Skip to content

Commit 57e12a4

Browse files
committed
make ios work idk
1 parent 0cfcbb4 commit 57e12a4

10 files changed

Lines changed: 2569 additions & 23 deletions

File tree

App.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,14 @@ function App(): JSX.Element {
107107
},
108108
);
109109

110-
const event = AppState.addEventListener('focus', () => {
111-
if (backgroundClickedNotification) {
112-
handleNotificationClick(backgroundClickedNotification);
113-
}
114-
backgroundClickedNotification = undefined;
115-
});
110+
const event = AppState.addEventListener('change', (nextAppState) => {
111+
if (nextAppState === 'active') {
112+
if (backgroundClickedNotification) {
113+
handleNotificationClick(backgroundClickedNotification);
114+
}
115+
backgroundClickedNotification = undefined;
116+
}
117+
});
116118

117119
return () => {
118120
disposeForegroundEvent();

ios/GoogleService-Info.plist

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>API_KEY</key>
6+
<string>AIzaSyBUIiSF7vdmd4cRGEXmthJCViXwmFgl4oE</string>
7+
<key>GCM_SENDER_ID</key>
8+
<string>833085928210</string>
9+
<key>PLIST_VERSION</key>
10+
<string>1</string>
11+
<key>BUNDLE_ID</key>
12+
<string>org.reactjs.native.example.NerimityReactNative</string>
13+
<key>PROJECT_ID</key>
14+
<string>nerimity</string>
15+
<key>STORAGE_BUCKET</key>
16+
<string>nerimity.firebasestorage.app</string>
17+
<key>IS_ADS_ENABLED</key>
18+
<false></false>
19+
<key>IS_ANALYTICS_ENABLED</key>
20+
<false></false>
21+
<key>IS_APPINVITE_ENABLED</key>
22+
<true></true>
23+
<key>IS_GCM_ENABLED</key>
24+
<true></true>
25+
<key>IS_SIGNIN_ENABLED</key>
26+
<true></true>
27+
<key>GOOGLE_APP_ID</key>
28+
<string>1:833085928210:ios:42927d481b32e47c0639cb</string>
29+
</dict>
30+
</plist>

ios/NerimityReactNative.xcodeproj/project.pbxproj

Lines changed: 47 additions & 0 deletions
Large diffs are not rendered by default.

ios/NerimityReactNative.xcworkspace/contents.xcworkspacedata

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ios/NerimityReactNative/AppDelegate.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import UIKit
22
import React
33
import React_RCTAppDelegate
44
import ReactAppDependencyProvider
5+
import FirebaseCore
56

67
@main
78
class AppDelegate: UIResponder, UIApplicationDelegate {
@@ -14,6 +15,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
1415
_ application: UIApplication,
1516
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
1617
) -> Bool {
18+
19+
FirebaseApp.configure()
20+
1721
let delegate = ReactNativeDelegate()
1822
let factory = RCTReactNativeFactory(delegate: delegate)
1923
delegate.dependencyProvider = RCTAppDependencyProvider()

ios/NerimityReactNative/Info.plist

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,15 @@
2828
<true/>
2929
<key>NSAppTransportSecurity</key>
3030
<dict>
31-
<!-- Do not change NSAllowsArbitraryLoads to true, or you will risk app rejection! -->
3231
<key>NSAllowsArbitraryLoads</key>
3332
<false/>
3433
<key>NSAllowsLocalNetworking</key>
3534
<true/>
3635
</dict>
3736
<key>NSLocationWhenInUseUsageDescription</key>
3837
<string></string>
38+
<key>RCTNewArchEnabled</key>
39+
<true/>
3940
<key>UILaunchStoryboardName</key>
4041
<string>LaunchScreen</string>
4142
<key>UIRequiredDeviceCapabilities</key>

ios/NerimityReactNative/PrivacyInfo.xcprivacy

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,20 @@
66
<array>
77
<dict>
88
<key>NSPrivacyAccessedAPIType</key>
9-
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
9+
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
1010
<key>NSPrivacyAccessedAPITypeReasons</key>
1111
<array>
12-
<string>C617.1</string>
12+
<string>CA92.1</string>
13+
<string>1C8F.1</string>
14+
<string>C56D.1</string>
1315
</array>
1416
</dict>
1517
<dict>
1618
<key>NSPrivacyAccessedAPIType</key>
17-
<string>NSPrivacyAccessedAPICategoryUserDefaults</string>
19+
<string>NSPrivacyAccessedAPICategoryFileTimestamp</string>
1820
<key>NSPrivacyAccessedAPITypeReasons</key>
1921
<array>
20-
<string>CA92.1</string>
22+
<string>C617.1</string>
2123
</array>
2224
</dict>
2325
<dict>

ios/Podfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ require Pod::Executable.execute_command('node', ['-p',
88
platform :ios, min_ios_version_supported
99
prepare_react_native_project!
1010

11+
use_modular_headers!
12+
1113
linkage = ENV['USE_FRAMEWORKS']
1214
if linkage != nil
1315
Pod::UI.puts "Configuring Pod with #{linkage}ally linked Frameworks".green

0 commit comments

Comments
 (0)