- 右键点击项目,选择
Add Files to "项目"...
,在弹出的窗口中选择Sources
目录,Added Folders 选择Create Groups
- 选中文件
Libraries/Plugins/iOS/ShibaInu/AppControllerProtocol.h
设置为Public
- Undefined symbol: _OBJC_CLASS_$_UnityFramework
TARGET
-> Build Phases
-> Link Binary With Libraries
添加 UnityFramework
TARGET
-> Build Settings
-> Enable Bitcode
设置成:NO
https://docs.unity3d.com/2020.3/Documentation/Manual/ClassIDReference.html
https://docs.unity3d.com/2020.3/Documentation/ScriptReference/UnityEngine.AIModule.html
然后将对应的 Assembly 和 Class 添加到 Assets/link.xml
文件中
- iPhone7-36 has denied the launch request.
原因可能是证书类型与运行目标类型不匹配。打开Edit Scheme, 确认 Build Configuration 值:Debug 或 Release; 以及 Signing Certificate 值:Developer 或 Distribution 是否匹配。
- Native 代码文件没有加入到项目中,选中文件夹
Classes/Nitive
,右键,选择 Add Files to [Project] - 查看日志详情,是否 native 函数命名有误。
XCode 7 uses tdb libraries instead of dylib libraries.
So you should remove the libiconv.2.dylib
dependency and add libiconv.2.tdb
.
"_OBJC_CLASS_$_ASIdentifierManager", referenced from: objc-class-ref in DeviceUtil.o
添加 AdSupport.Framework
即可。
此类编译错误可使用关键字,如:_OBJC_CLASS_$_ASIdentifierManager
搜索查出对应的 Framework 名称。
-canOpenURL: failed for URL: "weixinULAPI://" - error: "This app is not allowed to query for scheme weixinulapi"
接入第三方登录时,运行时可能会在控制台看到该错误。解决办法:
TARGET
-> Info
-> Custom iOS Target Properties
添加新项,Key = LSApplicationQueriesSchemes
Type = Array
添加内容:wechat
, weixinULAPI
, weixin
接入微博等其他平台时,也有可能会遇到该错误,追加相关内容即可。
这个运行时异常出现在跳转(唤起)第三方 APP 时。解决办法:
TARGET
-> Build Setting
-> Linking
-> Other Linker Flags
添加内容:-ObjC -all_load
dyld: Library not loaded: @rpath/UnityFramework.framework/UnityFramework...
dyld: launch, loading dependent libraries
DYLD_INSERT_LIBRARIES=/Developer/usr/lib/libMainThreadChecker.dylib:/Developer/Library/PrivateFrameworks/DTDDISupport.framework/libViewDebuggerSupport.dylib
这个错误出现于:XCode 为最新版本 (xcode 13.2.1),设备 iOS 版本过低 (ios 13)。 解决方法:升级设备的 iOS 至最新版本 (ios 15)。
这个错误是由于存在 Info.plist 导致的。 解决办法:
Solution -> TARGET
-> Build Phases
> Copy Bundle Resources
and remove Info.plist
from there.
XCode 打开项目 tolua_runtime/macnojit
开始设置 TARGETS
-> tolua
-> Build Settings
Architectures
值改为 Standard Architectures (Apple Silicon, Intel) - $(ARCHS_STANDARD)
VALID_ARCHS
值改为 arm64 x86_64
(添加 arm64
,并去掉对 i386
的支持)
原因:隐式声明在 C99 中无效。
解决办法:在头文件或文件开头声明 xxx 函数即可。
解决办法:手动执行 sudo xattr -r -d com.apple.quarantine xxx.bundle