2019-11-29 10:20:08 +00:00
|
|
|
{ mkShell, cocoapods }:
|
|
|
|
|
|
|
|
let
|
|
|
|
# source of what pod should install
|
|
|
|
podfileLock = "ios/Podfile.lock";
|
|
|
|
# current state of pods installed by pod
|
|
|
|
manifestLock = "ios/Pods/Manifest.lock";
|
2020-04-26 12:40:06 +00:00
|
|
|
in mkShell {
|
|
|
|
buildInputs = [ cocoapods ];
|
2024-04-30 08:38:41 +00:00
|
|
|
# https://github.com/reactwg/react-native-new-architecture/blob/main/docs/enable-apps.md#enable-new-architecture-for-ios
|
|
|
|
RCT_NEW_ARCH_ENABLED = 1;
|
2020-04-26 12:40:06 +00:00
|
|
|
shellHook = ''
|
2022-07-17 12:37:46 +00:00
|
|
|
pushd "$STATUS_MOBILE_HOME" > /dev/null
|
2020-04-26 12:40:06 +00:00
|
|
|
{
|
|
|
|
echo "Checking for modifications in ios/Pods..."
|
|
|
|
if diff -q ${podfileLock} ${manifestLock}; then
|
|
|
|
echo "No modifications detected."
|
|
|
|
else
|
|
|
|
# CocoaPods are trash and can't handle other pod instances running
|
|
|
|
./scripts/wait-for.sh 240 'pod install'
|
|
|
|
(cd ios && pod install)
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
popd > /dev/null
|
|
|
|
'';
|
2019-11-29 10:20:08 +00:00
|
|
|
}
|