diff --git a/plugins/fastlane-plugin-ios_cd/ios_crendentials.json b/plugins/fastlane-plugin-ios_cd/ios_crendentials.json new file mode 100644 index 0000000..44c3dbe --- /dev/null +++ b/plugins/fastlane-plugin-ios_cd/ios_crendentials.json @@ -0,0 +1,18 @@ +{ + "developer_app_id":"1624036332", + "developer_app_identifier":"com.jaggerlewis.jl3", + "app_identifier_extensions":[ + "com.jaggerlewis.jl3", + "com.jaggerlewis.jl3.OneSignalNotificationServiceExtension" + + ], + "apple_issuer_id":"69a6de90-9fe1-47e3-e053-5b8c7c11a4d1", + "apple_key_id":"VBRDBQM7SJ", + "apple_key_content":"-----BEGIN PRIVATE KEY-----MIGTAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBHkwdwIBAQQgxLuVvuI7DafrGHTzATTtdB1TgIFkb12qFVyNSj4kuE+gCgYIKoZIzj0DAQehRANCAAQl7PyxfJR2QoKCmpqvjG4mQxMIzehm9TsLAjwLrPya4LWRyxrEEvPG/N5L06udHtv26gLDMR5gY6uOY1pVJX28-----END PRIVATE KEY-----", + "provisioning_profiles":{ + "1624036332": "match AppStore com.jaggerlewis.jl3", + "com.jaggerlewis.jl3.OneSignalNotificationServiceExtension": "match AppStore com.jaggerlewis.jl3.OneSignalNotificationServiceExtension" + }, + "temp_keychain_user":"root", + "temp_keychain_password":"toto1234" +} \ No newline at end of file diff --git a/plugins/fastlane-plugin-ios_cd/ios_keys.zip b/plugins/fastlane-plugin-ios_cd/ios_keys.zip new file mode 100644 index 0000000..be63ca3 Binary files /dev/null and b/plugins/fastlane-plugin-ios_cd/ios_keys.zip differ diff --git a/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg b/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg new file mode 100644 index 0000000..19cdb2c Binary files /dev/null and b/plugins/fastlane-plugin-ios_cd/ios_keys.zip.gpg differ diff --git a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb index 8691592..588919e 100644 --- a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb +++ b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/actions/build_and_deploy_action.rb @@ -25,13 +25,13 @@ module Fastlane Helper::IosCdHelper.ensure_temp_keychain(creds['temp_keychain_user'], creds['temp_keychain_password']) # Obtain App Store Connect API key - api_key = Actions::AppStoreConnectApiKeyAction.run( + api_key = Actions::AppStoreConnectApiKeyAction.run({ key_id: creds['apple_key_id'], issuer_id: creds['apple_issuer_id'], key_content: creds['apple_key_content'], duration: 1200, in_house: false - ) + }) # Increment build number for latest TestFlight build Actions::IncrementBuildNumberAction.run({ @@ -40,27 +40,27 @@ module Fastlane }) # Install Cocoapods - Actions::CocoapodsAction.run( + Actions::CocoapodsAction.run({ clean_install: true - ) + }) # Set up code signing using match # Configures and runs `match` which manages code signing certificates and provisioning profiles for the project. # The function takes the app's bundle identifier, an authorization token for the project's Git repository, and the name and password for a temporary keychain used to store the signing certificate. # It uses the App Store Connect API key to access the App Store and increment the build number. # It then runs `gym` to build and sign the app using the selected provisioning profile, and finally, uses `pilot` to upload the app to TestFlight for beta testing. - Actions::MatchAction.run( + Actions::MatchAction.run({ type: 'appstore', app_identifier: creds['app_identifier_extensions'], git_basic_authorization: Base64.strict_encode64(ENV["GIT_AUTHORIZATION"]), keychain_name: creds['temp_keychain_user'], keychain_password: creds['temp_keychain_password'], api_key: api_key - ) + }) # Build and export app using Gym # Builds and packages an iOS app or framework for distribution to the App Store, TestFlight, or Enterprise distribution. - Actions::GymAction.run( + Actions::GymAction.run({ configuration: "Release", workspace: "Runner.xcworkspace", scheme: "your_schema", @@ -68,10 +68,10 @@ module Fastlane export_options: { provisioningProfiles: creds['provisioning_profiles'] } - ) + }) # Upload build to App Store Connect using Pilot - Actions::PilotAction.run( + Actions::PilotAction.run({ apple_id: creds['developer_app_id'].to_s, app_identifier: creds['developer_app_identifier'].to_s, skip_waiting_for_build_processing: true, @@ -79,7 +79,7 @@ module Fastlane distribute_external: false, notify_external_testers: false, ipa: "./Runner.ipa" - ) + }) Actions::DeleteTempKeychainAction.run end diff --git a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb index 308892f..aa7860e 100644 --- a/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb +++ b/plugins/fastlane-plugin-ios_cd/lib/fastlane/plugin/ios_cd/helper/ios_cd_helper.rb @@ -8,20 +8,20 @@ module Fastlane # Define method to delete temporary keychain def self.delete_temp_keychain(name) if File.exist?(File.expand_path("~/Library/Keychains/#{name}-db")) - Actions::DeleteKeychainAction.run( + Actions::DeleteKeychainAction.run({ name: name - ) + }) end end # Define method to create temporary keychain def self.create_temp_keychain(name, password) - Actions::CreateKeychainAction.run( + Actions::CreateKeychainAction.run({ name: name, password: password, unlock: false, timeout: 0 - ) + }) end # Define method to ensure that temporary keychain exists