Skip to content

Commit

Permalink
Set up auto deployment- iOS
Browse files Browse the repository at this point in the history
  • Loading branch information
cp-sneha-s committed Apr 2, 2024
1 parent c71937a commit 802e9a2
Show file tree
Hide file tree
Showing 2 changed files with 70 additions and 4 deletions.
70 changes: 68 additions & 2 deletions codemagic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ workflows:
- ANDROID_KEYSTORE
groups:
- google_credentials
- app_credentials


scripts:
Expand All @@ -20,8 +21,8 @@ workflows:
- name: Decode variables
script: |
echo $GOOGLE_SERVICES_JSON | base64 --decode > $CM_BUILD_DIR/khelo/android/app/google-services.json
echo $FIREBASE_OPTIONS | base64 --decode > $CM_BUILD_DIR/khelo/lib/firebase_options.dart
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > $CM_BUILD_DIR/khelo/android/app/google-services.json
echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > $CM_BUILD_DIR/khelo/lib/firebase_options.dart
echo Decoded google-services.json!
ls $CM_BUILD_DIR/khelo/lib/firebase_options.dart
Expand Down Expand Up @@ -60,4 +61,69 @@ workflows:


ios-workflow-id:

name: iOS build

max_build_duration: 120
instance_type: mac_mini_m1

environment:
ios_signing:
distribution_type: app_store
bundle_identifier: com.canopas.khelo

vars:
APP_ID: 6480175424

flutter: stable

scripts:

- name: Set up code signing settings on Xcode project
script: xcode-project use-profiles

- name: Decode variables
script: |
echo $GOOGLE_SERVICE_PLIST_BASE64| base64 --decode > $CM_BUILD_DIR/khelo/ios/Runner/GoogleService-Info.plist
echo $FIREBASE_OPTIONS | base64 --decode > $CM_BUILD_DIR/khelo/lib/firebase_options.dart
echo Decoded google-services.json!
ls $CM_BUILD_DIR/khelo/lib/firebase_options.dart
- name: Install Pods
script:
cd khelo/ios
find . -name "Podfile" -execdir pod install \;

- name: Get Flutter Packages
script: |
cd ../data
flutter clean
flutter pub get
cd ../style
flutter clean
flutter pub get
cd khelo
flutter clean
flutter pub get

- name: Flutter build ipa
script: |
flutter build ipa --release \
--export-options-plist=/Users/builder/export_options.plist
artifacts:
- build/ios/ipa/*.ipa
- /tmp/xcodebuild_logs/*.log
- flutter_drive.log

integrations:
app_store_connect: github-ci-april-24

publishing:
app_store_connect:
auth: integration

4 changes: 2 additions & 2 deletions khelo/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4;
DEVELOPMENT_TEAM = "";
Expand All @@ -711,7 +711,7 @@
PRODUCT_BUNDLE_IDENTIFIER = com.canopas.khelo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "kheloprovisioningprofile28-March-2024";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "khelo-provisioning-02-April-2024";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
Expand Down

0 comments on commit 802e9a2

Please sign in to comment.