diff --git a/.yarn/patches/expo-updates-npm-29.0.16-1c5c89eb83.patch b/.yarn/patches/expo-updates-npm-29.0.16-1c5c89eb83.patch new file mode 100644 index 00000000..7a782f21 --- /dev/null +++ b/.yarn/patches/expo-updates-npm-29.0.16-1c5c89eb83.patch @@ -0,0 +1,45 @@ +diff --git a/ios/EXUpdates/UpdatesConfig.swift b/ios/EXUpdates/UpdatesConfig.swift +index 09a1e145a9f5a938e10dd3c59eedfd213ad54346..787c1a8f7ae6a010fff4200ffebe31742e9a25eb 100644 +--- a/ios/EXUpdates/UpdatesConfig.swift ++++ b/ios/EXUpdates/UpdatesConfig.swift +@@ -141,7 +141,8 @@ public final class UpdatesConfig: NSObject { + } + + private static func configDictionaryWithExpoPlist(mergingOtherDictionary: [String: Any]?) throws -> [String: Any] { +- guard let configPlistPath = Bundle.main.path(forResource: PlistName, ofType: "plist") else { ++ let bundle = Bundle(for: UpdatesConfig.self) ++ guard let configPlistPath = bundle.path(forResource: PlistName, ofType: "plist") else { + throw UpdatesConfigError.ExpoUpdatesConfigPlistError + } + +diff --git a/ios/EXUpdates/UpdatesUtils.swift b/ios/EXUpdates/UpdatesUtils.swift +index a1e2c9af4ebaf9e50db2acaabfa876fc46d22454..0b96a7062dbcd021339a9daeb4397b3c7715b96d 100644 +--- a/ios/EXUpdates/UpdatesUtils.swift ++++ b/ios/EXUpdates/UpdatesUtils.swift +@@ -108,18 +108,22 @@ public final class UpdatesUtils: NSObject { + return assetFilesMap + } + ++ private static func getBundle() -> Bundle { ++ return Bundle(for: UpdatesUtils.self) ++ } ++ + internal static func url(forBundledAsset asset: UpdateAsset) -> URL? { + guard let mainBundleDir = asset.mainBundleDir else { +- return Bundle.main.url(forResource: asset.mainBundleFilename, withExtension: asset.type) ++ return getBundle().url(forResource: asset.mainBundleFilename, withExtension: asset.type) + } +- return Bundle.main.url(forResource: asset.mainBundleFilename, withExtension: asset.type, subdirectory: mainBundleDir) ++ return getBundle().url(forResource: asset.mainBundleFilename, withExtension: asset.type, subdirectory: mainBundleDir) + } + + internal static func path(forBundledAsset asset: UpdateAsset) -> String? { + guard let mainBundleDir = asset.mainBundleDir else { +- return Bundle.main.path(forResource: asset.mainBundleFilename, ofType: asset.type) ++ return getBundle().path(forResource: asset.mainBundleFilename, ofType: asset.type) + } +- return Bundle.main.path(forResource: asset.mainBundleFilename, ofType: asset.type, inDirectory: mainBundleDir) ++ return getBundle().path(forResource: asset.mainBundleFilename, ofType: asset.type, inDirectory: mainBundleDir) + } + + /** diff --git a/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo.xcscheme b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo.xcscheme index 25cbd4e2..b491f3bb 100644 --- a/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo.xcscheme +++ b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo.xcscheme @@ -31,7 +31,7 @@ shouldAutocreateTestPlan = "YES"> Bool { + return ReactNativeBrownfield.shared.application(application, willFinishLaunchingWithOptions: launchOptions) + } } public class RNNavigationDelegate: BrownfieldNavigationDelegate { diff --git a/apps/AppleApp/Brownfield Apple App/components/SettingsScreen.swift b/apps/AppleApp/Brownfield Apple App/components/SettingsScreen.swift index d5f584c3..f8eab904 100644 --- a/apps/AppleApp/Brownfield Apple App/components/SettingsScreen.swift +++ b/apps/AppleApp/Brownfield Apple App/components/SettingsScreen.swift @@ -19,4 +19,4 @@ struct SettingsScreen: View { } .navigationTitle("Settings") } -} \ No newline at end of file +} diff --git a/apps/ExpoApp54/RNApp.tsx b/apps/ExpoApp54/RNApp.tsx index 5d08feed..b141fbc8 100644 --- a/apps/ExpoApp54/RNApp.tsx +++ b/apps/ExpoApp54/RNApp.tsx @@ -3,11 +3,12 @@ import { Button, StyleSheet, Text, View } from 'react-native'; import BrownfieldNavigation from '@callstack/brownfield-navigation'; import Counter from './components/counter'; +import { checkAndFetchUpdate } from './utils/expo-rn-updates'; export default function RNApp() { return ( - Expo React Native Brownfield + 123123 Expo React Native Brownfield @@ -20,6 +21,7 @@ export default function RNApp() { title="Navigate to Referrals" onPress={() => BrownfieldNavigation.navigateToReferrals('123')} /> +