Apptentive:`Undefined symbols for architecture ...` Cordova 项目中的错误
Apptentive: `Undefined symbols for architecture...` error in Cordova project
我正在尝试在 Cordova 项目中使用 Apptentive。在构建我的 Xcode 项目时出现错误:
Undefined symbols for architecture arm64:
"_CGImageSourceCreateWithURL", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_kCGImageSourceCreateThumbnailWithTransform", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_kCGImageSourceThumbnailMaxPixelSize", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_OBJC_CLASS_$_QLPreviewController", referenced from:
objc-class-ref in libApptentiveConnect.a(ATAttachmentController.o)
objc-class-ref in libApptentiveConnect.a(ATMessageCenterViewController.o)
"_kCGImageSourceCreateThumbnailFromImageAlways", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_CGImageSourceCreateThumbnailAtIndex", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_CGImageSourceCopyTypeIdentifiers", referenced from:
___50+[ATFileAttachment canCreateThumbnailForMIMEType:]_block_invoke in libApptentiveConnect.a(ATFileAttachment.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Whosebug 上有类似的问题,但解决方案对我不起作用:/
看起来我拥有所有必需的依赖项,我还为链接器添加了 -lApptentiveConnect
标志。
看起来有些必需的系统框架没有被自动 linked。
您需要 link 对抗 AVFoundation、CoreData、CoreGraphics、Foundation、ImageIO、MobileCoreServices、QuartzCore、SystemConfiguration、UIKit 和较弱的 link StoreKit 和 CoreTelephony。
一步一步:
- Select 您在 Xcode 中的项目导航器中的项目。
- Select 目标列表中的目标。
- Select 构建阶段选项卡。
- 展开 Link Binary with Libraries 组。
- 单击 + 按钮和 select 上述框架(包括两个较弱的 linked 框架)。您可以 ⌘-单击以 select 多个。
- 当您返回库列表时,select "Optional" 两个弱 linked 框架。
然后您应该能够构建并 运行 成功。
我正在尝试在 Cordova 项目中使用 Apptentive。在构建我的 Xcode 项目时出现错误:
Undefined symbols for architecture arm64:
"_CGImageSourceCreateWithURL", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_kCGImageSourceCreateThumbnailWithTransform", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_kCGImageSourceThumbnailMaxPixelSize", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_OBJC_CLASS_$_QLPreviewController", referenced from:
objc-class-ref in libApptentiveConnect.a(ATAttachmentController.o)
objc-class-ref in libApptentiveConnect.a(ATMessageCenterViewController.o)
"_kCGImageSourceCreateThumbnailFromImageAlways", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_CGImageSourceCreateThumbnailAtIndex", referenced from:
-[ATFileAttachment createThumbnailOfSize:] in libApptentiveConnect.a(ATFileAttachment.o)
"_CGImageSourceCopyTypeIdentifiers", referenced from:
___50+[ATFileAttachment canCreateThumbnailForMIMEType:]_block_invoke in libApptentiveConnect.a(ATFileAttachment.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Whosebug 上有类似的问题,但解决方案对我不起作用:/
看起来我拥有所有必需的依赖项,我还为链接器添加了 -lApptentiveConnect
标志。
看起来有些必需的系统框架没有被自动 linked。
您需要 link 对抗 AVFoundation、CoreData、CoreGraphics、Foundation、ImageIO、MobileCoreServices、QuartzCore、SystemConfiguration、UIKit 和较弱的 link StoreKit 和 CoreTelephony。
一步一步:
- Select 您在 Xcode 中的项目导航器中的项目。
- Select 目标列表中的目标。
- Select 构建阶段选项卡。
- 展开 Link Binary with Libraries 组。
- 单击 + 按钮和 select 上述框架(包括两个较弱的 linked 框架)。您可以 ⌘-单击以 select 多个。
- 当您返回库列表时,select "Optional" 两个弱 linked 框架。
然后您应该能够构建并 运行 成功。