iOS crash when built with one version of Xcode, no crash with another version - objective-c

I need to debug a crash that happens at a fundamental part of the app experience on a particular iOS version, but when I use the (newer) dev tools for that version, the crash does not occur.
How can I get a GDB session on version of an app that was installed with another SDK version?

See if you can build the app in Xcode 4.1 and deploy it to an iOS 5.0 device via TestFlight: https://testflightapp.com/

Related

Crash while running old project on iOS 11

I have code which was initially developed on Xcode 3.2. It was then later update to become compatible with ios 7. But now when I run that code with Xcode 9 GM, it run alright on any iOS 10.x device.
But crash on iOS 11 device with following error detail:
Plus: When i open this project with Xcode 9 GM, Xcode doesn't show iPhone X simulator.
I think you have some old static libraries. iOS 11 supports only 64-bit libraries.
And also you can check Deployment target of your app. Maybe it's too low (I think ios7 deployment target is not supported now).
I think your app is running on 32-bit
As a reminder, new iOS apps and updates submitted to the App Store must support 64-bit. Support for 32-bit apps is not available in iOS 11 and all 32-bit apps previously installed on a user’s device will not launch
64-bit Apps on iOS 11
I don't know what is you exact scenario but possibilities of crash with payload could be following. Hope anyone of below all will work for you.
Please Try Following.
Disable "Enable guard Malloc" from diagnostics.
OR
You Can do Following:
delete all certificates from keychain.
Quit xcode
Delete xcode derivedData and delete all provison profiles
Restart mechine
Download latest certifcates and provison profile from Member Center
Click on certifcate i will install in keychain access.your key chain access should like this
OR
if you are using custom framworks, you need to put it inside the Embedded Binaries section located in the Xcode project under the tab Target / General.

Can't select older iOS SDK Simulator Version in Titanium Studio

I have installed the SDK's for 6.x and 7.0 in xcode and I'd like to test my app on ios6 in the simulator using titanium studio.
After poking around for some time I still can't find a way to select a different iOS version in my run configurations. As you can see, SDK's are installed and I can select them in the simulator itself, but the only way to test the app is by launching 7.0 (Titanium won't launch anything else).
Manually switching between versions and relaunching the app from titanium doesn't help either.
Looks like Titanium Studio has problem with simulator settings. Compiling project from console with titanium build -p ios will run your app on simulator with current settings. Also you can use additional flags to force different type of simulator:
--retina use the retina version of the iOS Simulator
--sim-64bit in combination with --retina flag & --tall flag, start the 64-bit tall version of the retina simulator
--tall in combination with --retina flag, start the tall version of the retina device

iPhone 5.1 App using OpenCV crashes due to "nonatomic" not found

I'm developing an iOS App which targets iOS 5.1+. I'm using XCode 4.5 on Mac OS X 10.8 and I do own an iPhone 4 with iOS 5.1.1. The app needs OpenCV, which I have successfully built from sources according to a tutorial in the OpenCV-Documentation.
Here is what happens:
When I start up the application I get an exception:
dyld: Symbol not found: _objc_setProperty_nonatomic
The error does not occur with iOS 6, but with iOS 5.1 in both the simulator and on a real device.
What is that? Is it related to OpenCV? Does it have to do something with incompatibilities between iOS / the iPhone / XCode??
EDIT: My development target is set to 5.1. The Base SDK is 6.0. I copied an SDK für 4.3 (which is the lowest version that XCode 4.5 will support) from another Mac and set development target as well as the base SDK to 4.3. Did not work either (it did not even build then).
I did not an update, the project has been started from scratch using XCode 4.5 initially.
Meanwhile I also found a tip to use gnulibc++ instead of libc++, but that also resulted in that the project did not build at all.
I built a test project and found the same issue. OpenCV is being built with a deployment target of ios6, this is a known issue, and a fix is pending review, see https://github.com/Itseez/opencv/pull/70

Upgraded Xcode 4.3.2 Showing Error

I just upgraded to Xcode 4.3.2 (the newest version). When I try to run an app that I built in previous versions of Xcode, this error pops up:
Xcode cannot run using the selected device.
No provisioned iOS devices are available with a compatible iOS version.
Connect an iOS device with a recent enough version of iOS to run your application
or choose an iOS simulator as the destination.
I made sure to change the iOS deployment target to 5.1. How can I get rid of this error?
All I did was press build and run. I want to run on the iOS Simulator.
You can set Xcode to build to the simulator as illustrated below.

Can I build for 4.x simulator but run in 3.x simulator?

Ok, there have been some questions alluding to this before, and I've even read some second-hand reports of people successfully doing this, but so far I haven't found a concrete answer.
Basically, I want to build an application for simulator using iOS 4.x, and then run it on a 3.x simulator.
I have both SDKs installed, so all I need is the last mile of getting the app to show up in the 3.x simulator.
I tried just copying the app across from Library/Application Support/iPhone Simulator/4.2/Applications to Library/Application Support/iPhone Simulator/3.0/Applications but it doesn't show up when I load the 3.x simulator. There's a binary plist called applicationstate.plist, which I'm guessing keeps track of what apps are installed on the simulator, but I don't know what the binary format is so I'm kind of stuck at this point.
Has anyone managed to load a 4.x app onto a 3.x simulator? And if so, how did you do it?
Why are you even trying to do this? What are you trying to achieve? If what you really just want to do is ensure the app works on iOS 3.x then simply state that in xcode and don't worry about the actual simulator. The simulator could be running iOS 5.0 for all you should care as long as you have set 'iOS Deployment Target' to '3.0' in xcode's project settings. That will ensure the application is compatible with iOS 3.x and above. Obviously you then still need to ensure you're not calling methods from SDK 4.x when it will run on an iOS 3.x device. If that is what you're trying to test then what you're doing won't actually work. You should (as Apple advises) always grab hold of a real device running the target firmware version and test it on that. Grab an old iPod for example with iOS 3.x and try testing your app on that to ensure you haven't called iOS 4.x methods when running under an older firmware.
The answer is: No, you cannot build for 4.x simulator and run on a 3.1.x simulator or earlier due to fundamental changes in the way the simulator works.
The only way to test 3.x support is to either run it on a 3.x device (after setting min deployment target), or build on an older xcode that supports 3.x simulator (which isn't feasible if you use Xcode 4, except for iPad 3.2).
Note: Setting the deployment target does not test compatibility with older operating systems. It's the operating system that it actually RUNS on that matters (such as "iPhone 4.3 Simulator", "iPhone 4.0 Simulator", "iPad 3.2 Simulator", or an actual device).
Of course, now that 3.x users make up less than 10% of the total population, it's not really worth the trouble to support it anymore.