Skip to content

Commit 6e5d9c4

Browse files
committed
fix: remove rnfirebase entirely
1 parent 2d1377b commit 6e5d9c4

File tree

10 files changed

+21
-880
lines changed

10 files changed

+21
-880
lines changed

examples/SampleApp/App.tsx

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { DevSettings, LogBox, Platform, Text, useColorScheme, View } from 'react
33
import { DarkTheme, DefaultTheme, NavigationContainer } from '@react-navigation/native';
44
import { createStackNavigator } from '@react-navigation/stack';
55
import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-context';
6-
import { getMessaging } from '@react-native-firebase/messaging';
76
import { AppContext } from './src/context/AppContext';
87
import { AppOverlayProvider } from './src/context/AppOverlayProvider';
98
import { UserSearchProvider } from './src/context/UserSearchContext';
@@ -48,31 +47,6 @@ const App = () => {
4847
const colorScheme = useColorScheme();
4948
const streamChatTheme = useStreamChatTheme();
5049

51-
useEffect(() => {
52-
const messaging = getMessaging();
53-
const unsubscribeOnNotificationOpen = messaging.onNotificationOpenedApp((remoteMessage) => {
54-
// Notification caused app to open from background state on iOS
55-
const channelId = remoteMessage.data?.channel_id as string;
56-
if (channelId) {
57-
navigateToChannel(channelId);
58-
}
59-
});
60-
// handle notification clicks on foreground
61-
messaging.getInitialNotification().then((remoteMessage) => {
62-
if (remoteMessage) {
63-
// Notification caused app to open from quit state on iOS
64-
const channelId = remoteMessage.data?.channel_id as string;
65-
if (channelId) {
66-
// this will make the app to start with the channel screen with this channel id
67-
initialChannelIdGlobalRef.current = channelId;
68-
}
69-
}
70-
});
71-
return () => {
72-
unsubscribeOnNotificationOpen();
73-
};
74-
}, []);
75-
7650
return (
7751
<SafeAreaProvider
7852
style={{

examples/SampleApp/ios/AppDelegate.swift

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,43 +2,35 @@ import UIKit
22
import React
33
import React_RCTAppDelegate
44
import ReactAppDependencyProvider
5-
import FirebaseCore
6-
import FirebaseMessaging
75

86
@main
97
class AppDelegate: UIResponder, UIApplicationDelegate {
108
var window: UIWindow?
11-
9+
1210
var reactNativeDelegate: ReactNativeDelegate?
1311
var reactNativeFactory: RCTReactNativeFactory?
14-
12+
1513
func application(
1614
_ application: UIApplication,
1715
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
1816
) -> Bool {
1917
let delegate = ReactNativeDelegate()
2018
let factory = RCTReactNativeFactory(delegate: delegate)
2119
delegate.dependencyProvider = RCTAppDependencyProvider()
22-
FirebaseApp.configure()
23-
20+
2421
reactNativeDelegate = delegate
2522
reactNativeFactory = factory
26-
23+
2724
window = UIWindow(frame: UIScreen.main.bounds)
28-
25+
2926
factory.startReactNative(
3027
withModuleName: "SampleApp",
3128
in: window,
3229
launchOptions: launchOptions
3330
)
34-
31+
3532
return true
3633
}
37-
38-
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
39-
// Pass the device token to FCM
40-
Messaging.messaging().apnsToken = deviceToken
41-
}
4234
}
4335

4436
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {

examples/SampleApp/ios/Podfile

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ target 'SampleApp' do
4343
inherit! :complete
4444
# Pods for testing
4545
end
46-
pod 'Firebase/Crashlytics'
47-
pod 'Firebase/Analytics'
48-
pod 'Firebase/AppDistribution'
4946

5047
post_install do |installer|
5148
# https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202

examples/SampleApp/ios/Podfile.lock

Lines changed: 1 addition & 192 deletions
Original file line numberDiff line numberDiff line change
@@ -3,149 +3,11 @@ PODS:
33
- DoubleConversion (1.1.6)
44
- fast_float (6.1.4)
55
- FBLazyVector (0.79.3)
6-
- Firebase/Analytics (11.13.0):
7-
- Firebase/Core
8-
- Firebase/AppDistribution (11.13.0):
9-
- Firebase/CoreOnly
10-
- FirebaseAppDistribution (~> 11.13.0-beta)
11-
- Firebase/Core (11.13.0):
12-
- Firebase/CoreOnly
13-
- FirebaseAnalytics (~> 11.13.0)
14-
- Firebase/CoreOnly (11.13.0):
15-
- FirebaseCore (~> 11.13.0)
16-
- Firebase/Crashlytics (11.13.0):
17-
- Firebase/CoreOnly
18-
- FirebaseCrashlytics (~> 11.13.0)
19-
- Firebase/Messaging (11.13.0):
20-
- Firebase/CoreOnly
21-
- FirebaseMessaging (~> 11.13.0)
22-
- FirebaseAnalytics (11.13.0):
23-
- FirebaseAnalytics/AdIdSupport (= 11.13.0)
24-
- FirebaseCore (~> 11.13.0)
25-
- FirebaseInstallations (~> 11.0)
26-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
27-
- GoogleUtilities/MethodSwizzler (~> 8.1)
28-
- GoogleUtilities/Network (~> 8.1)
29-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
30-
- nanopb (~> 3.30910.0)
31-
- FirebaseAnalytics/AdIdSupport (11.13.0):
32-
- FirebaseCore (~> 11.13.0)
33-
- FirebaseInstallations (~> 11.0)
34-
- GoogleAppMeasurement (= 11.13.0)
35-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
36-
- GoogleUtilities/MethodSwizzler (~> 8.1)
37-
- GoogleUtilities/Network (~> 8.1)
38-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
39-
- nanopb (~> 3.30910.0)
40-
- FirebaseAppDistribution (11.13.0-beta):
41-
- FirebaseCore (~> 11.13.0)
42-
- FirebaseInstallations (~> 11.0)
43-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
44-
- GoogleUtilities/UserDefaults (~> 8.1)
45-
- FirebaseCore (11.13.0):
46-
- FirebaseCoreInternal (~> 11.13.0)
47-
- GoogleUtilities/Environment (~> 8.1)
48-
- GoogleUtilities/Logger (~> 8.1)
49-
- FirebaseCoreExtension (11.13.0):
50-
- FirebaseCore (~> 11.13.0)
51-
- FirebaseCoreInternal (11.13.0):
52-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
53-
- FirebaseCrashlytics (11.13.0):
54-
- FirebaseCore (~> 11.13.0)
55-
- FirebaseInstallations (~> 11.0)
56-
- FirebaseRemoteConfigInterop (~> 11.0)
57-
- FirebaseSessions (~> 11.0)
58-
- GoogleDataTransport (~> 10.0)
59-
- GoogleUtilities/Environment (~> 8.1)
60-
- nanopb (~> 3.30910.0)
61-
- PromisesObjC (~> 2.4)
62-
- FirebaseInstallations (11.13.0):
63-
- FirebaseCore (~> 11.13.0)
64-
- GoogleUtilities/Environment (~> 8.1)
65-
- GoogleUtilities/UserDefaults (~> 8.1)
66-
- PromisesObjC (~> 2.4)
67-
- FirebaseMessaging (11.13.0):
68-
- FirebaseCore (~> 11.13.0)
69-
- FirebaseInstallations (~> 11.0)
70-
- GoogleDataTransport (~> 10.0)
71-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
72-
- GoogleUtilities/Environment (~> 8.1)
73-
- GoogleUtilities/Reachability (~> 8.1)
74-
- GoogleUtilities/UserDefaults (~> 8.1)
75-
- nanopb (~> 3.30910.0)
76-
- FirebaseRemoteConfigInterop (11.14.0)
77-
- FirebaseSessions (11.13.0):
78-
- FirebaseCore (~> 11.13.0)
79-
- FirebaseCoreExtension (~> 11.13.0)
80-
- FirebaseInstallations (~> 11.0)
81-
- GoogleDataTransport (~> 10.0)
82-
- GoogleUtilities/Environment (~> 8.1)
83-
- GoogleUtilities/UserDefaults (~> 8.1)
84-
- nanopb (~> 3.30910.0)
85-
- PromisesSwift (~> 2.1)
866
- fmt (11.0.2)
877
- glog (0.3.5)
88-
- GoogleAppMeasurement (11.13.0):
89-
- GoogleAppMeasurement/AdIdSupport (= 11.13.0)
90-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
91-
- GoogleUtilities/MethodSwizzler (~> 8.1)
92-
- GoogleUtilities/Network (~> 8.1)
93-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
94-
- nanopb (~> 3.30910.0)
95-
- GoogleAppMeasurement/AdIdSupport (11.13.0):
96-
- GoogleAppMeasurement/WithoutAdIdSupport (= 11.13.0)
97-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
98-
- GoogleUtilities/MethodSwizzler (~> 8.1)
99-
- GoogleUtilities/Network (~> 8.1)
100-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
101-
- nanopb (~> 3.30910.0)
102-
- GoogleAppMeasurement/WithoutAdIdSupport (11.13.0):
103-
- GoogleUtilities/AppDelegateSwizzler (~> 8.1)
104-
- GoogleUtilities/MethodSwizzler (~> 8.1)
105-
- GoogleUtilities/Network (~> 8.1)
106-
- "GoogleUtilities/NSData+zlib (~> 8.1)"
107-
- nanopb (~> 3.30910.0)
108-
- GoogleDataTransport (10.1.0):
109-
- nanopb (~> 3.30910.0)
110-
- PromisesObjC (~> 2.4)
111-
- GoogleUtilities/AppDelegateSwizzler (8.1.0):
112-
- GoogleUtilities/Environment
113-
- GoogleUtilities/Logger
114-
- GoogleUtilities/Network
115-
- GoogleUtilities/Privacy
116-
- GoogleUtilities/Environment (8.1.0):
117-
- GoogleUtilities/Privacy
118-
- GoogleUtilities/Logger (8.1.0):
119-
- GoogleUtilities/Environment
120-
- GoogleUtilities/Privacy
121-
- GoogleUtilities/MethodSwizzler (8.1.0):
122-
- GoogleUtilities/Logger
123-
- GoogleUtilities/Privacy
124-
- GoogleUtilities/Network (8.1.0):
125-
- GoogleUtilities/Logger
126-
- "GoogleUtilities/NSData+zlib"
127-
- GoogleUtilities/Privacy
128-
- GoogleUtilities/Reachability
129-
- "GoogleUtilities/NSData+zlib (8.1.0)":
130-
- GoogleUtilities/Privacy
131-
- GoogleUtilities/Privacy (8.1.0)
132-
- GoogleUtilities/Reachability (8.1.0):
133-
- GoogleUtilities/Logger
134-
- GoogleUtilities/Privacy
135-
- GoogleUtilities/UserDefaults (8.1.0):
136-
- GoogleUtilities/Logger
137-
- GoogleUtilities/Privacy
1388
- hermes-engine (0.79.3):
1399
- hermes-engine/Pre-built (= 0.79.3)
14010
- hermes-engine/Pre-built (0.79.3)
141-
- nanopb (3.30910.0):
142-
- nanopb/decode (= 3.30910.0)
143-
- nanopb/encode (= 3.30910.0)
144-
- nanopb/decode (3.30910.0)
145-
- nanopb/encode (3.30910.0)
146-
- PromisesObjC (2.4.0)
147-
- PromisesSwift (2.4.0):
148-
- PromisesObjC (= 2.4.0)
14911
- RCT-Folly (2024.11.18.00):
15012
- boost
15113
- DoubleConversion
@@ -1893,14 +1755,6 @@ PODS:
18931755
- ReactCommon/turbomodule/bridging
18941756
- ReactCommon/turbomodule/core
18951757
- Yoga
1896-
- RNFBApp (22.2.1):
1897-
- Firebase/CoreOnly (= 11.13.0)
1898-
- React-Core
1899-
- RNFBMessaging (22.2.1):
1900-
- Firebase/Messaging (= 11.13.0)
1901-
- FirebaseCoreExtension
1902-
- React-Core
1903-
- RNFBApp
19041758
- RNGestureHandler (2.26.0):
19051759
- DoubleConversion
19061760
- glog
@@ -1985,9 +1839,6 @@ DEPENDENCIES:
19851839
- DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`)
19861840
- fast_float (from `../node_modules/react-native/third-party-podspecs/fast_float.podspec`)
19871841
- FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`)
1988-
- Firebase/Analytics
1989-
- Firebase/AppDistribution
1990-
- Firebase/Crashlytics
19911842
- fmt (from `../node_modules/react-native/third-party-podspecs/fmt.podspec`)
19921843
- glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`)
19931844
- hermes-engine (from `../node_modules/react-native/sdks/hermes-engine/hermes-engine.podspec`)
@@ -2058,31 +1909,12 @@ DEPENDENCIES:
20581909
- ReactCodegen (from `build/generated/ios`)
20591910
- ReactCommon/turbomodule/core (from `../node_modules/react-native/ReactCommon`)
20601911
- "RNCAsyncStorage (from `../node_modules/@react-native-async-storage/async-storage`)"
2061-
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
2062-
- "RNFBMessaging (from `../node_modules/@react-native-firebase/messaging`)"
20631912
- RNGestureHandler (from `../node_modules/react-native-gesture-handler`)
20641913
- RNScreens (from `../node_modules/react-native-screens`)
20651914
- Yoga (from `../node_modules/react-native/ReactCommon/yoga`)
20661915

20671916
SPEC REPOS:
20681917
trunk:
2069-
- Firebase
2070-
- FirebaseAnalytics
2071-
- FirebaseAppDistribution
2072-
- FirebaseCore
2073-
- FirebaseCoreExtension
2074-
- FirebaseCoreInternal
2075-
- FirebaseCrashlytics
2076-
- FirebaseInstallations
2077-
- FirebaseMessaging
2078-
- FirebaseRemoteConfigInterop
2079-
- FirebaseSessions
2080-
- GoogleAppMeasurement
2081-
- GoogleDataTransport
2082-
- GoogleUtilities
2083-
- nanopb
2084-
- PromisesObjC
2085-
- PromisesSwift
20861918
- SocketRocket
20871919

20881920
EXTERNAL SOURCES:
@@ -2231,10 +2063,6 @@ EXTERNAL SOURCES:
22312063
:path: "../node_modules/react-native/ReactCommon"
22322064
RNCAsyncStorage:
22332065
:path: "../node_modules/@react-native-async-storage/async-storage"
2234-
RNFBApp:
2235-
:path: "../node_modules/@react-native-firebase/app"
2236-
RNFBMessaging:
2237-
:path: "../node_modules/@react-native-firebase/messaging"
22382066
RNGestureHandler:
22392067
:path: "../node_modules/react-native-gesture-handler"
22402068
RNScreens:
@@ -2247,26 +2075,9 @@ SPEC CHECKSUMS:
22472075
DoubleConversion: cb417026b2400c8f53ae97020b2be961b59470cb
22482076
fast_float: 06eeec4fe712a76acc9376682e4808b05ce978b6
22492077
FBLazyVector: a62a7a5760929b6265e27bc01ab7598dde93ebd3
2250-
Firebase: 3435bc66b4d494c2f22c79fd3aae4c1db6662327
2251-
FirebaseAnalytics: 630349facf4a114a0977e5d7570e104261973287
2252-
FirebaseAppDistribution: 8eed20488ab59271d923fb4e3edd887ccb7c011c
2253-
FirebaseCore: c692c7f1c75305ab6aff2b367f25e11d73aa8bd0
2254-
FirebaseCoreExtension: c048485c347616dba6165358dbef765c5197597b
2255-
FirebaseCoreInternal: 29d7b3af4aaf0b8f3ed20b568c13df399b06f68c
2256-
FirebaseCrashlytics: 8281e577b6f85a08ea7aeb8b66f95e1ae430c943
2257-
FirebaseInstallations: 0ee9074f2c1e86561ace168ee1470dc67aabaf02
2258-
FirebaseMessaging: 195bbdb73e6ca1dbc76cd46e73f3552c084ef6e4
2259-
FirebaseRemoteConfigInterop: 7b74ceaa54e28863ed17fa39da8951692725eced
2260-
FirebaseSessions: eaa8ec037e7793769defe4201c20bd4d976f9677
22612078
fmt: a40bb5bd0294ea969aaaba240a927bd33d878cdd
22622079
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
2263-
GoogleAppMeasurement: 0dfca1a4b534d123de3945e28f77869d10d0d600
2264-
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
2265-
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
22662080
hermes-engine: 94ed01537bdeccaab1adbf94b040d115d6fa1a7f
2267-
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
2268-
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
2269-
PromisesSwift: 9d77319bbe72ebf6d872900551f7eeba9bce2851
22702081
RCT-Folly: 36fe2295e44b10d831836cc0d1daec5f8abcf809
22712082
RCTDeprecation: c3e3f5b4ea83e7ff3bc86ce09e2a54b7affd687d
22722083
RCTRequired: ee438439880dffc9425930d1dd1a3c883ee6879c
@@ -2332,13 +2143,11 @@ SPEC CHECKSUMS:
23322143
ReactCodegen: 5a3b071aec923e67260550b3f65329f844d691fa
23332144
ReactCommon: 1dce2374d9dc2cdf634244f1584513b606512750
23342145
RNCAsyncStorage: faf86846c58994b6b8aab074a4914eb1796c2a9f
2335-
RNFBApp: df5caad9f64b6bc87f8a0b110e6bc411fb00a12b
2336-
RNFBMessaging: 6586f18ab3411aeb3349088c19fe54283d39e529
23372146
RNGestureHandler: 2fa49aef8b58d35bcc61abe06ffecc4bcc5268a4
23382147
RNScreens: d9d5d8a2a484bb4446968bfa00db991f1117db44
23392148
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
23402149
Yoga: b2eaabf17044cd4273a661b14eb83f9fd2c90491
23412150

2342-
PODFILE CHECKSUM: 4f662370295f8f9cee909f1a4c59a614999a209d
2151+
PODFILE CHECKSUM: de5234551be803f4b70b79cbcc1734989dc86e63
23432152

23442153
COCOAPODS: 1.14.3

0 commit comments

Comments
 (0)