Build new iOS xcode project every time again?


#1

Hello,

I build a project on my windows pc. The App runs on Android perfect. Now I copied the source to a mini mac and build there a xcode prject with the commands:

ionic platform add ios
ionic build ios

Then i open the project with xcode. The app runs on my testing device without problems.

But when I now edit some details in the template files with xcode an re-run the project on my testing device, the changes doesn’t appears.

Do I have to build the xcode project every time new when I edit some small things?


#2

You don’t necessarily have to rebuild each time to see updates in the app. I recommend using ionic emulate ios -l -c --device to get around this for development though. This will run a live reload server and hook it up to the device (therefore it will only work while the server is running) but it’s great to tweak UIs, etc. in real time.

-l triggers live reload, -c puts all logs into the console and --device targets a device instead of emulator.


#3

@Laire You can use @emily 's method, or if you’re looking for the build route->

You do have to build. I personally use some traditional cordova commands so before I build I make sure my files are saved, then I do cordova prepare ios and then ionic build ios.

Or if you are in Xcode already after cordova prepare ios you can just build and run via Xcode, which I prefer because then you can get all the debug logs, profiling for performance, that kind of stuff.

I hope that helps!


#4

But when i want to release a update, I have to create a new xcode project or?


#5

To do a release for the app store, you have to do a full build with ionic build ios. The xcode project is automatically generated.


#6

So to confirm, the ionic build iOS command is run by Xcode when you do a ‘run’ ?


#7

Sorry my English is not so good.

I use "ionic build iOS " to build a xcode project and from xcode I publish the app.

When I make changes in the html files and want to upload an update, I build the xcode project again, publish the app with xcode and so on.

Right?


#8

That is what I have always done, but I was just wondered if actually Xcode runs ‘ionic build iOS’ when you hit run which would save a step each time :smile:


#9

According to the apache docs, “cordova build” does a “prepare”. cordova cli Hopefully, ionic build performs a cordova build


#10

Hi,
I had the same problem and running "cordova prepare ios " fixed this for me.
Is there a way to run this command automaticly using the Build pre-actions in xCode?