React-native-fcm: ios Build Failure (no known instance method for selector 'appData')

Created on 25 Sep 2016  路  14Comments  路  Source: evollu/react-native-fcm

Greetings,

After upgrading react-native-fcm to version 2.2.0 the ios build fails with 3 errors which are described in the screenshots below, even removing and reinstalling the library still fails the same way:

The errors all are from RNFIRMessaging.m

screenshot at sep 25 20-55-20

screenshot at sep 25 20-55-37

screenshot at sep 25 20-56-15

Notes:
react-native version: "^0.33.0"
react version: "15.3.1"
Testing on iOS 10 simulator
Android version is working

Thank you

Most helpful comment

I had the same problem, and the problem is because you don't update Firebase in your pod installation, just go in ios folder and run pod update, don't forget to apply the new change in AppDelegate.m and AppDelegate.h

All 14 comments

I had the same problem, and the problem is because you don't update Firebase in your pod installation, just go in ios folder and run pod update, don't forget to apply the new change in AppDelegate.m and AppDelegate.h

I forgot about the Firebase, thank you.

For anyone who is not using pod for firebase just re-download the Firebase files and add those to the project again.

Im getting this error after linking, I can do a build with the firebase pod with no problems, after running react-native link i get the errors above.

Did you run pod install in the ios folder ?

Yea, like i said I could import all of the firebase libs with no problem and run my app, The problem was as soon as I linked this project. In the end I installed firebase manually and it worked.

Sound strange, you open .xworkspace file ?

Yep,

Hmm, can you put what your pod file look like here please :)

Sure can, I'll do it when I get home from work.

I created this when I had issues. https://github.com/evollu/react-native-fcm/issues/134

Ok, I wait for your Podfile, hope the problem came from that, I don't have any other ideas for the moment ^^

I had the same issue as @willoughby

Podfile is as plain as it gets..

# Uncomment this line to define a global platform for your project
# platform :ios, '9.0'

target 'MagicApp' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for MagicApp
  pod 'Firebase/Messaging'

  target 'MagicAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

----- EDIT

I was having this issue, so I decided to go with @willoughby's solution and did the linking manually.
At first I began having the same issues, then I realized that when I copied the frameworks to my project, I had forgotten to check the "Copy items if needed". After this, I deleted all the frameworks and reimported them with the checkbox marked and everything started working.

Perhaps this might help fixing the Pods solution.

I had the same error. It was solved by executing pod update inside the iOS project folder.

it may sound silly, but for me reopening the project did the trick!

Was this page helpful?
0 / 5 - 0 ratings