Skip to content

Commit

Permalink
Merge pull request #81 from xmtp-labs/testflight
Browse files Browse the repository at this point in the history
TestFlight Release Configurations
  • Loading branch information
alexrisch authored May 23, 2024
2 parents 8927220 + 8ece4c9 commit cdee3b7
Show file tree
Hide file tree
Showing 9 changed files with 169 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ios-release.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Release to TestFlight
on:
push:
branches:
- main
# branches:
# - main

jobs:
rebase:
Expand Down
20 changes: 15 additions & 5 deletions ios/EphemeraMobileChat.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
13B07FC11A68108700A75B9A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 13B07FB71A68108700A75B9A /* main.m */; };
331A34C09CDF74F0FC0CF2E9 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A92300ADBC27B47A39B6CF1 /* ExpoModulesProvider.swift */; };
42683F2D9EA5DDC49A85CEC0 /* ExpoModulesProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 78611DF31EED3FF745D00249 /* ExpoModulesProvider.swift */; };
638ED9512B7D419B009F369B /* Assests.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 638ED9502B7D419B009F369B /* Assests.xcassets */; };
7699B88040F8A987B510C191 /* libPods-EphemeraMobileChat-EphemeraMobileChatTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 19F6CBCC0A4E27FBF8BF4A61 /* libPods-EphemeraMobileChat-EphemeraMobileChatTests.a */; };
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
Expand Down Expand Up @@ -43,7 +44,8 @@
5709B34CF0A7D63546082F79 /* Pods-EphemeraMobileChat.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EphemeraMobileChat.release.xcconfig"; path = "Target Support Files/Pods-EphemeraMobileChat/Pods-EphemeraMobileChat.release.xcconfig"; sourceTree = "<group>"; };
5B7EB9410499542E8C5724F5 /* Pods-EphemeraMobileChat-EphemeraMobileChatTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EphemeraMobileChat-EphemeraMobileChatTests.debug.xcconfig"; path = "Target Support Files/Pods-EphemeraMobileChat-EphemeraMobileChatTests/Pods-EphemeraMobileChat-EphemeraMobileChatTests.debug.xcconfig"; sourceTree = "<group>"; };
5DCACB8F33CDC322A6C60F78 /* libPods-EphemeraMobileChat.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-EphemeraMobileChat.a"; sourceTree = BUILT_PRODUCTS_DIR; };
68B9EB672BF7DE32006398E1 /* EphemeraMobileChat.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = EphemeraMobileChat.entitlements; path = EphemeraMobileChat/EphemeraMobileChat.entitlements; sourceTree = "<group>"; };
638ED9502B7D419B009F369B /* Assests.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assests.xcassets; path = EphemeraMobileChat/Assests.xcassets; sourceTree = "<group>"; };
638ED9522B7D4755009F369B /* EphemeraMobileChat.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; name = EphemeraMobileChat.entitlements; path = EphemeraMobileChat/EphemeraMobileChat.entitlements; sourceTree = "<group>"; };
78611DF31EED3FF745D00249 /* ExpoModulesProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpoModulesProvider.swift; path = "Pods/Target Support Files/Pods-EphemeraMobileChat/ExpoModulesProvider.swift"; sourceTree = "<group>"; };
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = LaunchScreen.storyboard; path = EphemeraMobileChat/LaunchScreen.storyboard; sourceTree = "<group>"; };
89C6BE57DB24E9ADA2F236DE /* Pods-EphemeraMobileChat-EphemeraMobileChatTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-EphemeraMobileChat-EphemeraMobileChatTests.release.xcconfig"; path = "Target Support Files/Pods-EphemeraMobileChat-EphemeraMobileChatTests/Pods-EphemeraMobileChat-EphemeraMobileChatTests.release.xcconfig"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -91,13 +93,14 @@
13B07FAE1A68108700A75B9A /* EphemeraMobileChat */ = {
isa = PBXGroup;
children = (
68B9EB672BF7DE32006398E1 /* EphemeraMobileChat.entitlements */,
638ED9522B7D4755009F369B /* EphemeraMobileChat.entitlements */,
13B07FAF1A68108700A75B9A /* AppDelegate.h */,
13B07FB01A68108700A75B9A /* AppDelegate.mm */,
13B07FB51A68108700A75B9A /* Images.xcassets */,
13B07FB61A68108700A75B9A /* Info.plist */,
81AB9BB72411601600AC10FF /* LaunchScreen.storyboard */,
13B07FB71A68108700A75B9A /* main.m */,
638ED9502B7D419B009F369B /* Assests.xcassets */,
);
name = EphemeraMobileChat;
sourceTree = "<group>";
Expand Down Expand Up @@ -277,6 +280,7 @@
files = (
81AB9BB82411601600AC10FF /* LaunchScreen.storyboard in Resources */,
13B07FBF1A68108700A75B9A /* Images.xcassets in Resources */,
638ED9512B7D419B009F369B /* Assests.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -506,6 +510,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EphemeraMobileChat.app/EphemeraMobileChat";
};
name = Debug;
Expand All @@ -531,6 +536,7 @@
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = "org.reactjs.native.example.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/EphemeraMobileChat.app/EphemeraMobileChat";
};
name = Release;
Expand All @@ -542,10 +548,11 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = EphemeraMobileChat/EphemeraMobileChat.entitlements;
CURRENT_PROJECT_VERSION = 1;
CURRENT_PROJECT_VERSION = 20;
DEVELOPMENT_TEAM = FY4NZR34Z3;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = EphemeraMobileChat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "XMTP Inbox";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -558,7 +565,7 @@
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_DEBUG";
PRODUCT_BUNDLE_IDENTIFIER = org.ephemera.EphemeraMobileChat;
PRODUCT_BUNDLE_IDENTIFIER = com.xmtplabs.inbox.ios;
PRODUCT_NAME = EphemeraMobileChat;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
Expand All @@ -576,6 +583,7 @@
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = FY4NZR34Z3;
INFOPLIST_FILE = EphemeraMobileChat/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = "XMTP Inbox";
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -588,7 +596,7 @@
"-lc++",
);
OTHER_SWIFT_FLAGS = "$(inherited) -D EXPO_CONFIGURATION_RELEASE";
PRODUCT_BUNDLE_IDENTIFIER = org.ephemera.EphemeraMobileChat;
PRODUCT_BUNDLE_IDENTIFIER = com.xmtplabs.inbox.ios;
PRODUCT_NAME = EphemeraMobileChat;
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -671,6 +679,7 @@
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
USE_HERMES = true;
};
name = Debug;
Expand Down Expand Up @@ -743,6 +752,7 @@
);
REACT_NATIVE_PATH = "${PODS_ROOT}/../../node_modules/react-native";
SDKROOT = iphoneos;
SWIFT_VERSION = 5.0;
USE_HERMES = true;
VALIDATE_PRODUCT = YES;
};
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "App Icon.png",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions ios/EphemeraMobileChat/Assests.xcassets/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
6 changes: 6 additions & 0 deletions ios/EphemeraMobileChat/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
</array>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
Expand All @@ -40,12 +42,16 @@
<key>NSAllowsLocalNetworking</key>
<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>This application uses the camer to enable QR code scanning.</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string></string>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>NSPhotoLibraryUsageDescription</key>
<string>This application uses the photo library to enable saving QR codes captured via the camera.</string>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIRequiredDeviceCapabilities</key>
Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1697,4 +1697,4 @@ SPEC CHECKSUMS:

PODFILE CHECKSUM: 47641fd2f7a6fc6169785131e7615d136e56edd8

COCOAPODS: 1.15.2
COCOAPODS: 1.14.3
90 changes: 90 additions & 0 deletions ios/ci_scripts/ci_pre_xcodebuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
#!/bin/sh

# include helpers
source retry.sh

echo "####===== Stage: PRE-Xcode Build is activated .... "

cat > ../../.env <<EOF
XMTP_ENV=${XMTP_ENV}
THRID_WEB_CLIENT_ID=${THRID_WEB_CLIENT_ID}
AWS_S3_REGION=${AWS_S3_REGION}
AWS_S3_BUCKET=${AWS_S3_BUCKET}
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
EOF

# Debug output for ENV variables
# Note: Values are encrypted in CI host.
# Output will result as: XMTP_ENV=****
# echo "####===== Temporary ENV Debug"
# cat ../../.env

echo "###===== Installing Ruby"
retry 5 brew install ruby

echo "###===== Add Ruby to PATH"
if [[ -d "/opt/homebrew" ]]; then
HOMEBREW_PREFIX="/opt/homebrew"
else
HOMEBREW_PREFIX="/usr/local"
fi

echo "export PATH=\"$HOMEBREW_PREFIX/opt/ruby/bin:\$PATH\"" >> ~/.zshrc

echo "verify path:" $PATH

source ~/.zshrc

echo "###===== Verify Ruby installation"
ruby -v

# Ensure the gem bin directory is in the PATH
echo "export PATH=\"$(ruby -e 'puts Gem.user_dir')/bin:\$PATH\"" >> ~/.zshrc
source ~/.zshrc

echo "###===== Install bundler"
which gem
gem install bundler:2.1.4 --user-install

echo "###===== Checking bundler version"
which bundler

echo "###===== Source the updated .zshrc to apply changes in the current script"
source ~/.zshrc

echo "###===== Verify bundler installation"
bundler -v

echo "####===== Change working directory"
cd ../../

echo "###===== Installing Node"
retry 5 brew install node

echo "###===== Installing Yarn"
npm install --global yarn

echo "####===== Run: yarn install"
yarn install

#echo "####===== Run bundle install"
# bundle install // bundle installs the wrong version of Flipper

echo "####===== brew tap Cocoapods 1.14.3"
brew tap-new $USER/local-tap
brew tap homebrew/core --force
brew extract --version=1.14.3 cocoapods $USER/local-tap
brew install [email protected]

echo "####===== Check Cocoapods versions"
pod --version

echo "####===== Change directory and run pod install"
cd ios
pod install

#echo "####===== Run bundle exec pod install"
#bundle exec pod install --project-directory=ios // bundle installs the wrong version of Flipper

exit 0
35 changes: 35 additions & 0 deletions ios/ci_scripts/retry.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Retry a command up to a specific number of times until it exits successfully,
# with exponential backoff.
#
# $ retry 5 echo Hello
# Hello
#
# $ retry 5 false
# Retry 1/5 exited 1, retrying in 1 seconds...
# Retry 2/5 exited 1, retrying in 2 seconds...
# Retry 3/5 exited 1, retrying in 4 seconds...
# Retry 4/5 exited 1, retrying in 8 seconds...
# Retry 5/5 exited 1, no more retries left.
#
function retry {
local retries=$1
shift

local count=0
until "$@"; do
exit=$?
# Enable this following line if the backoff feature is needed.
# Default behavior is to wait 5 seconds
# wait=$((2 ** $count))
wait=$((5))
count=$(($count + 1))
if [ $count -lt $retries ]; then
echo "Retry $count/$retries exited $exit, retrying in $wait seconds..."
sleep $wait
else
echo "Retry $count/$retries exited $exit, no more retries left."
return $exit
fi
done
return 0
}

0 comments on commit cdee3b7

Please sign in to comment.