Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

iOS build failed when using plugin-push 2.3.0 #2845

Open
takhil opened this issue Oct 25, 2019 · 16 comments
Open

iOS build failed when using plugin-push 2.3.0 #2845

takhil opened this issue Oct 25, 2019 · 16 comments

Comments

@takhil
Copy link

takhil commented Oct 25, 2019

1:20:31.1560750Z Installing "phonegap-plugin-push" for ios
2019-10-25T21:20:31.3837980Z "framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
2019-10-25T21:20:32.8032650Z Failed to install 'phonegap-plugin-push': undefined
2019-10-25T21:20:32.8046410Z Failed to restore plugin "phonegap-plugin-push" from config.xml. You might need to try adding it again. Error: The CocoaPods repo has not been synced yet, this will take a long time (approximately 500MB as of Sept 2016). Please run pod setup first to sync the repo.

Ionic CLI 4.12.0

Cordova CLI version and cordova platform version

Cordova iOS - 5.0.1
Cordova Android - 9.0

cordova plugin version | grep phonegap-plugin-push 2.3.0

Ruby version - 2.3.7p

Reproducible with Cocoapods version 1.7.5 and 1.8.3

I'm about to submit app to stores. Did anyone had this issue before or any work around to fix this?

@GitToTheHub
Copy link

You should install CocoaPods manually, see here
I had a similar issue on a Mac with Cordova. It's not related to this plugin.

@takhil
Copy link
Author

takhil commented Oct 28, 2019

@GitToTheHub Thanks for reply. But when I run build command with verbose I below error

Plugins/phonegap-plugin-push/Pushplugin.m normal x86_64 objective c com.apple.llvm.clang.1_0.compiler (1 failure)

is this because of cocoapods ? or xcode ?

@GitToTheHub
Copy link

Have you first installed CocoaPods manually?
After that you should try

cordova platform remove ios
cordova platform add ios
cordova build ios

@DJmRek
Copy link

DJmRek commented Nov 13, 2019

Having the same issue on my CI pipeline. Is the only possible solution to manually get the git repo?

@takhil
Copy link
Author

takhil commented Nov 13, 2019

The work around solve my issue , at first I installed cocoa-pods globally in build machine and run npm install, and build iOS and Android.

@DJmRek
Copy link

DJmRek commented Nov 14, 2019

Yes the workaround worked for me too. But it slows down the build due to the repo cloning it performs. My build agent has a global 1.8.4 cocoapod installation. I've read about a change in cocoapod 1.8.x due to which the repo isn't nessesary anymore. The podfile needs a source on the new CDN instead
http://blog.cocoapods.org/CocoaPods-1.8.0-beta/

@GitToTheHub
Copy link

GitToTheHub commented Nov 14, 2019

You wrote

But it slows down the build due to the repo cloning it performs.

You don't have to clone the repo each time you build your app. It's only required once.

Thanks for the link with the new CDN. Didn't know it's no longer neccessary in new versions.

@DJmRek
Copy link

DJmRek commented Nov 19, 2019

Hi there, yes unfortunately we only have a hosted Apple build agent, so i can't persist the downloaded repository and have to clone it with every run. Do you think it might be worth of suggesting a pullrequest fixing the source in podfile and also updates the plugin.xml to the new tags?

The base problem seems to be in the cordova-ios platform.
apache/cordova-ios#700
But there is a fix on the way 😄
apache/cordova-ios#719

@GitToTheHub
Copy link

GitToTheHub commented Nov 22, 2019 via email

@Akkora
Copy link

Akkora commented Jan 28, 2020

I made it work by removing the platform, installing cocoapods and then adding the platform again.

Step by step:

cordova platform remove ios

brew install cocoapods --build-from-source

brew link --overwrite cocoapods

cordova platform add ios

@razam217
Copy link

razam217 commented May 4, 2020

@Akkora Thanks...

@arcreative
Copy link

The brew solution doesn't work for me--it causes many errors complaining about json and ffi not having pristine gems, even though the gems are fine...

@arcreative
Copy link

Actually, looks like this was an issue with my gemfile having an older version of cocoapods despite what I had installed on my system... man, the things that can go wrong with cordova!

@teuassuri2
Copy link

Help me please, I can't solve this problem

