Skip to content

Commit a2c2556

Browse files
authored
Merge pull request #26 from Vadko/03.05-rn-0.79-fix
feat: expo SDK 53 & react-native 0.79 support
2 parents 23bd3c5 + 00353eb commit a2c2556

15 files changed

Lines changed: 4162 additions & 3701 deletions

File tree

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v18
1+
v22.14.0

eslint.config.mjs

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { fixupConfigRules } from '@eslint/compat';
2+
import { FlatCompat } from '@eslint/eslintrc';
3+
import js from '@eslint/js';
4+
import prettier from 'eslint-plugin-prettier';
5+
import { defineConfig } from 'eslint/config';
6+
import path from 'node:path';
7+
import { fileURLToPath } from 'node:url';
8+
9+
const __filename = fileURLToPath(import.meta.url);
10+
const __dirname = path.dirname(__filename);
11+
const compat = new FlatCompat({
12+
baseDirectory: __dirname,
13+
recommendedConfig: js.configs.recommended,
14+
allConfig: js.configs.all,
15+
});
16+
17+
export default defineConfig([
18+
{
19+
extends: fixupConfigRules(compat.extends('@react-native', 'prettier')),
20+
plugins: { prettier },
21+
rules: {
22+
'react/react-in-jsx-scope': 'off',
23+
'prettier/prettier': [
24+
'error',
25+
{
26+
quoteProps: 'consistent',
27+
singleQuote: true,
28+
tabWidth: 2,
29+
trailingComma: 'es5',
30+
useTabs: false,
31+
},
32+
],
33+
},
34+
},
35+
{
36+
ignores: [
37+
'node_modules/',
38+
'lib/'
39+
],
40+
},
41+
]);

example/android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

example/ios/AppDelegate.swift

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import UIKit
2+
import React
3+
import React_RCTAppDelegate
4+
import ReactAppDependencyProvider
5+
6+
@main
7+
class AppDelegate: UIResponder, UIApplicationDelegate {
8+
var window: UIWindow?
9+
10+
var reactNativeDelegate: ReactNativeDelegate?
11+
var reactNativeFactory: RCTReactNativeFactory?
12+
13+
func application(
14+
_ application: UIApplication,
15+
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil
16+
) -> Bool {
17+
let delegate = ReactNativeDelegate()
18+
let factory = RCTReactNativeFactory(delegate: delegate)
19+
delegate.dependencyProvider = RCTAppDependencyProvider()
20+
21+
reactNativeDelegate = delegate
22+
reactNativeFactory = factory
23+
24+
window = UIWindow(frame: UIScreen.main.bounds)
25+
26+
factory.startReactNative(
27+
withModuleName: "FileViewerTurboExample",
28+
in: window,
29+
launchOptions: launchOptions
30+
)
31+
32+
return true
33+
}
34+
}
35+
36+
class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {
37+
override func sourceURL(for bridge: RCTBridge) -> URL? {
38+
self.bundleURL()
39+
}
40+
41+
override func bundleURL() -> URL? {
42+
#if DEBUG
43+
RCTBundleURLProvider.sharedSettings().jsBundleURL(forBundleRoot: "index")
44+
#else
45+
Bundle.main.url(forResource: "main", withExtension: "jsbundle")
46+
#endif
47+
}
48+
}

