Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use Firebase Crashlytics with Mac Catalyst app when installed using SPM #6408

Closed
DenTelezhkin opened this issue Sep 7, 2020 · 3 comments · Fixed by #6426 or google/GoogleDataTransport#36
Assignees
Labels
Milestone

Comments

@DenTelezhkin
Copy link

[REQUIRED] Step 1: Describe your environment

  • Xcode version: 12.0 beta 6
  • macOS Catalina 10.15.6
  • Firebase SDK version: branch 6.32-spm-beta
  • Firebase Component: Crashlytics
  • Component version: 6.32-spm-beta
  • Installation method: Swift Package Manager

[REQUIRED] Step 2: Describe the problem

When trying to use FirebaseCrashlytics in macCatalyst app, following compilation errors happen:

ld: symbol(s) not found for architecture x86_64
Undefined symbol: _CTRadioAccessTechnologyCDMA1x
Undefined symbol: _CTRadioAccessTechnologyCDMAEVDORev0
Undefined symbol: _CTRadioAccessTechnologyCDMAEVDORevA
Undefined symbol: _CTRadioAccessTechnologyCDMAEVDORevB
Undefined symbol: _CTRadioAccessTechnologyEdge
Undefined symbol: _CTRadioAccessTechnologyGPRS
Undefined symbol: _CTRadioAccessTechnologyHSDPA
Undefined symbol: _CTRadioAccessTechnologyHSUPA
Undefined symbol: _CTRadioAccessTechnologyLTE
Undefined symbol: _CTRadioAccessTechnologyWCDMA
Undefined symbol: _CTRadioAccessTechnologyeHRPD
Undefined symbol: _OBJC_CLASS_$_CTTelephonyNetworkInfo

Steps to reproduce:

  1. Install Firebase Crashlytics via SPM
  2. import Firebase
  3. Try to compile for macCatalyst

Opinion

I think this is happening because most of those constants are marked as API_UNAVAILABLE(macos).

Probably errors originate from here.

Possible solution - exclude calls to those constants using #if TARGET_OS_MACCATALYST, although i'm not 100% sure it's a complete solution for macCatalyst.

@paulb777
Copy link
Member

paulb777 commented Sep 7, 2020

@DenTelezhkin Thanks for the report. Your suggestions sounds reasonable. We'll investigate more deeply this week.

@ryanwilson ryanwilson added Catalyst macOS Issues or feature requests for macOS. labels Sep 8, 2020
@paulb777 paulb777 self-assigned this Sep 8, 2020
@paulb777
Copy link
Member

paulb777 commented Sep 8, 2020

Actually, it looks like those symbols should be available for Catalyst.

I'm able to work around by explicitly linking CoreTelephony:

Screen Shot 2020-09-08 at 3 37 18 PM

I'll continue to investigate if there's a way to make this automatic.

@DenTelezhkin
Copy link
Author

@paulb777 Linking CoreTelephony explicitly works on my side too, thanks!

FYI, I also tried PR you opened to fix this(#6419), but it did not work on my side, producing the following:

Unknown type name 'CTTelephonyNetworkInfo'
Use of undeclared identifier 'CTRadioAccessTechnologyGPRS'
Use of undeclared identifier 'CTRadioAccessTechnologyEdge'
Use of undeclared identifier 'CTRadioAccessTechnologyWCDMA'
Use of undeclared identifier 'CTRadioAccessTechnologyHSDPA'
Use of undeclared identifier 'CTRadioAccessTechnologyHSUPA'
Use of undeclared identifier 'CTRadioAccessTechnologyCDMA1x'
Use of undeclared identifier 'CTRadioAccessTechnologyCDMAEVDORev0'
Use of undeclared identifier 'CTRadioAccessTechnologyCDMAEVDORevA'
Use of undeclared identifier 'CTRadioAccessTechnologyCDMAEVDORevB'
Use of undeclared identifier 'CTRadioAccessTechnologyeHRPD'
Use of undeclared identifier 'CTRadioAccessTechnologyLTE'
Use of undeclared identifier 'CTTelephonyNetworkInfo'

@paulb777 paulb777 added this to the 6.33.0 - М80 milestone Sep 9, 2020
@firebase firebase locked and limited conversation to collaborators Oct 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
4 participants