Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

summer-wu/iOS10d3Demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

2 Commits

Repository files navigation

#README iOS 10.3 add two highlight features that developers may care.

  1. change app icon
  2. in app review

This demo demostrate the two features.Go Directly to ViewController.m

##change icon 1 . add CFBundleAlternateIcons and CFBundlePrimaryIcon to info.plist.

Notice: According to my test,adding CFBundlePrimaryIcon is necessary or icon may mismatch.

<key>CFBundleIcons</key>
<dict>
	<key>CFBundleAlternateIcons</key>
	<dict>
		<key>AppIcon2</key>
		<dict>
			<key>CFBundleIconFiles</key>
			<array>
				<string>AppIcon2</string>
			</array>
			<key>UIPrerenderedIcon</key>
			<false/>
		</dict>
	</dict>
	<key>CFBundlePrimaryIcon</key>
	<dict>
		<key>CFBundleIconFiles</key>
		<array>
			<string>AppIcon60x60</string>
		</array>
	</dict>
</dict>

2 . add AppIcon2@2x.png AppIcon2@3x.png to project(not Assets.xcassets)

According to my test,adding to Assets.xcassets leading to no effect.

3 . add code

if ([app supportsAlternateIcons]) {
 [app setAlternateIconName:@"AppIcon2" completionHandler:^(NSError * _Nullable error) {
 dispatch_async(dispatch_get_main_queue(), ^{
 [self updateLabel];
 });
 }];
}

##in app review

#import <StoreKit/StoreKit.h>
if ([UIDevice currentDevice].systemVersion.floatValue >= 10.3) {
 [SKStoreReviewController requestReview];
}

#refrence

https://forums.developer.apple.com/message/207848#207848 https://developer.apple.com/library/prerelease/content/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-SW14 https://github.com/steventroughtonsmith/AlternateIconTest

About

demostrate iOS10.3 features

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

AltStyle によって変換されたページ (->オリジナル) /