I'm developing an app in Ionic for iOS and Android, added both platforms to the project.
I'm getting the following when I add the push plugin. It installs for android, but not for iOS
ionic cordova plugin add phonegap-plugin-push --save
> cordova plugin add phonegap-plugin-push --save
× Running command - failed!
[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.
[ERROR] An error occurred while running cordova plugin add phonegap-plugin-push --save (exit code 1):
Installing "phonegap-plugin-push" for android
Subproject Path: CordovaLib
Installing "phonegap-plugin-push" for ios
Failed to install 'phonegap-plugin-push': undefined
Error: WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
Consider adding the following to ~/.profile:
export LANG=en_US.UTF-8
C:/Ruby22-x64/lib/ruby/gems/2.2.0/gems/claide-1.0.2/lib/claide/command.rb:439:in `help!': [!] You cannot run
CocoaPods as root. (CLAide::Help)
Here is the ionic info
PS D:\scripturi\Ionic\dangle> ionic info
#ionic/cli-plugin-cordova : 1.6.2
#ionic/cli-plugin-ionic-angular : 1.4.1
#ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.0
System:
Node : v7.2.1
OS : Windows 10
npm : 3.10.10
Tried removing the platforms and adding them back.
Any suggestions how to fix this?
The iOS verison of the plugin requires a CocoaPod (Firebase) to be installed. CocoaPods are used to manage ObjC and Swift dependencies and are only available in OSX environments, so it's quite expected that the plugin install fails on windows.
I'd suggest you remove the iOS platfom when developing on a windows machine.
Related
I am working on a project written in AngularJS, Cordova, and Ionic.
When I try to build my project in XCode to put on the apple store I get this error:
Strip /Users/swdev/Library/Developer/Xcode/DerivedData/Self_Service-dmwurawdbtvnmpgdsjvsyxoxafvo/Build/Intermediates.noindex/ArchiveIntermediates/Self\ Service/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a (in target 'CordovaLib' from project 'CordovaLib')
cd /Users/swdev/Documents/SelfServiceApp/platforms/ios/CordovaLib
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip -S -T /Users/swdev/Library/Developer/Xcode/DerivedData/Self_Service-dmwurawdbtvnmpgdsjvsyxoxafvo/Build/Intermediates.noindex/ArchiveIntermediates/Self\ Service/IntermediateBuildFilesPath/UninstalledProducts/iphoneos/libCordova.a
fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip: can't open temporary file: /tmp/strip.AH03t9 (No such file or directory)
Command Strip failed with a nonzero exit code
ionic info
Ionic:
Ionic CLI : 5.0.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic1 1.3.5
#ionic/v1-toolkit : 1.0.22
Cordova:
Cordova CLI : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 8.1.0, ios 5.0.1
Cordova Plugins : no whitelisted plugins (15 plugins total)
Utility:
cordova-res : not installed
native-run : 0.2.5
System:
Android SDK Tools : 26.1.1 (/Users/swdev/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.2
NodeJS : v10.16.3 (/usr/local/bin/node)
npm : 6.11.3
OS : macOS Catalina
Xcode : Xcode 11.0 Build version 11A420a
cordova requirements
Requirements check results for ios:
Apple macOS: installed darwin
Xcode: installed 11.0
ios-deploy: installed 1.9.4
CocoaPods: installed 1.8.0
Check that /tmp folder exists and you have writing permission
I have problem with ionic cordova build for iOS.
When I use command:
ionic cordova build android -dev
build ends successful (sometimes only the second time), but build for ios always ends with this error:
cat: no paths given
[xmldom error] invalid doc source
##[line:0,col:undefined]
Error: Cannot read property 'documentElement' of undefined
[ERROR] An error occurred while running cordova build ios --debug (exit code 1).
I'm don't have any idea where is a problem.
My ionic info:
cli packages:
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.2.0
Cordova Platforms : android 6.4.0 ios 4.5.5
Ionic Framework : ionic-angular 3.3.0
System:
ios-deploy : 1.9.2
Node : v8.9.4
npm : 5.1.0
OS : macOS High Sierra
Xcode : Xcode 9.4 Build version 9F1027a
Environment Variables:
ANDROID_HOME : /Users/jenkins/Library/Android/sdk
Misc:
backend : pro
I'm working with Ionic 3, iPhone 7 plus, iOS 11, and trying to build for iOS. When running ionic cordova build ios I'm getting this error. I've tried to remove and add the platform multiple times, without any result.
** ARCHIVE FAILED **
The following build commands failed: Ld
/Users/user/Library/Developer/Xcode/DerivedData/app-appdahiizzsdsdsdddoqgtygiuoqxm/Build/Intermediates.noindex/ArchiveIntermediates/app/IntermediateBuildFilesPath/Fishtank.build/Debug-iphoneos/app.build/Objects-normal/arm64/app
normal arm64 (1 failure) Error: Error code 65 for command: xcodebuild
with args:
-xcconfig,/Users/user/Documents/app/Development/app/platforms/ios/cordova/build-debug.xcconfig,-workspace,app.xcworkspace,-scheme,app,-configuration,Debug,-destination,generic/platform=iOS,-archivePath,app.xcarchive,archive,CONFIGURATION_BUILD_DIR=/Users/user/Documents/app/Development/app/platforms/ios/build/device,SHARED_PRECOMPS_DIR=/Users/user/Documents/app/Development/app/platforms/ios/build/sharedpch
[ERROR] An error occurred while running cordova build ios (exit code
1).
Here's my ionic info:
cli packages:
#ionic/cli-utils : 1.15.2
ionic (Ionic CLI) : 3.15.2
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 2.1.3
Cordova Platforms : ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
ios-deploy : 1.9.2
ios-sim : 5.0.12
Node : v7.10.0
npm : 4.2.0
OS : macOS Sierra
Xcode : Xcode 9.0 Build version 9A235
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy
if your xcode account isn't "agent" try this way:
when run ionic cordova build ios disconnecting your iphone from your mac
I developed an ionic 3 application on the windows operating system (Windows 8) build the app for android and everything work fine.
Then I need to build for iOS , so I copied the project to MacBook to build for IOS.
I have run the latest npm but when I run
ionic Cordova emulate ios --target="iPhone-X"
it load the simulator but then displays the error below
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
logPath: /Users/lekan/desktop/testProject/platforms/ios/cordova/console.log
What are my doing wrong
Below is my ionic info
ionic info
Result
cli packages: (/usr/local/lib/node_modules)
#ionic/cli-utils : 1.15.2
ionic (Ionic CLI) : 3.15.2
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
#ionic/app-scripts : 3.0.0
Cordova Platforms : android 6.2.3 browser 4.1.0 ios 4.5.2
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.11.4
npm : 3.10.10
OS : macOS Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I cant find the error for
ionic Cordova emulate ios
but if you go there
platforms/ios/cordova and click on run file the simulator work perfectly
** EXPORT FAILED **
Error: Error code 70 for command: xcodebuild with args:
-exportArchive,-archivePath,MyApp.xcarchive,-exportOptionsPlist,/Users/yeezy/cbe/platforms/ios/exportOptions.plist,-exportPath,/Users/yeezy/cbe/platforms/ios/build/device
this my ionic info;
global packages:
#ionic/cli-utils : 1.3.0
Cordova CLI : 7.0.1
Ionic CLI : 3.3.0
local packages:
#ionic/app-scripts : 1.3.7
#ionic/cli-plugin-cordova : 1.3.0
#ionic/cli-plugin-ionic-angular : 1.3.0
Cordova Platforms : ios 4.4.0
Ionic Framework : ionic-angular 3.3.0
System:
Node : v6.10.3
OS : macOS Sierra
Xcode : Xcode 8.3.2 Build version 8E2002
ios-deploy : 1.9.1
ios-sim : 5.0.13
somebody help?
I ran into a similar problem with my ionic1 test app. What happened to me was first I had to change the development team in xcode. Then, still in xcode, I updated the bundle identifier. Finally to resolve my issue I changed the config.xml file that is at the root of my ionic app. I changed the id attribute of the widget element to match the bundle identifier that I set in xcode.