Eduardo Amaral
Eduardo Amaral

Reputation: 89

Firebase ambiguous reference "FIRMessagingAPNSTokenType... is ambiguous"

After upgrading the Firebase Pods the project have ambiguous reference problems, any suggestions?

when I use the Pods with Version 4.10.0 it works perfectly, but if I use the latest version (5.0.0) I get the error.

My Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '9.0'

target 'AppName' do
    pod 'OpenSSL-Universal'
    pod 'Firebase/Core', '4.10.0'
    pod 'Firebase/Messaging', '4.10.0'
    pod 'GoogleToolboxForMac/Logger'
    pod 'AppCenter'
end

target 'AppName DEV' do
    pod 'OpenSSL-Universal'
    pod 'Firebase/Core', '4.10.0'
    pod 'Firebase/Messaging', '4.10.0'
    pod 'GoogleToolboxForMac/Logger'
    pod 'AppCenter'
end`

enter image description here

Thaks and advance!!

Upvotes: 1

Views: 186

Answers (2)

Eduardo Amaral
Eduardo Amaral

Reputation: 89

I solved this problem writing...

[FIRMessaging messaging].APNSToken = deviceToken;

instead...

enter image description here

On didRegisterForRemoteNotificationsWithDeviceToken method.

Thanks!!

Upvotes: 0

battlmonstr
battlmonstr

Reputation: 6290

This usually happens if you have the same class in 2 different frameworks. Can it be that you reference both 4 and 5 at the same time?

Try to comment out "BRy-Autenticador DEV" section and build only the 'BRy-Autenticador' target.

Check your Podfile.lock after running "pod install". It should contain only one version of Firebase frameworks.

Upvotes: 1

Related Questions