I have an application in the App Store, targeted for iOS 5, that runs correctly in iOS 6, and even iOS 7, but now, I wanted to add a new feature (just one new view with a controller).
The problem comes here: If I do compile the code with Xcode 5, it looks awkward, top status bar disappears, and even some views stop working.
I know this App needs a rewrite from Zero for iOS 7, but in the meantime, is there any way to make it work like it did before?
Can I somehow download a previous SDK, and in such case, will I be able to update the app to the App Store?
You need to copy the 6.1 SDK from an older version of Xcode into the Xcode.app you've got now, and then select the 6.1 SDK specifically in the build settings.
For the device this is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk, and for the simulator it is /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk. The paths are the same.
Just download Xcode 4.6 from the developer page and use it parallel with Xcode 5.
But you don't really need to rewrite anything...
Just make a subclass for UIViewController with a following code and use that instead the default.
- (void) viewDidLoad{
#if __IPHONE_7_0
if ([self respondsToSelector:#selector(setEdgesForExtendedLayout:)]) {
[self setEdgesForExtendedLayout:UIRectEdgeNone];
}
#endif
}
Also don't forget that all UINavigationController is translucent in 7 and up and not translucent below.
Related
When i run the xcode4.5 build of my project on ios7 then keyboard appearing is not ios native keyboard which is native to ios7 but it is showing the previous greyish keyboard but alertview is working fine.
I can move to xcode 5 but there is many UI issue when i switch to xcode 5.
Reset of things are working fine with xcode 4.5
You need to switch to Xcode 5 for the keyboard. There is not other way I know of. Also the users will like your app more if it has the iOS 7 features.
As already mentioned, you need to move to Xcode 5. As you've noticed, the alertViews (and actionSheets) will be iOS-7-ified automatically, though.
I have an app released on the app store and I am still working on my iOS 7 update. How will the upgrade to iOS 7 affect the version of my app that is already out there? Will the users who have upgraded still be able to use the existing version?
If your app was built with Xcode 4 and the iOS 6 SDK, it will look the same on iOS 7, except for UIAlertViews and UIActionSheets.
If you make an update to your app with Xcode 5 and the iOS 7 SDK, all UI elements will be updated.
Apple hasn't said how much longer you can submit apps using Xcode 4, but it won't be forever.
If your existing app uses any native controls and ui, it will change in the upgraded iOS. So if you have a navigation bar translucent in your current app, it will show up as the iOS 7 navigation bar translucent. If you have Custom buttons, they will stay unchanged. They will still be there.
So my answer is: Depends.
If you have all the native controls, it will be changed to iOS 7 elements.
If you have all the custom controls (custom buttons, backgrounds etc.), it will not be effected.
Try to look into iOS 7 transition guide once its available.
If you mean how will the existing version of your app work on iOS 7, then, the simple answer is: try it!
i can run my app on my 6.1 iOS but can't with 5.1
i have the iOS Deployment Target set to 5.1 on both Project and Target
when i run the simulation for 5.1 it works fine but when i try it on my iPhone it crash's
i committed out all my code thinking that was the problem but the same thing keeps happening
XIB and auto-layout is not enabled
The iPhone simulation works with no errors
I tried to create a new project and have only a label and i still get the same out come
can some one send a link to a single view project that works with 5.1, the program could be blank i just want to compare to mine to see what is different/ wrong.
Sounds like you might be trying to use an API that is specific to iOS6 (UICollectionView or something similar).
You need to plug the device in and run it and see what the console indicates is the problem.
You have Auto Layout turned on for ViewController.xib. There are two ways to work around this. Either disable Auto Layout on that xib:
1) Xcode 4.3 not presenting Autoresizing panel in Size Inspector
Or use one of many methods to enable auto layout while remaining backwards compatible:
2) Enabling auto layout in iOS 6 while remaining backwards compatible with iOS 5
I love the idea of using storyboards, but unfortunately when I try to test this using IOS 4,
I change the deployment target to IOS 4 and I can't compile this anymore.
it said that Storyboards is not supported for IOS 4.3 or later.
So is it useful to use storyboards?
How can I write iPhone apps using storyboards so that they can be compatible with IOS 4?
I don't think that there's a reasonable way of doing it.
You could instantiate your Storyboards programatically (I think) but then you'd need something to fall back on on pre-iOS5 devices. And what would that be? Probably XIBs... which also continue to work on iOS5. You'd end up implementing everything twice. So, as I say, it may be possible but it's probably not practical.
I made an app (already approved in the app store) with xcode 4 and it runs.
Now I would like to modify it for an update. My app has 2 localize (English and Italian) and before I modified it, I removed the second localize. My app is a tab bar app with 3 buttons.
My problem is that I added a new button to the tab bar in the mainWindow (everything is correct also name and nib) but it doesn't appear when I run it on my iphone nor on the simulator (iphone or ipad 3.2, 4.0 or 4.2). It works only on the 4.3 simulator (my iphone is 4.3.3).
If I remove the mainWindow (both), then it works on the iphone and 3.2, 4.0, 4.3 simulator as before I modified it.
What can i do?
Thanks!
When in doubt, try a full clean and rebuild. I've found xCode likes to hold onto old files if they're (mistakenly) marked as unmodified, doing a full clean and rebuild usually fixes this problem
Like #Dan F says, clean and rebuild is a must. Also I've found that putting out releases won't work unless you increase the app version number. If it's currently at 1.0 try changing it to 1.1 (or however you want to version your app) and see if that fixes it.
Otherwise you'll want to play around with your build settings and make sure the versions you're building for are correct. Just a few thoughts...