interface orientation in iOS6 - objective-c

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.

Related

App runs on iOS7 simulator, but changing simulator to iOS8 it doesn't recognize CoreData store

I have an iPad app, XCode 6, iOS 7, Storyboards and ARC. If I change the target to 7.x, the app works fine on the simulator running 7.0.
However, if I change the simulator to 8.0, the app doesn't recognize the CoreData store created when running under 7.x (the store is still there, just not found when running on the 8.0 simulator.) Also, none of the objects (UIButtons, UITextboxes, etc) show up either!
I don't have iOS 8 installed on my iPad (afraid stuff like this will affect my users), but the question is: just because something doesn't run on the simulator v8.0, does that mean that setting the lowest target to iOS 7, it won't run on the device if it is running iOS 8?
The iOS 7 simulator is on a separate (virtual) machine from the iOS 8 simulator. So any data you created one of these machines, will not be found on the other.

'NSInvalidUnarchiveOperationException', reason: 'Could not instantiate class named UIKeyCommand'

My app is crashing when I try to display another view controller. It does work correctly when the iOS SDK is set to 7.0 and I am targeting iOS 7.0. But I need the app to target iOS 6.0. UIKit is (obviously) declared in the imports. The UITableViewController I am trying to present works perfectly fine as far as I'm aware - I created it for another app, using XCode 4.6.3, targeting 6.0 and it compiled without error (as does this one) but it also displays without crashing.
I could provide code, code which does nothing more than present the table view controller using a modal transition, but I even went to the point of connecting a UIButton to the UITableViewController - it worked on iOS 7, but not 6. It's my belief that when I compile with the iOS 6.1 SDK, it should be using iOS 6.1 frameworks?
UIKeyCommand is only available in iOS 7 and later, according to this. That gives me reason to believe that it is using the iOS 7.0 frameworks even though the iOS 6.1 SDK has been specified.
I've tagged this with the xcode tag as I believe it could possibly be caused by xcode incorrectly searching for the specified SDK's frameworks.
I had the same problem as you and here is what i did to solve it:
I opened the Storyboard as Source Code and searched for the tag : keyCommands , I found a tag similar to
<keyCommands> <keyCommand/> </keyCommands>
and i deleted it.
After that i runned the app in iOS 6 & 7 and it worked with no problem.
Let me know if this works on your app too!
Cheers!

How to stop supporting iOS7

I have just installed Xcode 5, and I have an application that should be targeted only to iOS 6.0 and iOS 6.1 devices.
How can I stop supporting iOS 7.0 ??
That is not possible, you can stop supporting previous versions of iOS, but not the other way. You need to prepare your app to work on iOS7.
YOu don't need to redesign your app or anything, just open in with XCode 5 and get rid of all the warnings/small bugs.
As others have noted, you can't "not support iOS 7". However, you can delay upgrading to the iOS 7 SDK (at least, in the short term).
To do such, simply continue using Xcode 4 to build your app. When you're ready to submit it, simply do such using Xcode 4 like you normally would.
For the time being, Apple will most likely accept apps built using the iOS 6 SKD. (Imagine, for example, that you've spent several months or a year building your app... Apple will still let you submit it for the time being even using an older SDK).
Further, the app will run and appear correctly (in many/most cases) using iOS 6 UI components for the most part (in example, UIAlertView is an exception to this, which will use the iOS 7's UIAlertView look).
In the long term, however, you really should convert your app to use the latest SDK.
It's not possible to prevent the installation of your app to devices that meet minimum version requirements.
Of course, you're free to check in your app the iOS version and do something about that. For example, if your concern is really that the user user should download another, iOS 7-designed version of your app, you can inform her about this possibility:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
if ([self.window respondsToSelector:#selector(setTintColor:)]) // iOS 7
... // redirect user to better, tint-enabled version
return YES;
}

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 Dev. How can I make my app compatible with iOS 3 and iPads at the same time (iOS 4.2)

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.