Running .app file on iPhone Simulator - iphone

So I built my project and I have a .app file from my BUILD location. How can I run this on my simulator without using Xcode ?
I dont not wish to grab the .app file from iPhone Simulator files and pass it to another person. What I require is that, as soon as my .app file is built, I wish to use it to run in the iPhone simulator.
Any tricks ??

The excellent tool ios-sim does exactly what you want.

What I did is, put the .app file in the Users/Library/iPhoneSimulator.. directory and place it similar to the other apps present there.
Close and open the simulator again, and you will be able to see the app on the springboard.

Related

Look inside Apps folder

is there a way to navigate inside the folder structure in iPad or iPhone, check what is inside of any app folder? I tried already xcode but can not identify the folders. Thanks...
You can't do it on a real device, but you can have a look on the simulator. Up until iOS 7 each iOS version maintains it's own set of apps under
Library/Application Support/iPhone Simulator/7.1/Applications/
followed by a cryptic number representing your app. Replace 7.1 with another iOS version. To display the Library folder in Finder, click Go from the Finder menu while holding down Option.
Since iOS 8 those locations have moved and are harder to find. See here: http://pinkstone.co.uk/where-is-the-documents-directory-for-the-ios-8-simulator/
Yes, you can use programs like "iExplorer" which let you navigate your device even without jailbroken devices. I often use it to check that my app is correctly creating files according to my coded file structure.
You can see only contents of Documents Directory on Simulator or device. If you want to see documents directory in device then you have to set UIFileSharingEnabled key to YES in your application's Info.plist file. Then you can see it via iTunes app in Mac os x.
There is not way to see bundle contents in application. Just you can see bundle contents in xcode.
Regards.

How do I export my code into an app file? (iPhone)

I followed some simple "make your first iPhone app" guide.
I tried it in a emulator, and it worked fine, but how can I create the .app (or whatever the extension is) file?
You can either build it for distribution, or archive it, open the Organizer, and share it with the .ipa extension. I don't think .app is possible.
Xcode will automatically make the app for you. Look under products

Looking into app folders inside iPhone device

Is there any way I can see the folder stricture for my app inside iPhone? I have installed a app in my iPhone and have dumped a file inside documents directory. I wanted to see what all data I have in this folder. Is it somehow possible?
use the Xcode organizer.

Why isn't my iPhone app bundle replacing the old one during an update?

I'm starting with an app that has foo.png as a resource, and the app is installed (either in the simulator or on the device). If I delete foo.png, do a clean build, etc., and install, then it still shows up in the bundle on the simulator or device!
But I know the file isn't in the bundle before copying to the simulator or device (for example:
I can see it's not there in the build folder.
If I delete the app from the simulator or device, and then install, then foo.png doesn't show up on the simulator or device.
So it seems that when updating, it doesn't replace the app bundle; instead, it only copies new files and replaces updated ones. (I can confirm that it does, in fact, copy and replace files properly.)
Why isn't it replacing the entire app bundle?
If you update your application through iTunes using an ad hoc build you will see that your .app bundle will be replaced completely and old resources, such as the foo.png file described in the original post will be removed.
Reset the simulator, go up to the menu and then click reset simulator. I always have that problem with databases on the device. You will have to delete it on the device. Just a quirk that I've experienced as well.

iOS Question. Can I distribute the Xcode simulator versions of my app?

I would like to send someone the Xcode simulator version - not the device version - of my iPad app. I have located the .app file in the Finder. Do I just zip it up and send it off or is it more complicated than that?
Thanks,
Doug
UPDATE
Chrisbtoo got the answer on this one however he left of some critical bits for those of you trying this at home:
Path to Xcode simulator (the simulator can be run standalone.):
/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app
Path to app that appears in the home screen of the simulator:
/Users/turner/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID}
It is instructive to watch what happens in the app simulator directory as you build for simulation, delete apps from the simulator desktop and generally use the simulator as an actual device.
Bottom line: This is a viable approach for sharing apps in a "simulated" ad hoc manner without the mind numbing, soul sucking process of true ad hoc app sharing.
Cheers,
Doug
Assuming the other person already has the simulator installed, you can just zip up the stuff under ~/Library/Application Support/iPhone Simulator/3.2/Applications/{GUID} (includes both the .app and any data directories needed) and send it to them - they'll need to unzip it under that same directory. What I've done in the past was to rename the {GUID} part to a more friendly name - the sim will still pick it up.
If they don't already have the simulator, they will need to sign up for a free iphone dev account and download Xcode, etc.
We just put up a little tool that will help you with this. It manages both what you need on the dev side and also the tester.
Here it is
http://blog.placeit.net/ios-app-packager/
It basically creates a little zip that you can pass to the tester and it'll install the app in the right directory and also open it up for the user with the right device selected.
I would think you want to send the entire project folder to the other person- presumably you are expecting them to open it in their XCode- and presumably they have the sdk for the app.
You have to distribute via AdHoc or App Store for beta testing.
Become a developer and then look into how to do this.
You need to have a provisioning profile, and then select the UDID's for the device you want to beta test to.
Go to the iPhone Provisioning Portal
and here is a document with more detail