Automated Device Installs

It never takes too long, but I was wondering if anyone’s had some success with automating the build and/or device installation processes when working with Corona?

At the moment I have a series of steps I have to go through, and I’d like to automate one or more of them.

  1. Select appropriate provisioning profile

  2. Rename app (sometimes the source code is just in a folder named ‘src’ which isn’t that great for naming

  3. Build

  4. Uninstall old app from device

  5. Copy app into iPhone Configuration Utility (which I guess just replaces the copy of the app in ~/Library/MobileDevice/Applications

  6. Install new version on app

Ideally I’d like to have one command which perhaps reads from some config file in the project directory which does steps 1-6 for me. But I guess that won’t happen without some changes to Corona (though an NPM style package.json file would be really neat, in fact why not use build.settings?), surely though I ought to be able to automate 4-6, right? If 5 is as simple as I think, it’s trivial. I’m curious though whether I can push apps to the device from the command line.

So I was wondering, was anyone found any good tools for doing that, or any useful command line tools which might help? Ideally I’d like to use an existing workflow or process rather than write my own.

The Corona SDK build dialog should remember the last provisioning profile used for that build.  As for folder names, I always name the folder where my main.lua based on what I want the app to be named.  That means my folder structure will have:

   Projects/My Super App/My Super App

in them since I put resources, marketing info, etc in the higher level folder.  

For 4, 5 and 6, I would encourage you to use Xcode’s Organizer for this.   You can either drag-and-drop to install, (write over) the app, or if you need to delete because you need to clear the sandbox, it’s easy to delete the app from there.  

So CMD-B, click away the final dialog box, CMD-Tab to Xcode, drag and drop the build, click okay to overwrite.  Easy.

I would suggest that you goto:   http://feedback.coronalabs.com and add this as a feature request there.  

Hi Rob,

Thanks for pointing me to the xCode organiser, that seems a lot nicer than the iPhone Configuration Utility that I’ve been using and solves a lot of the associated problems.

There is a fully automated build utility available for enterprise subscribers (mainly for integration with build systems like jenkins). I would reach out to sales if that really interest you.

On the device side, you should take a look at a utility called fruit strap if the xcode organizer isn’t doing what you want.

Hi Seanh, 

Thanks for the tip - Fruit Strap looks great, though it’s marked as being no longer maintained. I’ll keep my eye on it, anything that lets you do stuff using the command line alone is prime for automation. 

Hi Seanh, 

Fruitstrap’s worked really well for me, thanks again for the tip. Using an Alfred workflow, I’ve got it set up now that with an .app file selected, I can now just select Fruitstrap and the file’s path is passed into the following script as the {query} parameter:

[lua]

cd ~/libs/fruitstrap

./fruitstrap -b {query}

rm -rf {query}

[/lua]

Updating has suddenly become even easier and cleaner!

If you take a wonder through the network section of the main repo you’ll find that a lot of other people have picked up maintenance for it.  https://github.com/ghughes/fruitstrap/network

The Corona SDK build dialog should remember the last provisioning profile used for that build.  As for folder names, I always name the folder where my main.lua based on what I want the app to be named.  That means my folder structure will have:

   Projects/My Super App/My Super App

in them since I put resources, marketing info, etc in the higher level folder.  

For 4, 5 and 6, I would encourage you to use Xcode’s Organizer for this.   You can either drag-and-drop to install, (write over) the app, or if you need to delete because you need to clear the sandbox, it’s easy to delete the app from there.  

So CMD-B, click away the final dialog box, CMD-Tab to Xcode, drag and drop the build, click okay to overwrite.  Easy.

I would suggest that you goto:   http://feedback.coronalabs.com and add this as a feature request there.  

Hi Rob,

Thanks for pointing me to the xCode organiser, that seems a lot nicer than the iPhone Configuration Utility that I’ve been using and solves a lot of the associated problems.

There is a fully automated build utility available for enterprise subscribers (mainly for integration with build systems like jenkins). I would reach out to sales if that really interest you.

On the device side, you should take a look at a utility called fruit strap if the xcode organizer isn’t doing what you want.

Hi Seanh, 

Thanks for the tip - Fruit Strap looks great, though it’s marked as being no longer maintained. I’ll keep my eye on it, anything that lets you do stuff using the command line alone is prime for automation. 

Hi Seanh, 

Fruitstrap’s worked really well for me, thanks again for the tip. Using an Alfred workflow, I’ve got it set up now that with an .app file selected, I can now just select Fruitstrap and the file’s path is passed into the following script as the {query} parameter:

[lua]

cd ~/libs/fruitstrap

./fruitstrap -b {query}

rm -rf {query}

[/lua]

Updating has suddenly become even easier and cleaner!

If you take a wonder through the network section of the main repo you’ll find that a lot of other people have picked up maintenance for it.  https://github.com/ghughes/fruitstrap/network