15

I am trying to figure out how I can build/archive my iOS application in xcode so that I can send it to anyone and they can run in it a simulator. I thought I could just build it and run it in the simulator and pull the .app file however I have no luck. I would like to build it so anyone I give it to can run it in any simulator using the phonegap ios-sim.

Any information would be great!

Thanks

1
  • Have you looked into testflight? You can have external users test your app on actual devices. I am assuming you are asking this question because your testers don't have apple devices. In that case tell them to download Xcode for free from apple, install it and then zip up your entire project and send to them. Or stage it on github Commented Nov 8, 2014 at 18:14

5 Answers 5

31

All answers here are wrong.

You cannot run an .IPA file on the simulator. The simulator runs files which are compiled for the x86 processor, while IPA files are compiled for the ARM processor in the iPhone. Additionally .IPA files must contain a valid certificate while apps for the simulator do NOT need a certificate.

After building the app, go to the left side navigator bar, select Products > appName.app, right click it and select 'Show in Finder'. Finder will show the .app file and you can send the file to your colleague / client and ask them to drag and drop it into iOS Simulator.

Get ios .app folder for simulator

Sign up to request clarification or add additional context in comments.

3 Comments

This is by far the easiest way to get the .app file
app which is under products folder is debug build. How to we get release build?
@Balasubramanian You can change build configuration in Edit Scheme Panel (Product-> Scheme -> Edit Scheme -> left Build Panel -> Build Configuration)
4

If you have the .app bundle, you can create a tarball of it and send it to someone else. They can then extract it and use xcrun simctl install <device UDID> <path to app bundle> to install your app in the given simulator device.

4 Comments

This is not an answer to the question. "If you have the .app bundle...". The question is how to GET the app bundle, not how to start it in the simulator. You missed the point.
On the contrary, it does answer the question of how to share the app with others. Specifically note "so that I can send it to anyone and they can run in it a simulator" in the original question. It seemed obvious to me how to actually get the app bundle (just run 'xcodebuild -target <your app target> -sdk iphonesimulator' to build it) and perhaps the less obvious how to actually install it.
If you know in which folder XCode has stored the compiled app (which is the most difficult part for a beginner) you can simply put the "XYZ.app" folder into a ZIP file and send it to anyone. The other person can then simply drag and drop the content of the ZIP file onto the iOS simulator. No commandline magic is required for this.
Yep, we added that a couple years ago. As for the path of the app itself, just drag it out of the file navigator in Xcode.
4
  1. Build the app in simulator, then locate the simulator data folder. You can get the list of simulator UDID by typing instruments -s devices in Terminal. The UDID is the string between the square brackets. Locate your finder to ~/Library/Developer/CoreSimulator/Devices/[Simulator UDID]

  2. Inside your simulator data folder, locate to data/Containers/Bundle/Application , you will see some folder there if you have multiple apps built before, open them one by one and find the one with your app name inside.

  3. Compress the app_name.app and send it to others. Ask other to use the command instruments -s devices in terminal to find the UDID as well.

  4. Open Xcode and the selected simulator, then open terminal, type xcrun simctl install <Device UDID> <Path to unzipped app_name.app>

The app should install successfully in the simulator, I wrote a blog post about this with screenshot guide here : https://fluffy.es/how-to-archive-ios-app-for-simulator/

1 Comment

Your answer does not help. The folder "CoreSimulator" does not exist in "/Library/Developer". There are only "CommandLineTools" and "PrivateFrameworks". However your link is more useful than your answer. The first chapter on that "fluffy" page descibes how to do it.
3

First off you will need a release build (not a dev build) to share the installable simulator .app

To generate a Release build:

  1. make sure you go into edit scheme (next to the simulator selector)

  2. Under Run change the build configuration to Release

Then you can right click the app and go into the DerivedData//Build/Products/Release-iphonesimulator/.app

Copy the .app and share with whoever has xcode.

That person then needs to do a few things.

  1. Download your app and add it in a location that they can access the path. example: Users/<username>/Downloads/test.app

  2. Get the device ID xcrun simctl list devices example 7FAB6CD2-70D0-416F-9C50-4C7C23B2ABCD

  3. With a valid simulator id, run xcrun simctl install 7FAB6CD2-70D0-416F-9C50-4C7C23B2ABCD Users/<username>/Downloads/test.app

  4. The app should install and they should be able to open the app.

1 Comment

By the way you can also install an app by drag and drop onto a running simulator. Something to note: you'll likely need to build the .app file on the same processor as the destination so be careful for M1 vs Intel issues.
0

First of all set proper bundle identifier with build setting and iOS version which is required for run app.

**

For Device

** 1.

You can Build Archive using and generate ipa

or build app then you will get .app you can drag .app in itune and get .ipa by show in finder.

**

For Simulator

** 2. path:- /Users/Krishan/Library/Application Support/iPhone Simulator/6.0/Applications Open above path and zip app folder which you want to share.Now unzip folder paste on same above path app shown in simulator will run successfully.

2 Comments

This information is outdated and does not apply to Xcode 6.0 and newer.
The answer is wrong. An IPA file can only run on a real phone but NOT in the simulator.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.