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

🔥 Cannot install the library using pods to use it on macOS #3948

Closed
2 of 11 tasks
Mustafax06 opened this issue Jul 15, 2020 · 2 comments
Closed
2 of 11 tasks

🔥 Cannot install the library using pods to use it on macOS #3948

Mustafax06 opened this issue Jul 15, 2020 · 2 comments

Comments

@Mustafax06
Copy link

Issue

Compatibility problem when installing pods.

I'm currently building up my macOS project and I want to implement an auth mechanism with Firebase auth. I installed this library with yarn and it succeeds but when installing the pods I got this error:

[!] The platform of the target 'RNMacOS5-macOS' (macOS 10.14) is not compatible with 'RNFBAuth (8.2.0)', which does not support 'macOS'.

I've looked into the issues and Google and I guess this library supports macOS and even people face a different problem(s) than mine. I've looked into the issues and Google and I guess this library supports macOS and even people face a different problem(s) than mine. Which means they installed the library successfully, IMO but I can't even install the library.

Project Files

Javascript

Click To Expand

package.json:

{
  "name": "RNMacOS5",
  "version": "0.0.1",
  "private": true,
  "scripts": {
    "android": "react-native run-android",
    "ios": "react-native run-ios",
    "start": "react-native start",
    "test": "jest",
    "lint": "eslint .",
    "start:macos": "node node_modules/react-native-macos/local-cli/cli.js start --use-react-native-macos"
  },
  "dependencies": {
    "@react-native-firebase/app": "^8.2.0",
    "@react-native-firebase/auth": "^8.2.0",
    "formik": "^2.1.4",
    "react": "16.9.0",
    "react-devtools": "^4.7.0",
    "react-native": "0.61.5",
    "react-native-anchor-point": "^1.0.1",
    "react-native-draggable-grid": "^2.1.2",
    "react-native-easy-grid": "^0.2.2",
    "react-native-expandable-section-list": "^1.0.7",
    "react-native-macos": "^0.61.0-0",
    "react-native-material-ui": "^1.30.1",
    "react-native-nested-listview": "^0.9.0",
    "react-native-picker-select": "^7.0.0",
    "react-native-responsive-grid": "^0.41.993",
    "react-native-sortable-grid": "^2.0.0",
    "react-native-super-grid": "^4.0.2",
    "react-navigation": "https://github.com/react-navigation/react-navigation.git#2.x"
  },
  "devDependencies": {
    "@babel/core": "^7.6.2",
    "@babel/runtime": "^7.6.2",
    "@react-native-community/eslint-config": "^0.0.5",
    "babel-jest": "^24.9.0",
    "eslint": "^6.5.1",
    "jest": "^24.9.0",
    "metro-react-native-babel-preset": "^0.56.0",
    "react-test-renderer": "16.9.0"
  },
  "jest": {
    "preset": "react-native"
  }
}

firebase.json for react-native-firebase v6:

Not imported yet

iOS

Click To Expand

INFO: this pod file is belongs to macOS project. Not iOS

ios/Podfile:

  • I'm not using Pods
  • I'm using Pods and my Podfile looks like:
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

