【问题标题】:Apptentive: `Undefined symbols for architecture...` error in Cordova projectApptentive:Cordova 项目中的`Undefined symbols for architecture...` 错误
【发布时间】:2016-04-06 15:01:12
【问题描述】:

我正在尝试在 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 标志。

Frameworks

【问题讨论】:

    标签: ios apptentive


    【解决方案1】:

    似乎有一些必需的系统框架没有自动链接。

    您需要链接 AVFoundation、CoreData、CoreGraphics、Foundation、ImageIO、MobileCoreServices、QuartzCore、SystemConfiguration、UIKit 以及弱链接 StoreKit 和 CoreTelephony。

    一步一步:

    1. 在 Xcode 的项目导航器中选择您的项目。
    2. 从目标列表中选择您的目标。
    3. 选择构建阶段选项卡。
    4. 展开 Link Binary with Libraries 组。
    5. 点击+按钮,选择前面提到的框架(包括两个弱链接的)。您可以-单击选择多个。
    6. 返回库列表后,为两个弱链接框架选择“可选”。

    然后您应该能够成功构建和运行。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-04-17
      • 2018-03-27
      • 2022-12-01
      • 2014-03-04
      • 2018-05-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多