cordova platform add ios

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Using cordova-fetch for cordova-ios@^4.5.5
Adding ios project...
Creating Cordova project for the iOS platform:
Path: platforms/ios
Package: io.ionic.starter
Name: MyApp
iOS project created with cordova-ios@4.5.5
Installing "cordova-plugin-compat" for ios
Installing "cordova-plugin-device" for ios
Installing "cordova-plugin-file" for ios
Plugin dependency "cordova-plugin-compat@1.2.0" already fetched, using that version.
Dependent plugin "cordova-plugin-compat" already installed on ios.
Installing "cordova-plugin-file-transfer" for ios
Plugin dependency "cordova-plugin-file@4.3.3" already fetched, using that version.
Dependent plugin "cordova-plugin-file" already installed on ios.
Installing "cordova-plugin-fullscreen" for ios
Installing "cordova-plugin-geolocation" for ios
Installing "cordova-plugin-inappbrowser" for ios
Installing "cordova-plugin-ionic-keyboard" for ios
Installing "cordova-plugin-ionic-webview" for ios
apple-ios version check failed ("/Users/teuassuricardoso/Desktop/iOS Paz/platforms/ios/cordova/apple_ios_version"), continuing anyways.
Installing "cordova-plugin-splashscreen" for ios
Installing "cordova-plugin-statusbar" for ios
Installing "cordova-plugin-whitelist" for ios
Installing "cordova-plugin-x-socialsharing" for ios
Plugin dependency "es6-promise-plugin@4.1.0" already fetched, using that version.
Installing "es6-promise-plugin" for ios
Installing "cordova-plugin-youtube-video-player" for ios
Plugin "es6-promise-plugin" already installed on ios. Making it top-level.
Installing "mx.ferreyra.callnumber" for ios
Installing "phonegap-plugin-push" for ios
Failed to install 'phonegap-plugin-push': undefined
CordovaError: Promise rejected with non-error: '/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/universal-darwin19/rbconfig.rb:229: warning: Insecure world writable dir /Users/teuassuricardoso/Desktop/iOS Paz/node_modules/.bin in PATH, mode 040777\n/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:439:in help!': \u001b[31m[!] You cannot run CocoaPods as root.\u001b[39m (CLAide::Help)\n\n\u001b[4mUsage:\u001b[24m\n\n $ \u001b[32mpod\u001b[39m \u001b[32mCOMMAND\u001b[39m\n\n CocoaPods, the Cocoa library package manager.\n\n\u001b[4mCommands:\u001b[24m\n\n \u001b[32m+ cache\u001b[39m Manipulate the CocoaPods cache\n \u001b[32m+ env\u001b[39m Display pod environment\n \u001b[32m+ init\u001b[39m Generate a Podfile for the current directory\n \u001b[32m+ install\u001b[39m Install project dependencies according to versions from a\n Podfile.lock\n \u001b[32m+ ipc\u001b[39m Inter-process communication\n \u001b[32m+ lib\u001b[39m Develop pods\n \u001b[32m+ list\u001b[39m List pods\n \u001b[32m+ outdated\u001b[39m Show outdated project dependencies\n \u001b[32m+ repo\u001b[39m Manage spec-repositories\n \u001b[32m+ setup\u001b[39m Setup the CocoaPods environment\n \u001b[32m+ spec\u001b[39m Manage pod specs\n \u001b[32m+ update\u001b[39m Update outdated project dependencies and create new Podfile.lock\n\n\u001b[4mOptions:\u001b[24m\n\n \u001b[34m--silent\u001b[39m Show nothing\n \u001b[34m--version\u001b[39m Show the version of the tool\n \u001b[34m--verbose\u001b[39m Show more debugging information\n \u001b[34m--no-ansi\u001b[39m Show output without ANSI codes\n \u001b[34m--help\u001b[39m Show help banner of specified command\n\tfrom /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/lib/cocoapods/command.rb:47:in run'\n\tfrom /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.9.3/bin/pod:55:in <top (required)>'\n\tfrom /usr/local/Cellar/cocoapods/1.9.3/libexec/bin/pod:23:in load'\n\tfrom /usr/local/Cellar/cocoapods/1.9.3/libexec/bin/pod:23:in `

'\n'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.
cordova platform add ios exited with exit code 1.

Re-running this command with the --verbose flag may provide more
information.

ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]

macOS Catalina10.15.5 (19F101)

PushPlugin 2.3.0
Thanks for opting into telemetry to help us improve cordova.
8.1.2 (cordova-lib@8.1.1)

╭─────────────────────────────────────╮
│ │
│ Update available 8.1.2 → 9.0.0 │
│ Run npm i cordova to update │
│ │
╰─────────────────────────────────────╯

@teuassuri2
Copy link

I ran the command and got this new error

Mac-mini-de-Teuassuri:iOS Paz teuassuricardoso$ sudo chown -R teuassuricardoso /Users/teuassuricardoso/Desktop/iOS\ Paz

CordovaError: Promise rejected with non-error: 'The CocoaPods repo has not been synced yet, this will take a long time (approximately 500MB as of Sept 2016). Please run pod setup first to sync the repo.'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:30:15)
at process._tickCallback (internal/process/next_tick.js:68:7)
[ERROR] An error occurred while running subprocess cordova.

    cordova platform add ios exited with exit code 1.

@takhil
Copy link
Author

takhil commented Jul 13, 2020

@teuassuri2 - try installing cocoa-pods specific version globally and then npm install followed by ionic build would resolve issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

No branches or pull requests

7 participants