iOS build failed after adding cordova fabric plugin - ios

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.

Related

Phonegap-nfc plugin causes build to fail on xcode

I am using ionic 5 capacitor and i am trying to get phonegap-nfc plugin to work. It works fine on android but while building with xcode building fails.
Steps to reproduce with fresh project (selected Angular framework when it was asked):
ionic start myApp blank --capacitor
cd myApp
ionic build
ionic capacitor add ios
npx cap open ios
It opens in xcode and i can build and run project on simulator just fine. Then i install phonegap-nfc plugin:
npm install phonegap-nfc
npm install #ionic-native/nfc
ionic cap sync
When i try to build again i receive semantic issue with cordovaplugins. There are 5 errors in NfcPlugin.m file saying 'new' is unavailable with note saying 'init has been explicitly marked unavailable here. How to fix this issue?
Some version info of my system:
Xcode version: 12.5 (12E262)
macOS version: Big Sur 11.3
node version: 16.0.0 (also tried with 10.16.0)
npm version: 7.10.0
Screenshot of xcode errors
I will answer my own question as i happened to find solution. I dont what is broken in xcode 12.5, but uninstalling xcode 12.5 and installing xcode 11.7 i was able to build succesfully and scan NFC tags.

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.

ionic platform add ios failed

When I try to run
ionic platform add ios
it fails with following error:
Couldn't find ionic.config.json file. Are you in an Ionic project?
Yes, I'm in an ionic project, called todo.
What do I do to fix this?
FYI, here is ionic info output:
Cordova CLI: 6.3.1
Ionic Framework Version: 1.3.1
Ionic CLI Version: 2.0.0
Ionic App Lib Version: 2.0.0
ios-deploy version: 1.9.0
ios-sim version: 5.0.8
OS: Mac OS X El Capitan
Node Version: v6.3.1
Xcode version: Xcode 7.3 Build version 7D175
Found a solution from this post in ionic forum.I'm just leaving the summary of the solutions if anyone needs it:
Solution 1:
Open a text editor.
Write following lines:
{
"name": "todo",
"app_id": ""
}
Note: app_idyour ionic cloud id. If you don't have one, leave it as is.
Save it as ionic.config.json in todo project directory.
Solution 2:
move to parent directory using cd ..
remove project directory using rm -r todo/. (caution: save your changes before removing).
create new project using ionic start todo blank command.
Restore your changes.
If the stated solutions don't work for you, uninstall and re-install ionic and Cordova/PhoneGap and try again.

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

Ionic build ios fails after installing cordova push plugin

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

Resources