Can I build for 4.x simulator but run in 3.x simulator? - iphone-sdk-3.0

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.

Related

App works fine in iOS 7 with no modifications?

We've been working on getting our app to work properly with all the changes in iOS 7. Particularly the colors and layouts of things. But these changes are still in development.
The version of our app in the app store has none of these modifications. When testing locally, it works on iOS 6 fine and looks horrible on iOS 7. Yet, upon downloading it from the app store and installing it on an iOS 7 iPad, it seems to work just fine -- just as it used to in iOS 6 (!). We are wondering if there is some "compatibility flag" that the app store folks can switch, which means "not ready for iOS 7 -- use compatibility mode"? I'm not sure how else to explain this. Wondering if anyone else knows?
Our app:
http://appstore.com/cedarssuite
Summary: running via the simulator on iOS 7 or on a development iPad that has iOS 7, the app looks horrible. But downloading the approved app store version and running on iOS 7, it works just fine. Why?
A note: This is no longer correct. Since February 2014, Apple only accepts SDK7 builds
That's normal. all the old apps work fine on new iOS versions since those app. Base SDK set to that old version. in your case (iOS 6.0). They will run using old sdks. But, when you built with the new sdk (Base SDK 7.0) they look horrible as you said and some times they crash. because of layout changes and controls behaviours in the new iOS.
You are only asked to build with the new sdk to take advantage of the new features.
keeping your app. built with the old versions doesn't seem to have disadvantages other than new features. since apple still accept publishing apps with old sdk back to 4.3.
If you set the base SDK < 7, it will use the old iOS 6 style. Of course, that basically requires you compile with an old version of Xcode, and you can't use iOS 7 features, even when running on iOS 7.

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

Cannot deploy an AIR application to an iPod Touch

I'm using Flash Builder 4.5 with Flex SDK 4.5.1, and when trying to deploy an app to a 2nd gen iPod Touch with latest available iOS I get an error saying the app is not valid, and according to some Adobe sites, only 1st generation iPods aren't supported. The application works fine in an iPhone.
Should I change some setting, update to AIR SDK 3.1, or am I wrong thinking my app should work on this device despite Adobe's pages?
From what I managed to gather a week ago, Adobe dropped iPod Touch 2ng Gen support with AIR 2.6 (or even 2.5, I don't know for sure).
However, one may be able to compile a Flex Mobile project targetting an old AIR SDK version (or a more recent one if you can target Flash 10.1), and then use PFI (the old packager for iPhone before it was combined with ADT) so your application works with older iOS devices.
Sadly, my current project is forced to use ANE, so I guess I must forget about supporting old devices.

Support of iPhone 3G

I have submitted one iPhone app 6 times, and in the requirement of the last/ current version, iPhone 3G is not supported anymore.
My question: Why do I lose this model?
I have some remarks:
Now, apps don't support the iPhone 3G anymore.
I made some searches, and I didn't find any news about it.
Before I submitted this version, I updated my XCode from version 4.0.2 (iOS SDK 4.3) to version 4.2 (iOS SDK 5).
Maybe during the submission, "Apple" checked the binary in order to check the version of my tools (which I built my app with).
And as the iOS 5 cannot be installed on iPhone 3G, I have lost this support.
I own an iPhone 3G in order to make compatibility tests.
And with XCode 4.2, I had trouble to debug my App with my iPhone 3G.
But, i found the solution: Add the architecture armv6 is not enough I need to put some weak links.
If I submit my app with these options "special 3G", will these options be take into account and the support will be back?
(see the edit)
"What's new" is I changed my Apple Account: I submitted my app with another account.
Maybe there are some options somewhere that I didn't see.
Edit: I forget a part maybe important: the version of iOS.
The minimum version of iOS for running my app is iOS 3.1.
And my iPhone 3G runs on iOS 3.X
And all troubles I had with XCode 4.2 and my iPhone 3G seem to be the version of iOS (3.X).
Maybe my app lost the support of iPhone 3G to be sure there is no problem with iOS SDK 5 and iOS 3.X
But, there are users with an iPhone 3GS running on iOS 3.X.
I made some tests with one iPhone 3GS running on iOS 4.0: I had no issues and no options to add in my project settings.
Thanks for your answer. The problem may be the version of my XCode.
Like I said, I have already added the architecture armv6. But with my iPhone 3G iOS 3.X, this is not enough.
Did you test only this setting with one iPhone 3G with success?
I should do:
Add the architecture arm6
Set the Base SDK with "Latest iOS" (iOS 5.0)
Set the iOS Deployment Target with the minimum value
--- It's what you advice ----
Remove into the info.plist the parameter "Required device capabilities" (armv6 and armv7)
Add SystemConfiguration.framework as Optional (to make a weak link)
With this settings, my app crashes: "dyld: Symbol not found: __NSConcreteGlobalBlock"
So I should also add in the flag "Other Linker Flags", - weak_library /usr/lib/libSystem.B.dylib
This is one of my questions:
If I submit my app with these options "special 3G", will these options be take into account and the support will be back?
By default, Xcode 4.2 does not include support for the iPhone 3G, but you can add it back. Just select your app target and select "Build Settings". At the top, change the Architectures listed from "Standard (armv7)" to "Other". In the pop-up box, select the existing option and click the minus button, then click the plus button and add "armv7", then again click plus and add "armv6". armv7 will support the newer chips, while armv6 will add back in support for the iPhone 3G... providing you set your iOS Deployment Target to iOS 4.2 or earlier... your setting at 3.x should be just fine—that merely limits you to not using newer features of iOS obviously.
You may also need to add "-mno-thumb" under "Other C Flags" in the Build Settings, though if my memory serves me correctly that may only have been if you are wanting to use Automatic Reference Counting on the old architecture—and even then only because this is a work-around for a known bug.

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

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/