从官网下载的uniapp ios的sdk工程运行时可能会遇到以下几个问题,需要进行修改:
1. HBuilder 的签名配置冲突
问题描述: 工程里有一些遗留的签名配置信息。
解决办法: 通过Build setting中搜索Provision,删除对应配置信息即可。
2. 安装Pod依赖时的警告信息
plaintext
[!] The `HBuilder [Debug]` target overrides the `GCC_PREPROCESSOR_DEFINITIONS` build setting defined in `Pods/Target Support Files/Pods-HBuilder/Pods-HBuilder.debug.xcconfig'. This can lead to problems with the CocoaPods installation
- Use the `$(inherited)` flag, or
- Remove the build settings from the target.
...
问题描述: 多个构建设置被覆盖,导致CocoaPods安装出现问题。
解决办法:
- 在项目 Build Settings 中:
- Other Linker Flags:增加
$(inherited)
,保留-ObjC
。 - Library Search Paths:增加
$(inherited)
。 - Preprocessor Macros:增加
$(inherited)
。
- Other Linker Flags:增加
然后重新运行 pod update
命令。
3. Sandbox 错误:rsync.samba in Xcode project
问题描述: 在Xcode项目中出现Sandbox错误。
解决办法: 修改Build Setting中的 ENABLE_USER_SCRIPT_SANDBOXING
的值为 NO
。
4. 编译警告:“Mixed ObjC ABI, xxx compiled without category class properties”
问题描述: 编译时出现混合ObjC ABI警告。
解决办法: 在Build Setting的 Other Linker Flag 中增加 -ld_classic
选项。