Is it possible to run iOS simulator on a Mac without Xcode installed? - iphone

There are a few questions relating to this topic but nothing quite the same when it comes down to the details:
We would like to use the iOS Simulator without installing the rest of XCode on a macbook. It is an in-house laptop, and will be used by employees, but not engineers.
We already know how to run applications on the simulator without the source code and compiling required, but it would be nice to be able to install a 100MB app and application support that can run our in-house distribution app as opposed to a 2.4GB XCode installation. Any ideas? Thanks.

The Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg. Then you can experiment with deleting the hopefully "unneeded" directories. Be prepared to start over if you delete something that the Simulator requires.

You would have to extract the Simulator pkg from the Xcode DMG. The only thing is that the Simulator depends on having an SDK installed, that way it knows which iOS to run the app in.

Simulators are not available as separate/stand alone downloads.

No, you can't download ios simulator stand-alone

Related

simulating app upgrade in iOS

I am trying to simulate an upgrade from version 2.0 to 2.1. I have version 2.0 hosted in testflight, so I did install it in my device. Then I tried running the app from xcode. However what happened is that the app did not get overlapped, instead it created two apps with the same name. How can I make it such that when I run the app from xcode it overlays the old version?
I've made sure that the bundle identifier is the same.
Well the info you can get while updating can be found # this link here.
when user updates an app, Documents folder is stored as is, including
NSUserDefaults (but, sometimes user download app via iTunes and
replace the whole application, crying 'OMG! update killed all my
levels progress!'); Application bundle is erased and replaced by new
one (anyway, it is readonly for user); Re-deployment of new build
version will be enough;
You can't access the appstore inside the simulator because: # link here
It's a simulator not an emulator. Even if there was an App Store in
the Simulator, none of the apps in the store would work since they are
compiled for ARM CPUs while the Simulator runs x86 code.
Another stack overflow # link here states:
Build and install your old version, generate some data, and then
install the new version on top of it.
For testing before submitting to the Appstore I generally download
from the AppStore again the old version, and then install with Xcode
the newer version - for your next update... ;-)
And another stack overflow (that I lost the link for) states:
No, the simulator runs i386 binaries and iPhone appstore apps are ARM
binaries apps.
iOS apps are compiled to machine code, Android apps are run in a
Virtual Machine using byte code and are translated to machine code at
the time they are run.
So no, I don't believe you can run it in the simulator, how ever you can have older projects saved on the iPhone and test both out. And the apple documentation is # this link here.
Read this: https://developer.apple.com/library/ios/technotes/tn2285/_index.html
You cannot simulate update in XCode (neither in simulator or connected device). You have to create IPA file and simulate update process via iTunes.

Is it possible to install .app files onto the iPhone simulator without source

Is it possible to download and install raw .app files onto the iPhone simulator. I like the functionality of some apps but simply do not have an iPhone. Would it be possible to download the app files and install them onto the simulator?
No. Release builds target ARM processors. The simulator doesn't emulate the CPU, that's why you have to build for it specifically - simulator builds are x86.
Do you mean with the IPA file? Unfortunately with Ad Hoc releases you need to install the provisioning profile that AFAIK won't allow you to install. There may be a hack but without hacking it there is no way to do so.
If the developer is built for simulator arch, then you can run it. By placing the .app file in the following location.
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/
Note: make sure your restarting the simulator to take effect.

iOS simulator only list the latest iOS version. How can I set earlier versions

