Skip to content

Commit

Permalink
fix: add @react-native-community/datetimepicker, @react-native-commun…
Browse files Browse the repository at this point in the history
…ity/slider (#10694)

Co-authored-by: Brian Nguyen <brianacnguyen@gmail.com>
Co-authored-by: Daniel Cross <dan.s.cross@icloud.com>
Co-authored-by: Daniel-Cross <hello@danielcross.dev>
  • Loading branch information
4 people authored Aug 26, 2024
1 parent d95e1fc commit e4adfc0
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 17 deletions.
2 changes: 2 additions & 0 deletions .depcheckrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
ignores:
- '@metamask/oss-attribution-generator'
- 'webpack-cli'
- '@react-native-community/datetimepicker'
- '@react-native-community/slider'
# This is used on the patch for TokenRatesController of Assets controllers, for we to be able to use the last version of it
- cockatiel

Expand Down
12 changes: 2 additions & 10 deletions ios/MetaMask.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1531,11 +1531,7 @@
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
};
Expand Down Expand Up @@ -1579,11 +1575,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
OTHER_CFLAGS = "$(inherited)";
OTHER_CPLUSPLUSFLAGS = "$(inherited)";
OTHER_LDFLAGS = (
"$(inherited)",
"-Wl",
"-ld_classic",
);
OTHER_LDFLAGS = "$(inherited)";
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,6 @@ post_install do |installer|
# Set `mac_catalyst_enabled` to `true` in order to apply patches
# necessary for Mac Catalyst builds
:mac_catalyst_enabled => false
)
)
__apply_Xcode_12_5_M1_post_install_workaround(installer)
end
25 changes: 19 additions & 6 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,8 @@ PODS:
- Base64
- GZIP
- React-Core
- react-native-in-app-review (3.2.3):
- React
- react-native-in-app-review (4.3.3):
- React-Core
- react-native-launch-arguments (4.0.1):
- React
- react-native-mmkv (2.11.0):
Expand All @@ -564,6 +564,9 @@ PODS:
- React-Core
- react-native-safe-area-context (3.4.1):
- React-Core
- react-native-slider (4.5.2):
- RCT-Folly (= 2021.07.22.00)
- React-Core
- react-native-splash-screen (3.2.0):
- React
- react-native-video (5.2.1):
Expand Down Expand Up @@ -699,6 +702,8 @@ PODS:
- React-Core
- RNCPicker (2.2.1):
- React-Core
- RNDateTimePicker (7.7.0):
- React-Core
- RNDefaultPreference (1.4.3):
- React
- RNDeviceInfo (9.0.2):
Expand Down Expand Up @@ -863,6 +868,7 @@ DEPENDENCIES:
- react-native-randombytes (from `../node_modules/react-native-randombytes`)
- react-native-render-html (from `../node_modules/react-native-render-html`)
- react-native-safe-area-context (from `../node_modules/react-native-safe-area-context`)
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
- "react-native-splash-screen (from `../node_modules/@metamask/react-native-splash-screen`)"
- react-native-video (from `../node_modules/react-native-video`)
- react-native-view-shot (from `../node_modules/react-native-view-shot`)
Expand Down Expand Up @@ -891,6 +897,7 @@ DEPENDENCIES:
- "RNCClipboard (from `../node_modules/@react-native-clipboard/clipboard`)"
- "RNCMaskedView (from `../node_modules/@react-native-masked-view/masked-view`)"
- "RNCPicker (from `../node_modules/@react-native-picker/picker`)"
- "RNDateTimePicker (from `../node_modules/@react-native-community/datetimepicker`)"
- RNDefaultPreference (from `../node_modules/react-native-default-preference`)
- RNDeviceInfo (from `../node_modules/react-native-device-info`)
- "RNFBApp (from `../node_modules/@react-native-firebase/app`)"
Expand Down Expand Up @@ -1050,6 +1057,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/react-native-render-html"
react-native-safe-area-context:
:path: "../node_modules/react-native-safe-area-context"
react-native-slider:
:path: "../node_modules/@react-native-community/slider"
react-native-splash-screen:
:path: "../node_modules/@metamask/react-native-splash-screen"
react-native-video:
Expand Down Expand Up @@ -1106,6 +1115,8 @@ EXTERNAL SOURCES:
:path: "../node_modules/@react-native-masked-view/masked-view"
RNCPicker:
:path: "../node_modules/@react-native-picker/picker"
RNDateTimePicker:
:path: "../node_modules/@react-native-community/datetimepicker"
RNDefaultPreference:
:path: "../node_modules/react-native-default-preference"
RNDeviceInfo:
Expand Down Expand Up @@ -1219,12 +1230,12 @@ SPEC CHECKSUMS:
react-native-blur: 507cf3dd4434eb9d5ca5f183e49d8bcccdd66826
react-native-branch: 4e42fda662d96893afbbd02839806931398e3d2e
react-native-camera: b8cc03e2feec0c04403d0998e37cf519d8fd4c6f
react-native-compat: 24c27f0076c5d094ac54a7c803aa5fd4f582444d
react-native-compat: dcf61cf5a7377da0e34d4b7879dc8942cc0b5602
react-native-cookies: f54fcded06bb0cda05c11d86788020b43528a26c
react-native-flipper: 6cfd5991388121f7f96fc5171b93380f97ebb3c6
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
react-native-gzip: c5e87ee9e359f02350e3a2ee52eb35eddc398868
react-native-in-app-review: 23f4f5b9fcd94339dd5d93c6230557f9c67c7dda
react-native-in-app-review: db8bb167a5f238e7ceca5c242d6b36ce8c4404a4
react-native-launch-arguments: 4e0fd58e56dcc7f52eedef9dc8eff81eb73ced7a
react-native-mmkv: e97c0c79403fb94577e5d902ab1ebd42b0715b43
react-native-netinfo: 48c5f79a84fbc3ba1d28a8b0d04adeda72885fa8
Expand All @@ -1234,6 +1245,7 @@ SPEC CHECKSUMS:
react-native-randombytes: 421f1c7d48c0af8dbcd471b0324393ebf8fe7846
react-native-render-html: 984dfe2294163d04bf5fe25d7c9f122e60e05ebe
react-native-safe-area-context: 9e40fb181dac02619414ba1294d6c2a807056ab9
react-native-slider: f266dd860064138a659a42714e6da47a52a51107
react-native-splash-screen: 49a7160705f32169d27ab8dff9dda53331592412
react-native-video: c26780b224543c62d5e1b2a7244a5cd1b50e8253
react-native-view-shot: 4475fde003fe8a210053d1f98fb9e06c1d834e1c
Expand Down Expand Up @@ -1262,6 +1274,7 @@ SPEC CHECKSUMS:
RNCClipboard: ddd4d291537f1667209c9c405aaa4307297e252e
RNCMaskedView: 090213d32d8b3bb83a4dcb7d12c18f0152591906
RNCPicker: cb57c823d5ce8d2d0b5dfb45ad97b737260dc59e
RNDateTimePicker: 4f3c4dbd4f908be32ec8c93f086e8924bd4a2e07
RNDefaultPreference: 2f8d6d54230edbd78708ada8d63bb275e5a8415b
RNDeviceInfo: 1e3f62b9ec32f7754fac60bd06b8f8a27124e7f0
RNFBApp: 1ae7462cddf74a49df206d3418bc0170f8fa53e5
Expand All @@ -1275,7 +1288,7 @@ SPEC CHECKSUMS:
RNOS: 6f2f9a70895bbbfbdad7196abd952e7b01d45027
RNPermissions: 4e3714e18afe7141d000beae3755e5b5fb2f5e05
RNReanimated: f8379347f71248607d530a21e31e4140c5910c25
RNScreens: 68fd1060f57dd1023880bf4c05d74784b5392789
RNScreens: ea4cd3a853063cda19a4e3c28d2e52180c80f4eb
RNSensors: c363d486c879e181905dea84a2535e49af1c2d25
RNSentry: 0aefd4f23b45e3c00577c3a18af79b8f8193bcdb
RNShare: f116bbb04f310c665ca483d0bd1e88cf59b3b334
Expand All @@ -1289,6 +1302,6 @@ SPEC CHECKSUMS:
Yoga: 6f5ab94cd8b1ecd04b6e973d0bc583ede2a598cc
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a

