Issue
macOS Catalina was released today to the public after some months of betas. The new Xcode adds a target option "Mac" in addition to "iOS" and "iPad":

When enabling it, there's at least one build error coming from react-native-firebase.
/node_modules/@react-native-firebase/app/ios/RNFBApp/RNFBUtilsModule.m:63:23: 'fetchAssetsWithALAssetURLs:options:' is unavailable: not available on macCatalyst
|
asset = [[PHAsset fetchAssetsWithALAssetURLs:@[ localFile ] |
If you comment that line, the next error comes from the underlying ios firebase sdk.
So there are a few things to fix on this repo and others that we'll have to wait (or contribute to) the underlying sdk.
Dependent on firebase/firebase-ios-sdk#3144
Related: react-native-community/discussions-and-proposals#131
Project Files
iOS
Click To Expand
ios/Podfile:
platform :ios, '9.0'
require_relative '../../../node_modules/@react-native-community/cli-platform-ios/native_modules'
target 'devhub' do
# Pods for devhub
pod 'FBLazyVector', :path => "../../../node_modules/react-native/Libraries/FBLazyVector"
pod 'FBReactNativeSpec', :path => "../../../node_modules/react-native/Libraries/FBReactNativeSpec"
pod 'RCTRequired', :path => "../../../node_modules/react-native/Libraries/RCTRequired"
pod 'RCTTypeSafety', :path => "../../../node_modules/react-native/Libraries/TypeSafety"
pod 'React', :path => '../../../node_modules/react-native/'
pod 'React-Core', :path => '../../../node_modules/react-native/'
pod 'React-CoreModules', :path => '../../../node_modules/react-native/React/CoreModules'
pod 'React-Core/DevSupport', :path => '../../../node_modules/react-native/'
pod 'React-RCTActionSheet', :path => '../../../node_modules/react-native/Libraries/ActionSheetIOS'
pod 'React-RCTAnimation', :path => '../../../node_modules/react-native/Libraries/NativeAnimation'
pod 'React-RCTBlob', :path => '../../../node_modules/react-native/Libraries/Blob'
pod 'React-RCTImage', :path => '../../../node_modules/react-native/Libraries/Image'
pod 'React-RCTLinking', :path => '../../../node_modules/react-native/Libraries/LinkingIOS'
pod 'React-RCTNetwork', :path => '../../../node_modules/react-native/Libraries/Network'
pod 'React-RCTSettings', :path => '../../../node_modules/react-native/Libraries/Settings'
pod 'React-RCTText', :path => '../../../node_modules/react-native/Libraries/Text'
pod 'React-RCTVibration', :path => '../../../node_modules/react-native/Libraries/Vibration'
pod 'React-Core/RCTWebSocket', :path => '../../../node_modules/react-native/'
pod 'React-cxxreact', :path => '../../../node_modules/react-native/ReactCommon/cxxreact'
pod 'React-jsi', :path => '../../../node_modules/react-native/ReactCommon/jsi'
pod 'React-jsiexecutor', :path => '../../../node_modules/react-native/ReactCommon/jsiexecutor'
pod 'React-jsinspector', :path => '../../../node_modules/react-native/ReactCommon/jsinspector'
pod 'ReactCommon/jscallinvoker', :path => "../../../node_modules/react-native/ReactCommon"
pod 'ReactCommon/turbomodule/core', :path => "../../../node_modules/react-native/ReactCommon"
pod 'Yoga', :path => '../../../node_modules/react-native/ReactCommon/yoga'
pod 'DoubleConversion', :podspec => '../../../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../../../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../../../node_modules/react-native/third-party-podspecs/Folly.podspec'
use_native_modules!
end
target 'devhub-tvOS' do
# Pods for devhub-tvOS
end
AppDelegate.m:
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#import "AppDelegate.h"
#import <React/RCTBridge.h>
#import <React/RCTBundleURLProvider.h>
#import <React/RCTLinkingManager.h>
#import <React/RCTRootView.h>
#import <Firebase.h>
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
RCTBridge *bridge = [[RCTBridge alloc] initWithDelegate:self launchOptions:launchOptions];
RCTRootView *rootView = [[RCTRootView alloc] initWithBridge:bridge
moduleName:@"devhub"
initialProperties:nil];
// #1F2229 (dark-gray)
rootView.backgroundColor = [UIColor colorWithRed:0.12 green:0.13 blue:0.16 alpha:1.0];
self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
UIViewController *rootViewController = [UIViewController new];
rootViewController.view = rootView;
self.window.rootViewController = rootViewController;
[self.window makeKeyAndVisible];
[FIRApp configure];
return YES;
}
- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge
{
#if DEBUG
return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"packages/mobile/index" fallbackResource:nil];
#else
return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"];
#endif
}
- (BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
return [RCTLinkingManager application:app openURL:url options:options];
}
@end
Android
Click To Expand
Have you converted to AndroidX?
android/build.gradle:
android/app/build.gradle:
android/settings.gradle:
MainApplication.java:
AndroidManifest.xml:
Environment
Click To Expand
react-native info output:
react-native v0.60.2
System:
OS: macOS 10.15
CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
Memory: 75.53 MB / 16.00 GB
Shell: 5.7.1 - /bin/zsh
Binaries:
Node: 12.10.0 - /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/yarn--1570483392765-0.2572019673201511/node
Yarn: 1.19.0 - /var/folders/xh/gcxkb1qx2rd3fmqz5vxrs2lh0000gn/T/yarn--1570483392765-0.2572019673201511/yarn
npm: 6.11.3 - /usr/local/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 13.0, DriverKit 19.0, macOS 10.15, tvOS 13.0, watchOS 6.0
Android SDK:
API Levels: 28
Build Tools: 28.0.3
IDEs:
Android Studio: 3.5 AI-191.8026.42.35.5900203
Xcode: 11.0/11A420a - /usr/bin/xcodebuild
npmPackages:
react-native: 0.61.2 => 0.61.2
- Platform that you're experiencing the issue on:
react-native-firebase version you're using that has this issue:
Firebase module(s) you're using that has the issue:
- Are you using
TypeScript?
Issue
macOS Catalina was released today to the public after some months of betas. The new Xcode adds a target option "Mac" in addition to "iOS" and "iPad":
When enabling it, there's at least one build error coming from
react-native-firebase.react-native-firebase/packages/app/ios/RNFBApp/RNFBUtilsModule.m
Line 63 in 16e67dd
If you comment that line, the next error comes from the underlying ios firebase sdk.
So there are a few things to fix on this repo and others that we'll have to wait (or contribute to) the underlying sdk.
Dependent on firebase/firebase-ios-sdk#3144
Related: react-native-community/discussions-and-proposals#131
Project Files
iOS
Click To Expand
ios/Podfile:AppDelegate.m:Android
Click To Expand
Have you converted to AndroidX?
android/gradle.settingsjetifier=truefor Android compatibility?jetifierfor react-native compatibility?android/build.gradle:// N/Aandroid/app/build.gradle:// N/Aandroid/settings.gradle:// N/AMainApplication.java:// N/AAndroidManifest.xml:<!-- N/A -->Environment
Click To Expand
react-native infooutput:react-native v0.60.2
react-native-firebaseversion you're using that has this issue:6.0.0Firebasemodule(s) you're using that has the issue:app,analyticsTypeScript?Y