invertase / react-native-firebase

šŸ”„ A well-tested feature-rich modular Firebase implementation for React Native. Supports both iOS & Android platforms for all Firebase services.
https://rnfirebase.io
Other
11.66k stars 2.21k forks source link

No visible @interface for 'FIROptions' declares Issue #496

Closed eggybot closed 6 years ago

eggybot commented 6 years ago

Issue

I got this issue when building via XCode on RNFirebase.m

/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:34:58: No visible @interface for 'FIROptions' declares the selector 'initWithGoogleAppID:GCMSenderID:'

along with this 8 issues

/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:36:31: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:37:34: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:38:33: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:39:35: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:40:36: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:41:38: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:42:40: Assignment to readonly property
/Users/me/mobileapps/react/casenote/node_modules/react-native-firebase/ios/RNFirebase/RNFirebase.m:44:24: Property 'bundleID' not found on object of type 'FIROptions *'

Environment

  1. Application Target Platform: iOS

  2. Development Operating System: OSX Xcode

  3. Build Tools:

  4. React Native version: 0.49.3

  5. RNFirebase Version: 3.0.2

  6. Firebase Module: pod 'Firebase/Core' pod 'Firebase/Analytics' pod 'Firebase/Auth' pod 'Firebase/Messaging' pod 'Firebase/Database'

chrisbianca commented 6 years ago

@eggybot Check which versions of the Firebase pods have been installed in your Podfile.lock. It could be that you have an older version. In which case, run the following:

pod outdated - will check which pods have new available versions pod update - update to the latest version of pods

eggybot commented 6 years ago

Thanks, it solve my problem by updating outdated version

eggybot commented 6 years ago

just one thing I notice it keeps going back when I install new module to my project. Also right now it is not updating the version.

I tried to use this code

pod install --repo-update
pod outdated
pod update
pod update --verbose
pod cache clean --all

still not updating it, how can I clear my repo

chrisbianca commented 6 years ago

Can you paste the contents of your Podfile.lock?

eggybot commented 6 years ago

I include this on my pod file pod 'Firebase', '4.3.0' and all other modules has been updated.

GioLogist commented 6 years ago

I was having this same problem. Updating pods as recommended in this thread followed by this step in another thread got everything working: https://github.com/firebase/quickstart-ios/issues/5#issuecomment-309929008

SandyLudosky commented 6 years ago

Hi this does not appear to be resolved. I am getting the error :

No visible @interface for 'FIRMessaging' declares the selector 'setDelegate:'

this is my Podfile

# Uncomment the next line to define a global platform for your project
# platform :ios, '11.0'

target 'com.notificationTest.fcm' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

   # Pods for com.notificationTest.fcm
   pod 'Firebase'
   pod 'Firebase/Core'
   pod 'Firebase/Messaging'

end

the issue with the configuration remained so I had to manually edit in Build Phases to : diff "${SRCROOT}/Podfile.lock" "${SRCROOT}/Pods/Manifest.lock" > /dev/null

AppDelegate.m I import Firebase

#import "AppDelegate.h"
#import "MainViewController.h"
@import FirebaseCore;
@import FirebaseMessaging;
@import FirebaseInstanceID;

@implementation AppDelegate

- (BOOL)application:(UIApplication*)application didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
{
      [FIRApp configure];
    self.viewController = [[MainViewController alloc] init];
    return [super application:application didFinishLaunchingWithOptions:launchOptions];
}

@end

is there another place where I should reference Firebase as it does not seem to be recognized.

this is my ionic info :

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node  : v9.11.1
    npm   : 6.0.0
    OS    : macOS High Sierra
    Xcode : Xcode 9.3 Build version 9E145

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro
CHOMNANP commented 6 years ago

I'm still having this issue after Pod Outdate and Pod Update. Not sure what to do at the moment.

chrisbianca commented 6 years ago

Please see: https://github.com/invertase/react-native-firebase/issues/1061