Category: iOS

  • Mobile App Release Roadmap / Checklist

    Mobile App Release Checklist

    1. Install new version above the old one.

    2. Install your app to different devices, as many as you can (iPad, iPhone, iPhone 5, iPhone 3GS, Galaxy S4, Google Nexus 5, Nexus 3, very small screen size Android devices, etc.) Particularly, for Android and for iPad.

    3. Check different geo locations, for example, Moscow, St. Petersburg, Ufa, etc., not the only one, where you live and develop the app.

    4. Check that your app doesn’t load data to Documents folder, that is backed up in iCloud. All files should be marked as not backed up, if they can be downloaded again.

    5. Check that your app doesn’t have iPad or iPhone words in the name.

    6. Check, how data absence is handled when your app fails to load data from server. Particularly, on Android.

    7. Check, how bad answers are handled, like HTML instead of JSON. Particularly, on Android.

    8. Check, how bad objects in JSON are handled (like null objects or strings instead of objects, etc.). Particularly, on Android.

    9. If you use In-App Purchases, check that they are activated for a new version in iTunes Connect.

    10. If you use In-App Purchases, check that your app has in-apps if they are activated.

    11. Check, how absence of internet is handled.

    12. Check, how different operations with arrays and dictionaries are handled.

    I am tired of being unsuccessful while releasing new versions of the apps to the AppStore and created a checklist. Always, I forget something to check, when I release an update. Hope, this will save your time, when you publish your app versions. Using the help of testers doesn’t improve final results in these cases, so you have to check all this shit yourself.

    All these reasons in my developer experience created some shit in my life. And all these points have their own graves of my time. Check them all, when you decide to release your app version.

  • Creating fast screenshots for AppStore in iOS Simulator

    Did you know, that there is a feature to create fast screenshots for AppStore in iOS Simulator ?

    Press Cmd + S and you will get a screen of the iPhone on your desktop in an appropriate size.

    Really useful feature, that I didn’t know about. What a shame…

  • How to create UIButton that looks like UITableViewCell with AccessoryIndicator

    Sometimes you need to create only one button, that looks like a UITableViewCell with accessory indicator. Users are familiar with this control and they know that if they click it, something should appear. For example, it can be used in different forms to select something after user taps a button. Using a UITableView with one section and cell is too complex approach if you need only one such button. Even if you need some more such buttons, you can use this solution to make code a little simpler.

    I created an instance of UIButton and reached this goal after some search in StackOverflow and my own attempts. Finally, my button looks like this:
    DKAccessoryButton

    Yes, it is a UIButton, not UITableViewCell. So, how I did it?

    You can look at my repository on GitHub, I have published a source code of such button under MIT Licence Terms.
    DKAccessoryButton: https://github.com/wzbozon/DKAccessoryButton

  • Using Yandex Maps API & Core Location In iOS To Determine City Of a User By Reverse Geocoding

    My goal was to determine the city or town name of a user to fill a region text field automatically in iOS app. At first I tried to use Core Location and MapKit, but I got only city names in English, for example, ‘Ufa’.  I had to get city names in Russian, so I decided to use Yandex Maps API. This is a final result – interface with a button to get city name automatically in Russian and a textField with a city name:

    First, we add CLLocationManagerDelegate interface and an instance variable of CLLocationManager to get coordinates to our View Controller:

    @interface MyViewController : UIViewController 
    {
      CLLocationManager *_locationManager;
    }
    
    @end

    I created in my ViewController two helper methods to show and hide spinner without writing implementation of it:

    - (void)showSpinner
    {
      self.hud = [MBProgressHUD showHUDAddedTo:self.view animated:YES];
    }
    
    - (void)hideSpinner
    {
      [self.hud hide:YES];
    }

    I have a button on my ViewController. When it’s clicked a TextField is filled by a city name automatically after it is determined.

    #pragma mark - Location determination
    
    // Button click handler
    - (void)determineRegionClicked:(id)sender
    {
      [self showSpinner];
    
      // We create CLLocationManager and start  updating location
      _locationManager = [[CLLocationManager alloc] init];
      _locationManager.delegate = self;
      _locationManager.distanceFilter = kCLDistanceFilterNone;
      _locationManager.desiredAccuracy = kCLLocationAccuracyBest;
      [_locationManager startUpdatingLocation];
    }

    Here we tell, that our ViewController is a delegate of CLLocationManager.

    This is a delegate method, that does all the remaining work. It is called after coordinates are determined. I used SBJson framework to parse JSON.

    #import 
    
    ...
    
    #define YANDEX_MAPS_API_DOMAIN @"http://geocode-maps.yandex.ru/1.x/"
    
    ...
    
    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
    {
      // Switching off location updates
      [_locationManager stopUpdatingLocation];
    
      // Reverse geocoding using Yandex Maps API
      CLLocationCoordinate2D coordinate = newLocation.coordinate;
      NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", coordinate.longitude, coordinate.latitude];
    
      // Creating HTTP request. Here kind=locality means that we will be searching for a city.
      NSString *urlString = [NSString stringWithFormat:@"%@?geocode=%@&results=1&lang=ru-RU&format=json&kind=locality", YANDEX_MAPS_API_DOMAIN, coordinatesString];
      NSURL *url = [NSURL URLWithString:urlString];
      NSURLRequest *urlRequest = [NSURLRequest requestWithURL:url];
    
      // Sending synchronous request in background queue using dispatch queues
      dispatch_queue_t backgroundQueue = dispatch_queue_create("bgQueue", nil);
      dispatch_async(backgroundQueue, ^{
        __autoreleasing NSHTTPURLResponse *urlResponse = nil;
        __autoreleasing NSError *error = nil;
        NSData *resultData = [NSURLConnection sendSynchronousRequest:urlRequest returningResponse:&urlResponse error:&error];
    
        // Parsing a result
        if (! error) {
          NSLog(@"Status Code: %d %@", [urlResponse statusCode], [NSHTTPURLResponse localizedStringForStatusCode:[urlResponse statusCode]]);
    
          NSString *resultString = [[NSString alloc] initWithData:resultData encoding:NSUTF8StringEncoding];
          // NSLog(@"resultString:%@", resultString);
    
          SBJsonParser *jsonParser = [[SBJsonParser alloc] init];
          NSDictionary *jsonObject = [jsonParser objectWithString:resultString];
    
          // If count is zero, then region is not found
          int count = [jsonObject[@"response"][@"GeoObjectCollection"][@"metaDataProperty"][@"GeocoderResponseMetaData"][@"found"] integerValue];
          if (count == 0) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [self showRegionNotFoundError];
            });
            return;
          }
    
          // Searching in a JSON
          NSString *city = [jsonObject[@"response"][@"GeoObjectCollection"][@"featureMember"] firstObject][@"GeoObject"][@"name"];
          NSLog(@"Yandex API City returned: %@", city);
    
          dispatch_async(dispatch_get_main_queue(), ^{
            // Here I have a code that updates my UI after city is determined
          });
    
        }
        else {
          // If failed to get data from Yandex API
          NSLog(@"An error occured, Status Code: %i", urlResponse.statusCode);
          NSLog(@"Description: %@", [error localizedDescription]);
          NSLog(@"Response Body: %@", [[NSString alloc] initWithData:resultData encoding:NSUTF8StringEncoding]);
    
          dispatch_async(dispatch_get_main_queue(), ^{
            [self showRegionNotFoundError];
          });
        }
    
        dispatch_async(dispatch_get_main_queue(), ^{
          [self hideSpinner];
        });
    
      });
    }
    

    This is an error handling for Core Location:

    - (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
    {
      [_locationManager stopUpdatingLocation];
    
      [self showRegionNotFoundError];
    }

    This method shows an error if we failed to determine city automatically:

    - (void)showRegionNotFoundError
    {
      [self hideSpinner];
    
      UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Error" message:@"Failed to determine your city automatically, please, select the one from a list." delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil];
      [alertView show];
    }

    The same goal can be achieved using MapKit instead of Yandex Maps API for English city names:

    #import 
    #import 
    #import 
    
    ... 
    
    - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
    
    ... 
    
      CLGeocoder *geocoder = [[CLGeocoder alloc] init] ;
      
      [geocoder reverseGeocodeLocation:newLocation completionHandler:^(NSArray *placemarks, NSError *error) {
        
        [self hideSpinner];
        
        if (! error )
        {
          CLPlacemark *placemark = [placemarks objectAtIndex:0];
          NSString *city = [[placemark addressDictionary] objectForKey:(NSString *)kABPersonAddressCityKey];
          NSLog(@"determinedRegion: %@", city);
        
          NSLog(@"Full placemark address dictionary: %@", placemark.addressDictionary);
        }
        else
        {
          [self showRegionNotFoundError];
          
          NSLog(@"Geocode failed with error %@", error);
          NSLog(@"\nCurrent Location Not Detected\n");
        }
      }];
    

    Finally, some test locations. Replace the appropriate string to simulate another coordinates. This could be done in Simulator settings also in Debug/Geo section.

      // Test for Novgorod
      // NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", 44.0000f, 56.3333f];
    
      // Test for Ufa city
      // NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", 55.9667f, 54.7500f];
    
      // Test for a small town Meleuz in the Republic of Bashkortostan, Russia
      // NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", 55.9333f, 52.9500f];
    
      // Test for a random location on a map
      // NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", 56.9333f, 53.9500f];
    
      // Test for Moscow
      // NSString *coordinatesString = [NSString stringWithFormat:@"%lf,%lf", 37.6167f, 55.7500f];
    
  • New Open Source Audio Player for iOS

    I added today my new Open Source Audio Player for iOS to GitHub.

    It’s main advantages:

    1. Simple
    2. Neat design
    3. Very little code to make your app play audio
    4. Everything is incapsulated inside component
    5. It can appear and disappear with animation
    6. It is flexible, so that it looks nice both on iPhone and iPad in two orientations

    You are welcome to use it and make pull requests:

    https://github.com/wzbozon/DKAudioPlayer 

     

    ScreenShot:

  • Code for Two Essential Buttons for iOS: Write a Review and Send a Letter To Developers

    Code for Two Essential Buttons: Write a Review and Send a Letter To Developers. These buttons are often required in a mobile application to collect a feedback from users and to allow them write a review to your app more quickly and comfortable. It also includes some system information. It is in Russian, but no problem to translate it.

    - (void)writeReviewClicked
    {
      NSString *url = @"https://itunes.apple.com/ru/app/yourapp.ru/id662863746?mt=8";
    	NSString *escapedUrl = [url stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
    	[[UIApplication sharedApplication] openURL:[NSURL URLWithString:escapedUrl]];
    }
    
    - (void)sendLetterClicked
    {
      NSString *subject = [NSString stringWithFormat:@"%@ %@", @"Письмо от пользователя мобильного приложения", @"YourApp для iOS"];
    
      NSDate *today = [NSDate date];
      NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
      dateFormatter.timeStyle = NSDateFormatterMediumStyle;
      dateFormatter.dateStyle = NSDateFormatterMediumStyle;
      NSString *todayString = [dateFormatter stringFromDate:today];
    
      NSMutableString *temp = [NSMutableString new];
      [temp appendFormat:@"\n\n\n\n\n-----------------------\nCистемная информация может помочь нам в отладке приложения.\n-----------------------\n"];
      [temp appendFormat:@"Версия приложения: %@\n", UD_OBJECT(UDKeyVersion)];
      [temp appendFormat:@"Версия iOS: %@\n", [[UIDevice currentDevice] systemVersion]];
      [temp appendFormat:@"Устройство: %@\n", [[UIDevice currentDevice] deviceName]];
      [temp appendFormat:@"Интернет соединение: %@\n", [[RRHelper defaultHelper] networkStatusString]];
      [temp appendFormat:@"Имя пользователя: %@ \n", UD_OBJECT(UDKeyPersonEmail)];
      [temp appendFormat:@"Дата: %@ \n", todayString];
      [temp appendFormat:@"-----------------------\n"];
    
      MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
      [controller setSubject:subject];
      [controller setToRecipients:@[@"your@email.ru"]];
      [controller setMessageBody:temp isHTML:NO];
      controller.mailComposeDelegate = self;
      [self presentViewController:controller animated:YES completion:nil];
    }
    
    #pragma mark - MFMailComposeViewControllerDelegate
    
    - (void) mailComposeController:(MFMailComposeViewController*)controller didFinishWithResult:(MFMailComposeResult)result error:(NSError*)error
    {
    	switch (result) {
    		case MFMailComposeResultCancelled:
        {
    			break;
        }
    		case MFMailComposeResultFailed:
        {
          [RRHelper showErrorMessage:@"Не удалось отправить письмо."];
    			break;
        }
    		case MFMailComposeResultSent:
    			break;
    		default:
    			break;
    	}
    
      [self dismissModalViewControllerAnimated:YES];
      [self dismissViewControllerAnimated:YES completion:nil];
    }

    Use this category to get a more precise device name:

    //
    //  UIDevice+machine.m
    //
    //  Created by Dennis Kutlubaev on 15.11.13.
    //
    
    #import "UIDevice+machine.h"
    
    #import 
    
    @implementation UIDevice(deviceName)
    
    - (NSString*)deviceName {
    
      struct utsname systemInfo;
    
      uname(&systemInfo);
    
      NSString *machineName = [NSString stringWithCString:systemInfo.machine encoding:NSUTF8StringEncoding];
    
      NSDictionary *commonNamesDictionary =
      @{
        @"i386":     @"iPhone Simulator",
        @"x86_64":   @"iPad Simulator",
    
        @"iPhone1,1":    @"iPhone",
        @"iPhone1,2":    @"iPhone 3G",
        @"iPhone2,1":    @"iPhone 3GS",
        @"iPhone3,1":    @"iPhone 4",
        @"iPhone3,2":    @"iPhone 4(Rev A)",
        @"iPhone3,3":    @"iPhone 4(CDMA)",
        @"iPhone4,1":    @"iPhone 4S",
        @"iPhone5,1":    @"iPhone 5(GSM)",
        @"iPhone5,2":    @"iPhone 5(GSM+CDMA)",
        @"iPhone5,3":    @"iPhone 5c(GSM)",
        @"iPhone5,4":    @"iPhone 5c(GSM+CDMA)",
        @"iPhone6,1":    @"iPhone 5s(GSM)",
        @"iPhone6,2":    @"iPhone 5s(GSM+CDMA)",
    
        @"iPad1,1":  @"iPad",
        @"iPad2,1":  @"iPad 2(WiFi)",
        @"iPad2,2":  @"iPad 2(GSM)",
        @"iPad2,3":  @"iPad 2(CDMA)",
        @"iPad2,4":  @"iPad 2(WiFi Rev A)",
        @"iPad2,5":  @"iPad Mini(WiFi)",
        @"iPad2,6":  @"iPad Mini(GSM)",
        @"iPad2,7":  @"iPad Mini(GSM+CDMA)",
        @"iPad3,1":  @"iPad 3(WiFi)",
        @"iPad3,2":  @"iPad 3(GSM+CDMA)",
        @"iPad3,3":  @"iPad 3(GSM)",
        @"iPad3,4":  @"iPad 4(WiFi)",
        @"iPad3,5":  @"iPad 4(GSM)",
        @"iPad3,6":  @"iPad 4(GSM+CDMA)",
    
        @"iPod1,1":  @"iPod 1st Gen",
        @"iPod2,1":  @"iPod 2nd Gen",
        @"iPod3,1":  @"iPod 3rd Gen",
        @"iPod4,1":  @"iPod 4th Gen",
        @"iPod5,1":  @"iPod 5th Gen",
    
        };
    
      NSString *deviceName = commonNamesDictionary[machineName];
    
      if (deviceName == nil) {
        deviceName = machineName;
      }
    
      return deviceName;
    }
    
    @end

    And use this method in your helper class to create a user friendly network status string using Reachability class instance:

    - (NSString *)networkStatusString
    {
      NetworkStatus networkStatus = [AppDel.reachability currentReachabilityStatus];
      
      /*NotReachable = 0,
      ReachableViaWiFi = 2,
      ReachableViaWWAN = 1*/
      
      switch (networkStatus) {
        case NotReachable:
          _networkStatusString = @"Нет соединения.";
          break;
        case ReachableViaWiFi: {
          _networkStatusString = @"Wi-Fi";
          break;
        }
        case ReachableViaWWAN: {
          _networkStatusString = @"WWAN";
          break;
        }
        default:
          break;
      }
      
      return _networkStatusString;
    }
    

    References:
    http://stackoverflow.com/questions/8292246/how-to-programmatically-differentiate-between-iphone-4-and-iphone-4s
    http://iosdevelopertips.com/device/determine-if-iphone-is-3g-or-3gs-determine-if-ipod-is-first-or-second-generation.html

  • XCode 5 project doesn’t load – Solution

    Suddenly, after I closed Xcode with two projects opened, it stopped to launch. When I started Xcode it was trying to load projects and failed with error. I couldn’t open any project.

    After some search and some experiments I finally found a solution to this problem, that might look not very simple and lying on the surface. That is why I decided to post about it. May be this solution is not very good in case you don’t want to loose your unsaved code, but it works:

    Go to your libraries folder and delete the contents of Autosave Information folder.

    Here is how to do it:

    1. Open Finder

    2. Shift + Cmd  + G

    3.~/Library/Autosave Information, delete it

    4. It is also important to clean your trash bin!

    Then try to launch Xcode.

  • Instructions on how to create custom UITableViewCell with a xib

    It is a very fast and convenient way to create a custom UITableViewCell layout using Interface Builder. But Apple for some reason has not made this easy – you have to know some magic things to perform this task. There is a a ton of tutorials on this topic already. But nevertheless I decided to write my own one. So, these are step by step instructions:

    1. Create a UITableViewCell subclass, let’s name it RRMessageCell. When you create it, you will not get a xib by default, because XCode doesn’t create it.
    2. Add a xib file called RRMessageCell.
    3. In your xib file delete a view by default and add UITableViewCell object.
    4. Set a class for that new cell in xib and for File’s owner RRMessageCell in a right panel, 3rd tab of the Interface Builder.
    5. Add elements to your cell in xib: labels, imageViews, etc.
    6. Create outlets in your RRMessageCell class.
    7. Here is a first magic: do not bind outlets via files’ owner, but bind them via your RRMessageCell. It should look like this when you right click of your file’s owner:

    And it should look like this when you right click of a cell view:

    8. Now second magic: select your cell view in a xib file and in a 4th tab of right panel (attributes) set Identifier to ‘RRMessageCell‘. Here is illustration:

    9. Now you can close a xib file, open implementation file and write some code to set contents of a cell, using a custom setter for object, that is displayed in your cell class RRMessageCell.m:

    - (void)setMessage:(RRMessage *)message
    {
      _message = message;
      
      self.topicLabel.text = message.messageTheme;
      self.bodyLabel.text = message.messageText;
      
      NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
      [dateFormatter setTimeStyle:NSDateFormatterMediumStyle];
      [dateFormatter setDateStyle:NSDateFormatterMediumStyle];
      NSString *dateString = [dateFormatter stringFromDate:message.messageDate];
      self.dateLabel.text = [NSString stringWithFormat:@"Отправлено: %@", dateString];
      
      self.arrowImageView.image = ([message.messageFromEmployer intValue] == 0) ? [UIImage imageNamed:@"arrow_from"] : [UIImage imageNamed:@"arrow_to"];
    }
    

    10. And now third magic – you have to create a cell this way in your UITableViewController:

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
    {
      
      static NSString *CellIdentifier = @"RRMessageCell";
      
      RRMessageCell *cell = (RRMessageCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
      
      if ( cell == nil ) {
        
        NSArray *topLevelObjects = [[NSBundle mainBundle] loadNibNamed:@"RRMessageCell" owner:self options:nil];
        cell = topLevelObjects[0];
        
      }
      
      RRMessage *message = _messages[indexPath.row];
      
      [cell setMessage:message];
      
      return cell;
    }
    

    P.S. Small tip: do not use “textLabel“, “detailTextLabel” variables in your custom UITableViewCell classes, because they will interrupt with native textLabel and you will get SIGABRT bug in runtime.

    P.S.S. If frames are drawn incorrectly, try to override layoutSubviews method of your custom class or remove autoresizing masks. This is another topic.

  • iOS AutoLayout Notes

    To transition the application to support iOS 7, Apple recommends to use Auto Layout extensively in their iOS 7 Transition Guide.

    Also at the recent time after about one year of creating intefaces completely programmatically, I again returned to using xibs to create TableViewCell layouts and other layouts rapidly. And now I definetely need to learn AutoLayout.

    So I decided to learn the features of AutoLayout from Auto Layout Guide and here I’m going to post some notes, that I took for myself to remember what to do and remember features of AutoLayout.

    Auto Layout is a system that lets you lay out your app’s user interface by creating a mathematical description of the relationships between the elements.

    The fundamental building block in Auto Layout is the constraint. Constraints express rules for the layout of elements in your interface; for example, you can create a constraint that specifies an element’s width, or its horizontal distance from another element.

    Constraints are cumulative, and do not override each other.

    Rather than writing an omniscient controller that calculates where views need to go for a given geometry, views become more self-organizing. This approach reduces the complexity of controller logic, and makes it easier to redesign views without requiring corresponding changes to the layout code.

    Leaf-level views such as buttons typically know more about what size they should be than does the code that is positioning them. This is communicated through the intrinsic content size, which tells the layout system that a view contains some content that it doesn’t natively understand, and indicates how large that content is, intrinsically.

    The easiest way to add, edit, or remove constraints is to use the visual layout tools in Interface Builder. Creating a constraint is as simple as Control-dragging between two views, or to add multiple constraints at once, you simply use the various pop-up windows.

    You can also add constraints using the Auto Layout menu, which resides on the Interface Builder canvas.

    Align. Create alignment constraints, such as centering a view in its container, or aligning the left edges of two views.

    Pin. Create spacing constraints, such as defining the height of a view, or specifying its horizontal distance from another view.

    Issues. Resolve layout issues by adding or resetting constraints based on suggestions.

    Resizing. Specify how resizing affects constraints.

    If you need to add a large set of constraints to describe your interface layout and you don’t want to add constraints one at a time, choose Issues > Add Missing Constraints to add a nonambiguous set of constraints.

    If you need to revert to a set of constraints without errors, or you just want to start over, choose Issues > Reset to Suggested Constraints to remove erroneous constraints and add a nonambiguous set of constraints.

    Here is a link on how to work with AutoLayout programmatically. I don’t need it yet, but it seems to be as easy, as using Interface Builder for this task.

  • Brief Info On What’s New in iOS 7 For Developers

    User Interface Changes

    • UI Redesign
    • – iOS 7 Design Resources

    • Dynamic Behaviors for Views
    • – apps can now specify dynamic behaviors for UIView objects and for other objects that conform to the UIDynamicItem protocol.

    • Text Kit
    • – Text programming guide

    64-Bit Support – when compiled for the 64-bit runtime, apps may run faster because of the availability of extra processor resources in 64-bit mode.

    Multitasking Enhancements – apps can register with the system and be launched periodically to retrieve that content in the background; apps that use push notifications to notify the user that new content is available can fetch the content in the background.

    Games

    • Sprite Kit Framework
    • – provides a hardware-accelerated animation system optimized for creating 2D and 2.5D games

    • Game Controller Framework
    • – lets you discover and configure Made-for-iPhone/iPod/iPad (MFi) game controller hardware in your app. Game controllers can be devices connected physically to an iOS device or connected wirelessly over Bluetooth

    • Game Center Improvements

    Maps – overlays, 3D map support, geodesic lines, map snapshots, direction related route information

    AirDrop – AirDrop support is now built in to the existing UIActivityViewController class.

    Inter-App Audio – enables the ability to send MIDI commands and stream audio between apps

    Peer-to-Peer Connectivity – supports the discovery of nearby devices and the direct communication with those devices

    New Frameworks

    • GameController.framework
    • SpriteKit.framework
    • MultipeerConnectivity.framework
    • JavaScriptCore.framework
    • MediaAccessibility.framework
    • SafariServices.framework
    • – provides support for programmatically adding URLs to the user’s Safari reading list

    Enhancements to Existing Frameworks

    • In the Message UI framework, the MFMessageComposeViewController class adds support for attaching files to messages.
    • The iAd framework introduces new methods on the MPMoviePlayerController class that let you run ads before a movie.
    • The framework extends the UIViewController class to make it easier to create ad-supported content. You can now configure your view controllers to display ads before displaying the actual content they manage.
    • The NSData class adds support for Base64 encoding.
    • The NSProgress class provides a general-purpose way to monitor the progress of an operation and report that progress to other parts of your app that want to use it.
    • The Core Telephony framework (CoreTelephony.framework) lets you get information about the type of radio technology in use by the device.
    • The Core Motion framework (CoreMotion.framework) adds support for step counting and motion tracking.
    • The Core Foundation framework (CoreFoundation.framework) now lets you schedule stream objects on dispatch queues.

    Objective-C – has been enhanced to support modules.

    Full description is in Apple iOS Developer Library.