Ionic build ios fails after installing cordova push plugin - ios

my ionic build ios fails after i install phonegap plugin :
it gives me this error
The following build commands failed:
CompileC build/example.build/Debug-iphonesimulator/example.build/Objects-normal/i386/PushPlugin.o example/Plugins/com.phonegap.plugins.PushPlugin/PushPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
ERROR building one of the platforms: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/wangeltamang/Documents/est_ionic/platforms/ios/cordova/build-debug.xcconfig,-project,example.xcodeproj,ARCHS=i386,-target,example,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/wangeltamang/Documents/est_ionic/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/wangeltamang/Documents/est_ionic/platforms/ios/build/sharedpch
You may not have the required environment or OS to build this project
what does the required environment is missing? I have latest xcode updated and cli versions
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.9.0
Xcode version: Xcode 7.2.1 Build version 7C1002

What is your output for cordova platform?
$ cordova platform
Installed platforms: ios 3.9.2
Available platforms: amazon-fireos, android, blackberry10, browser, firefoxos, osx, webos
With ios 4.0.0 I had the same error.
I changed the platform version and it worked.
$cordova platform remove ios
$cordova platform add ios#3.9.2

Related

IOS build failing in IONIC

I am getting “Error: doc.find is not a function” error when IONIC is trying to do IOS build.
IONIC is able to build Android successfully. Only issue is with IOS.
Ionic Info Output -
Cordova CLI - 7.0.1
Ionic CLI Version - 2.1.18
ios-deploy version: Not installed
ios-sim version: Not installed
OS: Windows 7
Node Version: v4.4.4
Xcode version: Not installed
Any help is appreciated.

Error installing ionic push plugin (for iOS) on windows

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.

iOS build failed after adding cordova fabric plugin

I added fabric plugin in my ionic 3 app. It's working in android but for iOS it has a problem.
When running ionic build ios --prod or ionic build ios I am getting following error:
/Users/abc/Library/Developer/Xcode/DerivedData/MyApp-
fgpvbdhjneqliicfyhoiuvrrhbfs/Build/Intermediates/MyApp.build/Debug-
iphonesimulator/MyApp.build/Script-FE794D9BFDB14C30B9E39200.sh: line 2:
/Users/abc/Desktop/NS: No such file or directory
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Fabric.io:\ Crashlytics
/Users/abc/Library/Developer/Xcode/DerivedData/MyApp-
fgpvbdhjneqliicfyhoiuvrrhbfs/Build/Intermediates/MyApp.build/Debug-
iphonesimulator/MyApp.build/Script-FE794D9BFDB14C30B9E39200.sh
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -
xcconfig,/Users/abc/Desktop/NS H iOS 2/platforms/ios/cordova/build-
debug.xcconfig,-workspace,MyApp.xcworkspace,-scheme,MyApp,-
configuration,Debug,-sdk,iphonesimulator,-destination,platform=iOS
Simulator,name=iPhone
5s,build,CONFIGURATION_BUILD_DIR=/Users/abc/Desktop/NS H iOS
2/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/abc/Desktop/NS H
iOS 2/platforms/ios/build/sharedpch
Ionic info:
Cordova CLI: 6.5.0
Ionic Framework Version: 3.0.1
Ionic CLI Version: 2.2.2
Ionic App Lib Version: 2.2.1
Ionic App Scripts Version: 1.3.0
ios-deploy version: Not installed
ios-sim version: Not installed
OS: macOS Sierra
Node Version: v6.10.2
Xcode version: Xcode 8.3.1 Build version 8E1000a
Please help.
Have you installed Fabric with CocoaPods? Here is the doc: https://fabric.io/kits/ios/crashlytics/install (Select Objective C).
This issue seems to be similar to this one that has been solved: Integrate Fabric/Crashlytics via CocoaPods
I hope It helps you.

Build Commands Failed Error Code 65 Ionic (iOS)

I'm using ionic to build my iOS app but im having this problem when running the command : "ionic build ios"
** BUILD FAILED **
The following build commands failed:
CompileC build/HR\ APP.build/Debug-iphonesimulator/HR\ APP.build/Objects-normal/i386/PushPlugin.o HR\ APP/Plugins/com.phonegap.plugins.PushPlugin/PushPlugin.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Error: Error code 65 for command: xcodebuild with args: -xcconfig,/Users/user/desktop/hr/platforms/ios/cordova/build-debug.xcconfig,-project,HR APP.xcodeproj,ARCHS=i386,-target,HR APP,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/user/desktop/hr/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/user/desktop/hr/platforms/ios/build/sharedpch
Try This command
phonegap plugin remove phonegap-plugin-push
I had this same issue,
I would like to let you know my machine local environment setup-
******************************************************
Your system information:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.0-beta.10
Ionic CLI Version: 2.1.8
Ionic App Lib Version: 2.1.4
ios-deploy version: Not installed
ios-sim version: 5.0.8
OS: OS X Yosemite
Node Version: v6.2.2
Xcode version: Xcode 7.2 Build version 7C68
******************************************************
It generally occurs when we took app raw code form some other machine and try to build.
When I search for that I came to know that this issue is taking place due of spaces from build path
Steps I followed-
Opened app config.xml in editor.
Renamed App name such as-
<name>Rername App Title</name>
$ cordova plugin save
$ cordova platform rm ios
$ cordova platform add ios
After this I just build the app
$ ionic build ios
And that worked for me, hope you will get your issue resolved too.
This link helped me a lot-
https://forum.ionicframework.com/t/ionic-build-ios-fails-android-works/10515/2
Note:- Make sure you have complete icon and splash of the app for each platform i.e-
ionic resources

Cordova push notification service not working in IOS device

i am wondering why cordova push plugin is not working in IOS device.IOS ver 9.3
I am using ionic push services.
Cordova CLI: 6.1.1
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: Not installed
ios-sim version: 5.0.6
OS: Mac OS X El Capitan
Node Version: v5.9.0
Xcode version: Xcode 7.3 Build version 7D175
It works on emulator and web but not in the device. It throws me this error
2016-04-11 04:51:52.385 example[1304:814527] Ionic Core: plugins are ready
2016-04-11 04:51:52.386 example[1304:814527] WARN: hideKeyboardAccessoryBar has been removed until a method is found that doesn't get rejected from the App Store.
2016-04-11 04:51:52.386 example[1304:814527] Ionic Push: register
2016-04-11 04:51:52.386 example[1304:814527] ERROR: Ionic Push (dev): error connecting development push service.

Resources