I am all of a sudden experiencing an issue where building and running on my device via Xcode is not building with the most recent changes. Ionic serve reflects the changes and Xcode was previously working. I am not sure what has gone wrong (I did recently create an archive, so I am not sure if that messed anything up). Anyways here the process I generally follow:
ionic build ios --prod (I have also tried “cordova prepare ios” or “npm run build ios --prod” here instead)
hit the “play” button on Xcode to run on my device
I have tried to delete the “www” folder of my project and have also tried to delete /users//Library/Developer/Xcode/DerivedData/ without any luck.
You Ionic CLI is quite old, especially [quote=“ssridhar582, post:1, topic:96919”]
Ionic App Scripts Version: 1.0.0
[/quote]
might cause problems in general in the build process. You might want to update this.
Have you tried ionic cordova run ios --prod (without cordova for your current CLI)? Doesn’t this run the app directly on your iPhone without the detour to Xcode?
I just figured it out…I just realized that ionic deploy was updating it to a previous snapshot (stupid me! - I didnt catch that earlier). I performed an ionic upload and it appears to be working.
Thanks for letting me know about my cli/app scripts being outdated. Will updating the CLI update the app scripts? Also is the most recent version of the CLI stable or should I get a slightly older one?
Also, you are right ionic run ios --prod does work (detouring around Xcode) although I want to have Xcode working for when I want to deploy to the app store (I feel like signing is more straightforward that way).
No, the CLI is global and app-scripts part of your project.
Run npm install -g ionic and npm install --save-dev @ionic/app-scripts to update both.[quote=“ssridhar582, post:3, topic:96919”]
Also is the most recent version of the CLI stable or should I get a slightly older one?
[/quote]
Pretty stable. Some commands changed in 3.x, so read the changelogs.[quote=“ssridhar582, post:3, topic:96919”]
Also, you are right ionic run ios --prod does work (detouring around Xcode) although I want to have Xcode working for when I want to deploy to the app store (I feel like signing is more straightforward that way).
[/quote]
Fair enough. For me Xcode sometimes messes stuff up though.
it seems that you use ionic cordova plugin and that’s why it runs the version uploaded to ionic branch master so the solution is to remove the plugin with running : ionic cordova plugin rm ionic-cordova-plugin
otherwise you have to commit you changes to ionic repository (production/dev)
I it necessary to have a project connected to xCode? Its infuriating. It constantly reverts my builds to random old versions or makes them listen to different deploy channels and changes update methods. And reverts to old app store icons
I can’t remember why it was necessary in the first place, but it must have been for a good reason? It seems to make development twice as long trying to chase down whatever it has done now.