According to the documentation should be able to choose which iOS version the simulator should run, however only the latest 4.3.2 is listed under "Hardware/Version".
The helps says:
"To set the iOS release used in the simulation environment, choose Hardware > Version, and choose the version you want to test on."
I don't want to support 3.x (although it would be nice) but at least I want to simulate my app on 4.2, 4.1 and 4.0.
What's going on? Why aren't they listed?
UPDATE:
I'm on Lion so I cannot install an earlier version of Xcode. Before my Upgrade I could test different versions easily.
the problem is that you have no other Simulator SDK installed which can be used. As #dorada has mentioned you have to install an older Xcode which in fact doesn't work because you're using Lion. I haven't tried it with Lion but principally it should work like before with Snow Leopard.
I'm referencing to my other answer how to get an older Xcode (don't know if it's still working)
After you have an older Xcode version, mount the image an navigate with terminal to that volume. There should be a hidden folder Packages. open that folder with open . and locate the two .pkg files you need (e.g. iPhoneSDK4_0.pkg and iPhoneSimulatorSDK4_0.pkg) and install both.
They will appear in your root directory and you have to move them to your Developer dir (don't simply overwrite, it will delete all other SDKs. go to the last different folder it should be iPhoneSimulator4.0.sdk\ and copy that one)
DONE (and at that point I have verified it: it works on my Lion. I used the dvd image which I have started backup'ing since 3.2.1)
Although iPortable has the correct answer I decided to post a step-by-step guide which is easer to follow:
Download Xcode 3.1
Mount the dmg file
In Finder menu select "Go\Go to folder" and enter "/Volumes/Xcode and iOS SDK/Packages"
Install the simulators you need (Double click)
Copy the simulation folders from /Platforms/iPhoneSimulator.platform/Developer/SDKs/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
If your have some SDK missing Install the missing SDK from "/Volumes/Xcode and iOS SDK/Packages" and copy subfolders from /Platforms/iPhoneOS.platform/DeviceSupport/ to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for me they were all there from 3.1 to 4.3)
you may download the older ios sdk / xcode from . https://developer.apple.com/downloads/index.action
(i found this answer in another stack overflow topic actually, but now i can not seem to find that question!)
Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."
The download section of Xcode preferences will open,
Click the "Components" tab.
You will see a list of simulators that can be installed, click install on version you need.
The simulator will need to restart to install.
To run the newly installed version of the simulator just select it from the run menu in Xcode.
You actually have to install previous simulator versions, they aren't there on a new install.
Maybe you can search and download them somewhere? - we keep them on a shared drive at the office.
After installing the Xcode 4.2 for Snow Leopard, I noticed there was a choice for iPad 3.2 Simulator, but using it just brings up some alerts that say "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." and another alert that says "Simulated application quit. Click Relaunch to try again." with Quit, Switch SDK, and Relaunch buttons.
I can successfully use iPhone 4.0 Simulator, iPhone 4.1 Simulator, iPad 4.2 Simulator, etc up to iPad/iPhone 5.0 Simulator, but really would like to have iPad 3.2 Simulator and iPhone 3.1.3 Simulator and earlier down to 3.0 if possible.
Our apps generally run all the way back to 3.0 and we occasionally receive bug reports from earlier iOS users, and would love to be able to debug these issues more effectively.
I tried the technique summarized by Tibidabo and although I am able to copy the simulator folders as mentioned, and though they show up as choices in Xcode, I cannot get them to actually run as simulators and I get the same problem alerts mentioned above.
What are other developers doing to support debugging of older iOS versions?
Go to Project Settings -> Summary an change Deployment Target.

Run a compiled iPhone Simulator App Build? (.app) without Xcode?

So have a complete build of my app compatible for the iOS Simulator on Snow Leopard. Now I don't want to install Xcode on my other Mac to run this.
The question: Is there a way to only install the iOS Simulator? I could install the app on my iOS Simulator on my primary Mac and then just copy the iPhone Simulator folder from the Library folder and paste it on my secondary Mac.
Or is there any other app?
Try Simulator Launcher:
Simulator Launcher builds custom executables to automatically launch an
embedded iPhone Simulator application using the correct iPhone SDK.
The Simulator app depends on other directories and files in the SDK/Xcode installation. Best bet is to install the full iOS SDK and then try deleting Xcode and other stuff until you find the minimum required.
There is no other app.
ios-sim seems to be the only one that works with xcode 6.3
https://github.com/phonegap/ios-sim
Try using app.io, worked great for me, and it's free

iPhone OS Deployment Target after update to iPhone SDK 4

I just updated to iPhone SDK 4 and am trying to debug on my device with 3.1.3 installed. Before the update, I compiled with Base and Active SDK set to 3.1.3 and all was well. After the update, I'm limited to SDKs 4.0 and 3.2--setting the base to 4.0 and iPhone OS Deployment Target to iPhone OS 3.1.3, I'm able to build and install on my 3.1.3 device, but receive the following error:
Error from Debugger: mi_cmd_stack_list_frames: Not enough frames in stack
I'm not using anything specific to the newer SDK, as I haven't touched a bit of code, just updated the SDK/XCode. So what am I doing incorrectly? The application runs as expected on an iOS4-installed device. Are there changes to pre-existing API's that need to be weakly linked perhaps? Thanks for all help.
Have you tried removing the app completely from your dev device, doing a build -> clean all targets, and then build again to your device?
I found this answer on macforums. If it's correct, then you probably have a memory corruption problem in your app that is confusing the debugger. Perhaps over-releasing something somewhere.
This probably isn't related to the SDK you are compiling with. It's possible you had this problem in your app all along but it just didn't show up until things moved around with the new Xcode, SDK, etc.
EDIT - I just ran into this problem myself trying to update an older app of mine to 4.0. It would run fine in the simulator and would install and run on the device except it wouldn't run in the debugger on the device. Anyway, I finally decided it was the .xcodeproj file that was corrupt or bad in some way and created a new project, copied over my source files to the new project and now it all works again. It's a pain but it only took about 20 mins to duplicate all my settings and I spent a couple hours trying to get the debugger to work.
Myself (and probably many others) are concerned about "will I still be able to compile/install apps for v3.1.3 of the iPhone OS?"
And what version of xCode does it become IMPOSSIBLE to ever write v3.1.3 apps again?
(Without installing a second copy of an older version of xCode.)
I've read the mile-long document that Apple wrote on the subject... but it sure would be simpler to understand if they just LISTED the various versions of each... instead of writing long paragraphs.
If you have:
Mac OS version 10.x.x x
xCode version x.x.x
SDK version(s) x.x.x
you can produce apps for iPhone OS x.x.x through x.x.x?