I just updated to iPhone SDK 4 and am trying to debug on my device with 3.1.3 installed. Before the update, I compiled with Base and Active SDK set to 3.1.3 and all was well. After the update, I'm limited to SDKs 4.0 and 3.2--setting the base to 4.0 and iPhone OS Deployment Target to iPhone OS 3.1.3, I'm able to build and install on my 3.1.3 device, but receive the following error:
Error from Debugger: mi_cmd_stack_list_frames: Not enough frames in stack
I'm not using anything specific to the newer SDK, as I haven't touched a bit of code, just updated the SDK/XCode. So what am I doing incorrectly? The application runs as expected on an iOS4-installed device. Are there changes to pre-existing API's that need to be weakly linked perhaps? Thanks for all help.
Have you tried removing the app completely from your dev device, doing a build -> clean all targets, and then build again to your device?
I found this answer on macforums. If it's correct, then you probably have a memory corruption problem in your app that is confusing the debugger. Perhaps over-releasing something somewhere.
This probably isn't related to the SDK you are compiling with. It's possible you had this problem in your app all along but it just didn't show up until things moved around with the new Xcode, SDK, etc.
EDIT - I just ran into this problem myself trying to update an older app of mine to 4.0. It would run fine in the simulator and would install and run on the device except it wouldn't run in the debugger on the device. Anyway, I finally decided it was the .xcodeproj file that was corrupt or bad in some way and created a new project, copied over my source files to the new project and now it all works again. It's a pain but it only took about 20 mins to duplicate all my settings and I spent a couple hours trying to get the debugger to work.
Myself (and probably many others) are concerned about "will I still be able to compile/install apps for v3.1.3 of the iPhone OS?"
And what version of xCode does it become IMPOSSIBLE to ever write v3.1.3 apps again?
(Without installing a second copy of an older version of xCode.)
I've read the mile-long document that Apple wrote on the subject... but it sure would be simpler to understand if they just LISTED the various versions of each... instead of writing long paragraphs.
If you have:
Mac OS version 10.x.x x
xCode version x.x.x
SDK version(s) x.x.x
you can produce apps for iPhone OS x.x.x through x.x.x?
Related
I am trying to simulate an upgrade from version 2.0 to 2.1. I have version 2.0 hosted in testflight, so I did install it in my device. Then I tried running the app from xcode. However what happened is that the app did not get overlapped, instead it created two apps with the same name. How can I make it such that when I run the app from xcode it overlays the old version?
I've made sure that the bundle identifier is the same.
Well the info you can get while updating can be found # this link here.
when user updates an app, Documents folder is stored as is, including
NSUserDefaults (but, sometimes user download app via iTunes and
replace the whole application, crying 'OMG! update killed all my
levels progress!'); Application bundle is erased and replaced by new
one (anyway, it is readonly for user); Re-deployment of new build
version will be enough;
You can't access the appstore inside the simulator because: # link here
It's a simulator not an emulator. Even if there was an App Store in
the Simulator, none of the apps in the store would work since they are
compiled for ARM CPUs while the Simulator runs x86 code.
Another stack overflow # link here states:
Build and install your old version, generate some data, and then
install the new version on top of it.
For testing before submitting to the Appstore I generally download
from the AppStore again the old version, and then install with Xcode
the newer version - for your next update... ;-)
And another stack overflow (that I lost the link for) states:
No, the simulator runs i386 binaries and iPhone appstore apps are ARM
binaries apps.
iOS apps are compiled to machine code, Android apps are run in a
Virtual Machine using byte code and are translated to machine code at
the time they are run.
So no, I don't believe you can run it in the simulator, how ever you can have older projects saved on the iPhone and test both out. And the apple documentation is # this link here.
Read this: https://developer.apple.com/library/ios/technotes/tn2285/_index.html
You cannot simulate update in XCode (neither in simulator or connected device). You have to create IPA file and simulate update process via iTunes.
According to the documentation should be able to choose which iOS version the simulator should run, however only the latest 4.3.2 is listed under "Hardware/Version".
The helps says:
"To set the iOS release used in the simulation environment, choose Hardware > Version, and choose the version you want to test on."
I don't want to support 3.x (although it would be nice) but at least I want to simulate my app on 4.2, 4.1 and 4.0.
What's going on? Why aren't they listed?
UPDATE:
I'm on Lion so I cannot install an earlier version of Xcode. Before my Upgrade I could test different versions easily.
the problem is that you have no other Simulator SDK installed which can be used. As #dorada has mentioned you have to install an older Xcode which in fact doesn't work because you're using Lion. I haven't tried it with Lion but principally it should work like before with Snow Leopard.
I'm referencing to my other answer how to get an older Xcode (don't know if it's still working)
After you have an older Xcode version, mount the image an navigate with terminal to that volume. There should be a hidden folder Packages. open that folder with open . and locate the two .pkg files you need (e.g. iPhoneSDK4_0.pkg and iPhoneSimulatorSDK4_0.pkg) and install both.
They will appear in your root directory and you have to move them to your Developer dir (don't simply overwrite, it will delete all other SDKs. go to the last different folder it should be iPhoneSimulator4.0.sdk\ and copy that one)
DONE (and at that point I have verified it: it works on my Lion. I used the dvd image which I have started backup'ing since 3.2.1)
Although iPortable has the correct answer I decided to post a step-by-step guide which is easer to follow:
Download Xcode 3.1
Mount the dmg file
In Finder menu select "Go\Go to folder" and enter "/Volumes/Xcode and iOS SDK/Packages"
Install the simulators you need (Double click)
Copy the simulation folders from /Platforms/iPhoneSimulator.platform/Developer/SDKs/ to /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/
If your have some SDK missing Install the missing SDK from "/Volumes/Xcode and iOS SDK/Packages" and copy subfolders from /Platforms/iPhoneOS.platform/DeviceSupport/ to /Developer/Platforms/iPhoneOS.platform/DeviceSupport/ (for me they were all there from 3.1 to 4.3)
you may download the older ios sdk / xcode from . https://developer.apple.com/downloads/index.action
(i found this answer in another stack overflow topic actually, but now i can not seem to find that question!)
Open Xcode and in the menu at the top left, where you select what device to run on, click "More Simulators..."
The download section of Xcode preferences will open,
Click the "Components" tab.
You will see a list of simulators that can be installed, click install on version you need.
The simulator will need to restart to install.
To run the newly installed version of the simulator just select it from the run menu in Xcode.
You actually have to install previous simulator versions, they aren't there on a new install.
Maybe you can search and download them somewhere? - we keep them on a shared drive at the office.
After installing the Xcode 4.2 for Snow Leopard, I noticed there was a choice for iPad 3.2 Simulator, but using it just brings up some alerts that say "iOS Simulator could not find the SDK. The SDK may need to be reinstalled." and another alert that says "Simulated application quit. Click Relaunch to try again." with Quit, Switch SDK, and Relaunch buttons.
I can successfully use iPhone 4.0 Simulator, iPhone 4.1 Simulator, iPad 4.2 Simulator, etc up to iPad/iPhone 5.0 Simulator, but really would like to have iPad 3.2 Simulator and iPhone 3.1.3 Simulator and earlier down to 3.0 if possible.
Our apps generally run all the way back to 3.0 and we occasionally receive bug reports from earlier iOS users, and would love to be able to debug these issues more effectively.
I tried the technique summarized by Tibidabo and although I am able to copy the simulator folders as mentioned, and though they show up as choices in Xcode, I cannot get them to actually run as simulators and I get the same problem alerts mentioned above.
What are other developers doing to support debugging of older iOS versions?
Go to Project Settings -> Summary an change Deployment Target.
I have a question regarding compiling against SDK's, which I thought I understood until yesterday.
I have an iPhone app, which the version compiled against SDK v3.2 and running on an iPhone emulator runnning version 4 works fine, but when I recompile the app against SDK 4 the interface starts to mess up.
I thought when you write an app against an SDK/Frameworks like iOS or the Android SDK's, the code you write gets compiles into an app (with any added libs), and then get excecuted on the system. The sdk being present on the dev machine for the purpose of the app being able to compile (and run compile time checks) but not actually compiled into the app code.
What I dont understand is that if this is the way it works, how can just compiling against a newer version of the SDK break the app (bearing in mind whatever version it is compiled against it is still running on iOS version 4) as how is it not still the same compiled app.
Obviously I am missing something here!
Thanks for any pointers
Any number of reasons; when you target a particular version of the OS, it can change the set of APIs that are available and it can change how the app is linked. At runtime, the system can do what are called "linked on or after" checks. If your app was linked with a target of an older OS, the newer OS might preserve some behavior or make sure a bug still exists. If targeted to the newest OS, you get the new behavior.
All of this is to say that you likely have some issue in your code where either you were relying on a bug in the 3.x versions or you are using an API whose behavior has changed between the two versions.
There are a few questions relating to this topic but nothing quite the same when it comes down to the details:
We would like to use the iOS Simulator without installing the rest of XCode on a macbook. It is an in-house laptop, and will be used by employees, but not engineers.
We already know how to run applications on the simulator without the source code and compiling required, but it would be nice to be able to install a 100MB app and application support that can run our in-house distribution app as opposed to a 2.4GB XCode installation. Any ideas? Thanks.
The Simulator app requires several other large directories from the Xcode distribution in order to work at all. The only official way to install all of those properly is to install the entire SDK from the dmg. Then you can experiment with deleting the hopefully "unneeded" directories. Be prepared to start over if you delete something that the Simulator requires.
You would have to extract the Simulator pkg from the Xcode DMG. The only thing is that the Simulator depends on having an SDK installed, that way it knows which iOS to run the app in.
Simulators are not available as separate/stand alone downloads.
No, you can't download ios simulator stand-alone
I'm having a problem getting my MacBook set up to build iPhone apps in xCode. The iPhone Simulator locks up and shows the "spinning circle" busy icon.
I've tried everything I can think of, including
resetting the simulator
tried all of the different hardware options
tried the two debug build choices in xCode.
uninstalling the SDK and completely reinstalling
I downloaded the SDK today - "xcode_3.2.2_and_iphone_sdk_3.2_final"
I'm just upgraded from Leopard to Snow Leopard (10.6.3). I've run all the software updates. xCode version says 3.2.2 (1650)
If it matters, my MacBook is 3-4 years old, 13 inch, dual 2.16 ghz intel cores, 2 gig RAM. I've never had a single problem with it.
I would be so grateful if anyone can help me
thanks so much,
if you have access to the 4.0 one, then try that, if not, then I would install a previous sdk version in a different folder (or rename your current developer folder or delete it, then install the previous version under /Developer) and run that one instead
I just finished installing the 4.0 SDK. I made a new windows-based iPhone app (HelloWorld) and tried a build/run (Simulator-4.0 | Debug)
Same exact behavior... The simulator appears and the rainbow spinning progress wheel just keeps going and going
I took a sample from the process ("not responding...") but it's pretty big and I don't see any way to attach it to this question.
thanks again