class Fastlane::Helper::CreateXcframeworkHelper
Public Class Methods
new(params)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 4 def initialize(params) @params = params end
Public Instance Methods
framework()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 16 def framework "#{product_name}.framework" end
library_identifier(framework_index)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 63 def library_identifier(framework_index) framework_path = xcarchive_framework_path(framework_index) framework_basename = framework_path.split('/').last framework_root = framework_basename.split('.').first library_identifiers = Dir.chdir(xcframework_path) do Dir.glob('*').select { |f| File.directory?(f) } end library_identifier = library_identifiers.detect do |id| FileUtils.compare_file( "#{framework_path}/#{framework_root}", "#{xcframework_path}/#{id}/#{framework_basename}/#{framework_root}" ) end UI.user_error!("Error: #{xcframework_path} doesn't contain #{framework_path}") if library_identifier.nil? library_identifier end
output_directory()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 59 def output_directory @params[:xcframework_output_directory] ? @params[:xcframework_output_directory] : '' end
product_name()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 8 def product_name @params[:product_name] ||= @params[:scheme] end
xcarchive_BCSymbolMaps_path(framework_index)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 47 def xcarchive_BCSymbolMaps_path(framework_index) File.expand_path("#{xcarchive_path_for_destination(framework_index)}/BCSymbolMaps") end
xcarchive_dSYMs_path(framework_index)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 39 def xcarchive_dSYMs_path(framework_index) File.expand_path("#{xcarchive_path_for_destination(framework_index)}/dSYMS") end
xcarchive_framework_path(framework_index)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 28 def xcarchive_framework_path(framework_index) framework_path = "#{xcarchive_path_for_destination(framework_index)}/Products/Library/Frameworks/#{framework}" return framework_path if File.exist?(framework_path) FastlaneCore::UI.user_error!("▸ PRODUCT_NAME was misdefined: `#{product_name}`. Please, provide :product_name option") end
xcarchive_frameworks_path()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 35 def xcarchive_frameworks_path @params[:destinations].each_with_index.map { |_, i| xcarchive_framework_path(i) } end
xcarchive_path()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 20 def xcarchive_path "#{output_directory}/archives" end
xcarchive_path_for_destination(framework_index)
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 24 def xcarchive_path_for_destination(framework_index) "#{xcarchive_path}/#{framework_index}_#{product_name}.xcarchive" end
xcframework()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 12 def xcframework "#{product_name}.xcframework" end
xcframework_BCSymbolMaps_path()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 51 def xcframework_BCSymbolMaps_path File.expand_path("#{output_directory}/#{product_name}.BCSymbolMaps") end
xcframework_dSYMs_path()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 43 def xcframework_dSYMs_path File.expand_path("#{output_directory}/#{product_name}.dSYMs") end
xcframework_path()
click to toggle source
# File lib/fastlane/plugin/create_xcframework/helper/create_xcframework_helper.rb, line 55 def xcframework_path File.expand_path("#{output_directory}/#{xcframework}") end