hansemannn / titanium-firebase-performance

Use the Firebase Performance SDK in Axway Titanium 🚀

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build error when building Titanium project (SDK 7.x) - iOS

yakupkalin opened this issue · comments

When building a Ti project with SDK 7.x (7.0.2.GA in my case) for iOS, I'm getting a build error:

[INFO]  Invoking xcodebuild
[ERROR] ** BUILD FAILED **
[ERROR] The following build commands failed:
[ERROR]         Ld build/Intermediates/MyApp\ app.build/Debug-iphoneos/MyApp\ app.build/Objects-normal/arm64/MyApp\ app normal arm64
[ERROR] (1 failure)

When running the generated Xcode project to get more insights, I get this following detailed error:

Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
      objc-class-ref in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyWCDMA", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyHSDPA", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyHSUPA", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyEdge", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyCDMAEVDORevA", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyGPRS", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyCDMAEVDORevB", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyeHRPD", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyCDMA1x", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyCDMAEVDORev0", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
  "_CTRadioAccessTechnologyLTE", referenced from:
      ___FPRCellularNetworkType_block_invoke in FirebasePerformance(FPRProtoUtils_65503330c41be495987b3293c294adc1.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

It seems that CoreTelephony.framework is missing, which seems to be referenced within FirebasePerformance.

Possible solution

When adding the CoreTelephony.framework in Xcode the build succeeds. Instead of adding it manually, we could fix this issue by adding/referencing CoreTelephony.framework within the module.xconfig file:
OTHER_LDFLAGS[sdk=iphoneos4*]=$(inherited) -framework CoreTelephony