11XCODE_WORKSPACE = "DevLog.xcworkspace"
22XCODE_PROJ = "Application/DevLogApp/DevLogApp.xcodeproj"
3+ WIDGET_XCODE_PROJ = "Widget/DevLogWidgetExtension/DevLogWidgetExtension.xcodeproj"
34APP_IDENTIFIER = "opfic.DevLog"
45WIDGET_IDENTIFIER = "opfic.DevLog.DevLogWidget"
56APP_IDENTIFIERS = [ APP_IDENTIFIER , WIDGET_IDENTIFIER ]
@@ -73,9 +74,16 @@ platform :ios do
7374
7475 setup_ci if ENV [ "CI" ]
7576
77+ testflight_build_number = latest_testflight_build_number + 1
78+
7679 increment_build_number (
7780 xcodeproj : XCODE_PROJ ,
78- build_number : latest_testflight_build_number + 1
81+ build_number : testflight_build_number
82+ )
83+
84+ increment_build_number (
85+ xcodeproj : WIDGET_XCODE_PROJ ,
86+ build_number : testflight_build_number
7987 )
8088
8189 match (
@@ -88,17 +96,25 @@ platform :ios do
8896 if ENV [ "CI" ] == "true"
8997 profile_mapping = lane_context [ SharedValues ::MATCH_PROVISIONING_PROFILE_MAPPING ]
9098 signing_targets = {
91- TARGET_NAME => APP_IDENTIFIER ,
92- WIDGET_TARGET_NAME => WIDGET_IDENTIFIER
99+ TARGET_NAME => {
100+ identifier : APP_IDENTIFIER ,
101+ xcodeproj : XCODE_PROJ
102+ } ,
103+ WIDGET_TARGET_NAME => {
104+ identifier : WIDGET_IDENTIFIER ,
105+ xcodeproj : WIDGET_XCODE_PROJ
106+ }
93107 }
94108
95- signing_targets . each do |target_name , app_identifier |
109+ signing_targets . each do |target_name , signing_target |
110+ app_identifier = signing_target [ :identifier ]
111+ xcodeproj = signing_target [ :xcodeproj ]
96112 provisioning_profile_specifier = profile_mapping [ app_identifier ] . to_s
97113 UI . user_error! ( "Missing App Store provisioning profile mapping for #{ app_identifier } " ) if provisioning_profile_specifier . empty?
98114
99115 update_code_signing_settings (
100116 use_automatic_signing : false ,
101- path : XCODE_PROJ ,
117+ path : xcodeproj ,
102118 sdk : "iphoneos*" ,
103119 team_id : ENV [ "APP_STORE_TEAM_ID" ] ,
104120 targets : [ target_name ] ,
0 commit comments