diff --git a/.changeset/calm-poets-film.md b/.changeset/calm-poets-film.md new file mode 100644 index 00000000..68050851 --- /dev/null +++ b/.changeset/calm-poets-film.md @@ -0,0 +1,5 @@ +--- +'brownfield': patch +--- + +feat: support Expo SDK 56 in the Brownfield package and example apps diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c728c56e..14994afc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,6 +19,7 @@ jobs: rnapp: ${{ steps.filter.outputs.rnapp }} expo54: ${{ steps.filter.outputs.expo54 }} expo55: ${{ steps.filter.outputs.expo55 }} + expo56: ${{ steps.filter.outputs.expo56 }} androidapp: ${{ steps.filter.outputs.androidapp }} appleapp: ${{ steps.filter.outputs.appleapp }} ci: ${{ steps.filter.outputs.ci }} @@ -39,6 +40,8 @@ jobs: - 'apps/ExpoApp54/**' expo55: - 'apps/ExpoApp55/**' + expo56: + - 'apps/ExpoApp56/**' androidapp: - 'apps/AndroidApp/**' appleapp: @@ -120,6 +123,7 @@ jobs: ( needs.filter.outputs.expo54 == 'true' || needs.filter.outputs.expo55 == 'true' || + needs.filter.outputs.expo56 == 'true' || needs.filter.outputs.androidapp == 'true' || needs.filter.outputs.packages == 'true' || needs.filter.outputs.ci == 'true' @@ -130,6 +134,7 @@ jobs: include: - version: '54' - version: '55' + - version: '56' steps: - name: Checkout @@ -200,6 +205,7 @@ jobs: ( needs.filter.outputs.expo54 == 'true' || needs.filter.outputs.expo55 == 'true' || + needs.filter.outputs.expo56 == 'true' || needs.filter.outputs.appleapp == 'true' || needs.filter.outputs.packages == 'true' || needs.filter.outputs.ci == 'true' @@ -210,6 +216,7 @@ jobs: include: - version: '54' - version: '55' + - version: '56' steps: - name: Checkout diff --git a/apps/AndroidApp/app/build.gradle.kts b/apps/AndroidApp/app/build.gradle.kts index 7d11b815..02087aa7 100644 --- a/apps/AndroidApp/app/build.gradle.kts +++ b/apps/AndroidApp/app/build.gradle.kts @@ -35,6 +35,9 @@ android { create("expo55") { dimension = "app" } + create("expo56") { + dimension = "app" + } create("vanilla") { dimension = "app" } @@ -71,6 +74,7 @@ dependencies { implementation(libs.androidx.compose.ui.tooling.preview) implementation(libs.androidx.compose.material3) implementation(libs.androidx.appcompat) + add("expo56Implementation", libs.brownfieldlib.expo56) add("expo55Implementation", libs.brownfieldlib.expo55) add("expo54Implementation", libs.brownfieldlib.expo54) add("vanillaImplementation", libs.brownfieldlib.vanilla) diff --git a/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/BrownfieldStore.kt b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/BrownfieldStore.kt new file mode 100644 index 00000000..c9e8fa11 --- /dev/null +++ b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/BrownfieldStore.kt @@ -0,0 +1,4 @@ +package com.callstack.brownfield.android.example + +typealias BrownfieldStore = com.callstack.rnbrownfield.demo.expoapp56.BrownfieldStore +typealias User = com.callstack.rnbrownfield.demo.expoapp56.User diff --git a/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt new file mode 100644 index 00000000..dfd59f51 --- /dev/null +++ b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeConstants.kt @@ -0,0 +1,6 @@ +package com.callstack.brownfield.android.example + +object ReactNativeConstants { + const val MAIN_MODULE_NAME = "main" + const val APP_NAME = "Android (Expo 56)" +} diff --git a/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeHostManager.kt b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeHostManager.kt new file mode 100644 index 00000000..c317ce58 --- /dev/null +++ b/apps/AndroidApp/app/src/expo56/java/com/callstack/brownfield/android/expo/ReactNativeHostManager.kt @@ -0,0 +1,3 @@ +package com.callstack.brownfield.android.example + +typealias ReactNativeHostManager = com.callstack.rnbrownfield.demo.expoapp56.ReactNativeHostManager diff --git a/apps/AndroidApp/gradle/libs.versions.toml b/apps/AndroidApp/gradle/libs.versions.toml index 973d4ce6..1155d03c 100644 --- a/apps/AndroidApp/gradle/libs.versions.toml +++ b/apps/AndroidApp/gradle/libs.versions.toml @@ -16,6 +16,7 @@ gson = "2.13.2" [libraries] androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" } +brownfieldlib-expo56 = { module = "com.callstack.rnbrownfield.demo.expoapp56:brownfieldlib", version.ref = "brownfieldlib" } brownfieldlib-expo55 = { module = "com.callstack.rnbrownfield.demo.expoapp55:brownfieldlib", version.ref = "brownfieldlib" } brownfieldlib-expo54 = { module = "com.callstack.rnbrownfield.demo.expoapp54:brownfieldlib", version.ref = "brownfieldlib" } brownfieldlib-vanilla = { module = "com.rnapp:brownfieldlib", version.ref = "brownfieldlib" } @@ -40,4 +41,3 @@ gson = { module = "com.google.code.gson:gson", version.ref = "gson" } [plugins] android-application = { id = "com.android.application", version.ref = "agp" } kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } - diff --git a/apps/AndroidApp/package.json b/apps/AndroidApp/package.json index ec42f314..983d0a35 100644 --- a/apps/AndroidApp/package.json +++ b/apps/AndroidApp/package.json @@ -3,7 +3,8 @@ "version": "0.0.1", "private": true, "scripts": { - "build:example:android-consumer:expo": "./gradlew assembleExpo55Release", + "build:example:android-consumer:expo": "./gradlew assembleExpo56Release", + "build:example:android-consumer:expo56": "./gradlew assembleExpo56Release", "build:example:android-consumer:expo55": "./gradlew assembleExpo55Release", "build:example:android-consumer:expo54": "./gradlew assembleExpo54Release", "build:example:android-consumer:vanilla": "./gradlew assembleVanillaRelease" diff --git a/apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj b/apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj index 7b9e9c19..34199aa3 100644 --- a/apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj +++ b/apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj @@ -45,6 +45,20 @@ 79B8BE932FB7273600B94C6F /* hermesvm.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99C2FB4A61400A5F42B /* hermesvm.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 79B8BE942FB7273600B94C6F /* BrownfieldLib.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D9992FB4A61400A5F42B /* BrownfieldLib.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 79B8BE952FB7273600B94C6F /* React.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99D2FB4A61400A5F42B /* React.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEA02FB8000000B94C6F /* Brownie.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99B2FB4A61400A5F42B /* Brownie.xcframework */; }; + 79B8BEA12FB8000000B94C6F /* BrownfieldNavigation.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99A2FB4A61400A5F42B /* BrownfieldNavigation.xcframework */; }; + 79B8BEA22FB8000000B94C6F /* ReactNativeDependencies.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99F2FB4A61400A5F42B /* ReactNativeDependencies.xcframework */; }; + 79B8BEA32FB8000000B94C6F /* hermesvm.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99C2FB4A61400A5F42B /* hermesvm.xcframework */; }; + 79B8BEA42FB8000000B94C6F /* ReactBrownfield.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99E2FB4A61400A5F42B /* ReactBrownfield.xcframework */; }; + 79B8BEA52FB8000000B94C6F /* BrownfieldLib.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D9992FB4A61400A5F42B /* BrownfieldLib.xcframework */; }; + 79B8BEA62FB8000000B94C6F /* React.xcframework in Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99D2FB4A61400A5F42B /* React.xcframework */; }; + 79B8BEA72FB8000000B94C6F /* Brownie.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99B2FB4A61400A5F42B /* Brownie.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEA82FB8000000B94C6F /* ReactBrownfield.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99E2FB4A61400A5F42B /* ReactBrownfield.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEA92FB8000000B94C6F /* ReactNativeDependencies.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99F2FB4A61400A5F42B /* ReactNativeDependencies.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEAA2FB8000000B94C6F /* BrownfieldNavigation.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99A2FB4A61400A5F42B /* BrownfieldNavigation.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEAB2FB8000000B94C6F /* hermesvm.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99C2FB4A61400A5F42B /* hermesvm.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEAC2FB8000000B94C6F /* BrownfieldLib.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D9992FB4A61400A5F42B /* BrownfieldLib.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + 79B8BEAD2FB8000000B94C6F /* React.xcframework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 79B1D99D2FB4A61400A5F42B /* React.xcframework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -97,6 +111,23 @@ name = "Embed Frameworks"; runOnlyForDeploymentPostprocessing = 0; }; + 79B8BEAE2FB8000000B94C6F /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 79B8BEA72FB8000000B94C6F /* Brownie.xcframework in Embed Frameworks */, + 79B8BEA82FB8000000B94C6F /* ReactBrownfield.xcframework in Embed Frameworks */, + 79B8BEA92FB8000000B94C6F /* ReactNativeDependencies.xcframework in Embed Frameworks */, + 79B8BEAA2FB8000000B94C6F /* BrownfieldNavigation.xcframework in Embed Frameworks */, + 79B8BEAB2FB8000000B94C6F /* hermesvm.xcframework in Embed Frameworks */, + 79B8BEAC2FB8000000B94C6F /* BrownfieldLib.xcframework in Embed Frameworks */, + 79B8BEAD2FB8000000B94C6F /* React.xcframework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ @@ -110,6 +141,7 @@ 79B1D99F2FB4A61400A5F42B /* ReactNativeDependencies.xcframework */ = {isa = PBXFileReference; expectedSignature = "SelfSigned:BEEAE960B121B398BB228BD547298BD461DFFFD862BD3AD794A38F6D426F6741"; lastKnownFileType = wrapper.xcframework; name = ReactNativeDependencies.xcframework; path = package/ReactNativeDependencies.xcframework; sourceTree = ""; }; 79B8BE802FB7270E00B94C6F /* Brownfield Apple App (ExpoApp54).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Brownfield Apple App (ExpoApp54).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 79B8BE9B2FB7273600B94C6F /* Brownfield Apple App (ExpoApp55).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Brownfield Apple App (ExpoApp55).app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 79B8BEB22FB8000000B94C6F /* Brownfield Apple App (ExpoApp56).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Brownfield Apple App (ExpoApp56).app"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFileSystemSynchronizedBuildFileExceptionSet section */ @@ -143,6 +175,21 @@ ); target = 79B8BE832FB7273600B94C6F /* Brownfield Apple App (ExpoApp55) */; }; + 79B8BEB32FB8000000B94C6F /* Exceptions for "Brownfield Apple App" folder in "Brownfield Apple App (ExpoApp56)" target */ = { + isa = PBXFileSystemSynchronizedBuildFileExceptionSet; + membershipExceptions = ( + Assets.xcassets, + BrownfieldAppleApp.swift, + components/ContentView.swift, + components/GreetingCard.swift, + components/MaterialCard.swift, + components/MessagesView.swift, + components/ReferralsScreen.swift, + components/SettingsScreen.swift, + components/Toast.swift, + ); + target = 79B8BEB42FB8000000B94C6F /* Brownfield Apple App (ExpoApp56) */; + }; /* End PBXFileSystemSynchronizedBuildFileExceptionSet section */ /* Begin PBXFileSystemSynchronizedRootGroup section */ @@ -151,6 +198,7 @@ exceptions = ( 79B8BE822FB7270F00B94C6F /* Exceptions for "Brownfield Apple App" folder in "Brownfield Apple App (ExpoApp54)" target */, 79B8BE9C2FB7273600B94C6F /* Exceptions for "Brownfield Apple App" folder in "Brownfield Apple App (ExpoApp55)" target */, + 79B8BEB32FB8000000B94C6F /* Exceptions for "Brownfield Apple App" folder in "Brownfield Apple App (ExpoApp56)" target */, ); path = "Brownfield Apple App"; sourceTree = ""; @@ -198,6 +246,20 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 79B8BEAF2FB8000000B94C6F /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 79B8BEA02FB8000000B94C6F /* Brownie.xcframework in Frameworks */, + 79B8BEA12FB8000000B94C6F /* BrownfieldNavigation.xcframework in Frameworks */, + 79B8BEA22FB8000000B94C6F /* ReactNativeDependencies.xcframework in Frameworks */, + 79B8BEA32FB8000000B94C6F /* hermesvm.xcframework in Frameworks */, + 79B8BEA42FB8000000B94C6F /* ReactBrownfield.xcframework in Frameworks */, + 79B8BEA52FB8000000B94C6F /* BrownfieldLib.xcframework in Frameworks */, + 79B8BEA62FB8000000B94C6F /* React.xcframework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ @@ -230,6 +292,7 @@ 793C76A72EEBF938008A2A34 /* Brownfield Apple App (RNApp).app */, 79B8BE802FB7270E00B94C6F /* Brownfield Apple App (ExpoApp54).app */, 79B8BE9B2FB7273600B94C6F /* Brownfield Apple App (ExpoApp55).app */, + 79B8BEB22FB8000000B94C6F /* Brownfield Apple App (ExpoApp56).app */, ); name = Products; sourceTree = ""; @@ -306,6 +369,29 @@ productReference = 79B8BE9B2FB7273600B94C6F /* Brownfield Apple App (ExpoApp55).app */; productType = "com.apple.product-type.application"; }; + 79B8BEB42FB8000000B94C6F /* Brownfield Apple App (ExpoApp56) */ = { + isa = PBXNativeTarget; + buildConfigurationList = 79B8BEB92FB8000000B94C6F /* Build configuration list for PBXNativeTarget "Brownfield Apple App (ExpoApp56)" */; + buildPhases = ( + 79B8BEB12FB8000000B94C6F /* Sources */, + 79B8BEAF2FB8000000B94C6F /* Frameworks */, + 79B8BEB02FB8000000B94C6F /* Resources */, + 79B8BEAE2FB8000000B94C6F /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + fileSystemSynchronizedGroups = ( + 793C76A92EEBF938008A2A34 /* Brownfield Apple App */, + ); + name = "Brownfield Apple App (ExpoApp56)"; + packageProductDependencies = ( + ); + productName = "Brownfield Apple App"; + productReference = 79B8BEB22FB8000000B94C6F /* Brownfield Apple App (ExpoApp56).app */; + productType = "com.apple.product-type.application"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -319,6 +405,9 @@ 793C76A62EEBF938008A2A34 = { CreatedOnToolsVersion = 26.1.1; }; + 79B8BEB42FB8000000B94C6F = { + CreatedOnToolsVersion = 26.1.1; + }; }; }; buildConfigurationList = 793C76A22EEBF938008A2A34 /* Build configuration list for PBXProject "Brownfield Apple App" */; @@ -338,6 +427,7 @@ 793C76A62EEBF938008A2A34 /* Brownfield Apple App (RNApp) */, 79B8BE682FB7270E00B94C6F /* Brownfield Apple App (ExpoApp54) */, 79B8BE832FB7273600B94C6F /* Brownfield Apple App (ExpoApp55) */, + 79B8BEB42FB8000000B94C6F /* Brownfield Apple App (ExpoApp56) */, ); }; /* End PBXProject section */ @@ -364,6 +454,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 79B8BEB02FB8000000B94C6F /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXResourcesBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -388,6 +485,13 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 79B8BEB12FB8000000B94C6F /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; /* End PBXSourcesBuildPhase section */ /* Begin XCBuildConfiguration section */ @@ -979,6 +1083,194 @@ }; name = "Release Vanilla"; }; + 79B8BEB52FB8000000B94C6F /* Debug Expo */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + ENABLE_APP_SANDBOX = YES; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Brownfield-Apple-App-Info.plist"; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UIViewControllerBasedStatusBarAppearance = "$(USE_EXPO_HOST_STATUS_BAR_APPEARANCE)"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.callstack.brownfield.ios.example.Brownfield-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) USE_EXPO_HOST"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + USE_EXPO_HOST_STATUS_BAR_APPEARANCE = NO; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = "Debug Expo"; + }; + 79B8BEB62FB8000000B94C6F /* Release Expo */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + ENABLE_APP_SANDBOX = YES; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Brownfield-Apple-App-Info.plist"; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UIViewControllerBasedStatusBarAppearance = "$(USE_EXPO_HOST_STATUS_BAR_APPEARANCE)"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.callstack.brownfield.ios.example.Brownfield-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) USE_EXPO_HOST"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + USE_EXPO_HOST_STATUS_BAR_APPEARANCE = NO; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = "Release Expo"; + }; + 79B8BEB72FB8000000B94C6F /* Debug Vanilla */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + ENABLE_APP_SANDBOX = YES; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Brownfield-Apple-App-Info.plist"; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UIViewControllerBasedStatusBarAppearance = "$(USE_EXPO_HOST_STATUS_BAR_APPEARANCE)"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.callstack.brownfield.ios.example.Brownfield-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + USE_EXPO_HOST_STATUS_BAR_APPEARANCE = YES; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = "Debug Vanilla"; + }; + 79B8BEB82FB8000000B94C6F /* Release Vanilla */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEAD_CODE_STRIPPING = YES; + ENABLE_APP_SANDBOX = YES; + ENABLE_PREVIEWS = YES; + ENABLE_USER_SELECTED_FILES = readonly; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_FILE = "Brownfield-Apple-App-Info.plist"; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSceneManifest_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphoneos*]" = YES; + "INFOPLIST_KEY_UILaunchScreen_Generation[sdk=iphonesimulator*]" = YES; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphoneos*]" = UIStatusBarStyleDefault; + "INFOPLIST_KEY_UIStatusBarStyle[sdk=iphonesimulator*]" = UIStatusBarStyleDefault; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UIViewControllerBasedStatusBarAppearance = "$(USE_EXPO_HOST_STATUS_BAR_APPEARANCE)"; + IPHONEOS_DEPLOYMENT_TARGET = 16.4; + LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks"; + "LD_RUNPATH_SEARCH_PATHS[sdk=macosx*]" = "@executable_path/../Frameworks"; + MACOSX_DEPLOYMENT_TARGET = 14.0; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = "com.callstack.brownfield.ios.example.Brownfield-iOS-App"; + PRODUCT_NAME = "$(TARGET_NAME)"; + REGISTER_APP_GROUPS = YES; + SDKROOT = auto; + STRING_CATALOG_GENERATE_SYMBOLS = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx xros xrsimulator"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited)"; + SWIFT_APPROACHABLE_CONCURRENCY = YES; + SWIFT_DEFAULT_ACTOR_ISOLATION = MainActor; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_UPCOMING_FEATURE_MEMBER_IMPORT_VISIBILITY = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2,7"; + USE_EXPO_HOST_STATUS_BAR_APPEARANCE = YES; + XROS_DEPLOYMENT_TARGET = 2.0; + }; + name = "Release Vanilla"; + }; 7A1B2C3D4E5F60718293A401 /* Debug Vanilla */ = { isa = XCBuildConfiguration; buildSettings = { @@ -1238,6 +1530,17 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = "Release Expo"; }; + 79B8BEB92FB8000000B94C6F /* Build configuration list for PBXNativeTarget "Brownfield Apple App (ExpoApp56)" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 79B8BEB52FB8000000B94C6F /* Debug Expo */, + 79B8BEB62FB8000000B94C6F /* Release Expo */, + 79B8BEB72FB8000000B94C6F /* Debug Vanilla */, + 79B8BEB82FB8000000B94C6F /* Release Vanilla */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = "Release Expo"; + }; /* End XCConfigurationList section */ }; rootObject = 793C769F2EEBF938008A2A34 /* Project object */; diff --git a/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo 56.xcscheme b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo 56.xcscheme new file mode 100644 index 00000000..0db5f92f --- /dev/null +++ b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/Brownfield Apple App Expo 56.xcscheme @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + diff --git a/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist index 87fb27c8..7c4a606b 100644 --- a/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist +++ b/apps/AppleApp/Brownfield Apple App.xcodeproj/xcshareddata/xcschemes/xcschememanagement.plist @@ -14,6 +14,11 @@ orderHint 1 + Brownfield Apple App Expo 56.xcscheme + + orderHint + 0 + Brownfield Apple App Vanilla.xcscheme orderHint @@ -37,6 +42,11 @@ primary + 79B8BEB42FB8000000B94C6F + + primary + + diff --git a/apps/AppleApp/package.json b/apps/AppleApp/package.json index 832bdbee..f876b058 100644 --- a/apps/AppleApp/package.json +++ b/apps/AppleApp/package.json @@ -4,7 +4,8 @@ "private": true, "type": "module", "scripts": { - "build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo55", + "build:example:ios-consumer:expo": "yarn build:example:ios-consumer:expo56", + "build:example:ios-consumer:expo56": "node prepareXCFrameworks.js --appName ExpoApp56 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 56\" -configuration Release", "build:example:ios-consumer:expo54": "node prepareXCFrameworks.js --appName ExpoApp54 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 54\" -configuration Release", "build:example:ios-consumer:expo55": "node prepareXCFrameworks.js --appName ExpoApp55 && yarn internal::build::common -scheme \"Brownfield Apple App Expo 55\" -configuration Release", "build:example:ios-consumer:vanilla": "node prepareXCFrameworks.js --appName RNApp && yarn internal::build::common -scheme \"Brownfield Apple App Vanilla\" -configuration \"Release Vanilla\"", diff --git a/apps/ExpoApp55/eslint.config.js b/apps/ExpoApp55/eslint.config.js index a852d76e..6b5c1078 100644 --- a/apps/ExpoApp55/eslint.config.js +++ b/apps/ExpoApp55/eslint.config.js @@ -7,6 +7,9 @@ module.exports = defineConfig([ expoConfig, { ignores: ['dist/*'], + rules: { + 'import/no-unresolved': ['error', { ignore: ['^@callstack/.+$'] }], + }, }, // Jest config is executed by Node (CommonJS); teach ESLint Node globals like __dirname. { diff --git a/apps/ExpoApp56/.gitignore b/apps/ExpoApp56/.gitignore new file mode 100644 index 00000000..4b00baf3 --- /dev/null +++ b/apps/ExpoApp56/.gitignore @@ -0,0 +1,43 @@ +# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files + +# dependencies +node_modules/ + +# Expo +.expo/ +dist/ +web-build/ +expo-env.d.ts + +# Native +.kotlin/ +*.orig.* +*.jks +*.p8 +*.p12 +*.key +*.mobileprovision + +# Metro +.metro-health-check* + +# debug +npm-debug.* +yarn-debug.* +yarn-error.* + +# macOS +.DS_Store +*.pem + +# local env files +.env*.local + +# typescript +*.tsbuildinfo + +example + +# generated native folders +/ios +/android diff --git a/apps/ExpoApp56/BrownfieldStore.brownie.ts b/apps/ExpoApp56/BrownfieldStore.brownie.ts new file mode 100644 index 00000000..94e22c72 --- /dev/null +++ b/apps/ExpoApp56/BrownfieldStore.brownie.ts @@ -0,0 +1,21 @@ +import type { BrownieStore } from '@callstack/brownie'; + +export interface BrownfieldStore extends BrownieStore { + counter: number; + user: { + name: string; + }; +} + +export interface SettingsStore extends BrownieStore { + theme: 'light' | 'dark'; + notificationsEnabled: boolean; + privacyMode: boolean; +} + +declare module '@callstack/brownie' { + interface BrownieStores { + BrownfieldStore: BrownfieldStore; + SettingsStore: SettingsStore; + } +} diff --git a/apps/ExpoApp56/README.md b/apps/ExpoApp56/README.md new file mode 100644 index 00000000..4d67aec2 --- /dev/null +++ b/apps/ExpoApp56/README.md @@ -0,0 +1,56 @@ +# Welcome to your Expo app 👋 + +This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app). + +## Get started + +1. Install dependencies + + ```bash + npm install + ``` + +2. Start the app + + ```bash + npx expo start + ``` + +In the output, you'll find options to open the app in a + +- [development build](https://docs.expo.dev/develop/development-builds/introduction/) +- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/) +- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/) +- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo + +You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction). + +## Get a fresh project + +When you're ready, run: + +```bash +npm run reset-project +``` + +This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing. + +### Other setup steps + +- To set up ESLint for linting, run `npx expo lint`, or follow our guide on ["Using ESLint and Prettier"](https://docs.expo.dev/guides/using-eslint/) +- If you'd like to set up unit testing, follow our guide on ["Unit Testing with Jest"](https://docs.expo.dev/develop/unit-testing/) +- Learn more about the TypeScript setup in this template in our guide on ["Using TypeScript"](https://docs.expo.dev/guides/typescript/) + +## Learn more + +To learn more about developing your project with Expo, look at the following resources: + +- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides). +- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web. + +## Join the community + +Join our community of developers creating universal apps. + +- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute. +- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions. diff --git a/apps/ExpoApp56/RNApp.tsx b/apps/ExpoApp56/RNApp.tsx new file mode 100644 index 00000000..bb470700 --- /dev/null +++ b/apps/ExpoApp56/RNApp.tsx @@ -0,0 +1,70 @@ +import { SafeAreaView } from 'react-native-safe-area-context'; +import { Button, StyleSheet, Text, View } from 'react-native'; +import BrownfieldNavigation from '@callstack/brownfield-navigation'; +import { checkAndFetchUpdate } from './src/utils/expo-rn-updates'; + +import Counter from './src/components/counter'; + +type RNAppProps = { + nativeOsVersionLabel?: string; +}; + +export default function RNApp({ nativeOsVersionLabel }: RNAppProps) { + return ( + + Expo React Native Brownfield + + {nativeOsVersionLabel ? ( + + {nativeOsVersionLabel} + + ) : null} + + + + +