hansemannn / titanium-firebase-performance

Use the Firebase Performance SDK in Axway Titanium 🚀
Other
8 stars 5 forks source link

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

Closed yakupkalin closed 6 years ago

yakupkalin commented 6 years ago

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

hansemannn commented 6 years ago

Thanks! Fixed via https://github.com/hansemannn/titanium-firebase-performance/releases/tag/ios-1.1.1.