Finished running on iphone simulator - iphone

Since Yesterday when I build and run my app I m getting build Succeeded and Finished running 'appname'on iphone simulator and then it stops running. When I reset the contents of simulator then it shows me the app.This happens to me from yesterday.Before that I used to run as many apps in my simulator.But now when I reset contents then only I can run a new app.
I dont understnd whats wrong with xcode..?
Is there a way that I don't reset content settings everytime for a new app?

Try this..
1.Manually launch the iOS Simulator.
2.From the "iOS Simulator" menu, click "Reset content and settings",
3.Close and rebuild your app.

I fixed it by doing the following..
- clearing the derived data
- resetting the simulator
- shutting down the simulator and having it be launched by xcode after that
I did figure out what it was I was doing to get into the problem. I was trying to copy a folder called Resources to the bundle. Twice doing that got me into the mess. Third time I renamed the folder to just Res and it seemed to work. Seems like "Resources" is a special name for folders in a bundle and you can't use it for your own content.

Related

Storyboard file 'MainStoryboard_iPad~ipad.storyboardc' was not found

I am attempting to validate my iOS project before uploading it to the App Store. It's an iPhone app that runs fine in the simulator and on my iPhone test device. It works fine in iOS 6.1 and iOS 7.
When I run the Validate check in Xcode Organizer, I repeatedly get 1 error and 1 warning.
Error is:
Storyboard file 'MainStoryboard_iPad~ipad.storyboardc' was not found. Please ensure the specified file is included in the bundle with any required device modifiers appended to the filename.
Warning is:
Missing recommended icon file. The bundle does not contain an app icon for iPhone/iPod Touch of exactly '120x120' pixels, in .png format.
I have spent days (weeks?) searching for an answer to similar questions that might resolve the error message. Nothing works ... and I've tried a lot of things that seemed to have worked for others.
Perhaps there really is something wrong in my code / bundle creation ... help! I can't find it. Since I get the same 2 messages every time I try and validate the project, no matter what I change, I'm starting to wonder if, somehow, the changes I'm making are not making it through to the bundle that is getting validated each time?
Goto your Project view, click Targets, goto General tab and look at Deployment Info settings.
In the Devices selection box, you will see iPhone in your case.
Perform the next steps:
select iPad
Delete the text Storyboard-iPad in the 'Main Interface' Choice box so it is empty
Press cmd-s to save (If not saves automatically)
select iPhone again in the Devices selection box
Build your project again and archive it again 5.
Problem should be solved now.
To fix the error, just open the project's info.plist file and remove the value for the key Main storyboard file base name (iPad) (or UIMainStoryboardFile~ipad).
Also, you should be able to fix the warning by adding an app icon of the size/type specified in the warning message.
Don't forget to re-archive after making these changes.
This happens, when you change the default storyboard name for iPhone App (even you not targeting to iPad).
In Project > Targets (App)> General > Deployment Info
Just change Device to iPad and then select the default storyboard of iPhone.
Change back Device to iPhone
I have exact the same problem. I'm working on a universal app that has 2 storyboard (both iPhone and ipad) and I accidentally deleted the iPad storyboard while I was making the localisation, then I re-added the iPad storyboard(maybe I did it incorrectly), the next time I submit the binary, the Error-itms-90029 occurs(gone through the validation but failed at the submission, strange case aye~).
I solved this problem by once again deleting the the iPad storyboard, and again re-insert it. and now it is fine. careful when you re-insert it, you also need to check it in the "Build Phases >> Copy Bundle Resources", if you see the storyboard icon showing properly then it is fine.
I stopped trying to resolve the error messages I was getting in the Validate step and began following my hunch that the bundle changes I was making were not getting through to the bundle that was being validated. I read posts about how to create an Archive "ipa" file. Following those instructions, I was able to create a new and up to date ipa file that did validate and I was able to upload to the App Store for review.

Xcode 4.6 builds, runs and finishes instantly (simulator iOS 6.1)

