Skip to content

Commit 0984e18

Browse files
committed
Fix RN AsyncStorage Xcode 27 compatibility
Discovered after #1994 React Native fails to handle podspec resource bundle targets https://github.com/react/react-native/blob/27e83d0a959a2e7ef9af8b0379f0ef763b2cd4d9/packages/react-native/scripts/cocoapods/utils.rb#L362-L372 so pods like https://github.com/react-native-datetimepicker/datetimepicker/blob/81b90986646a3b43515b523367aea435730b04fe/RNDateTimePicker.podspec#L13 are handled correctly compiling fine but ones with resource_bundles like https://github.com/react-native-async-storage/async-storage/blob/main/packages/async-storage/AsyncStorage.podspec breaking Xcode compilation minimally patch @react-native-async-storage/async-storage podspec s.platforms ios to 15.1 (official RN min_ios_version_supported) Resolve: #2004
1 parent d1b5e9c commit 0984e18

4 files changed

Lines changed: 28 additions & 3 deletions

File tree

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
diff --git a/AsyncStorage.podspec b/AsyncStorage.podspec
2+
index a50585b2c9d4e2826a1aca5b07655a88a23dc656..99765b8b0d801861cb69ecdb7230f27ee411c0cf 100644
3+
--- a/AsyncStorage.podspec
4+
+++ b/AsyncStorage.podspec
5+
@@ -10,7 +10,7 @@ Pod::Spec.new do |s|
6+
s.license = package["license"]
7+
s.authors = package["author"]
8+
9+
- s.platforms = { :ios => "13.0", :osx => "12.0", :visionos => "1.0" }
10+
+ s.platforms = { :ios => "15.1", :osx => "12.0", :visionos => "1.0" }
11+
s.source = { :git => "https://github.com/react-native-async-storage/async-storage.git", :tag => "#{s.version}" }
12+
s.resource_bundles = { "AsyncStorage_resources" => "apple/PrivacyInfo.xcprivacy" }
13+

β€Žios/Podfile.lockβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2227,7 +2227,7 @@ EXTERNAL SOURCES:
22272227
:path: "../node_modules/react-native/ReactCommon/yoga"
22282228

22292229
SPEC CHECKSUMS:
2230-
AsyncStorage: 163ab23f6aa37a58b7f2379d0b4ee7ac84d6655c
2230+
AsyncStorage: 886b6a9682bcb0a2691766228510584803a2a667
22312231
FBLazyVector: ca925ec39f8ad16cd9c870572637fea166fe794a
22322232
hermes-engine: 586e189753a97573ccde76926175c43645bfb549
22332233
RCTDeprecation: ee9a22e97644c1f80b3f6a869b25dccba548d37c

β€Žpackage.jsonβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
},
5151
"dependencies": {
5252
"@lavamoat/react-native-lockdown": "1.0.0",
53-
"@react-native-async-storage/async-storage": "3.1.1",
53+
"@react-native-async-storage/async-storage": "patch:@react-native-async-storage/async-storage@npm%3A3.1.1#~/.yarn/patches/@react-native-async-storage-async-storage-npm-3.1.1-1905bccfdf.patch",
5454
"@react-native-community/datetimepicker": "9.1.0",
5555
"@react-native-community/slider": "5.2.0",
5656
"@react-native/new-app-screen": "0.87.0-nightly-20260519-58cd1bf58",

β€Žyarn.lockβ€Ž

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2803,6 +2803,18 @@ __metadata:
28032803
languageName: node
28042804
linkType: hard
28052805

2806+
"@react-native-async-storage/async-storage@patch:@react-native-async-storage/async-storage@npm%3A3.1.1#~/.yarn/patches/@react-native-async-storage-async-storage-npm-3.1.1-1905bccfdf.patch":
2807+
version: 3.1.1
2808+
resolution: "@react-native-async-storage/async-storage@patch:@react-native-async-storage/async-storage@npm%3A3.1.1#~/.yarn/patches/@react-native-async-storage-async-storage-npm-3.1.1-1905bccfdf.patch::version=3.1.1&hash=adc693"
2809+
dependencies:
2810+
idb: "npm:8.0.3"
2811+
peerDependencies:
2812+
react: "*"
2813+
react-native: "*"
2814+
checksum: 10/37b6c60b57a56215d0dba26b93271e2ff9eeec22df605c7e4e8fcb3f79f9d2e03e643164cc629b743be40c90f832faf8b7de88dfcf37a69f063ab9da43c127df
2815+
languageName: node
2816+
linkType: hard
2817+
28062818
"@react-native-community/cli-clean@npm:20.1.0":
28072819
version: 20.1.0
28082820
resolution: "@react-native-community/cli-clean@npm:20.1.0"
@@ -17167,7 +17179,7 @@ __metadata:
1716717179
"@lavamoat/git-safe-dependencies": "npm:1.0.0"
1716817180
"@lavamoat/preinstall-always-fail": "npm:3.0.0"
1716917181
"@lavamoat/react-native-lockdown": "npm:1.0.0"
17170-
"@react-native-async-storage/async-storage": "npm:3.1.1"
17182+
"@react-native-async-storage/async-storage": "patch:@react-native-async-storage/async-storage@npm%3A3.1.1#~/.yarn/patches/@react-native-async-storage-async-storage-npm-3.1.1-1905bccfdf.patch"
1717117183
"@react-native-community/cli": "npm:20.1.0"
1717217184
"@react-native-community/cli-platform-android": "npm:20.1.0"
1717317185
"@react-native-community/cli-platform-ios": "npm:20.1.0"

0 commit comments

Comments
Β (0)