Q1:
Code Signing Error: Signing for "SiriUIExtension" requires a development team. Select a development team in the project editor.
Code Signing Error: Code signing is required for product type 'App Extension' in SDK 'iOS 11.2'
A1:
- 检查每个 TARGETS 的这些地方:
Q2:
symbol(s) not found for architecture arm64
A2:
add $(inherited) to Other Linker Flags as below.
Q3:
精简 HBuilderX 项目时遇到的问题:在 Xcode - TARGETS - Builds Phases - Link Binary With Libraries
中删除 libmp3lame.a
时报错,如图:
A3:
删除 liblibMedia.a
重新编译即可。
如果在上图的报错信息中出现其他必须引用的资源库,则需要把刚才删除的单个/多个 xxx.a 重新引入进来。
Q4: Xcode 输出无用的信息、自定义 NSlog 方法
2019-12-01 10:54:07.059434+0800 GCDFetchFeed[2384:98784] TIC Read Status [10:0x0]: 1:57
2019-12-01 10:54:07.059790+0800 GCDFetchFeed[2384:98784] TIC Read Status [10:0x0]: 1:57
2019-12-01 10:54:07.060381+0800 GCDFetchFeed[2384:98784] TIC Read Status [10:0x0]: 1:57
2019-12-01 10:54:07.060888+0800 GCDFetchFeed[2384:98784] TIC Read Status [10:0x0]: 1:57
- 在 Xcode 中点击
Product - Scheme - Edit Scheme - Run - Aguments - Environment Variables
,添加OS_ACTIVITY_MODE,disable
,如图:
但是这样做会 导致系统的 NSLog 方法失效
,因此我们要使用 printf 函数替换系统的 NSlog,如下:
// 自定义log
#ifdef DEBUG
#define NSLog(format, ...) printf("\n[%s] %s [第%d行] %s\n", __TIME__, __FUNCTION__, __LINE__, [[NSString stringWithFormat:format, ## __VA_ARGS__] UTF8String]);
#else
#define NSLog(format, ...)
#endif