Crashlytics not working with ionic framework - ios

I am having an iOS ionic application in which I am trying to incorporate crashlytics, for that I have added cordova crashlytics plugin.After that I launched the Fabric application and selected new application > projects xcode file > install crashlytics
after this step I added a run script build phase with the code in the fabric application and then build and run the application using xcode, but nothing is happening in the fabric application.
Attaching the screenshot.

I faced similar problem trying to integrate Crashlytics into an Ionic app. The following worked for me.
Install the cordova-fabric-plugin:
ionic plugin add cordova-fabric-plugin --variable FABRIC_API_KEY={api-key} --variable FABRIC_API_SECRET={api-secret} --save
This will automatically add a build phase script to the XCode Project.
Build and Run the project. The build phase script uploads a dSYM file which Crashlytics uses to process the crashes.
The first run after build is important as it identifies the build with the Crashlytics platform.

Related

defining the architecture specific cordova plugin libraries to use in capacitor/react project

As has been mentioned in https://github.com/cordova-rtc/cordova-plugin-iosrtc/blob/master/docs/Building.md#apple-store-submission in order to submit the app to App Store we need to strip simulator (i386/x86_64) archs from WebRTC binary and as the very last step to do so it says:
Remove ios cordova platform if already added and add ios platform again (e.g. with a command cordova platform remove ios && cordova platform add ios) or remove and add only the plugin at your own risk.
I have a capacitor/react project in which I am using the above mentioned cordova plugin. And unfortunately you can not use cordova commands in capacitor/react environments!
How can I invoke such command in a capacitor/react project or is there any equivalent steps I can take to get the same result?
Those are cordova instructions, for Capacitor just run npx cap update ios or npx cap sync ios

Error on running a Ionic 3 App in Xcode "Property 'isPairedWatchExist' not found on object of type 'AppDelegate"

I'm trying to run a app build on Ionic 3 on Xcode.
The app was running fine o Xcode in June when I have made and publish i Apple Store.
Now when I try to run the app on Xcode I receive this error "Property 'isPairedWatchExist' not found on object of type 'AppDelegate".
I receive the error from a file called CDVAppleWallet.m coming from the plugin cordova-apple-wallet that we use in application
https://imgur.com/7mxAR85
I have tried to:
run npm install;
uninstall the cordova apple wallet plugin and install it again;
event the plugin is uninstalled we receive the error;
I have deleted all the plugins and node modules and reinstall them again.
I had this too, and I did a few things but not sure which ones solved it:
Removed platform, and re-added ios
ionic cordova platform rm ios
ionic cordova platform add ios
Fixed signing in Xcode, exited
Did a build in CLI
ionic cordova build ios --prod --release
Opened Xcode again, clicked "Clean Build Folder"
The error disappeared after that

Ionic build fails Info.plist not found

Apple has tricked me and even though I disabled autoupdates it now pulled the most recent XCode version (Version 10.0 (10A255)) and dependencies. The effect is that I can not build my app anymore, even after removing (ionic cordova platform remove ios) and re-adding the platform.
It now fails with the error below.
onic cordova run ios --debug --target="iPhone-8" --consolelogs
...
<path>/platforms/ios/build/emulator/MyApp.app/Info.plist file not found.
[ERROR] An error occurred while running cordova run ios --debug --target iPhone-8 (exit code 1).
ionic --version
3.20.0
---- EDIT
ran with verbose and received :No scripts found for hook "before_deploy". as additional info for the failure.
----- EDIT ------
Please look here for more detail. I was able to reproduce it from scratch / a blank app template
Blank app fails debug build - /Info.plist file not found
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
Try this command it should work,this is issue with cordova.
If you're building on the command-line, try this
ionic cordova emulate ios -- --buildFlag="-UseModernBuildSystem=0"
or
Xcode 10
If you are opening the project in the Xcode IDE, you need to change the build system in Workspace Settings to "Legacy Build System"
Xcode example
Now, You can also run this on command-line $ionic cordova build ios
Best of luck

Xcode does not include changes in rebuild of cordova app

I am experiencing the problem that Xcode does not incorporate any changes made to HTML/CSS/JS files when rebuilding the app for iOS
Right now I am deleting the whole platforms/ios folder and rerunning cordova add platform ios every time. This can't be the intended way of testing cordova apps. What is a good workflow for testing cordova apps on an iOS device?
Well, the recommended workflow for testing Cordova apps is not using Xcode at all, just use the Cordova CLI to run your apps. But the truth is that running from the CLI might be slower than using Xcode.
What you need to copy the changes from www to the Xcode project is to run cordova prepare ios before running from Xcode. You can do it manually or create a Xcode build script to run it for you.
To add a build script, on Xcode select your project target, go to Build Phases, click the + button and select New Build Script phase.
You can try to just add cordova prepare ios and this might work.
If you get a cordova command not found, then you also need to add Cordova path to your PATH. To do it, open a terminal and type which cordova, you'll get the Cordova path, something like /Users/davidnathan/.nvm/versions/node/v4.4.7/bin/cordova.
Now add that path without the cordova part to your build script before the cordova prepare ios, something like
PATH=/Users/davidnathan/.nvm/versions/node/v4.4.7/bin/:$PATH && cordova prepare ios
Move the build script to be over the existing "Copy www directory"
Try ionic cordova prepare ios.

How to include phonegap application in the iOS

I am creating a phonegap application in ios and i am following below mentioned link
http://docs.phonegap.com/en/1.9.0/guide_getting-started_ios_index.md.html
It is said in the link that we need to download the phone gap, which i had done already
and then click on the cordova based application, but in my app I am not getting the options
to select the same.
So can anyone suggest how it can be done?
PhoneGap installation process has been changed. You will not get any template in Xcode and we can do is creating app in terminal
List of this you need to install phoneGap are
1. node.js
2. cordova
3. phonegap
first install node.js and then phone gap/cordova
once your installation is completed open terminal and then create a cordova based application
use this for creating process
http://cordova.apache.org/docs/en/3.3.0/guide_cli_index.md.html
this for plugins
http://docs.phonegap.com/en/3.4.0/cordova_plugins_pluginapis.md.html#Plugin%20APIs
cd to your workspace
cd /Users/xxxx/Desktop
create cordova project
cordova create your-project-name
cd to your project
cd your-project-name
add ios platform
cordova platform add ios
build your project using cordova build
cordova build ios
done !!
Reference: http://blog.revivalx.com/2014/02/21/crud-operation-using-jquery-mobile-on-android-part-1/

Resources