Skip to content

Instantly share code, notes, and snippets.

@wf-adamhei
Created July 30, 2021 03:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wf-adamhei/91c0c64660e161233966a48bd7eade96 to your computer and use it in GitHub Desktop.
Save wf-adamhei/91c0c64660e161233966a48bd7eade96 to your computer and use it in GitHub Desktop.
# Find credentials in keychain
# ...
# Create test account credentials ($USER + $PASS)
# ...
# Boot target simulator if not already booted
# ...
xcrun simctl get_app_container $TARGET_DEVICE_IDENTIFIER com.Wealthfront.CredentialHelper 2> /dev/null
if [[ $? -e 0 ]]; then
echo "Credential Helper already installed => Credentials were stored previously"
exit 0
fi
echo "Installing Credential Helper"
# Build helper app
xcodebuild \
-workspace Wealthfront.xcworkspace \
-scheme CredentialHelper \
-sdk "$SDK_NAME" \
-derivedDataPath build \
-configuration DEBUG
# Install on booted simulator
xcrun simctl install $TARGET_DEVICE_IDENTIFIER ./build/Build/Products/Debug-iphonesimulator/CredentialHelper.app
# Launch helper app and store credentials to shared keychain
xcrun simctl launch --console-pty $TARGET_DEVICE_IDENTIFIER com.Wealthfront.CredentialHelper "$USER" "$PASS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment