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

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.

Related

Jailbreak development using xcode

I have been looking around for learning how xcode can be used for jailbreak development.
I have Lion and jailbroken iPhone3G and xcode4.6 which doesnt support iPhone3G.
I have installed ldid but have no idea how to use it.
I have to make launch daemons, too, and attach them with my application. I have followed this tutorial for making a daemon but i got stuck in the setup for creating an open tool chain template in xcode. I followed every step but my xcode is not showing any template for open tool chain. Is it really required to have open tool chain template?
You're right. Xcode 4.6 doesn't support the iPhone 3G. Can you install an older version of Xcode? For example, Xcode 4.4 still supports the 3G.
Login to the Apple Developer Portal and download old versions here
You can choose to install the old version of Xcode in a different folder, so that it doesn't overwrite the new version (for example, install to /Developer-old/ or something).
Once you install the old Xcode version, you can navigate to the installation directory and look for the directory named:
iPhoneOS5.0.sdk
(or probably iPhoneOS5.1.sdk would work, too). Then, copy that entire folder into the new Xcode 4.6 installation directory. For example:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs
Afterwards, you should see this:
iPhoneOS5.0.sdk
iPhoneOS6.1.sdk
With the 5.0 SDK installed, you can now build apps for the iPhone 3G, using Xcode 4.6. You can also now uninstall Xcode 4.4 if you want. See more about this in this other question. The key is that you will be building your app for armv6 (only). Armv6 is the iPhone 3G's processor.
The second step is to turn off code-signing within Xcode. In your project settings, you set the provisioning profile to Don't Code Sign. You must modify an Xcode configuration file to allow you to do this.
Now you build the app in Xcode. When you're done, navigate to the directory on your Mac where the app has been built (where the MyAppName.app/ folder is). Then, you use ldid to fake code sign the app executable:
ldid -S MyAppName.app/MyAppName
Now, your app has a fake code signature that will allow it to run on a jailbroken phone.
Then, you use ssh, or scp, or something else to transfer it to your phone, where it should be installed under /Applications/.
You already have the best link on building iOS Launch Daemons. I'd stick with that tutorial. No, I don't have any open toolchain template in Xcode, either. I just use Chris' tutorial to see how to build a non-graphical daemon main program (not a UIApplication), copy it to my MyAppName.app folder, and create a com.mycompany.mydaemon.plist file that defines the Launch Daemon.
Once the plist is installed in /System/Library/LaunchDaemons/ on the phone, you can start it, without having to reboot the phone, with:
launchctl load -w /System/Library/LaunchDaemons/com.mycompany.mydaemon.plist
at the command line (on the phone). Or, just reboot the phone, and the daemon will start automatically.
Although I learned to do this before it was available, you can now look at iOSOpenDev if you'd like a more polished way of doing some of this stuff.
Yes. Xcode can be used for developing jailbreak-type projects. Use iOSOpenDev to set up Xcode and iOS SDK to allow jailbreak-type development.
iOSOpenDev comes with a set of templates, signs (with ldid) targets and creates Debian packages (packages are submitted to repos like ModMyI and BigBoss) during its build phase, in addition to installing packages directly to an iDevice with Cmd-Shift-I (build for profiling shortcut) for immediate testing, among other useful features for using Xcode to develop jailbreak-type projects.

Where does the compiled .ipa reside when I compile and deploy the app for the iOS simulator from Xcode?

I'd like to be able to pass around the version of my iphone application that was compiled for the simulator. The idea here is to be able to give copies of the app to different vms where they would deploy the app to the iOS simulator and run some tests.
But after I compile the app for the iOS simulator, I can't find the darn *.ipa. Does anyone know where it resides?
There’s no .ipa—Xcode copies the .app bundle by itself into the simulator. You can check:
~/Library/Developer/Xcode/DerivedData/YourProject-<some garbage>/Build/Products/Debug-iphonesimulator/
(swap Debug for Release if you’re looking to distribute a release build, obviously), or, alternately, get the version that’s actually installed in the simulator from:
~/Library/Application Support/iPhone Simulator/<OS version>/Applications/<some UUID>/.
You can copy that app bundle into another simulator by creating an arbitrarily-named folder in the above Applications directory and placing the .app inside it.
You can see where it is putting your build products by looking on:
Xcode Menu-> Preferences-> Locations
Or if you have project Specific settings they will be found by looking on
Xcode Menu-> File-> Project Settings
I think it builds the ipas from the products in those locations and loads them into the simulator. So you might not find an actual .ipa there you find .app in these locations.
If you want an ipa. Do an Archive build.
Do an Ad Hoc distribution and save the resulting .ipa to your desktop.
have you already tried the following location???
Library/Developer/Xcode/DerivedData

Can I access the App Store from within the iOS Simulator?

Within the iOS Simulator, is it possible to access the App Store?
That is, can I install the App Store application within the Simulator and download applications through it to the iOS Simulator? If so, how?
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.
Sorry it is not available! The simulator will only allow you to install programs from xCode. I am not sure why they restrict this - but I am also not sure why you would want to use the Simulator for this purpose.
Interacting with iOS Simulator: https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/iOS_Simulator_Guide/InteractingwiththeiOSSimulator/InteractingwiththeiOSSimulator.html
Note: You cannot install apps from the App Store in simulation environments.
You can put application in your simulator. But you cannot run it. They have restricted users to run applications. I found where the .app files are.
Machintosh HD - Application - Xcode - Contents - Developer - Platforms - iPhoneSimulator.platform - Developer - SDKs - iPhoneSimulator.sdk - Applications
All applications are in there but, I can't run them. However, I succeeded to install .app files.
In .ipa file, there is 'payload' folder, and .app file is in there.
All you need is just copy it and paste it in Applications folder. Then you can see the icon on your simulator.
But, it will not work.
Probably wont work, but if you have an IOS device and copy an app onto your computer, you might be able to run it on IOS simulator, as you can run your own apps.

xcodebuild install path?

I am developing an iphone app using xcode. I would like to automate the "build and run" process, and so want to know if there is any way to install the built app on simulator or device.
There is xcodebuild install command but i don't know how to set the installation directory DSTROOT to simulator/device. Please help me there.
I have looked through many forums where people suggest just to use xcode GUI to do the stuff, and I do that too, but I would really like to know the command-line way.
Thanks
All you need to do is copy the built .app from wherever XCode puts it to ~/Library/Application Support/iPhone Simulator/User/Applications/[somefolder]/, with a file named [somefolder].sb (alongside the folder, not in it) containing the following:
(version 1)
(debug deny)
(allow default)
Then launch /Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator. And select your App. Without Jailbreaking it's NOT possible to install it from outside the GUI.
The install build action for Xcode will only copy the built product to the install path specified in the xcode project.
This is used for frameworks and libraries that need installing after being built so that other apps can link against them from a common location.
I don't think you'll be able to use this build action to automate the Build and Run process - that is going to have to be done manually by each developer. There is no way to push apps onto a device without using Xcode, iTunes or the iPhone Configuration utility. As for the Simulator, it's as woodleader says. But for the device, without jailbreaking and writing your own code, you can't do this.
What you can do is use xcodebuild to generate daily/nightly builds for continuous integration. You can write a script that checks out the source form version control, runs xcodebuild and puts the built product in an easy to reach location. The installtion onto devices will still need to be done manually however.

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

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