3G iPhone Device "finished running" but app won't load - iphone

I'm trying to run an app on a 3G device. Xcode says that the app has "Finished running on the iPhone" but the app will not deploy. I think I have the architectures configured correctly (see image below)
any help would be great,
thanks

I figured this out finally. In the Info.plist there's a "Required device capabilities" setting that was set to armv7. I was aware of the armv6 and armv7 requirements in the target build settings for the 3G model but not in the plist. here's a screenshot. hope it helps anyone else stuck with something similar:

Your configuration looks fine. I’ve seen this before; removing the device from the Organizer (selecting it in the list on the left of the “Devices” tab and clicking the “Remove” button at the bottom of the main panel), restarting Xcode, and connecting it again seemed to fix the problem.

In my case, the architecture in the target properties was set to Standard (armv7). I had to add the armv6 architecture and it worked

Check "Required device capabilities" in settings.
I had problem with accelerometr set to OFF.
When I had remove this line, everything start working.
Same problem on 3G (iOS4) and 4GS (iOS5)

Each .xib file and core data model also has a deployment property. It's in the identity inspector. Changing it worked for me.

Make sure you have it setup like this in the target build settings, not just the project build settings.

Restarting the device usually fixes this one for me.

Under Build Settings at the top, you'll not a selection named 'Levels'. If you select this you may find that the Architecture and/or your Code Signing Identity is out of step with the settings that were showing under the 'Combined' setting. I had a case where an App was building successfully and simply not deploying on the phone. When I select "Levels" the values under my App target for these Build settings was incorrect. Once I set them here it deployed to the device fine.
Hope that helps.

Related

Xcode cannot run using the selected device (Weird error)

I'm trying to debug an application on my iphone. I was able to do it before I updated Facebook client library yesterday. After updating, something weird happened and now I got the "Xcode cannot run using the selected device" error.
Error can be seen from the screenshot. Note that in the upper middle it says "Finished running FacebookSDK on baysungur's iPhone", which is weird because my app's name is different.
I tried some things like adding architectures to build settings, decreasing minimum deployment target, etc. They did not work.
Anyone has any idea?
I'm using Mountain Lion and Xcode 4.4.1. I'm trying to connect to a iphone 4.
Note: I was able to connect to device before updating that facebook client.
edit: Well, a similar thing also happens for simulator. Now I basically can not debug my app in any way.
Facebook library had a file named Info.plist, which caused xcode's head to be confused.
Weird thing is that I was seeing correct settings in project's settings. I mean everything seemed correct in that UI but appearantly xcode was using wrong Info.plist in action.
Deleting that second Info.plist solved the issue.
Is device is connected in organizer? If yes then quit your xcode and also restart your device and choose valid provisioning profile and try again.
thanks

No valid com.apple.developer.ubiquity-kvstore-identifier entitlement [duplicate]

