Monday, September 22, 2014

Manual install of apps on iPhone 6 simulator

Source:
https://forums.adobe.com/thread/1571152

Well, I'll describe what I did, but I don't know why exactly it works like this, nor can I guarantee it will work for you 
1. Install a native app on the simulator of choice (e.g. iPhone 6+) with Xcode 6.
2. Build the an ipa file for the simulator with Flash (this crashes Flash for me, but it builds the ipa before crashing), and unzip it so you can access the .app file in it.
3. Locate the directory of the simulator you want to use. In ~/Library/Developer/CoreSimulator/Devices you will find several folders (with names that look like hexadecimal), each with a simulator. Check the device.plist file in each to find the simulator you want. The one for iPhone 6+ contains the string "com.apple.CoreSimulator.SimDeviceType.iPhone-6-Plus".
4. In that folder, go to data/Containers/Bundle/Application, where you should see another folder with a hexadecimal name, containing the .app file of the native app installed in step 1.
5. Next to that folder, create a new folder for your app. I named that folder after the app bundle ID. Copy your .app file from step 2 into that new folder.
6. In the folder of the native app (step 4), open the hidden file named .com.apple.mobile_container_manager.metadata.plist and change the string under MCMMetadataIdentifier into your app's bundle ID. I didn't change the other stuff in there as I don't know what it means. Save this changed file into the newly created folder next to your .app file.
7. Open the simulator (located at /Applications/Xcode.app/Contents/Applications) and in it the chosen device in the hardware menu. On the 2nd page you should hopefully see your app icon. If not, then it means that one of the many other things I tinkered with had an effect as well...