Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,19 @@ permissions:
jobs:
pr_checks:
name: PR Checks
uses: openMF/mifos-x-actionhub/.github/workflows/[email protected]
secrets: inherit
uses: openMF/mifos-x-actionhub/.github/workflows/pr-check.yaml@main
with:
android_package_name: 'cmp-android' # <-- Change Your Android Package Name
desktop_package_name: 'cmp-desktop' # <-- Change Your Desktop Package Name
web_package_name: 'cmp-web' # <-- Change Your Web Package Name
ios_package_name: 'cmp-ios' # <-- Change Your iOS Package Name
build_ios: true # <-- Change to 'false' if you don't want to build iOS
keychain_name: 'ci-signing.keychain'
match_type: 'adhoc'
export_method: 'ad-hoc'
app_identifier: 'org.mifos.kmp.template'
provisioning_profile_name: 'match AdHoc org.mifos.kmp.template'
secrets:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }}
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ GEM
xcodeproj (>= 1.13.0, < 2.0.0)
xcpretty (~> 0.4.1)
xcpretty-travis-formatter (>= 0.0.3, < 2.0.0)
fastlane-plugin-firebase_app_distribution (0.10.0)
fastlane-plugin-firebase_app_distribution (0.10.1)
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
fastlane-plugin-increment_build_number (0.0.4)
Expand Down
2 changes: 1 addition & 1 deletion cmp-android/prodRelease-badging.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package: name='cmp.android.app' versionCode='1' versionName='2025.4.2-beta.0.22' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
package: name='cmp.android.app' versionCode='1' versionName='2025.4.2-beta.0.37' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
sdkVersion:'26'
targetSdkVersion:'34'
uses-permission: name='android.permission.INTERNET'
Expand Down
16 changes: 12 additions & 4 deletions cmp-ios/iosApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -315,9 +315,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = "${TEAM_ID}";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = L432S2FZP5;
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -333,8 +335,10 @@
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
"PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.mifos.kmp.template;
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AdHoc org.mifos.kmp.template";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand All @@ -345,9 +349,11 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_ASSET_PATHS = "\"iosApp/Preview Content\"";
DEVELOPMENT_TEAM = "${TEAM_ID}";
DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = L432S2FZP5;
ENABLE_PREVIEWS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -363,8 +369,10 @@
);
MARKETING_VERSION = 1.0.0;
PRODUCT_BUNDLE_IDENTIFIER = "${BUNDLE_ID}${TEAM_ID}";
"PRODUCT_BUNDLE_IDENTIFIER[sdk=iphoneos*]" = org.mifos.kmp.template;
PRODUCT_NAME = "${APP_NAME}";
PROVISIONING_PROFILE_SPECIFIER = "";
"PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AdHoc org.mifos.kmp.template";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down
Binary file not shown.
13 changes: 4 additions & 9 deletions cmp-ios/iosApp/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
Expand All @@ -17,18 +19,11 @@
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>5</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Allow access to add photos to your library so you can save artworks directly to your device and view them offline.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
</dict>
<string>Allow access to add photos to your library so you can save artworks directly to your device and view them offline.</string>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
Expand Down
19 changes: 16 additions & 3 deletions fastlane-config/ios_config.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,28 @@
module FastlaneConfig
module IosConfig
FIREBASE_CONFIG = {
firebase_app_id: "1:728434912738:ios:shjhsa78392shja",
firebase_app_id: "1:728434912738:ios:1d81f8e53ca7a6f31a1dbb",
firebase_service_creds_file: "secrets/firebaseAppDistributionServiceCredentialsFile.json",
firebase_groups: "kmp-project-template-testers"
firebase_groups: "mifos-mobile-testers"
}

BUILD_CONFIG = {
project_path: "cmp-ios/iosApp.xcodeproj",
scheme: "iosApp",
output_directory: "cmp-ios/build"
output_name: "iosApp.ipa",
output_directory: "cmp-ios/build",
match_git_basic_authorization: "someBase64Code",
match_password: "somePassphrasePassword",
keychain_name: "ci-signing.keychain",
keychain_password: "someCustomKeychainPassword",
match_type: "adhoc",
app_identifier: "org.mifos.kmp.template",
export_method: "ad-hoc",
provisioning_profile_name: "match AdHoc org.mifos.kmp.template",
git_url: "https://github.com/openMF/ios-provisioning-profile",
git_branch: "master",
username: "[email protected]",
storage_mode: "git",
}
end
end
66 changes: 54 additions & 12 deletions fastlane/FastFile
Original file line number Diff line number Diff line change
Expand Up @@ -319,24 +319,62 @@ platform :android do
end

platform :ios do

desc "Build iOS application"
lane :build_ios do |options|
ios_config = FastlaneConfig::IosConfig::BUILD_CONFIG

# Set default configuration if not provided
options[:configuration] ||= "Debug"
ios_config = FastlaneConfig::IosConfig::BUILD_CONFIG
match_git_basic_authorization = options[:match_git_basic_authorization] || ios_config[:match_git_basic_authorization]
match_password = options[:match_password] || ios_config[:match_password]
match_type = options[:match_type] || ios_config[:match_type]
keychain_name = options[:keychain_name] || ios_config[:keychain_name]
keychain_password = options[:keychain_password] || ios_config[:keychain_password]
export_method = options[:export_method] || ios_config[:export_method]
app_identifier = options[:app_identifier] || ios_config[:app_identifier]
provisioning_profile_name = options[:provisioning_profile_name] || ios_config[:provisioning_profile_name]

create_keychain(
name: keychain_name,
password: keychain_password,
default_keychain: true,
unlock: true,
timeout: 3600,
add_to_search_list: true
)

update_code_signing_settings(
use_automatic_signing: true,
path: ios_config[:project_path]
# Use match to fetch the provisioning profile and certificate
match(
type: match_type,
app_identifier: app_identifier,
readonly: true, # Use readonly mode to avoid creating new profiles on CI
git_basic_authorization: match_git_basic_authorization,
keychain_name: keychain_name,
keychain_password: keychain_password,
git_url: ios_config[:git_url],
username: ios_config[:username],
storage_mode: ios_config[:storage_mode]
)

build_ios_app(
project: ios_config[:project_path],
scheme: ios_config[:scheme],
configuration: options[:configuration],
skip_codesigning: "true",
output_directory: ios_config[:output_directory],
skip_archive: "true"
output_name: ios_config[:output_name],
export_method: export_method,
clean: true,
skip_codesigning: false,
export_options: {
provisioningProfiles: {
app_identifier => provisioning_profile_name
}
}
)

delete_keychain(
name: keychain_name
)
end

Expand All @@ -345,14 +383,18 @@ platform :ios do
ios_config = FastlaneConfig::IosConfig::BUILD_CONFIG

latest_release = firebase_app_distribution_get_latest_release(
app: firebase_config[:appId],
service_credentials_file: options[:serviceCredsFile] || firebase_config[:serviceCredsFile]
app: firebase_config[:appId],
service_credentials_file: options[:serviceCredsFile] || firebase_config[:serviceCredsFile]
)

increment_build_number(
xcodeproj: ios_config[:project_path],
build_number: latest_release[:buildVersion].to_i + 1
)
if latest_release
increment_build_number(
xcodeproj: ios_config[:project_path],
build_number: latest_release[:buildVersion].to_i + 1
)
else
UI.important("⚠️ No existing Firebase release found. Skipping build number increment.")
end
end

desc "Upload iOS application to Firebase App Distribution"
Expand Down
Loading