@@ -20,9 +20,10 @@ def self.run(params)
20
20
@xchelper = Helper ::CreateXcframeworkHelper . new ( params )
21
21
22
22
params [ :destinations ] . each_with_index do |destination , framework_index |
23
- params [ :destination ] = destination
24
- params [ :archive_path ] = @xchelper . xcarchive_path_for_destination ( framework_index )
25
- XcarchiveAction . run ( params )
23
+ options = params . values
24
+ options [ :destination ] = destination
25
+ options [ :archive_path ] = @xchelper . xcarchive_path_for_destination ( framework_index )
26
+ XcarchiveAction . run ( options )
26
27
end
27
28
28
29
create_xcframework ( params )
@@ -94,7 +95,7 @@ def self.debug_symbols(index:, params:)
94
95
end
95
96
96
97
def self . copy_dSYMs ( params )
97
- return if params [ :include_dSYMs ] == false
98
+ return if params [ :include_debug_symbols ] == false
98
99
99
100
dSYMs_output_dir = @xchelper . xcframework_dSYMs_path
100
101
FileUtils . mkdir_p ( dSYMs_output_dir )
@@ -111,7 +112,7 @@ def self.copy_dSYMs(params)
111
112
end
112
113
113
114
def self . copy_BCSymbolMaps ( params )
114
- return if params [ :enable_bitcode ] == false || params [ :include_BCSymbolMaps ] == false
115
+ return if params [ :include_debug_symbols ] == false || params [ : enable_bitcode] == false || params [ :include_BCSymbolMaps ] == false
115
116
116
117
symbols_output_dir = @xchelper . xcframework_BCSymbolMaps_path
117
118
FileUtils . mkdir_p ( symbols_output_dir )
@@ -212,7 +213,17 @@ def self.details
212
213
end
213
214
214
215
def self . available_options
215
- XcarchiveAction . available_options + [
216
+ XcarchiveAction . available_options . select { |item | item [ 0 ] != 'scheme' } . map { |elem |
217
+ FastlaneCore ::ConfigItem . new (
218
+ key : elem [ 0 ] . to_sym ,
219
+ description : elem [ 1 ] . delete_suffix ( '.' ) ,
220
+ optional : true )
221
+ } + [
222
+ FastlaneCore ::ConfigItem . new (
223
+ key : :project ,
224
+ description : "The Xcode project to work with" ,
225
+ optional : true
226
+ ) ,
216
227
FastlaneCore ::ConfigItem . new (
217
228
key : :scheme ,
218
229
description : "The project's scheme. Make sure it's marked as Shared" ,
@@ -221,15 +232,13 @@ def self.available_options
221
232
FastlaneCore ::ConfigItem . new (
222
233
key : :enable_bitcode ,
223
234
description : 'Should the project be built with bitcode enabled?' ,
224
- optional : true ,
225
- is_string : false ,
226
- default_value : true
235
+ type : Boolean ,
236
+ default_value : false
227
237
) ,
228
238
FastlaneCore ::ConfigItem . new (
229
239
key : :destinations ,
230
240
description : 'Use custom destinations for building the xcframework' ,
231
- optional : true ,
232
- is_string : false ,
241
+ type : Array ,
233
242
default_value : [ 'iOS' ]
234
243
) ,
235
244
FastlaneCore ::ConfigItem . new (
@@ -240,20 +249,20 @@ def self.available_options
240
249
FastlaneCore ::ConfigItem . new (
241
250
key : :include_dSYMs ,
242
251
description : 'Includes dSYM files in the xcframework' ,
243
- optional : true ,
252
+ type : Boolean ,
244
253
default_value : true
245
254
) ,
246
255
FastlaneCore ::ConfigItem . new (
247
256
key : :include_BCSymbolMaps ,
248
257
description : 'Includes BCSymbolMap files in the xcframework' ,
249
- optional : true ,
250
- default_value : true
258
+ type : Boolean ,
259
+ default_value : false
251
260
) ,
252
261
FastlaneCore ::ConfigItem . new (
253
262
key : :include_debug_symbols ,
254
263
description : 'This feature was added in Xcode 12.0.' \
255
264
'If this is set to false, the dSYMs and BCSymbolMaps wont be added to XCFramework itself' ,
256
- optional : true ,
265
+ type : Boolean ,
257
266
default_value : true
258
267
) ,
259
268
FastlaneCore ::ConfigItem . new (
@@ -265,22 +274,22 @@ def self.available_options
265
274
key : :remove_xcarchives ,
266
275
description : 'This option will auto-remove the xcarchive files once the plugin finishes.' \
267
276
'Set this to false to preserve the xcarchives' ,
268
- optional : true ,
269
- default_value : true
277
+ type : Boolean ,
278
+ default_value : false
270
279
) ,
271
280
FastlaneCore ::ConfigItem . new (
272
281
key : :allow_internal_distribution ,
273
282
description : 'This option will create an xcframework with the allow-internal-distribution flag.' \
274
283
'Allows the usage of @testable when importing the created xcframework in tests' ,
275
- optional : true ,
284
+ type : Boolean ,
276
285
default_value : false
277
286
) ,
278
287
FastlaneCore ::ConfigItem . new (
279
288
key : :override_xcargs ,
280
289
description : 'This option will override xcargs SKIP_INSTALL and BUILD_LIBRARY_FOR_DISTRIBUTION.' \
281
- 'If set to true, SKIP_INSTALL will be set to NO and BUILD_LIBRARY_FOR_DISTRIBUTION will be set to YES' \
290
+ 'If set to true, SKIP_INSTALL will be set to NO and BUILD_LIBRARY_FOR_DISTRIBUTION will be set to YES. ' \
282
291
'Set this to false to preserve the passed xcargs' ,
283
- optional : true ,
292
+ type : Boolean ,
284
293
default_value : true
285
294
)
286
295
]
0 commit comments