Installing iPhone app onto device from Xcode, no files installing with app - iphone

I've just set up a new computer and now trying to install my app onto my device through xcode. I've installed the certificates, developer provisioning files, etc..
The app is being installed onto my device, but none of the .png files are being loaded. So my app has the UIButtons and UILabels but nothing else is showing up in my app. Even though the simulator is running the app perfectly.
This app was just installing fine on my old computer to my device, with all the files included. Same version of Xcode and I'm not aware of any changes to settings I made that would have caused this.
No issues or errors when building the app, everything looks good.
Xcode 4.2.1, iPhone 4S 5.0
Thank you

There's sometimes strange things like that which cache themselves in the DerivedData or BuildIntermediates folders of your Xcode project so rebuilding doesn't actually get any changes through. You may want to try Product > Clean and then build again, and then if nothing changes jump into the Xcode Organizer (Window > Organizer) and delete the Derived Data from the project. This will force a reindex of all the project files and any trace of prior builds will be deleted. It should then pick up all of the images as listed in your Copy Bundle Resources build phase(s).

Related

Why does Xcode successfully build & copy my application, but won't launch it?

Developing an iPhone application on Xcode 4.5.2. Device: iPhone 4.
I was preparing my application for sending it to someone through testflight. I created a distribution profile and certificate for this. I did it following this: https://stackoverflow.com/a/11917884/555690
Anyway, recently, Xcode is unable to launch my project. When I press Run, it will successfully build and copy the files to the device, but when attempting to launch it, it will send an error:
Error launching remote program: No such file or directory
(/Users/Me/Library/Developer/Xcode/DerivedData/MyGame-xxxxxxxxxxxxxxx/Build/Products/Debug-iphoneos/MyGame.app/MyGame).
I'm not sure why is this happening.
A very similar question is this: Xcode successfully builds my target, but does not run the product, however, it seems to be more oriented to OSX instead of iOS, and the solutions there haven't helped me either. Also, I do get an error (he doesn't get an error).
If I run the app in the device (without Xcode), it works fine.
Yes, this happens a lot in the new Xcode.
One recipe that should work is:
disconnect the device from computer
delete app from device
reset the device
quit the xcode (not just by closing the project, quit the program)
in Finder go to ~/Library/Developer/Xcode/DerivedData
(Library folder is hidden: you can open Finder->Go->Go to Folder...)
delete all subfolders there
empty the trash
reconnect the device
open the project
now you should be able to run the app on the device again

App stopped running on device - ‘No such file or directory'

Initially I started building an iPhone app (App still in development stage) using Xcode 4.2, it was working fine on both device and simulator.Later, we wanted to add support for iPhone 5 (4 inch display). When I ran it on Xcode 4.5 (including Default-568h.png), it was working fine (on the simulator both 3.5 inch and 4 inch). But when i tried to run it on device, it keeps on giving me the error
"Could not launch appname.app” No such file or directory (/Users/<user>/Library/Developer/Xcode/DerivedData/appname-ffotpypmbvaguyhfvnnejhjotpbp/Build/Products/Debug-iphoneos/appname.app/appname).
I tried the following steps, but no luck :(
Deleted the app from device. Restarted the device.
Quit XCode.Trashed all folders from `DerivedData.Cleaned the project. Restarted
machine.
Set Build for active architectureto YES
Deleted Required device capabilities from -info.plist
Do I have any other options to try, or should I repeat these again and again?
The last time I had a similar issue, a normal clean wasn't enough, as it left some derived data. In Xcode, select the Product menu and hold down the option key to reveal "Clean Build Folder...", or even better, close Xcode and delete /Users/<user>/Library/Developer/Xcode/DerivedData/ entirely.

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

App builds & runs in iPhone Simulator, but doesn't deploy to iPhone

The app I'm working on builds & runs just fine in the iPhone Simulator, but, when I try to test it on an iPhone 4S, XCode says, "Finished running ..." immediately after I click "Run", and, when I look at the iPhone, there's no icon for the app at all. It's as though XCode doesn't detect that XCode isn't deploying the app to the device.
I've got a signed certificate, a developer profile, and a valid provisioning profile (XCode's Organizer says so). The provisioning profile is present on the iPhone.
I've tried restoring the iPhone, and I still get the same error.
How do I successfully deploy my app to the iPhone?
Edit:
It's deep in the comments of the below answer, but the problem was that I had a misspelled within Info.plist's required Required device capabilities section. I solved it by deleting that row.
few things to check:
clean your build folders and rebuild. In Xcode project navigator, under products folder, is your app present?
open iTunes and try dragging this app into iTunes. Will it show up in iTunes or do you get an error? if it shows up, can you install it to iPhone via iTunes?
Is you iPhone iOS version and Xcode version and build settings all in sync? I know some version of Xcode 4.x have issues build and running apps on iOS 4.x.

iPhone app doesn't stay installed (icon disappears)

I'm trying to install Zxing on my iphone from source (I know I can get it at the app store, but I want to modify some things in it).
The problem I'm having is that the app won't stay installed on the phone. It will run without a problem, but no icon will appear after I quit the app. I thought it had to do with my manually editing the codesign information in the project.pbxproj but after the developers changed the codesign identity they had left in the checked in version, the problem still persists.
I tried deploying an app I had developed from scratch and that worked fine.
I'm new to this, so any help would be much appreciated. You can download the zxing code from here:
svn checkout http://zxing.googlecode.com/svn/trunk/ zxing-read-only
Have you downloaded a copy from the App Store? I had one app (built from Xcode) that wasn't staying around after a sync and I found it was because iTunes was looking at my application syncing preferences and it wasn't selected to sync (as I had the Xcode build version on there, I didn't want to sync that version). However, it presumably removes the built app because I said I didn't want to sync any version of it.
Checking the checkbox to sync the app in iTunes kept the Xcode built version on there without installing the App Store version.
Hope this helps.
I think the problem had to do with my iPhone firmware. It might be a bug from Apple as I got an email from truphone saying that users were experiencing similar problems. I re-installed firmware, and could install it fine, and sync other apps. As soon as I did a restore from a previous backup, it broke again... what a pain. Case closed.