I want to know how to install an ipa/app file into iPhone just using the command line?
The device maybe without jailbreak or jailbroken already.
I tried to use the command line: xcodebuild, but failed. I didn't find the parameter how to set the destination, maybe a real device, not a simulator.
What options do I have?
Three ways I know of:
These guys wrote a tool in Ruby to do it. It uses the Fruitstrap library which in turn uses one of Apple's private APIs, so this could possibly break in the future.
You can also just use Fruitstrap on its own, but then you need an .app directory, whereas the Transporter Chief tool I linked above supports both .app and .ipa deployments (as required in your answer).
In either case, you need to have XCode installed for it to work, but the device does not need to be jailbroken.
Thirdly, there is also a binary distribution for OS X of the libimobiledevice library, which enables Linux boxes to talk to iOS devices. This has a few different tools, one of which can install valid signed IPAs to the device using this syntax:
ideviceinstaller -i myapp.ipa
The advantage of this method is that it does not need XCode or even iTunes.
With the new Apple Configurator 2 application, you can Install Automation Tools... from the menu. This will add support for the command-line tool "cfgutil".
cfgutil allows you to install ipa's from the command-line using cfgutil install-app <AbsolutePathToIpa>. We use it on our build server to automatically update the device with the latest build.
I've just gathered in a single post (Gist) how to achieve this, using
1.- Mattt's library Shenzhen
2.- Phonegap's library ios-deploy
Read here:
How to generate and install an IPA file
I've tried libimobiledevice-macosx. works fine on iPhone 5. iOS version 6.1.4.
I was able to install app and see log output like in xcode :) Thank you!
Related
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.
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.
How do I convert a .ipa file to a .deb file?
Your question makes very little sense, since .IPA is the extension for an application installed on the i(Phone|Pad|Pod), where as .DEB is the extension for a package for the Linux operating system Debian.
Based on your comments, the answer is: you pay the $99/year to Apple, and you can then deploy things to your own iPhone (there are plenty of docs out there on this), or you Jailbreak your iPhone, and in that case, I'm not sure how app deployment works, but I'm sure there are docs out there for that too.
It is unfortunate that Apple has chosen to require payment for people to tinker with their own devices, but I guess that's why there are some many people Jailbreaking there devices.
Correction to the previous answer:
Your question makes perfect sense
iOS (and Mac OS) are based on linux. Sometimes, when downloading apps for a jailbroken iphone onto your PC, these files will be have a deb extension because of this.
try this page for a couple of methods:
http://xsellize.com/topic/32674-converting-cydia-applications-to-ipa-format/
If someone wants to convert an ipa to deb I am 90% sure it is because they are not able to perform sideloading (e.g. I failed with ideviceinstaller), and they want to install the package with Cydia without the need of sideloading.
Tools:
rullinoiz/ipa2deb
Un1Gfn-obj/ios/ipa2deb.sh - written by me based on the previous one
alamshafil/ipa2deb - C# - Windows - GUI - I haven't tried it
TL;DR of how they work:
Create a DEBIAN/control and fill in some package info
Unpack ipa to a directory (ipa is kinda equivalent to zip)
Repack the directory with dpkg -b or dpkg-deb
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
I'm using google unit testing code.
I'm building it quite nicely with xcodebuild on the command line. Now I want to run it (preferably on attached Device but simulator would also work) and catch all the feedback from the tests.
But I can't find out how to run it. Any ideas?
Jeff Haynie's iphonesim project on Github looks like it could work. I had trouble building 27812bb4b (make failed on a warning in nsprintf.m), but that may just be me using a pre-release OS and SDK. See also this related question.
If you followed the instructions from the Google page (creating the target, adding the test files to the target) and you have an iPhone SDK certificate (you need it to upload apps to the device) you can just change the Active SDK to your device (upper left corner combo in XCode)
If you don't have a certificate, you need to apply to the SDK program.
The only iPhone simulator and debugger I'm aware of comes with the iPhone SDK. In order to use the iPhone SDK you need to have an Intel-based mac with OS 10.5 Leopard installed, in which case you might as well be programming/compiling in XCode instead of using the command line.
There has to be some misunderstanding here. What exactly do you want to run from the command line? The test suite? If so, the test suite should be a separate target, so that all you have to do is build it, for example like this:
xcodebuild -target UnitTests -sdk iphonesimulator2.2.1 -configuration Debug
If you have the testing target configured correctly, it will run the RunIPhoneUnitTest.sh shipped with the Google Toolbox and the script will run all your tests.