From 9a04cbc6be84718c67bea17687c91fbea9f0f46f Mon Sep 17 00:00:00 2001 From: Kilian Finger Date: Thu, 5 Dec 2024 17:48:23 +0100 Subject: [PATCH] chore: upgrade ios example --- packages/react-native-app/.watchmannconfig | 1 + packages/react-native-app/Gemfile | 9 + .../project.pbxproj | 199 +++++++++--------- .../MapLibreReactNativeExample.xcscheme | 41 +--- .../xcshareddata/swiftpm/Package.resolved | 4 +- .../MapLibreReactNativeExample/AppDelegate.m | 55 ----- .../MapLibreReactNativeExample/AppDelegate.mm | 31 +++ .../LaunchScreen.storyboard | 2 +- packages/react-native-app/ios/Podfile | 50 ++--- 9 files changed, 154 insertions(+), 238 deletions(-) create mode 100644 packages/react-native-app/.watchmannconfig create mode 100644 packages/react-native-app/Gemfile delete mode 100644 packages/react-native-app/ios/MapLibreReactNativeExample/AppDelegate.m create mode 100644 packages/react-native-app/ios/MapLibreReactNativeExample/AppDelegate.mm diff --git a/packages/react-native-app/.watchmannconfig b/packages/react-native-app/.watchmannconfig new file mode 100644 index 000000000..0967ef424 --- /dev/null +++ b/packages/react-native-app/.watchmannconfig @@ -0,0 +1 @@ +{} diff --git a/packages/react-native-app/Gemfile b/packages/react-native-app/Gemfile new file mode 100644 index 000000000..85d7f6828 --- /dev/null +++ b/packages/react-native-app/Gemfile @@ -0,0 +1,9 @@ +source 'https://rubygems.org' + +# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version +ruby ">= 2.6.10" + +# Exclude problematic versions of cocoapods and activesupport that causes build failures. +gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' +gem 'xcodeproj', '< 1.26.0' diff --git a/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/project.pbxproj b/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/project.pbxproj index d3a4068cc..391442e79 100644 --- a/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/project.pbxproj +++ b/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/project.pbxproj @@ -7,27 +7,27 @@ objects = { /* Begin PBXBuildFile section */ - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.m */; }; + 0C80B921A6F3F58F76C31292 /* libPods-MapLibreReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-MapLibreReactNativeExample.a */; }; + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; }; 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; }; 13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; }; - 1DC0AFC22BE58DCE00FBCA80 /* MapLibre in Frameworks */ = {isa = PBXBuildFile; productRef = 1DC0AFC12BE58DCE00FBCA80 /* MapLibre */; }; - 2B603C2EE532BDC98C0C1354 /* libPods-MapLibreReactNativeExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BFD1441A45E7C8246ED3CEDF /* libPods-MapLibreReactNativeExample.a */; }; - 51C0260825301F99008C5283 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 51C0260725301F99008C5283 /* LaunchScreen.storyboard */; }; - ABFF5F20602FA5B9796E966D /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 3AB2AAB6E474104F831A6963 /* PrivacyInfo.xcprivacy */; }; + 519D15602D020E19009F802D /* MapLibre in Frameworks */ = {isa = PBXBuildFile; productRef = 57D38659624A4159F63D7BA4 /* MapLibre */; }; + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; }; + A0062AFBABAAC219026F55E2 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 13B07F961A680F5B00A75B9A /* MapLibreReactNativeExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MapLibreReactNativeExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 13B07FAF1A68108700A75B9A /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = MapLibreReactNativeExample/AppDelegate.h; sourceTree = ""; }; - 13B07FB01A68108700A75B9A /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = AppDelegate.m; path = MapLibreReactNativeExample/AppDelegate.m; sourceTree = ""; }; + 13B07FB01A68108700A75B9A /* AppDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppDelegate.mm; path = MapLibreReactNativeExample/AppDelegate.mm; sourceTree = ""; }; 13B07FB51A68108700A75B9A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = MapLibreReactNativeExample/Images.xcassets; sourceTree = ""; }; 13B07FB61A68108700A75B9A /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = MapLibreReactNativeExample/Info.plist; sourceTree = ""; }; 13B07FB71A68108700A75B9A /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = MapLibreReactNativeExample/main.m; sourceTree = ""; }; - 3AB2AAB6E474104F831A6963 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = MapLibreReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; - 51C0260725301F99008C5283 /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = MapLibreReactNativeExample/LaunchScreen.storyboard; sourceTree = ""; }; - 6E29023E8B5A6DA540E4474B /* Pods-MapLibreReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MapLibreReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample.release.xcconfig"; sourceTree = ""; }; - A32049E2AE532B3366AA9311 /* Pods-MapLibreReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MapLibreReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample.debug.xcconfig"; sourceTree = ""; }; - BFD1441A45E7C8246ED3CEDF /* libPods-MapLibreReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MapLibreReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = PrivacyInfo.xcprivacy; path = MapLibreReactNativeExample/PrivacyInfo.xcprivacy; sourceTree = ""; }; + 3B4392A12AC88292D35C810B /* Pods-MapLibreReactNativeExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MapLibreReactNativeExample.debug.xcconfig"; path = "Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample.debug.xcconfig"; sourceTree = ""; }; + 5709B34CF0A7D63546082F79 /* Pods-MapLibreReactNativeExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-MapLibreReactNativeExample.release.xcconfig"; path = "Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample.release.xcconfig"; sourceTree = ""; }; + 5DCACB8F33CDC322A6C60F78 /* libPods-MapLibreReactNativeExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-MapLibreReactNativeExample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = MapLibreReactNativeExample/LaunchScreen.storyboard; sourceTree = ""; }; ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; }; /* End PBXFileReference section */ @@ -36,8 +36,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1DC0AFC22BE58DCE00FBCA80 /* MapLibre in Frameworks */, - 2B603C2EE532BDC98C0C1354 /* libPods-MapLibreReactNativeExample.a in Frameworks */, + 519D15602D020E19009F802D /* MapLibre in Frameworks */, + 0C80B921A6F3F58F76C31292 /* libPods-MapLibreReactNativeExample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -47,29 +47,22 @@ 13B07FAE1A68108700A75B9A /* MapLibreReactNativeExample */ = { isa = PBXGroup; children = ( - 51C0260725301F99008C5283 /* LaunchScreen.storyboard */, 13B07FAF1A68108700A75B9A /* AppDelegate.h */, - 13B07FB01A68108700A75B9A /* AppDelegate.m */, + 13B07FB01A68108700A75B9A /* AppDelegate.mm */, 13B07FB51A68108700A75B9A /* Images.xcassets */, 13B07FB61A68108700A75B9A /* Info.plist */, + 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */, 13B07FB71A68108700A75B9A /* main.m */, - 3AB2AAB6E474104F831A6963 /* PrivacyInfo.xcprivacy */, + 13B07FB81A68108700A75B9A /* PrivacyInfo.xcprivacy */, ); name = MapLibreReactNativeExample; sourceTree = ""; }; - 29082F7A5E3B4C188AA82FB2 /* Resources */ = { - isa = PBXGroup; - children = ( - ); - name = Resources; - sourceTree = ""; - }; 2D16E6871FA4F8E400B85C8A /* Frameworks */ = { isa = PBXGroup; children = ( ED297162215061F000B7C4FE /* JavaScriptCore.framework */, - BFD1441A45E7C8246ED3CEDF /* libPods-MapLibreReactNativeExample.a */, + 5DCACB8F33CDC322A6C60F78 /* libPods-MapLibreReactNativeExample.a */, ); name = Frameworks; sourceTree = ""; @@ -88,8 +81,7 @@ 832341AE1AAA6A7D00B99B32 /* Libraries */, 83CBBA001A601CBA00E9B192 /* Products */, 2D16E6871FA4F8E400B85C8A /* Frameworks */, - EE5EDD88BB42C11717A56BB9 /* Pods */, - 29082F7A5E3B4C188AA82FB2 /* Resources */, + BBD78D7AC51CEA395F1C20DB /* Pods */, ); indentWidth = 2; sourceTree = ""; @@ -104,11 +96,11 @@ name = Products; sourceTree = ""; }; - EE5EDD88BB42C11717A56BB9 /* Pods */ = { + BBD78D7AC51CEA395F1C20DB /* Pods */ = { isa = PBXGroup; children = ( - A32049E2AE532B3366AA9311 /* Pods-MapLibreReactNativeExample.debug.xcconfig */, - 6E29023E8B5A6DA540E4474B /* Pods-MapLibreReactNativeExample.release.xcconfig */, + 3B4392A12AC88292D35C810B /* Pods-MapLibreReactNativeExample.debug.xcconfig */, + 5709B34CF0A7D63546082F79 /* Pods-MapLibreReactNativeExample.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -120,13 +112,13 @@ isa = PBXNativeTarget; buildConfigurationList = 13B07F931A680F5B00A75B9A /* Build configuration list for PBXNativeTarget "MapLibreReactNativeExample" */; buildPhases = ( - BDA2996983FC83FE8B42398D /* [CP] Check Pods Manifest.lock */, - FD10A7F022414F080027D42C /* Start Packager */, + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */, 13B07F871A680F5B00A75B9A /* Sources */, 13B07F8C1A680F5B00A75B9A /* Frameworks */, 13B07F8E1A680F5B00A75B9A /* Resources */, 00DD1BFF1BD5951E006B06BC /* Bundle React Native code and images */, - 7BC27FFD4688D6914F2322C7 /* [CP] Copy Pods Resources */, + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */, + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -134,7 +126,7 @@ ); name = MapLibreReactNativeExample; packageProductDependencies = ( - 1DC0AFC12BE58DCE00FBCA80 /* MapLibre */, + 57D38659624A4159F63D7BA4 /* MapLibre */, ); productName = MapLibreReactNativeExample; productReference = 13B07F961A680F5B00A75B9A /* MapLibreReactNativeExample.app */; @@ -146,11 +138,19 @@ 83CBB9F71A601CBA00E9B192 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 940; - ORGANIZATIONNAME = Facebook; + LastUpgradeCheck = 1210; + TargetAttributes = { + 00E356ED1AD99517003FC87E = { + CreatedOnToolsVersion = 6.2; + TestTargetID = 13B07F861A680F5B00A75B9A; + }; + 13B07F861A680F5B00A75B9A = { + LastSwiftMigration = 1120; + }; + }; }; buildConfigurationList = 83CBB9FA1A601CBA00E9B192 /* Build configuration list for PBXProject "MapLibreReactNativeExample" */; - compatibilityVersion = "Xcode 3.2"; + compatibilityVersion = "Xcode 12.0"; developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( @@ -159,7 +159,7 @@ ); mainGroup = 83CBB9F61A601CBA00E9B192; packageReferences = ( - DB11E3B9346BB8DFEB4101D5 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */, + A561C65B7C488474562F962D /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */, ); productRefGroup = 83CBBA001A601CBA00E9B192 /* Products */; projectDirPath = ""; @@ -175,9 +175,9 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */, 13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */, - 51C0260825301F99008C5283 /* LaunchScreen.storyboard in Resources */, - ABFF5F20602FA5B9796E966D /* PrivacyInfo.xcprivacy in Resources */, + A0062AFBABAAC219026F55E2 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -190,41 +190,34 @@ files = ( ); inputPaths = ( + "$(SRCROOT)/.xcode.env.local", + "$(SRCROOT)/.xcode.env", ); name = "Bundle React Native code and images"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n"; + shellScript = "set -e\n\nWITH_ENVIRONMENT=\"$REACT_NATIVE_PATH/scripts/xcode/with-environment.sh\"\nREACT_NATIVE_XCODE=\"$REACT_NATIVE_PATH/scripts/react-native-xcode.sh\"\n\n/bin/sh -c \"$WITH_ENVIRONMENT $REACT_NATIVE_XCODE\"\n"; }; - 7BC27FFD4688D6914F2322C7 /* [CP] Copy Pods Resources */ = { + 00EEFC60759A1932668264C0 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - "${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-resources.sh", - "${PODS_CONFIGURATION_BUILD_DIR}/RCT-Folly/RCT-Folly_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-Core/React-Core_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/React-cxxreact/React-cxxreact_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/boost/boost_privacy.bundle", - "${PODS_CONFIGURATION_BUILD_DIR}/glog/glog_privacy.bundle", + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-frameworks-${CONFIGURATION}-input-files.xcfilelist", ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/RCT-Folly_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-Core_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/React-cxxreact_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/boost_privacy.bundle", - "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/glog_privacy.bundle", + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-frameworks-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - BDA2996983FC83FE8B42398D /* [CP] Check Pods Manifest.lock */ = { + C38B50BA6285516D6DCD4F65 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -246,23 +239,21 @@ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; - FD10A7F022414F080027D42C /* Start Packager */ = { + E235C05ADACE081382539298 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-resources-${CONFIGURATION}-input-files.xcfilelist", ); - inputPaths = ( - ); - name = "Start Packager"; + name = "[CP] Copy Pods Resources"; outputFileListPaths = ( - ); - outputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-resources-${CONFIGURATION}-output-files.xcfilelist", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "export RCT_METRO_PORT=\"${RCT_METRO_PORT:=8081}\"\necho \"export RCT_METRO_PORT=${RCT_METRO_PORT}\" > \"${SRCROOT}/../node_modules/react-native/scripts/.packager.env\"\nif [ -z \"${RCT_NO_LAUNCH_PACKAGER+xxx}\" ] ; then\n if nc -w 5 -z localhost ${RCT_METRO_PORT} ; then\n if ! curl -s \"http://localhost:${RCT_METRO_PORT}/status\" | grep -q \"packager-status:running\" ; then\n echo \"Port ${RCT_METRO_PORT} already in use, packager is either not running or not running correctly\"\n exit 2\n fi\n else\n open \"$SRCROOT/../node_modules/react-native/scripts/launchPackager.command\" || echo \"Can't start packager automatically\"\n fi\nfi\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-MapLibreReactNativeExample/Pods-MapLibreReactNativeExample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -272,7 +263,7 @@ isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 13B07FBC1A68108700A75B9A /* AppDelegate.m in Sources */, + 13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */, 13B07FC11A68108700A75B9A /* main.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; @@ -282,23 +273,19 @@ /* Begin XCBuildConfiguration section */ 13B07F941A680F5B00A75B9A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A32049E2AE532B3366AA9311 /* Pods-MapLibreReactNativeExample.debug.xcconfig */; + baseConfigurationReference = 3B4392A12AC88292D35C810B /* Pods-MapLibreReactNativeExample.debug.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; - GCC_PREPROCESSOR_DEFINITIONS = ( - "$(inherited)", - "FB_SONARKIT_ENABLED=0", - ); + ENABLE_BITCODE = NO; INFOPLIST_FILE = MapLibreReactNativeExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "RN App"; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -306,25 +293,26 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.maplibre.reactnative.example; PRODUCT_NAME = MapLibreReactNativeExample; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Debug; }; 13B07F951A680F5B00A75B9A /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6E29023E8B5A6DA540E4474B /* Pods-MapLibreReactNativeExample.release.xcconfig */; + baseConfigurationReference = 5709B34CF0A7D63546082F79 /* Pods-MapLibreReactNativeExample.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = 1; - "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64; INFOPLIST_FILE = MapLibreReactNativeExample/Info.plist; - INFOPLIST_KEY_CFBundleDisplayName = "RN App"; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -332,6 +320,7 @@ ); PRODUCT_BUNDLE_IDENTIFIER = org.maplibre.reactnative.example; PRODUCT_NAME = MapLibreReactNativeExample; + SWIFT_VERSION = 5.0; VERSIONING_SYSTEM = "apple-generic"; }; name = Release; @@ -340,7 +329,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -360,6 +348,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -367,7 +356,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = NO; - CXX = ""; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; @@ -386,22 +374,26 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD = ""; - LDPLUSPLUS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", ); LIBRARY_SEARCH_PATHS = ( - "$(SDKROOT)/usr/lib/swift", + "\"$(SDKROOT)/usr/lib/swift\"", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = "$(inherited)"; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); OTHER_LDFLAGS = ( "$(inherited)", " ", @@ -409,7 +401,7 @@ REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) DEBUG"; - USE_HERMES = false; + USE_HERMES = true; }; name = Debug; }; @@ -417,7 +409,6 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - CC = ""; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++20"; CLANG_CXX_LIBRARY = "libc++"; @@ -437,6 +428,7 @@ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; @@ -444,7 +436,6 @@ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; COPY_PHASE_STRIP = YES; - CXX = ""; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; "EXCLUDED_ARCHS[sdk=iphonesimulator*]" = ""; @@ -456,28 +447,32 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.4; - LD = ""; - LDPLUSPLUS = ""; + IPHONEOS_DEPLOYMENT_TARGET = 15.1; LD_RUNPATH_SEARCH_PATHS = ( /usr/lib/swift, "$(inherited)", ); LIBRARY_SEARCH_PATHS = ( - "$(SDKROOT)/usr/lib/swift", + "\"$(SDKROOT)/usr/lib/swift\"", "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", "\"$(inherited)\"", ); MTL_ENABLE_DEBUG_INFO = NO; - OTHER_CFLAGS = "$(inherited)"; - OTHER_CPLUSPLUSFLAGS = "$(inherited)"; + OTHER_CPLUSPLUSFLAGS = ( + "$(OTHER_CFLAGS)", + "-DFOLLY_NO_CONFIG", + "-DFOLLY_MOBILE=1", + "-DFOLLY_USE_LIBCPP=1", + "-DFOLLY_CFG_NO_COROUTINES=1", + "-DFOLLY_HAVE_CLOCK_GETTIME=1", + ); OTHER_LDFLAGS = ( "$(inherited)", " ", ); REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native"; SDKROOT = iphoneos; - USE_HERMES = false; + USE_HERMES = true; VALIDATE_PRODUCT = YES; }; name = Release; @@ -506,20 +501,20 @@ /* End XCConfigurationList section */ /* Begin XCRemoteSwiftPackageReference section */ - DB11E3B9346BB8DFEB4101D5 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */ = { + A561C65B7C488474562F962D /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */ = { isa = XCRemoteSwiftPackageReference; repositoryURL = "https://github.com/maplibre/maplibre-gl-native-distribution"; requirement = { - kind = upToNextMajorVersion; - minimumVersion = 6.5.4; + kind = exactVersion; + version = 6.5.4; }; }; /* End XCRemoteSwiftPackageReference section */ /* Begin XCSwiftPackageProductDependency section */ - 1DC0AFC12BE58DCE00FBCA80 /* MapLibre */ = { + 57D38659624A4159F63D7BA4 /* MapLibre */ = { isa = XCSwiftPackageProductDependency; - package = DB11E3B9346BB8DFEB4101D5 /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */; + package = A561C65B7C488474562F962D /* XCRemoteSwiftPackageReference "maplibre-gl-native-distribution" */; productName = MapLibre; }; /* End XCSwiftPackageProductDependency section */ diff --git a/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/xcshareddata/xcschemes/MapLibreReactNativeExample.xcscheme b/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/xcshareddata/xcschemes/MapLibreReactNativeExample.xcscheme index ff2e1de94..b0caf8a28 100644 --- a/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/xcshareddata/xcschemes/MapLibreReactNativeExample.xcscheme +++ b/packages/react-native-app/ios/MapLibreReactNativeExample.xcodeproj/xcshareddata/xcschemes/MapLibreReactNativeExample.xcscheme @@ -3,23 +3,9 @@ LastUpgradeVersion = "1210" version = "1.3"> - - - - - - - - - - - - - - - -#if FB_SONARKIT_ENABLED -#import -#import -#import -#import -#import -#import - -static void InitializeFlipper(UIApplication *application) { - FlipperClient *client = [FlipperClient sharedClient]; - SKDescriptorMapper *layoutDescriptorMapper = [[SKDescriptorMapper alloc] initWithDefaults]; - [client addPlugin:[[FlipperKitLayoutPlugin alloc] initWithRootNode:application withDescriptorMapper:layoutDescriptorMapper]]; - [client addPlugin:[[FKUserDefaultsPlugin alloc] initWithSuiteName:nil]]; - [client addPlugin:[FlipperKitReactPlugin new]]; - [client addPlugin:[[FlipperKitNetworkPlugin alloc] initWithNetworkAdapter:[SKIOSNetworkAdapter new]]]; - [client start]; -} -#endif - -@implementation AppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - #if FB_SONARKIT_ENABLED - InitializeFlipper(application); - #endif - - self.moduleName = @"MapLibreReactNativeExample"; - - // You can add your custom initial props in the dictionary below. - // They will be passed down to the ViewController used by React Native. - self.initialProps = @{}; - - return [super application:application didFinishLaunchingWithOptions:launchOptions]; -} - -- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge -{ - return [self bundleURL]; -} - -- (NSURL *)bundleURL -{ -#if DEBUG - return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; -#else - return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; -#endif -} - -@end \ No newline at end of file diff --git a/packages/react-native-app/ios/MapLibreReactNativeExample/AppDelegate.mm b/packages/react-native-app/ios/MapLibreReactNativeExample/AppDelegate.mm new file mode 100644 index 000000000..bbc8b69af --- /dev/null +++ b/packages/react-native-app/ios/MapLibreReactNativeExample/AppDelegate.mm @@ -0,0 +1,31 @@ +#import "AppDelegate.h" + +#import + +@implementation AppDelegate + +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions +{ + self.moduleName = @"MapLibreReactNativeExample"; + // You can add your custom initial props in the dictionary below. + // They will be passed down to the ViewController used by React Native. + self.initialProps = @{}; + + return [super application:application didFinishLaunchingWithOptions:launchOptions]; +} + +- (NSURL *)sourceURLForBridge:(RCTBridge *)bridge +{ + return [self bundleURL]; +} + +- (NSURL *)bundleURL +{ +#if DEBUG + return [[RCTBundleURLProvider sharedSettings] jsBundleURLForBundleRoot:@"index"]; +#else + return [[NSBundle mainBundle] URLForResource:@"main" withExtension:@"jsbundle"]; +#endif +} + +@end diff --git a/packages/react-native-app/ios/MapLibreReactNativeExample/LaunchScreen.storyboard b/packages/react-native-app/ios/MapLibreReactNativeExample/LaunchScreen.storyboard index d1388d18e..edd46eb15 100644 --- a/packages/react-native-app/ios/MapLibreReactNativeExample/LaunchScreen.storyboard +++ b/packages/react-native-app/ios/MapLibreReactNativeExample/LaunchScreen.storyboard @@ -16,7 +16,7 @@ -