@Jancesc
2018-03-20T04:04:44.000000Z
字数 1398
阅读 863
0.配置推送证书
1.UnityWebPlugin插件混淆
2.依照文档 http://wx7.bigh5.com:8090/pages/viewpage.action?pageId=2457762 添加unity插件
3.在Unity中File->Build Settings中选择iOS平台,在Player Settings中设置Launch screen type 为none 并设置LaunchImage
4.设置Other settings包括签名和版本,只支持iphone,最低iOS版本是iOS8等 
5.打包成xcode工程后,关闭Unity,打开xcode工程
6.替换icon 和 launchImage,注意把iPhoneX版本的launchImage加上 1125*2436
打开网页:http://www.atool.org/ios_logo.php,把1024*1024的logo上传上去,生成配套的iOS icon,然后填满xcode的APPIcon,注意尺寸要一致

7.配置UnityAppController.mm页面
7.1 :引入配置类XXXXCongig.h,XXXX为类前缀
7.2 : 把宏UNITY_USES_REMOTE_NOTIFICATIONS 改成 true
7.3 : 找到方法: - (void)application:(UIApplication*)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData*)deviceToken, 在该方法内添加语句:
[[XXXXConfig shareInstance] uploadDeviceToken:deviceToken];
7.4 :找到方法:-(void)applicationWillEnterForeground:(UIApplication*)application,在此方法内添加语句:
application.applicationIconBadgeNumber = 0;

8.搜索info.plist,右键选择Open As 用 Source Code打开,在倒数第二行前添加插件plist.txt的内容

9.在Link Binary With Libraries中添加系统framework
Security.framework, WebKit.framework

10.添加中文本地化

11.搜索infoPlist.strings,选中infoPlist.strings,在右边的Localization中添加Chinese(simplified),在Target membership勾中当前的TARGET,一般是Unity-iPhone

12.搜索infoPlist.strings,分别选中infoPlist.strings(English) 和 infoPlist.strings(simplified),添加 CFBundleDisplayName = "对应语言的APP名称";


13.确定General中的基本信息无误,Bundle Identifier 和 Provisioning Profile一定要对应,每一次打包Version必须改变

14.添加推送权限

15.选中Product->Archive打包

16.打包完成之后,点击 Upload to App Store 上传到苹果后台,所有选项都不勾
