@@ -23,23 +23,27 @@ platform :ios do
2323
2424 desc "Deploy a new build to TestFlight"
2525 lane :deploy do
26- ios_set_version ( xcodeproj : "SendbirdUIKitSample.xcodeproj" , version : VERSION )
27- ios_set_build_number ( xcodeproj : "SendbirdUIKitSample.xcodeproj" , build_number : DATE )
28- match ( type : "appstore" , readonly : true , app_identifier : [ "com.sendbird.uikit.reactnative.sample" , "com.sendbird.uikit.reactnative.sample.NotificationService" ] )
29- build_app ( workspace : "SendbirdUIKitSample.xcworkspace" , scheme : "SendbirdUIKitSample" )
30-
3126 # Use App Store Connect API key for authentication
27+ # Create temporary key file
28+ key_file_path = "/tmp/app_store_api_key.p8"
29+ File . write ( key_file_path , ENV [ "APP_STORE_CONNECT_API_KEY" ] )
30+
3231 api_key_info = {
3332 key_id : ENV [ "APP_STORE_CONNECT_API_KEY_ID" ] ,
3433 issuer_id : ENV [ "APP_STORE_CONNECT_API_ISSUER_ID" ] ,
35- key_content : ENV [ "APP_STORE_CONNECT_API_KEY" ]
34+ key_filepath : key_file_path
3635 }
3736
3837 # Check if all API key values are present
39- if api_key_info [ :key_id ] . nil? || api_key_info [ :issuer_id ] . nil? || api_key_info [ :key_content ] . nil?
38+ if api_key_info [ :key_id ] . nil? || api_key_info [ :issuer_id ] . nil? || ENV [ "APP_STORE_CONNECT_API_KEY" ] . nil?
4039 UI . user_error! ( "Missing App Store Connect API key values. Please check your environment variables." )
4140 end
4241
42+ ios_set_version ( xcodeproj : "SendbirdUIKitSample.xcodeproj" , version : VERSION )
43+ ios_set_build_number ( xcodeproj : "SendbirdUIKitSample.xcodeproj" , build_number : DATE )
44+ match ( type : "appstore" , readonly : true , app_identifier : [ "com.sendbird.uikit.reactnative.sample" , "com.sendbird.uikit.reactnative.sample.NotificationService" ] , api_key : api_key_info )
45+ build_app ( workspace : "SendbirdUIKitSample.xcworkspace" , scheme : "SendbirdUIKitSample" )
46+
4347 upload_to_testflight (
4448 api_key : api_key_info ,
4549 skip_waiting_for_build_processing : true
0 commit comments