Quick deployment of an app after build without running - iphone

Via Xcode is there a quick way to deploy an app you've just compiled to an attached iPhone without actually launching it on the phone?
My scenario is that I've tested it out my app just fine in the simulator, now I just want to deploy it to my provisioned iPhone, grab the device and go without running it then and there. Sure, I can just hit build & run after I've set the target settings to release & device, but that attempts to initiate a GDB session and it even complains if my phone is in screen lock mode.
Not a huge problem of course, and I'm not really asking how to deploy the same app to a lot of other testers who weren't involved in the development and aren't running Xcode, just if I might have missed some kind of 'build & deploy' option that doesn't attempt to run the app.

You could always build and archive, save it somewhere and copy it via iTunes... I doubt it is much faster or any more convenient. I'll use Build'n'Run all the time and stop with stop button or home button. At least you make sure that it actually runs and starts on the device. :-)

Related

Xcode shows popup but there is no errors

Working with my application It goes well but has met into a problem with Xcode. When I try to run the application on the iPhone simulator this message always pops up:
"A coordinated app install already exists for com.apk.ios with intent IXCoordinatorIntentUpdating (creator InstallCoordination Simple SPI) but request by CoreSimulatorBridge (pid 677) was for intent IXCoordinatorIntentInitiating"
What is wrong? There are no errors when trying to build the app. Has tried to clean the build.
Erasing all content and settings is not always necessary as #user3344236 stated.
Please make sure to delete the app that you are trying to install from the iOS Simulator. That'll probably solve your problem.
Why this occurs?
In my case something went wrong while Xcode is trying to install the app on the simulator. Everything is frozen and I had to restart the Mac manually.
Found a solution that works for me:
Reason:
Either the App store or something else tool is downloading the same app with the same identifier at the time Xcode is trying to launch the same app on the Simulator or on MAC.
Solution:
Need to stop/delete all the running installs of the app with the same identifier. (How to stop -> that can be figured out to see either App Store or any other tool ) Then try again to launch the app with Xcode, this time it succeeds.
No need to Reboot the simulator/ Mac or reinstall Xcode.
Thanks, Hope this will help someone.

Test the app in real iPhone, but it keeps running the old version app?

I have tested my app on the real iPhone for a while and everything has been working perfectly fine. Then an accident happened -- during the development, I disconnected my iPhone to do something else. When I came back and resume the work, the test just doesn't work properly any more. I have updated the app, but in each test, it keeps running the old version.
What's even more weird is: it's not even running the version right before the unplug accident. It's actually running a version before that.
I have tried a few things, such as disconnect and restart iTunes/XCode/iPhone etc, but it still runs the same version.
I opened the Organiser, it does give the message of "Xcode cannot find the software image to install this version", BUT what doesn't make sense is -- it worked perfectly just half an hour ago!!
delete your app from your device and run it again
Clean Your project build then restart your device and now instal the app into original device,

Why won't instruments execute my Monotouch application?

I'm trying to use Instruments to look at resource usage in my Monotouch app. However, I can't get the app to launch through Instruments.
When I hit the record button in Instruments, the app launches on my iPhone, buzzes (signifying it's a debug build), then crashes - and Instruments reports:
Target failed to run: Remote exception encountered : 'Failed to get task for pid 384'
The app runs fine when I launch it directly on the phone.
I've tried it with debug builds and ad hoc builds (using the parameters defined on the Monotouch support page). Always the same.
I'm using Monotouch 3.2.5, iOS 4.3.1 (on a 3GS), Xcode 4 and Snow Leopard.
I've see this issued mentioned in a few places around the web, but haven't seen a resolution. Anyone know how to resolve it?
It's a signing problem: to run under the control of Instruments, the app is compiled with the Release build settings, not the Debug build settings, which usually means the app is signed with your Distribution certificate instead of your Developer certificate.
The app needs to be signed with a Developer certificate for Instruments to be able to control it.
Change your signing option to Developer on the Release build and you should be fine.
I also ran into this issue with Xcode 4. What worked for me was...
From Xcode 4, run on the connected iOS device.
Launch the Instruments app manually.
Choose my template (in this case TIme Profiler).
Choose my app from the Target menu (to the right of the Record button).
Click the Record button.
The suggested Entitlements solution did not work for me (since Entitlements are evidently no longer required in Xcode 4).
The suggested signing solution did not work either. Also, it would be inconvenient to change this every time I wanted to test with Instruments.
Check your Entitlements.plist for the signed app. If get-task-allow is false, it will prevent Instruments from attaching to the process.
How about launching Instruments from inside XCode? If you're using Xcode 3, it's in the Build menu and then Run with performance tools. This will fire up Instruments and automatically start recording.

iPhone testing on device

With my iPhone connected to my mac via 30-pin connector (standard apple/iphone cable) I of course test and run my app with Xcode building it to run on the device.
For some reason though, when I build and run, it installs on my device but doesn't go further than the loading screen of the app with Default.png showing.
Then if I stop the build in Xcode it quit the application, then I run in manually on my device and the new build is there for me to test, but I just don't know why I have to do that and it doesn't just run past the loading screen when building?
This happened to me once after I added some certificates. I removed the build directory (MyApp/build/) and then did a clean and then build again, and everything miraculously worked. You might try that.

Build and install without run in Xcode

Is it possible to build an xcode project for iPhone and have it install the result on a connected device without actually running the application? I'm currently using Build & Run, but I'm debugging a peer to peer game, so I have to build & run for two different devices, stop tasks on each of those and then build & run on the simulator so all three have the latest build. I'd love to not have to wait for the application to run on the two devices in this process.
You can drag and drop the built app (in your project build directory) into the Applications list of your device in the Organizer window.
Things have changed a little since this answer...
For simulator, you can drag/drop your recently-built app product from the Products folder in the Project Navigator straight onto the simulator window.
For a device, drag and drop the app product into "Installed Apps" when viewing the device in the "Devices" window.
If you're not quite sure where the built app is (the project build directory):
Xcode → Preferences → Locations tab → Derived Data will show the location.
There's more information in this question:
Xcode 4 - build output directory
There's another way to get it to install automatically without launching. Maybe not as useful for the OP's situation, but in my case I'm trying to profile app load times so I want to start the app without the debugger attached (which can slow down execution.)
Under the target scheme, right click and select "Edit Scheme". Make sure the run configuration is selected, and then look in the info panel. There's an option that says "Launch" - set this to "Wait for executable to be launched."
Now once it's installed it will wait for you to launch the app before attaching the debugger. However, you can just hit "Stop" in Xcode and then launch the app manually. It seems to crash the first time but on second run seems to work OK. Maybe a little hacky but less manual steps than the other methods. Tested on Xcode 7.