Skip to content

Commit a822216

Browse files
authored
fix: proper patch for use_frameworks (#591)
1 parent 6713d79 commit a822216

File tree

7 files changed

+45
-29
lines changed

7 files changed

+45
-29
lines changed

bun.lockb

-188 Bytes
Binary file not shown.

example/ios/Podfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,12 @@ target 'QuickCryptoExample' do
3333
:mac_catalyst_enabled => false,
3434
# :ccache_enabled => true
3535
)
36+
37+
# https://github.com/mrousavy/nitro/issues/422#issuecomment-2545988256
38+
installer.pods_project.targets.each do |target|
39+
target.build_configurations.each do |config|
40+
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '16.0'
41+
end
42+
end
3643
end
3744
end

example/ios/Podfile.lock

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,14 @@ PODS:
4040
- RCT-Folly (= 2024.01.01.00)
4141
- RCTRequired
4242
- RCTTypeSafety
43+
- React-callinvoker
4344
- React-Core
4445
- React-debug
4546
- React-Fabric
4647
- React-featureflags
4748
- React-graphics
4849
- React-ImageManager
50+
- React-jsi
4951
- React-NativeModulesApple
5052
- React-RCTFabric
5153
- React-rendererdebug
@@ -1940,7 +1942,7 @@ SPEC CHECKSUMS:
19401942
hermes-engine: 46f1ffbf0297f4298862068dd4c274d4ac17a1fd
19411943
NitroModules: 3a58d9bc70815a0d5de4476ed6a36eff05a6a0ae
19421944
OpenSSL-Universal: b60a3702c9fea8b3145549d421fdb018e53ab7b4
1943-
QuickCrypto: 9db9b8128d72cfa9b8a355e78d1f5b64eeac35e4
1945+
QuickCrypto: 729fb68e1c5dffd92f47db0098e3d3a93433f2d8
19441946
RCT-Folly: 84578c8756030547307e4572ab1947de1685c599
19451947
RCTDeprecation: fde92935b3caa6cb65cbff9fbb7d3a9867ffb259
19461948
RCTRequired: 75c6cee42d21c1530a6f204ba32ff57335d19007
@@ -2004,6 +2006,6 @@ SPEC CHECKSUMS:
20042006
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
20052007
Yoga: db69236006b8b1c6d55ab453390c882306cbf219
20062008

2007-
PODFILE CHECKSUM: 684599d0e4b0f60fab3a5ad6c896bb5e77f7b4f2
2009+
PODFILE CHECKSUM: bcfd7840a8f657993e5e9504fdac2d1397cbc14a
20082010

20092011
COCOAPODS: 1.15.2

example/ios/QuickCryptoExample.xcodeproj/project.pbxproj

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
0C80B921A6F3F58F76C31292 /* libPods-QuickCryptoExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5DCACB8F33CDC322A6C60F78 /* libPods-QuickCryptoExample.a */; };
1110
13B07FBC1A68108700A75B9A /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB01A68108700A75B9A /* AppDelegate.mm */; };
1211
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 13B07FB51A68108700A75B9A /* Images.xcassets */; };
1312
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
1413
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
14+
E2573AAA37E1A3A99DF5551D /* libPods-QuickCryptoExample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F26BC0CBF1EA56237A94D44D /* libPods-QuickCryptoExample.a */; };
1515
F79205B082B213F0B2028CDB /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 58F74FD0ACBE81B6473252E5 /* PrivacyInfo.xcprivacy */; };
1616
/* End PBXBuildFile section */
1717

@@ -28,18 +28,18 @@
2828
3B4392A12AC88292D35C810B /* Pods-QuickCryptoExample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QuickCryptoExample.debug.xcconfig"; path = "Target Support Files/Pods-QuickCryptoExample/Pods-QuickCryptoExample.debug.xcconfig"; sourceTree = "<group>"; };
2929
5709B34CF0A7D63546082F79 /* Pods-QuickCryptoExample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-QuickCryptoExample.release.xcconfig"; path = "Target Support Files/Pods-QuickCryptoExample/Pods-QuickCryptoExample.release.xcconfig"; sourceTree = "<group>"; };
3030
58F74FD0ACBE81B6473252E5 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xml; name = PrivacyInfo.xcprivacy; path = QuickCryptoExample/PrivacyInfo.xcprivacy; sourceTree = "<group>"; };
31-
5DCACB8F33CDC322A6C60F78 /* libPods-QuickCryptoExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QuickCryptoExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3231
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = QuickCryptoExample/LaunchScreen.storyboard; sourceTree = "<group>"; };
3332
A2730E142C641A21000A5703 /* MaterialCommunityIcons.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = MaterialCommunityIcons.ttf; path = "../../node_modules/react-native-vector-icons/Fonts/MaterialCommunityIcons.ttf"; sourceTree = "<group>"; };
3433
ED297162215061F000B7C4FE /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = JavaScriptCore.framework; path = System/Library/Frameworks/JavaScriptCore.framework; sourceTree = SDKROOT; };
34+
F26BC0CBF1EA56237A94D44D /* libPods-QuickCryptoExample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-QuickCryptoExample.a"; sourceTree = BUILT_PRODUCTS_DIR; };
3535
/* End PBXFileReference section */
3636