PODFILE CHECKSUM: 927882068f3289129c30becb4706176f8ad95e4b
PODFILE CHECKSUM: e4050300fc9c8d091b9c00e1486ad6e205c250c7

COCOAPODS: 1.15.2
1 change: 1 addition & 0 deletions metro.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = function (baseConfig) {
resolver: {
assetExts: assetExts.filter((ext) => ext !== 'svg'),
sourceExts: [...sourceExts, 'svg', 'cjs'],
resolverMainFields: ['sbmodern', 'react-native', 'browser', 'main'],
},
transformer: {
babelTransformerPath: require.resolve('./metro.transform.js'),
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,9 @@
"@react-native-clipboard/clipboard": "1.8.4",
"@react-native-community/blur": "^4.4.0",
"@react-native-community/checkbox": "^0.5.17",
"@react-native-community/datetimepicker": "^7.5.0",
"@react-native-community/netinfo": "^9.5.0",
"@react-native-community/slider": "^4.4.3",
"@react-native-cookies/cookies": "^6.2.1",
"@react-native-firebase/app": "^20.1.0",
"@react-native-firebase/messaging": "^20.1.0",
Expand Down
13 changes: 13 additions & 0 deletions patches/@react-native-community+datetimepicker+7.7.0.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
index 4ff3362..c139440 100644
--- a/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
+++ b/node_modules/@react-native-community/datetimepicker/ios/RNDateTimePickerShadowView.m
@@ -41,7 +41,7 @@ - (void)setTimeZoneName:(NSString *)timeZoneName {
YGNodeMarkDirty(self.yogaNode);
}

-static YGSize RNDateTimePickerShadowViewMeasure(YGNodeConstRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
+static YGSize RNDateTimePickerShadowViewMeasure(YGNodeRef node, float width, YGMeasureMode widthMode, float height, YGMeasureMode heightMode)
{
RNDateTimePickerShadowView *shadowPickerView = (__bridge RNDateTimePickerShadowView *)YGNodeGetContext(node);

12 changes: 12 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6702,6 +6702,13 @@
prompts "^2.4.0"
semver "^7.5.2"

"@react-native-community/datetimepicker@^7.5.0":
version "7.7.0"
resolved "https://registry.yarnpkg.com/@react-native-community/datetimepicker/-/datetimepicker-7.7.0.tgz#0d0162b0434c7b35883f8c5af846f35e23d045ec"
integrity sha512-nYzZy4DQLRFUzKJShWzRleCaebmCJfZ1lIcFmZgMXJoiVuGJNw3OIGHSWmHhPETh3OhP1RO3to882d7WmDIyrA==
dependencies:
invariant "^2.2.4"

"@react-native-community/eslint-config@^2.0.0":
version "2.0.0"
resolved "https://registry.yarnpkg.com/@react-native-community/eslint-config/-/eslint-config-2.0.0.tgz#35dcc529a274803fc4e0a6b3d6c274551fb91774"
Expand Down Expand Up @@ -6731,6 +6738,11 @@
resolved "https://registry.yarnpkg.com/@react-native-community/netinfo/-/netinfo-9.5.0.tgz#93663bbb105feb8f729b8f0271ee06ffc009f024"
integrity sha512-sppTBobjvIlPYXyDAyb5WJoBaQq1hprnHj1PWICsA10mVnlmwX5ZVkgO2vGjsfFtb+fmWK9XtZF+aQ6ijqQcwg==

"@react-native-community/slider@^4.4.3":
version "4.5.2"
resolved "https://registry.yarnpkg.com/@react-native-community/slider/-/slider-4.5.2.tgz#c3835788dbc1bd83d3778b83ca15533c805db149"
integrity sha512-DbFyCyI7rwl0FkBkp0lzEVp+5mNfS5qU/nM2sK2aSguWhj0Odkt1aKHP2iW/ljruOhgS/O4dEixXlne4OdZJDQ==

"@react-native-community/viewpager@^2.0.1":
version "2.0.2"
resolved "https://registry.yarnpkg.com/@react-native-community/viewpager/-/viewpager-2.0.2.tgz#622b190294b1310c4825c98daeaee1c8443f7124"
Expand Down

0 comments on commit e4adfc0

Please sign in to comment.