segment-integrations / analytics-ios-integration-firebase

Segment's bundled integration for Firebase on iOS
MIT License
13 stars 92 forks source link

Compilation failure #17

Closed jc-paris closed 6 years ago

jc-paris commented 6 years ago

Hi,

I'm unable to link Firebase Segment pod to my project. Whereas the official pod from Firebase is working like a charm. I'm getting the error below :


Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)```
ladanazita commented 6 years ago

Hi @jc-paris

Could you reach out to our support team with a bit more on how to reproduce this?

Thank you! Ladan

nebiros commented 6 years ago

Same issue, Swift 4, Xcode Version 9.2 (9C40b), Segment-Firebase (2.1.0):

Undefined symbols for architecture armv7:
  "_OBJC_CLASS_$_FIRApp", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIROptions", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
  "_OBJC_CLASS_$_FIRAnalytics", referenced from:
      objc-class-ref in SEGFirebaseIntegration.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
  - Analytics (3.6.9)
  - Firebase/Analytics (4.8.2):
    - Firebase/Core
  - Firebase/Core (4.8.2):
    - FirebaseAnalytics (= 4.0.9)
    - FirebaseCore (= 4.0.14)
  - FirebaseAnalytics (4.0.9):
    - FirebaseCore (~> 4.0)
    - FirebaseInstanceID (~> 2.0)
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
    - nanopb (~> 0.3)
  - FirebaseCore (4.0.14):
    - GoogleToolboxForMac/NSData+zlib (~> 2.1)
  - FirebaseInstanceID (2.0.8):
    - FirebaseCore (~> 4.0)
ladanazita commented 6 years ago

@nebiros Could you reach out to our support team as well? Some additional context will be able to surface whats going on

Fawxy commented 6 years ago

I am also running into this issue. I'll get in touch with the support team.

ladanazita commented 6 years ago

Hi @Fawxy @nebiros

Can you confirm you have use_frameworks! uncommented? I was able to reproduce this when I added use_frameworks!, so my thought is this is likely an issue with Cocoapods not working well with static libraries, which GA/Firebase historically has been a pain to work with in this regard.

I can introduce a subspec to help with the workaround we normally suggest, similar to what our Google Analytics integration does here. This work around was taken from this suggestion to rely on the integration manually.

Let me know! Ladna

Fawxy commented 6 years ago

use_frameworks! is uncommented (as it should be with swift projects). I think this is quite a common issue with segment integrations - it's also an issue with the AppsFlyer integration.

ladanazita commented 6 years ago

Hey all,

Unfortunately this limitation does exists with Swift applications and dependencies served as static libs.

I've included a subspec workaround, which you can read more about here. I'm going to brainstorm internally to see what we can do long term to reduce the headache here.

Thanks for your patience and understanding! Ladan