Reputation: 2835
How do I deploy my app down to the iPhone (for testing purposes) from XCode without actually running the app?
Upvotes: 49
Views: 9236
Reputation: 3441
Xcode -> Product -> Scheme -> Edit Scheme -> Run -> Info -> Wait for executable to be launched
Upvotes: 9
Reputation: 30015
Edit your launch Scheme, open the section titled "Run myApp.app" and toggle ON the option to "Wait for myApp.app to launch".
It will then just install, and not run the app. If you do run it yourself, the debugger should attach. This is useful for when you want to test how your applications works when launched via a URL, amongst other things.
NOTE - To be fair, this answer is the same as the one for this question. I didn't mark this question as a duplicate though, because you might have a different reason for wanting to do this. Still, if you want a more detailed explanation, look there.
Upvotes: 78
Reputation: 70673
If you time it just right by watching the Xcode console, you can kill the debugger after the app is completely downloaded, but before any code in the app is executed.
If you don't want to depend on timing, and don't need to consider the app to be running until it hits some Cocoa Touch or Objective C runtime code, you could set a breakpoint on an NSLog inserted as the first line of main() and kill the app after it hits that breakpoint.
Upvotes: -1
Reputation: 12106
You can create an archive, drag that .ipa onto iTunes and sync the device.
Or you can just run it from XCode, and then kill the XCode process, and run it from the SpringBoard, though I assume you need the virgin case or you wouldn't have asked the question.
Upvotes: 0
Reputation: 901
Connect your device, set the Scheme on your top left to iOS Device.
Upvotes: -6