修复 AMap 真机链接错:补 3 个系统 framework + 永久文档化
真机首次跑 ylgamehall 时 linker 报 7 个 Undefined symbol: - _CNCopyCurrentNetworkInfo / _CNCopySupportedInterfaces / _SCNetworkReachability* → SystemConfiguration.framework - _OBJC_CLASS_$_CTTelephonyNetworkInfo → CoreTelephony.framework - _OBJC_CLASS_$_EAAccessoryManager → ExternalAccessory.framework 根因:AMap 是 fat 静态库(`Vendor/AMap/*.framework`),它内部引用的系统 API 不会被自动带入 transitive 依赖,必须项目方手动 link。CocoaPods 时代由 podspec 自动声明(daoqi msext 走 Pods 故未在 pbxproj 显式 link ExternalAccessory);本项目走 Vendor 手动接入路线,必须显式补齐。 工程:pbxproj 加 3 个 PBXBuildFile + PBXFileReference(Xcode UI 操作自动写入) 文档(永久记录避免重蹈): - Vendor/AMap/README.md「工程接入步骤」第 5 步补齐 3 个系统 framework + 列出每个 framework 对应的 symbol - Vendor/AMap/README.md 末尾加「如果未来真机链接报 C++ symbol 缺失」 备用方案(加 libc++.tbd,daoqi 已加;当前 AMap 2.12.0 未触发) - docs/SDK-Integration-Guide.md §A.2 第 5 步同步 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
e6bcb32820
commit
323fb9074b
@@ -13,6 +13,9 @@
|
||||
1A2954E02FE99C2C009E703E /* WechatOpenSDK-NoPay.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954DE2FE99C2C009E703E /* WechatOpenSDK-NoPay.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
1A2954E32FE99C53009E703E /* AMapFoundationKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954E22FE99C53009E703E /* AMapFoundationKit.framework */; };
|
||||
1A2954E62FE99C63009E703E /* AMapLocationKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954E52FE99C63009E703E /* AMapLocationKit.framework */; };
|
||||
1A2954ED2FE9BA49009E703E /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954EC2FE9BA49009E703E /* SystemConfiguration.framework */; };
|
||||
1A2954EF2FE9BA6E009E703E /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954EE2FE9BA6E009E703E /* CoreTelephony.framework */; };
|
||||
1A2954F12FE9BA7C009E703E /* ExternalAccessory.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A2954F02FE9BA7C009E703E /* ExternalAccessory.framework */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
@@ -33,6 +36,9 @@
|
||||
1A2954DE2FE99C2C009E703E /* WechatOpenSDK-NoPay.xcframework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcframework; name = "WechatOpenSDK-NoPay.xcframework"; path = "Vendor/WechatSDK/WechatOpenSDK-NoPay.xcframework"; sourceTree = "<group>"; };
|
||||
1A2954E22FE99C53009E703E /* AMapFoundationKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMapFoundationKit.framework; path = Vendor/AMap/AMapFoundationKit.framework; sourceTree = "<group>"; };
|
||||
1A2954E52FE99C63009E703E /* AMapLocationKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AMapLocationKit.framework; path = Vendor/AMap/AMapLocationKit.framework; sourceTree = "<group>"; };
|
||||
1A2954EC2FE9BA49009E703E /* SystemConfiguration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = SystemConfiguration.framework; path = System/Library/Frameworks/SystemConfiguration.framework; sourceTree = SDKROOT; };
|
||||
1A2954EE2FE9BA6E009E703E /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
|
||||
1A2954F02FE9BA7C009E703E /* ExternalAccessory.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ExternalAccessory.framework; path = System/Library/Frameworks/ExternalAccessory.framework; sourceTree = SDKROOT; };
|
||||
1A714BD22FE8047A00913338 /* ylgamehall.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ylgamehall.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@@ -64,8 +70,11 @@
|
||||
files = (
|
||||
1A2954622FE840DA009E703E /* ZIPFoundation in Frameworks */,
|
||||
1A2954E62FE99C63009E703E /* AMapLocationKit.framework in Frameworks */,
|
||||
1A2954EF2FE9BA6E009E703E /* CoreTelephony.framework in Frameworks */,
|
||||
1A2954E32FE99C53009E703E /* AMapFoundationKit.framework in Frameworks */,
|
||||
1A2954DA2FE97D61009E703E /* Qiniu in Frameworks */,
|
||||
1A2954ED2FE9BA49009E703E /* SystemConfiguration.framework in Frameworks */,
|
||||
1A2954F12FE9BA7C009E703E /* ExternalAccessory.framework in Frameworks */,
|
||||
1A2954DF2FE99C2C009E703E /* WechatOpenSDK-NoPay.xcframework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
@@ -76,6 +85,9 @@
|
||||
1A2954DB2FE99B2F009E703E /* Frameworks */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
1A2954F02FE9BA7C009E703E /* ExternalAccessory.framework */,
|
||||
1A2954EE2FE9BA6E009E703E /* CoreTelephony.framework */,
|
||||
1A2954EC2FE9BA49009E703E /* SystemConfiguration.framework */,
|
||||
1A2954E52FE99C63009E703E /* AMapLocationKit.framework */,
|
||||
1A2954E22FE99C53009E703E /* AMapFoundationKit.framework */,
|
||||
1A2954DE2FE99C2C009E703E /* WechatOpenSDK-NoPay.xcframework */,
|
||||
|
||||
Reference in New Issue
Block a user