In xcode, I tried to add a tap gesture to my app and when I built it, it started a problem with Xcode. It goes from building, 'running on iPhone 6.1 simulator' to 'finished running on iPhone 6.1 simulator'.
If the simulator is closed, it starts up with a black screen and you cannot click the home button etc. If open, nothing happens, the app doesn't install but the simulator doesn't crash.
I have tried the armv6 architecture 'fix' but that didn't work. I have also cleaned the project and project data. I have reset the simulator multiple times as well.
If I add the old files to my new project, it works up to a point (I copy and paste old files into new) but then the same happens.
Thanks for your help in advance!
NOTE:
New blank projects build and run fine.
EDIT: It still didn't work after undoing my previous actions, and the simulator is responding according to Finder, although the screen stays black
–––––––––––––––––––––––––––––––––––––––––
UPDATE
I had a folder named 'resources' in my application, imported as a reference which, following links from the thread #arthan.v supplied me with fixed the problem. What I did was rename the folder to files and reimport it.
Thank you so much, I spent 2 days trying to fix it before now!
Click the Center Button in View on your right hand side of Xcode.
In your Bottom bar, you'll see error: failed to attach to process ID 0.
Check these error: failed to attach to process ID 0 and Xcode compiles my App, but can't run it in the simulator
This sometimes gets fixed by these steps:
iOS Simulator > Reset Content and Settings ... > Reset
Xcode > Build and Run
I experienced the same issue after I had re-organized some code and renamed the workspace and project. Eventually realized there was an old version of my test app on the simulator's homescreen. I delete that and then everything was building fine again.
You might need to add the device to the provisioning profile. I experienced this on Xcode 6 and a real device.

iOS.app not refreshing GUI

I have a strange app behavior: The App updates the GUI changes only after returning from the background to foreground. When launching, some GUI elements are also missing and appearing not until returning from background state. Any touch on buttons fires not until going to background and reentering foreground.
The problem is with iPhone, iPad and both simulators and with Xcode 5.2.1 up to 5.3. It appeared after deleting the app from the devices and resetting the simulator. Beforehand there was never a problem like this with this app.
When you can't fix it, restore it: With version control i reverted the AppName.xcodeproj directory (Finder shows it like a file) and it fixed the problem.
Then Xcode offered me to "upgrade to latest recommended settings and perform project clean up" which "removes unnecessary build files". I did that and also chose the "create snapshot option". After that i had the same problem again.
The i reverted to that snapshot before the project settings update and it worked again.
Key take-away: "upgrading project to latest recommended settings" can have nasty side effects. Snapshots and version control are great stuff.
Further investigation showed that in Settings.bundle one missing Root.plist file was reason enough to kill my GUI. I had there Root~ipad.plist and Root–iphone.plist and thought the Root.plist is no longer needed. Looks like you need all three if you want separate plists for iPhone and iPad.

App Icon Won't Change In iPhone Simulator

I had an old app icon in xcode that I had just attached to the program to see how it looked in the simulator. I made changes, deleted the images, and replaced them in Xcode. However, they are still the old ones in the simulator. I tried resetting it and everything. Does it keep a cache somewhere?
EDIT: Solved by cleaning project.
Have you tried cleaning?
From the Xcode "Product" menu, choose "Clean" or "Clean Build Folder" if you hold alt/option.
If "Clean" does not work, try this:
Reboot the device
Kill the app before running it from Xcode.
Those works in my case.

XIB not loading on iphone but in Simulator

When I run my app in the simulator it does load the xib file and all looks perfectly fine. As soon as I run in on my iphone4 I get a white page with "My Universal App on iPhone" but not my xib file.
how comes?
Try this: Clean all targets, delete Build folder and uninstall app from device.
It happened to me once too. Try to clean your project (cmd+maj+K).
Try to use the function InitWithNibName:#"YourNibName" without misspelling in YourNiBName.
Good luck
Check that the .xib file is still part of your project and set as a resource to copy at build time. This sort of thing tends to happen if you've removed a file from the build resources but there's still an old copy in the simulator's build directory.