example/ios/FileViewerTurboExample.xcodeproj/project.pbxproj

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
/* Begin PBXBuildFile section */
1010
00E356F31AD99517003FC87E /* FileViewerTurboExampleTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 00E356F21AD99517003FC87E /* FileViewerTurboExampleTests.m */; };
1111
0C80B921A6F3F58F76C31292 /* libPods-FileViewerTurboExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-FileViewerTurboExample.a */; };
12-
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
1312
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
14-
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
13+
522DD9342DC57D340069B9B7 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522DD9332DC57D340069B9B7 /* AppDelegate.swift */; };
1514
7699B88040F8A987B510C191 /* libPods-FileViewerTurboExample-FileViewerTurboExampleTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-FileViewerTurboExample-FileViewerTurboExampleTests.a */; };
1615
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
1716
A648109D9411DCDE401CBCE3 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; };
@@ -32,14 +31,13 @@
3231
00E356F11AD99517003FC87E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3332
00E356F21AD99517003FC87E /* FileViewerTurboExampleTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FileViewerTurboExampleTests.m; sourceTree = "<group>"; };
3433
13B07F961A680F5B00A75B9A /* FileViewerTurboExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = FileViewerTurboExample.app; sourceTree = BUILT_PRODUCTS_DIR; };
35-
13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = FileViewerTurboExample/AppDelegate.h; sourceTree = "<group>"; };
36-
13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = FileViewerTurboExample/AppDelegate.mm; sourceTree = "<group>"; };
3734
13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = FileViewerTurboExample/Images.xcassets; sourceTree = "<group>"; };
3835
13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = FileViewerTurboExample/Info.plist; sourceTree = "<group>"; };
39-
13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = FileViewerTurboExample/main.m; sourceTree = "<group>"; };
4036
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = FileViewerTurboExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
4137
19F6CBCC0A4E27FBF8BF4A61 /* libPods-FileViewerTurboExample-FileViewerTurboExampleTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-FileViewerTurboExample-FileViewerTurboExampleTests.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4238
3B4392A12AC88292D35C810B /* Pods-FileViewerTurboExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FileViewerTurboExample.debug.xcconfig"; path = "Target Support Files/Pods-FileViewerTurboExample/Pods-FileViewerTurboExample.debug.xcconfig"; sourceTree = "<group>"; };
39+
522DD9322DC57D340069B9B7 /* FileViewerTurboExample-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "FileViewerTurboExample-Bridging-Header.h"; sourceTree = "<group>"; };
40+
522DD9332DC57D340069B9B7 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
4341
5239B6D92D00FCA4009FB165 /* libreact-native-file-viewer-turbo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; path = "libreact-native-file-viewer-turbo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
4442
5239B6DB2D00FE38009FB165 /* QuickLook.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuickLook.framework; path = System/Library/Frameworks/QuickLook.framework; sourceTree = SDKROOT; };
4543
5709B34CF0A7D63546082F79 /* Pods-FileViewerTurboExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-FileViewerTurboExample.release.xcconfig"; path = "Target Support Files/Pods-FileViewerTurboExample/Pods-FileViewerTurboExample.release.xcconfig"; sourceTree = "<group>"; };
@@ -90,13 +88,12 @@
9088
13B07FAE1A68108700A75B9A /* FileViewerTurboExample */ = {
9189
isa = PBXGroup;
9290
children = (
93-
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
94-
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
9591
13B07FB51A68108700A75B9A /* Images.xcassets */,
9692
13B07FB61A68108700A75B9A /* Info.plist */,
9793
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
98-
13B07FB71A68108700A75B9A /* main.m */,
9994
13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */,
95+
522DD9332DC57D340069B9B7 /* AppDelegate.swift */,
96+
522DD9322DC57D340069B9B7 /* FileViewerTurboExample-Bridging-Header.h */,
10097
);
10198
name = FileViewerTurboExample;
10299
sourceTree = "<group>";
@@ -213,7 +210,7 @@
213210
TestTargetID = 13B07F861A680F5B00A75B9A;
214211
};
215212
13B07F861A680F5B00A75B9A = {
216-
LastSwiftMigration = 1120;
213+
LastSwiftMigration = 1630;
217214
};
218215
};
219216
};
@@ -400,8 +397,7 @@
400397
isa = PBXSourcesBuildPhase;
401398
buildActionMask = 2147483647;
402399
files = (
403-
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */,
404-
13B07FC11A68108700A75B9A /* main.m in Sources */,
400+
522DD9342DC57D340069B9B7 /* AppDelegate.swift in Sources */,
405401
);
406402
runOnlyForDeploymentPostprocessing = 0;
407403
};
@@ -489,6 +485,7 @@
489485
);
490486
PRODUCT_BUNDLE_IDENTIFIER = fileviewerturbo.example;
491487
PRODUCT_NAME = FileViewerTurboExample;
488+
SWIFT_OBJC_BRIDGING_HEADER = "FileViewerTurboExample-Bridging-Header.h";
492489
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
493490
SWIFT_VERSION = 5.0;
494491
VERSIONING_SYSTEM = "apple-generic";
@@ -516,6 +513,7 @@
516513
);
517514
PRODUCT_BUNDLE_IDENTIFIER = fileviewerturbo.example;
518515
PRODUCT_NAME = FileViewerTurboExample;
516+
SWIFT_OBJC_BRIDGING_HEADER = "FileViewerTurboExample-Bridging-Header.h";
519517
SWIFT_VERSION = 5.0;
520518
VERSIONING_SYSTEM = "apple-generic";
521519
};

example/ios/FileViewerTurboExample/AppDelegate.h

Lines changed: 0 additions & 6 deletions
This file was deleted.

example/ios/FileViewerTurboExample/AppDelegate.mm

Lines changed: 0 additions & 31 deletions
This file was deleted.

example/ios/FileViewerTurboExample/main.m

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)