When I run cordova on ios it keeps building my old app - ios

I started a cordova project a while again and needed to do a major update so I cloned the folder and rebuilt the app. I deleted the old xcode project and cordova app but when I run:
cordova run ios --device
it keeps bring up my old app even though its deleted and no where to be found. If I run it in xcode and target my device it works fine? Is there some kind of caching I need to delete?

It is an issue with xcode 10 and cordova 8. This fix is to use this instead:
cordova run ios --buildFlag='-UseModernBuildSystem=0'

Related

Xcode running iOS app without updated code. Ionic live reload not working

ionic cordova emulate ios -l <target>
Does not work for me. I get an error suggesting that I am targeting the wrong device even though the device I am targeting is listed as a virtual device when running the command:
ionic cordova emulate --list
When I run the app with Xcode instead it works however it does not reload my edits, even if I stop and start the app again.
*** disclaimer: this is both a quick and dirty solution to the aforementioned issues ***
Before running your app in Xcode (pressing the play button), in your project directory run the following command:
ionic cordova prepare ios
This will load your changes and update your app in Xcode before running it in your emulator so you can then debug and see your edits.
Open to suggestions if anyone has a more direct solution!
Try:
cleaning the build folder in Xcode: cmd+shift+k
In the "Device" menu of Simulator, click "Erase All Content and Settings"
Quit Xcode, simulator and whatever program you are running the emulate command in
Reboot the machine

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

Xcode Simulator using cached files

I am running a Cordova app and when I open it using Xcode (iOS Simulator) it shows the updated code files in Project Navigator. I then run Product -> Clean and run the code on the simulator but it still uses a previous version of the HTML/JS files.
How do I get the simulator to build again from the updates source files? It seems they are somehow cached and I can't seem to get it cleared.
Use cordova build ios first and then run the app in simulator.

Upload cordova app to the Apple store with Xcode 10

I noticed that Cordova is not compatible with the latest version of Xcode 10. To test the app I use this command:
cordova run ios --buildFlag='-UseModernBuildSystem=0'
and it works all correctly. I would like to know if it is possible to load applications built with the old Xcode system on the app store.
Using XCode legacy build system works completely fine when uploading to the AppStore. I still maintain an ionic 1 project that way.
Also, might I suggest checking out the release notes on the new build system which might answer some of your questions: https://developer.apple.com/documentation/xcode_release_notes/xcode_10_release_notes/build_system_release_notes_for_xcode_10

I can’t get my iOS project to build my changes

I'm new to the iOS side of things and I’m having a huge issue. None of my changes I am making to my views are being built when I build iOS. I run
sudo cordova build ios
Then I open Xcode and “sign” it. I then run from Xcode to my test device. But no changes are made. Even when I remove the iOS platform, add it back, rebuild iOS, run from Xcode, my changes still have not taken effect in the build. Am I missing something?
After you update your view, the process is:
1. build the components and pages and copy the result into www dir.
2. copy the contents in www into ios project, with ionic prepare command.
3. build your ios project.
With the latest version of ionic, it will be done one one command ionic cordova build ios, but if you use some old version of ionic, maybe you need to run:
ionic build
ionic cordova build ios

Resources