Weex 应用发布苹果应用商店审核被拒 - 移除 ATSDK 解决

发布时间: 2017-11-10 12:30:00 作者: 大象笔记

收到苹果审核的拒绝邮件,提示说 Weex 应用使用了非公开的 API,IOKit.framework APIs.

Guideline 2.5.1 - Performance - Software Requirements

Your app uses or references the following non-public APIs:

IOKit.framework APIs.

The use of non-public APIs is not permitted on the App Store because it can lead to a poor user experience should these APIs change. 

Continuing to use or conceal non-public APIs in future submissions of this app may result in the termination of your Apple Developer account, as well as removal of all associated apps from the App Store.

Next Steps

If you are using third-party libraries, please update to the most recent version of those libraries. If you do not have access to the libraries' source, you may be able to search the compiled binary using the "strings" or "otool" command line tools. The "strings" tool can output a list of the methods that the library calls and "otool -ov" will output the Objective-C class structures and their defined methods. These tools can help you narrow down where the problematic code resides. You could also use the "nm" tool to verify if any third-party libraries are calling these APIs.

网上看到其他人也有遇到 Weex 类似的问题,但是调用的 API 更具体:

kIOMasterPortDefault, _IOServiceMatching, _IOServiceGetMatchingService, _IORegistryEntryCreateCFProperties, _IOObjectRelease

排查

在 platforms/ios 目录下

$ grep "IOKit.framework" -r .
Binary file ./Pods/ATSDK/ATSDK.framework/ATSDK matches
Binary file ./Pods/ATSDK/ATSDK.framework/Versions/A/ATSDK matches
Binary file ./Pods/ATSDK/ATSDK.framework/Versions/Current/ATSDK matches

ATSDK 是内部做调试的一个工具,所以去掉之后不会对线上有影响。

$ grep ATManager -r .
Binary file ./Pods/ATSDK/ATSDK.framework/ATSDK matches
./Pods/ATSDK/ATSDK.framework/Headers/ATManager.h://  ATManager.h
./Pods/ATSDK/ATSDK.framework/Headers/ATManager.h:@interface ATManager : NSObject
./Pods/ATSDK/ATSDK.framework/Headers/ATManager.h:+ (ATManager *)shareInstance;
Binary file ./Pods/ATSDK/ATSDK.framework/Versions/A/ATSDK matches
./Pods/ATSDK/ATSDK.framework/Versions/A/Headers/ATManager.h://  ATManager.h
./Pods/ATSDK/ATSDK.framework/Versions/A/Headers/ATManager.h:@interface ATManager : NSObject
./Pods/ATSDK/ATSDK.framework/Versions/A/Headers/ATManager.h:+ (ATManager *)shareInstance;
Binary file ./Pods/ATSDK/ATSDK.framework/Versions/Current/ATSDK matches
./Pods/ATSDK/ATSDK.framework/Versions/Current/Headers/ATManager.h://  ATManager.h
./Pods/ATSDK/ATSDK.framework/Versions/Current/Headers/ATManager.h:@interface ATManager : NSObject
./Pods/ATSDK/ATSDK.framework/Versions/Current/Headers/ATManager.h:+ (ATManager *)shareInstance;
./Pods/Headers/Public/ATSDK/ATSDK/ATManager.h://  ATManager.h
./Pods/Headers/Public/ATSDK/ATSDK/ATManager.h:@interface ATManager : NSObject
./Pods/Headers/Public/ATSDK/ATSDK/ATManager.h:+ (ATManager *)shareInstance;
./WeexDemo/AppDelegate.m:#import <ATSDK/ATManager.h>
./WeexDemo/AppDelegate.m:    [[ATManager shareInstance] addPluginWithId:@"weex" andName:@"weex" andIconName:@"../weex" andEntry:@"" andArgs:@[@""]];
./WeexDemo/AppDelegate.m:    [[ATManager shareInstance] addSubPluginWithParentId:@"weex" andSubId:@"logger" andName:@"logger" andIconName:@"log" andEntry:@"WXATLoggerPlugin" andArgs:@[@""]];
./WeexDemo/AppDelegate.m://    [[ATManager shareInstance] addSubPluginWithParentId:@"weex" andSubId:@"viewHierarchy" andName:@"hierarchy" andIconName:@"log" andEntry:@"WXATViewHierarchyPlugin" andArgs:@[@""]];
./WeexDemo/AppDelegate.m:    [[ATManager shareInstance] addSubPluginWithParentId:@"weex" andSubId:@"test2" andName:@"test" andIconName:@"at_arr_refresh" andEntry:@"" andArgs:@[]];
./WeexDemo/AppDelegate.m:    [[ATManager shareInstance] addSubPluginWithParentId:@"weex" andSubId:@"test3" andName:@"test" andIconName:@"at_arr_refresh" andEntry:@"" andArgs:@[]];

处理流程

重新编译即可

开发环境

$ weex --version
   v1.0.5
 - weex-builder : v0.2.6
 - weex-previewer : v1.3.8
 - weexpack : v0.4.1

参考

我是一名山东烟台的开发者,联系作者