PDA

View Full Version : iPhone apps on mac?




Sover
Feb 9, 2012, 10:17 AM
Hello, i need urgent help.
Im designing (graphic) few apps for iPhone, and client send me beta app to test, but there is one big problem. I broke my iPhone 4s few days ago, and i need to test this app.
So is there any way to test it on mac? maybe apple sdk or something?
I know there is app emulator with it, but client send me full packed app so im asking any way to run it or emulate it on mac? :(



IDMah
Feb 9, 2012, 10:28 AM
Ah? if you have the Xcode installed. Then you have the simulator.. si?
Compile and go.

or Google something like how to install apps in iphone simulator.

should be that easy..
Ian

ArtOfWarfare
Feb 9, 2012, 11:49 AM
So you have an app ready to be installed on a device, but no actual device, correct? Not an Xcode project that needs to be compiled?

I've never tried getting one of those on the simulator, but if I wanted to, this is what I would try:

1.) Download Xcode, it comes with an iPhone simulator.
2.) Start a project, give it a unique name so searching for the name will only give relevant results.
3.) Don't bother putting anything in the template, just click on the run button in the top left corner and it should install the compiled app in the installer.
4.) Open a finder window, search for the project name, include system files, include hidden files... There's another thing that I would say to include but I can't remember what off the top of my head.
5.) Drag and drop the app to a directory that looks appropriate based on search results. Quit the simulator. Launch the simulator. Hope that the app appears.

Let us know how it goes. I would guess it won't be as easy as what I laid out above and actually would go as far as saying its not possible, but who knows?

phantax
Feb 9, 2012, 12:07 PM
The simulator is NOT an emulator, it will not run apps compiled for ARM.

r0k
Feb 9, 2012, 01:08 PM
The simulator is NOT an emulator, it will not run apps compiled for ARM.

Say what? When you compile an iOS app, are you saying you get an "intel version" (for the simulator) and an "arm version?" (for the app store) I think not. When I've compiled and run apps in the simulator, I've gotten the impression I'm running the same app that would be run on an iThing.

robbieduncan
Feb 9, 2012, 01:29 PM
Say what? When you compile an iOS app, are you saying you get an "intel version" (for the simulator) and an "arm version?" (for the app store) I think not. When I've compiled and run apps in the simulator, I've gotten the impression I'm running the same app that would be run on an iThing.

Absolutely. The simulator is Intel and is linked against Intel libraries. It makes no attempt to simulate the power of the phone: it uses the Mac CPU and GPU so it is entirely possible to write apps that run well in the simulator and terribly on the iOS device. Furthermore if the libraries exist on OSX to start with, think Foundation, the simulator runs linked to the Mac OS version not the iOS versions. So it is possible to write an app that uses a Mac only Foundation method that will run in the simulator and fail on an iOS device. All of this behaviour is well documented.

phantax
Feb 9, 2012, 01:31 PM
Say what? When you compile an iOS app, are you saying you get an "intel version" (for the simulator) and an "arm version?" (for the app store)

Yes, that is exactly what happens.

I think not. When I've compiled and run apps in the simulator, I've gotten the impression I'm running the same app that would be run on an iThing.

The simulator is designed to give you a feel for what your apps will look like on an actual device, as that is its purpose, however you are actually running x86 compiled code.

r0k
Feb 9, 2012, 02:08 PM
Absolutely. The simulator is Intel and is linked against Intel libraries. It makes no attempt to simulate the power of the phone: it uses the Mac CPU and GPU so it is entirely possible to write apps that run well in the simulator and terribly on the iOS device. Furthermore if the libraries exist on OSX to start with, think Foundation, the simulator runs linked to the Mac OS version not the iOS versions. So it is possible to write an app that uses a Mac only Foundation method that will run in the simulator and fail on an iOS device. All of this behaviour is well documented.

Ouch.

Yes, that is exactly what happens.



The simulator is designed to give you a feel for what your apps will look like on an actual device, as that is its purpose, however you are actually running x86 compiled code.

Ouch Ouch. Now I know. I'm glad I asked.

All my apps are OS X apps and I've only compiled and taken a look at the demos in the simulator. I got the impression the simulator was something like a virtualbox and that it could run ARM compiled code.