Monday, May 22, 2017

iOS application icon change without appstore update on iOS 10.3

In other words, an update is no longer required to push out the new icon artwork.
The seemingly unimportant change opens up a world of new possibilities for interactions with your favorite apps that simply were not possible before.
Taking advantage of the iOS 10.3 SDK, developers can now use a new Instance method to specify the primary app icon as well as one or more alternate icons.
iOS developer Steve Stroughton-Smith explained that apps must ask your permission before changing their icon. Granting permission yields an alert like the one you see below, informing you of an icon change.

So let see, how to change the icon in your app.

If you see in your Info.plist file, Icon files new entity, showing a way you need to put all icon information in plist.




In order to Icon change process, should include here

    switch (sender.selectedSegmentIndex) {
        case 0:
            [[UIApplication sharedApplication] setAlternateIconName:nil completionHandler:^(NSError * _Nullable error) {
                NSLog(@"error = %@", error.localizedDescription);
            }];
            break;
        case 1:
            [[UIApplication sharedApplication] setAlternateIconName:@"Test1" completionHandler:^(NSError * _Nullable error) {
                NSLog(@"error = %@", error.localizedDescription);
            }];
            break;
        case 2:
            [[UIApplication sharedApplication] setAlternateIconName:@"Test2" completionHandler:^(NSError * _Nullable error) {
                NSLog(@"error = %@", error.localizedDescription);
            }];
            break;
           
        default:
            break;
    }
Demo Code