I'm having a problem integrating iCloud with my app.
When I set test out iCloud availability, I receive Success for the function
NSURL *iCloudURL = [fileManager URLForUbiquityContainerIdentifier:#"AppID"];
but right after this, when I attempt to perform:
NSUbiquitousKeyValueStore *iCloudStore = [NSUbiquitousKeyValueStore defaultStore];
I receive the error
NSUbiquitousKeyValueStore error: no valid com.apple.developer.ubiquity-kvstore-identifier entitlement.
Any ideas on how to fix this? My App.Entitlements file is using the default macro'd prefixes, nothing changed from the auto-generated file. iCloud is definitely enabled on the AppID in iTunes Connect.
Thanks.
I had the same problem even though all of my code, settings, entitlements, etc were correct. I fixed it by physically deleting the app from my iPhone, then building in Xcode and running it on my iPhone and it worked. Just wanted to add that in case the other solutions don't work for somebody else out there.
Big warning: if your device is jailbroken, make sure you have uninstalled AppSync. I had two insane days because of that. iCloud (and Game Center) would not work on device with AppSync installed even with correct entitlements and profiles!
I did the follow to get this to work for me (Xcode 4.2.1):
In Xcode, go to your target > Summary > at the bottom, click Enable Entitlements.
In the iOS Provisioning Portal, go to App IDs and enabled iCloud support. (You may not have to do this, but it worked for me.)
Edit your Provisioning Profile to force it to update; then download this profile and open it so it automatically launches in Xcode.
Clean and build your app to your device.
I ran into this problem when attempting to debug a Mac (not iOS) application. The problem turned out to be that I was not signing the debug build, and did not have the deployment phase of the project with "Skip Install" set to "Yes".
Apparently, iCloud will not function properly with an unsigned application.
Add com.apple.developer.ubiquity-kvstore-identifier in your Entitlements with the following value:
$(TeamIdentifierPrefix)$(CFBundleIdentifier)

App settings appear in simulator but not on device?

Hey folks, I'm setting up my first application settings bundle right now. I went through the process of creating a Settings.bundle in the project root, settings the Root.plist to display as an iPhone Settings plist, etc.
So – the app's settings panel displays in Settings.app just as I would expect in the iPhone Simulator. However, it is not present in my device settings when I deploy there. My test device is an iPod Touch running iOS4. I've rebooted the device just to make sure everything has reloaded... still nothing. Can anyone think of a reason that my settings panel would work in the Simulator but not on my Device?
Thanks for you help!
You may need to run your app at least once after installing your app before the app's setting will appear.
Not sure if a quit and restart of the Settings app (from the "multi-tasking" bar) might also be required.
I've experienced this myself - it usually happens when you mistype a key in the plist or if required keys are missing.

There is no SDK with the name or path "iphoneos4.0"

I download a sample of UICatalog and run it.When I compile it ,it shows the failed message:There is no SDK with the name or path "iphoneos4.0".I find the "Base SDK" of UICatalog's Targets is iphone Device 4.0(missing).How can I solve this question and run it.
Thank you!
Select the root level of the project, in "Groups & Files". It's blue. Then hit command-I to get its Info.
Pick "Build" from the segmented controller at the top of the info window. In the first section of that panel you'll see Base SDK as one of the first few lines of options. Select the latest version of the SDK you find in there, and close the window to save your options.
Build-and-run the project, and you should be good to go.
EDIT, because I see from the comments that people are finding this answer who have a slightly different question than the OP's, so here's one other thing to try. It could also be you have "iOS Device" selected as your build target. If so, and if what you really want is for it to launch into the simulator, select "Simulator" instead.
After loading the project into XCode..
Under Groups and Files
right click on UICatalog<-(or your demo project name) and select Get Info
in Base SDK select IOS Simulator 4.1
Close and save info pane
expand Targets exposing UICatalog<-(or demo project name)
right click on UICatalog and select Get Info
in Base SDK select IOS Simulator 4.1
Combo box in UICatalog project pane (upper left corner) should switch to "Device - 4.1 | Debug" instead of "No Base SDK"
if you Build and Run at this point you might get another error. If so, open the UICatalog combo and switch from Device to Simulator
The "official link" mentioned above states…
"Note: Targets can override build settings defined at the Project level. "
..but should probably read "will" instead of "can"
Ok, I've solved it.
In Groups & Files go to Targets and select your target.
Press Ctrl+I (or open the info in some other way)
Set the Base SDK of your target
(The Base SDK should also be set at the project)
Steve nailed it. This is an Xcode bug. I loaded the NavBar sample and Xcode didn't even offer the simulator as an option, and it complained about the missing SDK even though it was set correctly in the project and wasn't set at all on the target.
Do what Steve said:
"The only way I could resolve it (in fact, the only way I could get the option of running in the simulator at all) was to change from debug to release and back. The dropdown still shows Base SDK Missing but if you click it, the simulator options are there and it builds."
My problem was that in the sample code another xcodeproj was embedded. So I looked after that file with Finder, opened it with Xcode and than the same as Dan said: Project -> Edit Project Settings -> Under "Architectures" set Base SDK to "iPhone Simulator x.x" (the latest one you have installed)
I had the same issue with another Apple sample app. The only way I could resolve it (in fact, the only way I could get the option of running in the simulator at all) was to change from debug to release and back. The dropdown still shows Base SDK Missing but if you click it, the simulator options are there and it builds.
I think that's a bug.
Many answers here, none seem to be complete enough about this, and it's all a mess. But they are all helpful. Here, I just want to compile all helpful pieces in one answer. Thanks to Larry (who have almost everything compiled into steps already), Steve, Dan Ray, dkk, geowar and lqf.
This picture from apple is a little decieving and outdated (talking about iOS SDK 4.0 and we're currently at 4.1) but it does show where you should change the project settings. Just select iPhone Simulator 4.0 if it was previously on iPhone Device 4.0.
Other than that, they say "Targets can override build settings defined at the Project level". So, yeah, also go ahead, open Targets and set all of their Base SDK back to default by pressing delete on it. If they were bolded, they'll become regular indicating a default value, which should be iPhone Simulator 4.0 if you did the first step right.
Just realize there are many places where Base SDK can be wrong:
Under Project Info
Under Target Info
Under different configurations for both Project and Target
And that under Target it should be set to default, which is value from Project.
There's still something about the overview combo sometimes having and sometimes not having more than 1 option such as "Device" and "Simulator" that I just couldn't understand yet, but this is another potential configuration place for Base SDK being wrong.
You have to make sure that you change to the "iPhone Simulator" under the project settings in the appropriate configuration (i.e. if you are building a debug build you have to change to the simulator under the debug configuration).
For some reason I was getting this error when I did change the simulator but realized that I was doing a debug build but changed to the simulator under the release configuration and not the debug configuration.
dkk's answer is what made things work for me. I had to change the Base SDK on the target and not just the project. Perhaps you have to do both.
I got a similar error after upgrading my iPhone to iOS4.2.1(8C148a). The situation is as following.
I was using Xcode 3.2.4, but it does not support iOS4.2.1. So I downloaded Xcode_3.2.5_and_ios-sdk_4.2_final.dmg which is 3.78GB requiring 9.53GB to install. Then I ran my ap with Xcode 3.2.5. That is where I got the above error message.
Now it is ok. I solve this based on Geowar's answer:
For the official answer:
http://developer.apple.com/library/ios/#qa/qa2010/qa1701.html
Please be noted that if you have done as Geowar said and the message is still there. Try to close Xcode 3.2.5 and restart it. That is how it works for me.
Another thing is that if you have just upgraded to iOS4.2.1 like me. When you try to load the a/p from Xcode 3.2.5 the first time. Xcode 3.2.5 may still give you "No provision iOS device connected". Please try to go to organizer and click on your iPhone under DEVICES on the left bar. Wait for a while to let Xcode in sync with your iPhone with iOS4.2.1. Then it will work. At least it work for me.
Jesse
Ok, so I struggled through this too. Based on some of the answers above and from the apple development forum, I was able to figure out what worked for me.
In XCODE, if you notice that the pull down at the top left of the window says "BASE SDK MISSING", you are going to get this error "There is no SDK with the name or path “iphoneos4.0”". To fix the problem:
double click on Group & Files in the upper part of the left pane of xcode. This will open a window
go to the Build tab of the new window
click on the row that says "BaseSDK" and select "Latest iOS (currently set to iOS 3.2)
The Configurations pull down near the top should now say "All Configurations". If not, set it.
close the window.
Now if you try to build, you will get a different error, something like: Code Sign error: The identity 'iPhone Developer: x Xxxxx' doesn't match any identity in any profile ...
So, now what you need to do in xcode is to click on the pull down in the upper left corner (the pull down that had the original BASE SDK MISSING indication, but probably has something different now), and make sure that both "Simulator" and "Debug" are checked as options in the pull-down.
now you should be good to go.
I just went Project -> Edit Project Settings -> Build -> then change the Base SDK to iPhone 4 simulator or I'm assuming whichever SDK you want to use.
I never had to specify the build for a given target, although my program was created on a mac that was already configured to use the iPhone 4.0 simulator.. so perhaps the targets were set for the simulator SDK and the project itself wasn't? Either way... just glad it works.
I was having the same problem and what I did to solve it was:
Go to Menu Project
Go to Set Active SdK
Select the option SIMULATOR instead of DEVICE
Build and Run and the ERROR has gonne!
I hope it works for you guys... =)
I just had a situation where I changed the Base SDK to 4.2 on my project after updating to Xcode 3.2.5, but I kept on getting the "There is no SDK..." error. I finally opened the project file (MyProject.xcodeproj/project.pbxproj) in a text editor and looked around. There was no mention of 4.0 anywhere, only 4.2. BUT when I then saved that file, it all started working in Xcode. Perhaps some permission on the file or something else. Have no idea really, but it worked.
I got this error when one of my configurations still referenced an old (iOS) SDK. Note that the error shouldn't have come up when I tried to build a totally different configuration (with correct Base SDK setting), so this smells like an XCode bug to me.
People suggesting that you don't set the base SDK in at target-level have probably never created projects which contain targets for different platforms all in one project file (in my case Mac and iOS targets, so setting the base SDK once in the project file is nonsense advice).

No provisioned iPhone connected....!

Hii all,
I tried to test my application on the simulator and it fails. Just the day before it was working fine. i checked in the organizer window.. all the provision certificates are installed, but still the color is Orange,. its not working. and when i try to debug the application it shows "No provisioned iPhone connected" error.
I got the same problem before, at that time i changed the name of the folder which specify the iphone version, but unfortunately i don't remember now where that folder is. Can anyone help me please.. or is there any alternative.
Thanks,
Shibin
There are (at least) two possibilities here. As Alex says, if you are trying to run on the Simulator then you need to switch your active SDK to one of the Simulator options. The screen shot is of a rather old version of the SDK but the principle is the same.
If, on the other hand, you are trying to run on a phone that has worked before you usually just need to reboot your handset. Sometimes the process that the debugger connects to gets in a state and doesn't respond. Restarting usually works.
You can the No provisioned device connected error only when you try to test on the device. Did you check the active configuration of your project? In order to run the Simulator you should have the corresponding build configuration selected. See the screenshot: alt text http://img255.imageshack.us/img255/7594/xcodeconfig.png
So you are seeing orange color status of the iphone in organizer? If it is the problem simply switch off your device and switch-on again. Try reconnecting the device. This solves my same problem most of the time.
Hope this helps.