abstract_target 'Shared' do
  # Pods for RNMacOS5
  pod 'JSONModel'
  pod 'FBLazyVector', :path => '../node_modules/react-native-macos/Libraries/FBLazyVector'
  pod 'FBReactNativeSpec', :path => '../node_modules/react-native-macos/Libraries/FBReactNativeSpec'
  pod 'RCTRequired', :path => '../node_modules/react-native-macos/Libraries/RCTRequired'
  pod 'RCTTypeSafety', :path => '../node_modules/react-native-macos/Libraries/TypeSafety'
  pod 'React', :path => '../node_modules/react-native-macos/'
  pod 'React-Core', :path => '../node_modules/react-native-macos/'
  pod 'React-CoreModules', :path => '../node_modules/react-native-macos/React/CoreModules'
  pod 'React-Core/DevSupport', :path => '../node_modules/react-native-macos/'
  pod 'React-RCTActionSheet', :path => '../node_modules/react-native-macos/Libraries/ActionSheetIOS'
  pod 'React-RCTAnimation', :path => '../node_modules/react-native-macos/Libraries/NativeAnimation'
  pod 'React-RCTBlob', :path => '../node_modules/react-native-macos/Libraries/Blob'
  pod 'React-RCTImage', :path => '../node_modules/react-native-macos/Libraries/Image'
  pod 'React-RCTLinking', :path => '../node_modules/react-native-macos/Libraries/LinkingIOS'
  pod 'React-RCTNetwork', :path => '../node_modules/react-native-macos/Libraries/Network'
  pod 'React-RCTSettings', :path => '../node_modules/react-native-macos/Libraries/Settings'
  pod 'React-RCTText', :path => '../node_modules/react-native-macos/Libraries/Text'
  pod 'React-RCTVibration', :path => '../node_modules/react-native-macos/Libraries/Vibration'
  pod 'React-Core/RCTWebSocket', :path => '../node_modules/react-native-macos/'

  pod 'React-cxxreact', :path => '../node_modules/react-native-macos/ReactCommon/cxxreact'
  pod 'React-jsi', :path => '../node_modules/react-native-macos/ReactCommon/jsi'
  pod 'React-jsiexecutor', :path => '../node_modules/react-native-macos/ReactCommon/jsiexecutor'
  pod 'React-jsinspector', :path => '../node_modules/react-native-macos/ReactCommon/jsinspector'
  pod 'ReactCommon/jscallinvoker', :path => '../node_modules/react-native-macos/ReactCommon'
  pod 'ReactCommon/turbomodule/core', :path => '../node_modules/react-native-macos/ReactCommon'
  pod 'Yoga', :path => '../node_modules/react-native-macos/ReactCommon/yoga'

  pod 'boost-for-react-native', :podspec => '../node_modules/react-native-macos/third-party-podspecs/boost-for-react-native.podspec'
  pod 'DoubleConversion', :podspec => '../node_modules/react-native-macos/third-party-podspecs/DoubleConversion.podspec'
  pod 'glog', :podspec => '../node_modules/react-native-macos/third-party-podspecs/glog.podspec'
  pod 'Folly', :podspec => '../node_modules/react-native-macos/third-party-podspecs/Folly.podspec'

  target 'RNMacOS5-macOS' do
    platform :macos, '10.14'
    use_native_modules!
    # Pods specifically for macOS target
  end

  target 'RNMacOS5-iOS' do
    platform :ios, '9'
    use_native_modules!
    # Pods specifically for iOS target
  end
end

AppDelegate.m:

#import "AppDelegate.h"

#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import "RNMacOS5-macOS-Bridging-Header.h"
#import "ProcessorFactory.h"

#import <AudioKit/AudioKit.h>

@interface AppDelegate () <RCTBridgeDelegate> {
  
}

@end

@implementation AppDelegate

- (void)awakeFromNib {
  [super awakeFromNib];

  _bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:nil];
}

- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
  // Insert code here to initialize your application
  
   [ProcessorFactory initInstances];
}

- (void)applicationWillTerminate:(NSNotification *)aNotification {
  // Insert code here to tear down your application
}

#pragma mark - RCTBridgeDelegate Methods

- (NSURL *)sourceURLForBridge:(__unused RCTBridge *)bridge {
  return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index" fallbackResource:@"main"]; // .jsbundle;
}

@end


Android

Click To Expand

Have you converted to AndroidX?

  • my application is an AndroidX application?
  • I am using android/gradle.settings jetifier=true for Android compatibility?
  • I am using the NPM package jetifier for react-native compatibility?

android/build.gradle:

// N/A

android/app/build.gradle:

// N/A

android/settings.gradle:

// N/A

MainApplication.java:

// N/A

AndroidManifest.xml:

<!-- N/A -->


Environment

Click To Expand

react-native info output:

System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 20.31 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-macos-cli: 2.0.1System:
    OS: macOS 10.15.5
    CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
    Memory: 20.31 MB / 8.00 GB
    Shell: 3.2.57 - /bin/bash
  Binaries:
    Node: 12.16.1 - ~/.nvm/versions/node/v12.16.1/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.13.4 - ~/.nvm/versions/node/v12.16.1/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
  IDEs:
    Android Studio: 4.0 AI-193.6911.18.40.6514223
    Xcode: 11.4.1/11E503a - /usr/bin/xcodebuild
  npmPackages:
    react: 16.9.0 => 16.9.0 
    react-native: 0.61.5 => 0.61.5 
  npmGlobalPackages:
    react-native-cli: 2.0.1
    react-native-macos-cli: 2.0.1
  • Platform that you're experiencing the issue on:
    • iOS
    • Android
    • iOS but have not tested behavior on Android
    • Android but have not tested behavior on iOS
    • Both
    • macOS but have not tested behavior on Mobile
  • react-native-firebase version you're using that has this issue:
    • 8.2.0
  • Firebase module(s) you're using that has the issue:
    • N/A
  • Are you using TypeScript?
    • No, I'm not

@russellwheatley
Copy link
Member

This project is for iOS, I'm pretty sure it will not work on macOS

@mikehardy
Copy link
Collaborator

It is perhaps worth paying attention to the underlying SDKs which do (through community effort) support at least a subset of modules now for macOS, tvOS, watchOS etc, and there is some #2698 #3840 work that makes it work

But this will have to be community effort. If you're not the sort of person that can say "oh, it's failing on macOS because of this" and propose a PR to fix it, you will likely not get things solved as it's not a platform used by current maintainers and thus would need someone to maintain it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants