iphone Dev. How can I make my app compatible with iOS 3 and iPads at the same time (iOS 4.2) - iphone-sdk-3.0

I've been looking around for a way to make my application compatible with iPhones-iOS3 and at the same time make it compatible with iphones and iPads that have iOS 4.2
I have seen some apps on the app store that claim to be compatible with iphones iOS3 and above, and with iPads.
Any idea on how they do that? How do they test against the different versions and how do they compile the final version that gets uploaded on the app store.

To make your app load in both iPad and iPhone, just make sure you have 2 different xibs to cater for each device, at application launch, check the device whether it's an iPad or iPhone and load the xib file accordingly.
iOS3 and multitasking unsupported devices will call applicationDidTerminate method when home button is pressed. iOS4 onwards, just make sure applicationDidEnterBackground method is implemented to support multitasking. You could also uncheck in the Info.plist file that your app does not support multitasking (not recommended by Apple), iOS will call applicationDidTerminate instead and the app will still be usable in both iOS3 & iOS4.
Cheers.

Related

interface orientation in iOS6

I have to make some changes in an existing app. That app was last update in June when iOS6.0 was not launched. I am wondering how the orientation works properly on the devices running with iOS6.0?? As that build contains deprecated methods of oreintation?
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
This method doesnt get called in iOS6.0 then how that app in app store is working fine in iOS6 devices? Additionally if i run this app from xcode using its code, then it doesnt support orientation for iOS6. Now my client is saying app on app store is working fine with orientation in all the devices and the new build is not supporting orientation. I know I can fix this issue by using new methods for orientation
-(BOOL)shouldAutoRotate
but just curious to know how older app is working fine on iOS6 devices using deprecated methods when those method are not even getting called in when i run it using xcode.
The older applications were compiled using iOS 5.x SDK, that's why they can run fine on iOS 6, the problem occurs when you compile non iOS 6 compliant code with iOS 6.x SDK.

Get "No such file or directory" when testing on iPad device but not in simulator

I have an app that i am release as iPhone and iPad even if it developed as Universal. The reason is that i have release an English version that is Universal and just want to update the iPhone and iPad Swedish versions as it have been with separate apps for the different devices.
When i run on the iPhone device i have no problems but when testing with iPad i get the message below, which i do not know how to remove:
"Could not launch “FamilyQuiz_3"
No such file or directory (/Users/peterk/Library/Developer/Xcode/DerivedData/MyApp_3-fosmfwberzyfryenqrjlfpacftjv/Build/Products/Debug-iphoneos/MyApp_3.app/MyApp_3)
I can start the app from the iPad device but it do not start automatically when submit from XCODE.
1)make sure your iOS Deployment Target version is the same or lower than the one on your device in build settings.
2)delete it from the device
3)close xcode
4)Goto /Users/peterk/Library/Developer/Xcode/DerivedData/ on your computer and delete the
MyApp_3-fosmfwberzyfryenqrjlfpacftjv folder
if that still doesnt work go and try deleting the app restarting your phone, and then restarting your computer even, and doing it again.

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.

Difference between ipad/iphone/Universal Application

can you please help me .
what is the Difference between ipad/iphone/Universal Application.
iPad application - Application meant to run on an iPad.
iPhone application - Application meant to run on an iPhone/iPod touch, but can also run on an iPad (in compatibility mode, with the 1x/2x toggle)
Universal Application - Application that runs on both iPad and iPhone/iPod touch and adapts to both screen sizes.
iPad uses different processor type than iPhone or iPod, so universal application carries both binaries.

iPad: What happens to iAds if iOS on user's machine doesn't support them?

Ok,
So say I put some iAds in my iPad app. Assuming that I implement it via the iOS4.2 update that comes out next week.
Now, say I release my product but the majority of users haven't installed iOS4.2 in their iPads yet. Does that mean that my app will not run on their systems (meaning, my app requires iOS4.2), or does it mean that it'll run in their system (say iOS 3.2.2) but just the iAds won't show?
Regarding making your app available on iOS 3.2 devices: Make sure to weak link iAd.framework (i.e. in your target's settings, choose 'Weak Link' next to iAd.framework) as it is not available on iOS 3.2. You should also check for availability like
if (NULL != NSClassFromString(#"ADBannerView"))
{
// handle ad loading here
}
else
{
// no iAds available.
}
It depends how you compiled your app.
You can specify that an app can run on iOS 3.2.2, but can still use features of iOS 4.2, by carefully checking the availability before using these features.
You can also specify that your app can only run on iOS 4.2 and later; then you can use iOS 4.2 features without checking the availability.
So, it's your choice. Read this Apple document.