While attending the JAMF Regional User Conference, last week, one of the discussions was related to distributing apps. I was asked to provide the workflow that we use to distribute App Store apps, as In-House apps.
As you’re probably well aware, Apple does not provide an easy way to distribute App Store apps to your iOS devices without it either A) Being free, or B) Using all of your redemption codes that have been purchased via VPP. This is troublesome when you want to regulate app updates for your devices. This is even worse when you have multitudes of devices (in our case it’s around 1500). If you’re in a boat similar to ours, you may have found yourself wanting to have a little more control over the whole process. The following steps will allow you to upload App Store apps as In-House apps in JSS.
App Prep
Make sure you have the latest version of Xcode installed.
If you want to maintain full control, each device will need to be initially set up under the same iTunes account (for this example will say user@domain.com).
For proper licensing reasons, you will need to be enrolled into Apple’s VPP program. Purchase the number of licenses you may need. Once purchased, you’ll be provided with your list of redemption codes.
Back in iTunes, using the user@domain.com account, redeem one code for each app you purchased. If there any free apps to purchase, download those as well. What we’re trying to do here is make sure that account being used is the same on the device and for the apps being purchased.
You should now have a few (or many) apps downloaded at located at ~/Music/iTunes/Mobile Applications. From here, I ended up copying the Mobile Applications folder, to my desktop, just in case something goes wrong in the process. It’s up to you as to which folder you want to work from, but I worked from the copied folder. To accelerated part of the process, I utilized an Automator workflow. a. Ask for Finder Items i. Prompt - Leave empty ii. Start at – Since my folder is on the desktop, Desktop was chosen iii. Type – Files, and Allow Multiple Selections is checked b. Replace Text i. Drop Down Menu – Replace Text ii. Find - .ipa in full name, and ignore case iii. Replace - .zip c. Run the workflow and select all of the apps. This will change the file extension for ipa to zip.
Open your folder, select all of the zipped files, and press Command + O to open all of the files. This will extract the data and create a folder for each.
Run the Automator workflow again, but swap .zip and .ipa. This will change the extension back on the apps.
Back in the folder, select all the items, and expand the folders. You’ll understand why in a second.
Edit the Automator workflow once again. This time, Find iTunesArtwork, and replace it with iTunesArtwork.jpg. When you run and it asks you where to look, open the folder as you have before, but since all of the folders are expanded, press Command + A to select all. This will save time instead of needing to click each individual one. It will then add the extension to the files. The iTunes Artwork file is the image file used for the icon you see on your iOS device.
Go to developer.apple.com. You’ll need to do these steps for each app you’ll be uploading into JSS. a. Go to the iOS provisioning portal b. Create a new App ID i. Provide the name of the app you’ll be uploading to JSS (for example Office2 HD) ii. Use Team ID iii. Enter a bundle identifier com.organization.appname c. Go to the Provisioning Section, then Distribution, and create a New Profile. i. Distribution Method – In House ii. Profile Name – Name of App iii. Check the box for Distribution Certificate iv. Select the App ID that corresponds with the on you created in step b. v. Submit, refresh, and download the provisioning profile.
JSS
Log into the JSS
Click Management, then Mobile Device Profiles. a. Upload your provisioning profiles. You’ll have to do each one individually.
With the profile(s) uploaded, go back to Management, and select Mobile Device App Catalog
Click Add App, select In-House App, and click Continue
In the folder that contains your apps, open the corresponding folder of the app you wish to upload. From there you should find a file titled iTunesMetadata.plist. Double click this file; it should automatically open in Xcode.
Enter the App name exactly as it is provided in iTunes
With the iTunesMetadata file open, find the line item titled softwareVersionBundleID. Copy the string information and paste it into the Bundle ID section.
Lood for the line item titled bundleVersion. Copy and paste this information in the Version section.
Deployment – This can be set to your own discretion. We set it to Make Available in Self Service.
Deploy as managed app, remove app when MDM profile is removed, and Prevent backup – Again, set these options to your own discretion.
Description – In our environment we have two iTunes accounts, one for staff devices, one for student. Since some of the apps are the same, but use different iTunes accounts, we used the Description section to help us identify which was which.
Icon – Upload Icon. You will need to Browse… to the folder related to the app, and select the iTunesArtwork.jpg. Click Upload Selected File
Click Upload App Archive – Browse and select the app you to upload, and click Upload Selected File…
Select the provisioning profile that you uploaded to the app.
Set up your Scope. Click Save
From here, you can go to an enrolled device and open Self Service. If the app has not been installed on the device, it will be available in the In-House Apps section. If it has already been installed, an it is an update, you’ll find it in the Updates section.
When it comes to updating the apps in JSS, the two items you’ll need to change are the Bundle Version, and the App Archive File. The rest can stay the same.
Some things to Note:
1. The steps for the provisioning profiles may change. I’m still doing some testing to see if one provisioning profile can be used for all apps, instead of one for each.
2. Some of my Windows skills are a tad rusty, and I’m aware that some of the steps won’t work for you if you’re doing this from a Windows machine. The majority will work, but the location of your mobile apps “should be”, My Documents/Music/iTunes/Mobile Applications. If someone has a process that works like the Automator tasks, let me know.
3. When uploading app archives to JSS, the system does not properly recognize file names such as, Office² HD.ipa. You’ll need to change the file name so that it reflects as Office2 HD.ipa. The file name won’t change what the devices see.
4. Make sure to keep track of the apps you've purchased, and how many devices you've installed them on. You should only install for the number of codes you have.
I know this is a lot of information. Hopefully you find it useful. If you have questions, don't hesitate to ask, and I'll answer them as best I can.
