Problem with upgraded project from iphone sdk3.2 to work on sdk4.0 - objective-c

I had a application that was written for iphone SDK3.2 and now I want that application to be upgraded to full fill multi tasking...
I just compiled it to SDK4.0 actually it has to get upgraded and when the home button is pressed it should 1st go to applicationWillResignActive and then it should goto
applicationDidEnterBackground but my application is not calling applicationDidEnterBackground but it is calling applicationWillTerminate...
Should I need to add any code to prevent this to happen if so, Please any one help me in solving this...
Waiting for reply...
~Raviraja

You need to setup the app to build as follows:
Base SDK: iPhone Device 4.0
iPhone OS Deployment Target: iPhone OS 3.0
They are two separate settings when in the Project > Edit Project Settings section of Xcode.
Hope that helps!

In your 'Info.plist', add 'Application does not run in background' and make sure the checkbox is NOT checked.
Source

Related

Simulator/Device name shows only Unity-iPhone

Just loaded a project in Unity 3D (4.34f) it is working as desired, Built and Run for iOS devices. works perfect in the Xcode (5.1.1) simulator.
In the Simulator/Device Name is written Unity-iPhone, it does not show neither my iPad or my iphone when connected.
What am I missing? any help?
Easy, happens to me frequently, two choices deselect the Development Build in build settings or in the player settings change the dropdown list of Optimization SDK Version to "Device SDK".
Let me know if works for you....

iOS Simulator Doesn't Install Application

Using Xcode 5.1 to debug an iOS 7.1 iPad application.
When I build and run my project in the iOS Simulator, the simulator opens and my app icon pops up for a second. Then it looks like the app stops installing and the simulator goes to the home screen. Xcode still thinks it's debugging and it doesn't show any errors in Xcode or the simulator. I can go to my app in the simulator and click it again, but it just crashes. I get the same behavior in iPad, iPad Retina, and iPad Retina (64 bit). Any subsequent tries to run the app in the simulator doesn't even attempt to pop the app icon up until I quit the iOS Simulator and try again. All the usual fixes haven't worked for me yet.
Fixes I've Tried:
1. iOS Simulator > Reset Content and Settings...
2. Window(in Xcode) > Organizer > Delete Derived Data & Delete Snapshots
3. Delete Contents in ~/Library/Application Support/iPhone Simulator
4. Uninstall Xcode and reinstall
5. Clean project and rebuild
6. Restart machine
I'm out of ideas. Is there something I've missed?
Thanks all!
Create another app with the exact same template and look at the app delegates and make sure they are the same.
Example: AppDelegate.h and AppDelegate.m
You might've accidentally deleted an area that helps load the App.
Alright I found the problem. I was playing with how we load our frameworks because we were having other issues before and I left a bad value in our Linking settings.
Here's how I fixed it:
Project > Build Settings > Linking > Mach-O Type set to "Executable"
It was set to "Bundles" before which causes Xcode to package the app in a way that caused ours to break.
Helpful Post: In Xcode project target build settings, What is Mach-O Type?

xcode timed out waiting for app to launch

Application get fail to launch in device having iOS 6.0 from xcode 4.5. Xcode says Application can't be launched timed out waiting for app to launch. I reset my all device settings. Cross checked if i choosed right provisioning. Yes, its right. here i am attaching image of console. Please help me out.
None of the above tips helped me. It turned out I was using my Distribution Profile instead of the Developer Profile in Debug mode. You can check the Profile you are using by going to
Build Settings->Code Signing Entity.
Make sure you are using your Developer Profile in Beta and Debug mode.
I had a similar issue when trying to debug an App with Ad-Hoc provisioning... Check which provisioning you're using, it seems ad-hoc provisioning cannot be used for debbuging.
Whenever this happens to me, I have done the following to fix the problem:
Stop the app from running in Xcode.
Delete the app from the device (or Simulator).
Select Product > Clean from the Xcode menu.
Close Xcode.
Close the Simulator (or restart the device).
Restart your computer (yes I know this like a Windows solution but seriously).
Try again.

Library not loaded

I added Social.framework in my application in the same way i use to add the other frame works. I have downloaded xcode 4.5 and iOS 6 . but my application crashes with follwing error only on device. It works fine on simulator.
dyld: Library not loaded: /System/Library/Frameworks/Social.framework/Social
Referenced from: /var/mobile/Applications/FC88291D-2052-45D6-A7BB-65CE340F07BF/Uploading Image.app/Uploading Image
Reason: image not found
I was getting this exact error. My app currently has a deployment target of 5.1. I wanted to add Facebook sharing. I found this old post, Conditionally including a library for different iOS SDK versions?. All I did was set "Social.framework" to 'optional' and it did the trick, then my app would run on ios 5.1 and ios 6.0. Of course you need to do checks at runtime for what OS the device is running otherwise you could run into a crash if you try to access social.framework in ios 5.1 or earlier. Hope that helps!
In Xcode go to targets, Go to build phase and search for Social frame work you will find that under "Link Binary with Libraries" section. There select social frame work and see there is an option on right hand side required/optional in that just change required to optional. Now you are able to run on all ios devices without any crashes.

Interface builder is unable to open documents of type iPad XIB

I got a application from my teammate, and it is for both iphone and ipad devices (which it is developed under iPhone SDK 3.2).
I have iPhone SDK 3.1.3 installed in my mac book. When i tried to compile the application for iphone simulator i got the following error.
Interface builder is unable to open documents of type iPad XIB.
The above error is for interface builder created for ipad.
My Question is we can't compile the application on iPhone SDK 3.1.3 which the application developed under iPhone SDK 3.2?
Please shed some light of this?
thanks
mindus
Go to your project settings, and delete the line that says Interface Builder Plugin search path or something similar.
the exact line in project.pbxproj is: IBC_PLUGIN_SEARCH_PATHS = "${PROJECT_DIR}/**";
Short answer
Temporarily remove the iPad xib when working with the 3.1.3 SDK. Put them back when you go back to 3.2 and above.
Longer answer
This cropped up for me when compiling against 3.1.3. You can use conditional compiling to get code user newer features to build successfully (see Matt Gallagher's helpful post on conditional compiling).
There may be a smarter way to tell the compiler not to look at the iPad xibs. For testing on the 3.1.3 simulator I simply made a copy all my iPad xibs and then removed them from the xcode project. When going back to my current development set up, you have to put them back. It's a bit of pain, but not that fiddly.
To fix this:
Press Command-1 to go to the project tree
Select your project
The in the right panel select your project, and then click on "Build Settings"
In search field just below the "Build Settings" enter: "Overriding Plug-In"
Now, the only visible setting left should say "Overriding Plug-In and Framework Directory"
Double-click the value and remove all entries using "-" button
Click somewhere else so settings are saved
That should fix it