3737
/* Begin PBXFrameworksBuildPhase section */
3838
13B07F8C1A680F5B00A75B9A /* Frameworks */ = {
3939
isa = PBXFrameworksBuildPhase;
4040
buildActionMask = 2147483647;
4141
files = (
42-
0C80B921A6F3F58F76C31292 /* libPods-QuickCryptoExample.a in Frameworks */,
42+
E2573AAA37E1A3A99DF5551D /* libPods-QuickCryptoExample.a in Frameworks */,
4343
);
4444
runOnlyForDeploymentPostprocessing = 0;
4545
};
@@ -83,7 +83,7 @@
8383
isa = PBXGroup;
8484
children = (
8585
ED297162215061F000B7C4FE /* JavaScriptCore.framework */,
86-
5DCACB8F33CDC322A6C60F78 /* libPods-QuickCryptoExample.a */,
86+
F26BC0CBF1EA56237A94D44D /* libPods-QuickCryptoExample.a */,
8787
);
8888
name = Frameworks;
8989
sourceTree = "<group>";
@@ -388,6 +388,17 @@
388388
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
389389
GCC_WARN_UNUSED_FUNCTION = YES;
390390
GCC_WARN_UNUSED_VARIABLE = YES;
391+
HEADER_SEARCH_PATHS = (
392+
"$(inherited)",
393+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
394+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core",
395+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers",
396+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios",
397+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
398+
"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers",
399+
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
400+
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
401+
);
391402
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
392403
LD = "";
393404
LDPLUSPLUS = "";
@@ -462,6 +473,17 @@
462473
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
463474
GCC_WARN_UNUSED_FUNCTION = YES;
464475
GCC_WARN_UNUSED_VARIABLE = YES;
476+
HEADER_SEARCH_PATHS = (
477+
"$(inherited)",
478+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers",
479+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core",
480+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers",
481+
"${PODS_CONFIGURATION_BUILD_DIR}/ReactCommon-Samples/ReactCommon_Samples.framework/Headers/platform/ios",
482+
"${PODS_CONFIGURATION_BUILD_DIR}/React-Fabric/React_Fabric.framework/Headers/react/renderer/components/view/platform/cxx",
483+
"${PODS_CONFIGURATION_BUILD_DIR}/React-NativeModulesApple/React_NativeModulesApple.framework/Headers",
484+
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers",
485+
"${PODS_CONFIGURATION_BUILD_DIR}/React-graphics/React_graphics.framework/Headers/react/renderer/graphics/platform/ios",
486+
);
465487
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
466488
LD = "";
467489
LDPLUSPLUS = "";

package.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,5 @@
7070
"workspaces": [
7171
"packages/react-native-quick-crypto",
7272
"example"
73-
],
74-
"patchedDependencies": {
75-
76-
}
73+
]
7774
}

packages/react-native-quick-crypto/QuickCrypto.podspec

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Pod::Spec.new do |s|
1212
s.license = package["license"]
1313
s.authors = package["authors"]
1414

15-
s.ios.deployment_target = 16.0 # min_ios_version_supported (see https://github.com/Expensify/App/pull/53149#issuecomment-2562786065)
15+
s.ios.deployment_target = min_ios_version_supported
1616
s.visionos.deployment_target = 1.0
1717
s.macos.deployment_target = 10.13
1818
s.tvos.deployment_target = 13.4
@@ -32,16 +32,17 @@ Pod::Spec.new do |s|
3232
"deps/**/*.{h,c}",
3333
]
3434

35-
if ENV["USE_FRAMEWORKS"]
36-
s.dependency "React-Core"
37-
add_dependency(s, "React-jsinspector", :framework_name => "jsinspector_modern")
38-
add_dependency(s, "React-rendererconsistency", :framework_name => "React_rendererconsistency")
39-
end
35+
s.pod_target_xcconfig = {
36+
# C++ compiler flags, mainly for folly.
37+
"GCC_PREPROCESSOR_DEFINITIONS" => "$(inherited) FOLLY_NO_CONFIG FOLLY_CFG_NO_COROUTINES"
38+
}
4039

4140
# Add all files generated by Nitrogen
4241
load 'nitrogen/generated/ios/QuickCrypto+autolinking.rb'
4342
add_nitrogen_files(s)
4443

44+
s.dependency 'React-jsi'
45+
s.dependency 'React-callinvoker'
4546
s.dependency "OpenSSL-Universal"
4647
install_modules_dependencies(s)
4748
end

patches/[email protected]

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

0 commit comments

Comments
 (0)