Porting Apps From iOS 7 To iOS 8: How To Go About It?

By | April 21, 2015

For retaining the functionality of iOS applications on the latest flagship iPhones, they have to be ported to the iOS 8 platform. In what follows, we have deliberated on some key steps for porting applications to the new mobile platform from Apple.

With more than 4000 new APIs, iOS 8 has been universally acknowledged as the most developer-friendly iteration of Apple’s mobile platform to date. Right from the platform extensions and Swift-compatibility (Swift 1.2 released recently), to device-specific features like the ‘smarter’ Siri and Touch ID – most things have come in for praise by mobile software and app development experts. There is some doubts and concerns about how iOS 7 applications can be ported to the iOS 8 platform though. Over here, we will highlight how this porting of apps has to be done:

 

  1. Stop relying on ‘Scale Mode – You might be tempted into thinking that porting apps to iOS 8 is not necessary, since there is the option of running the applications in ‘Scale Mode’. However, simply scaling up iOS 7 applications is not a smart option – since, on the bigger screens of iPhone 6 and iPhone 6 Plus, the app screens might appear stretched (particularly in ‘fullscreen mode’). There can be issues with the size of the status bar as well. Porting the apps is important, since you want to provide optimal app-usage experience to iOS 8 users, without causing any inconvenience to those who have stayed with iOS 7.
  2. Download and install the latest Xcode version – Which means Xcode 6.3. Contrary to what was initially thought, iPhone app developers have confirmed that there is no need to work through older versions of Xcode as well. The new Xcode framework has all the tools and resources to enable seamless porting of apps from iOS 7 to iOS 8.
  3. Take a complete backup – Chances of losing the source code of an app while porting it is minimal. Even so, it makes sense to take a backup of the entire source code folder, before initiating the process. Make sure that you can access it quickly, if and when necessary. Once this is done, launch the project in Xcode, and select ‘8.0’ as the iOS Development Target version (under Project → Settings).
  4. Check the deprecation warnings – Next up, you will need to prepare a list of the APIs and frameworks that have changed between iOS 7 and iOS 8. After setting the Development Target version, a fairly large number of warnings will be automatically generated. Jot them down, and start changing the deprecated APIs individually. For instance, ‘[NSArray count]’ on iOS 7 has changed to ‘NSArray.count’ on iOS 8. You will have to carefully make these changes.
  5. Boost up the display resolutions – Professional UI/UX designers have a big role to play in the porting of apps to the iOS 8 platform. iPhone 6 Plus comes with high-end 401 PPI Retina HD display (a big move up from the 326 PPI support of iPhone 5). Hence, the images in the apps need to be of higher resolution too. All the new images you include in the app have to be of 3X (thrice the original resolution level) resolution, unlike the 2X images that were being used for iOS 7. Note that @2X app assets are still supported by iOS 8.
  6. Implement the new notifications system in your app – According to iPhone app development experts, this is probably the trickiest part in the porting process. Directly calling registerForRemoteNotificationTypes no longer works – since iOS 8 requires a  dual layer of app notification permission (the first for displaying app notifications, and the second for sending these notifications remotely). Developers now have to call ‘registerUserNotificationSettings’, and then pass it in a previously-defined settings object (UIUserNotificationSettings). Once the user-response is received and a new delegate method is called (i.e., after the first layer of permissions is obtained), the registerForRemoteNotifications method has to be used, to request remote viewing of notifications. The earlier callbacks can still be used to get the device token, but no parameters are supported in iOS 8 inside registerForRemoteNotifications.
  7. For large apps, use XIBs – There is a lot to be said in favor of storyboarding, but it is not particularly good for large-scale iPhone apps. Problems can crop up if a team is working simultaneously, and porting from iOS 7 to iOS 8 can also be problematic. Instead, you can switch over to XIB files, which, apart from being optimal for larger applications, benefit from the new ‘Size Classes’ of iOS 8 as well. A mix of storyboards and XIB can also be used, if displaying the core flow of an app is important.
  8. Provide 64-bit support – Apple had issued a notice that, from February 2015, every iOS application will need to have 64-bit support. Hence, this is yet another vital element of the overall app-porting process. In the ARCHS build setting you are using, simply add the arm 64 bit architecture. Check whether this implementation has been done correctly, and then just port the app to the 64-bit level. It should work fine.
  9. Customize the app launch screen in fullscreen mode – We have already mentioned how running apps in ‘Scale Mode’ is not quite the right idea on iOS 8 devices. Instead, iPhone app developers need to activate the ‘Fullscreen Mode’, while porting applications to iPhone 6/6 Plus. According to Apple, a ‘storyboard launch screen file’ (which, ironically, is a XIB file) is auto-generated in Xcode. It serves as the new launch screen of the app. The presence of this file is an implicit indication that the application is compatible with the larger iOS 8 devices. Remember, you will still have to provide 4” images, if you do not want to withdraw support for iOS 7. With the launch image, you can add a UIImageView as well.
  10. Working with asset catalogs – This is, in essence, a continuation of the previous point. Professional iOS coders and app developers who use asset catalogs need to separately choose the right sizes for the launch screen images of the app. For iPhone 6 Plus, launch images have to be 2208×1242 and 1242×2208 (for landscape and portrait views respectively). For iPhone 6, the app only needs the launch image only in portrait mode (size: 750×1334).
  11. Create a Universal Storyboard – This is required for two key purposes. Firstly, a Universal Storyboard is essential to create an smooth and adaptive layout of the app that is being ported to iOS 8. Secondly, and more importantly for mobile app developers, the WatchKit SDK cannot function without it and Auto Layout. Enter the info panel of your project storyboard (press ‘Cmd+Alt+1’), and click on the checkbox next to ‘Use Size Classes’. Next, for the separate size classes (in other words, the screen sizes), you will have to define the Auto Layout Constraints. To ensure that the views are being set up properly, use the ‘Preview’ option (in Assistant Editor) from time to time. The Universal Storyboard thus created will make your app customized for all screen sizes.
  12. Rewrite the rotation methods – iOS 8 comes with all-new rotation methods. This, in turn, implies that the ‘viewWillUnload’ methods used for iOS 7 (or earlier) apps would no longer work. The new methods – like viewWillTransitionToSize:withTransitionCoordinator and viewWillTransitionToTraitcollection:withTransitionCoordinator – have to be manually written. In fact, all the UI rotation methods in the ported app have to be new. The old ones are deprecated in the iOS 8 SDK (many apps created with iOS 7 SDK will still work on iOS 8 though).
  13. Set up the Location Permissions – You are almost done with the iOS 7-to-iOS 8 app porting process. The next thing you have to do is include the two-stage location permission request requirements of iOS 8 (for receiving updates a) when the app is running, and b) when the app is not running). Location updates are no longer automatically shared, and for requesting the permissions – developers have to separately call the requestAlwaysAuthorization on the CLLocationManager. A new key (NSLocationAlwaysUsageDescription) also has to be created in the info.plist of the application. Location/Navigation features are key for the optimal performance of most iOS apps. Make sure it does not get lost after an app is ported.
  14. Use the resources of Swift – It would be a shame if you do not use the powerful resources of Swift after the porting is complete. In the existing .m file(s), you can add Swift classes by importing ProductModuleName-Swift.h. If you wish to work the other way round (i.e., include Obj-C classes in Swift files), use #import for importing all the necessary header files). Make sure that you allow the ‘bridging header’ (the prompt appears when Swift files are added to an Xcode project for the first time) to be created.

UIActionSheet, UIPresentationController and UI AlertView are some of the APIs that have deprecated in iOS 8 (the first and the third have been replaced with UIAlertController). For mobile app graphic designers, two of the biggest #wins of the new platform are UIVibrancyEffectView and UIVisualEffectView. After porting your app from iOS 7 to iOS 8, you can use the WatchKit tool to create an extension for Apple Watch. iPhone applications can be made more functional than ever before on iOS 8 – and it’s high time you ported all your applications on it.

  • SorinJackson

    I know one company mobilepundits who can help you to port your app from iOS7 to iOS8