我正在尝试在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)
StackOverflow上有类似的问题,但解决方案对我不起作用:/
看起来我有所有必需的依赖项,我也为链接器添加了-lApptentiveConnect
标志。
答案 0 :(得分:2)
看起来有一些必要的系统框架没有自动链接。
您需要链接AVFoundation,CoreData,CoreGraphics,Foundation,ImageIO,MobileCoreServices,QuartzCore,SystemConfiguration,UIKit以及弱链接StoreKit和CoreTelephony。
一步一步:
然后您应该能够成功构建并运行。