diff --git a/Gemfile b/Gemfile index 19644df3127..068416d70de 100644 --- a/Gemfile +++ b/Gemfile @@ -3,7 +3,7 @@ source 'https://rubygems.org' ruby '2.7.7' # Exclude problematic versions of cocoapods and activesupport that causes build failures. -gem 'cocoapods', '>= 1.13', '!= 1.15.0', '!= 1.15.1' +gem 'cocoapods', '>= 1.13', '!= 1.15.1', '!= 1.15.0' gem 'activesupport', '>= 6.1.7.5', '!= 7.1.0' gem 'xcodeproj', '< 1.26.0' gem 'concurrent-ruby', '< 1.3.4' diff --git a/Gemfile.lock b/Gemfile.lock index 435b453c726..a85e179d53b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -308,7 +308,7 @@ DEPENDENCIES activesupport (>= 6.1.7.5, != 7.1.0) benchmark bigdecimal - cocoapods (>= 1.13, != 1.15.0, != 1.15.1) + cocoapods (>= 1.13, != 1.15.1, != 1.15.0) concurrent-ruby (< 1.3.4) fastlane fastlane-plugin-bugsnag diff --git a/ios/fastlane/Fastfile b/ios/fastlane/Fastfile index f8df411c23d..2d8930b0f00 100644 --- a/ios/fastlane/Fastfile +++ b/ios/fastlane/Fastfile @@ -21,7 +21,9 @@ platform :ios do create_keychain( name: ENV["MATCH_KEYCHAIN_NAME"], password: ENV["MATCH_KEYCHAIN_PASSWORD"], - timeout: 1200 + timeout: 0, + lock_when_sleeps: false, + unlock: true ) end @@ -54,11 +56,16 @@ platform :ios do key_filepath: 'fastlane/app_store_connect_api_key.p8', in_house: false ) - match(type: "appstore") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.ShareExtension") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.NotificationService") - get_provisioning_profile(app_identifier: "chat.rocket.reactnative.watchkitapp") + match(type: "appstore", platform: "ios") + get_provisioning_profile(app_identifier: "chat.rocket.reactnative.ShareExtension", platform: "ios") + get_provisioning_profile(app_identifier: "chat.rocket.reactnative.NotificationService", platform: "ios") + get_provisioning_profile(app_identifier: "chat.rocket.reactnative.watchkitapp", platform: "ios") # pem(api_key: api_key) # still uses Spaceship http://docs.fastlane.tools/actions/pem/#how-does-it-work + # Allow codesign to access keys without prompting + keychain_path = "~/Library/Keychains/#{ENV['MATCH_KEYCHAIN_NAME']}-db" + sh "security unlock-keychain -p \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" + sh "security set-keychain-settings -lut 3600 #{keychain_path}" + sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" gym( scheme: "RocketChatRN", workspace: "RocketChatRN.xcworkspace", @@ -72,11 +79,18 @@ platform :ios do match( type: "appstore", + platform: "ios", app_identifier: ["chat.rocket.ios", "chat.rocket.ios.NotificationService", "chat.rocket.ios.Rocket-Chat-ShareExtension", "chat.rocket.ios.watchkitapp"], readonly: true, output_path: './' ) + # Allow codesign to access keys without prompting + keychain_path = "~/Library/Keychains/#{ENV['MATCH_KEYCHAIN_NAME']}-db" + sh "security unlock-keychain -p \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path}" + sh "security set-keychain-settings -lut 3600 #{keychain_path}" + sh "security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k \"#{ENV['MATCH_KEYCHAIN_PASSWORD']}\" #{keychain_path} || true" + update_code_signing_settings( profile_name: "match AppStore chat.rocket.ios.NotificationService", build_configurations: "Release",