Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
39 lines (33 sloc) 1.42 KB
# This is the minimum version number required.
fastlane_version "1.110.0"
default_platform :ios
# Switch ProvisioningStyle to Manual for all targets in the given project
def enable_manual_provisioning(project_file)
UI.important "Switching ProvisioningStyle to Manual."
fastlane_require 'xcodeproj'
project = Xcodeproj::Project.open(project_file)
target_attributes = project.root_object.attributes["TargetAttributes"]
target_attributes.each { |id, attrs| attrs["ProvisioningStyle"] = 'Manual' }
project.save
end
platform :ios do
desc "Build an adhoc distribution version"
desc "This will also make sure the profile is up to date"
lane :adhoc do
xcargs = {}
if is_ci?
# import the private key
signing_assets = File.join(ENV['TRAVIS_BUILD_DIR'], 'travis_signing_assets.p12')
keychain = File.join(ENV['TRAVIS_BUILD_DIR'], 'travis.keychain')
FastlaneCore::KeychainImporter.import_file(signing_assets, keychain,
keychain_password: 'travis', certificate_password: ENV['TRAVIS_KEY_PASSWORD'])
profile_uuid = sigh(adhoc: true)
xcargs = {
'PROVISIONING_PROFILE_app' => profile_uuid
}
enable_manual_provisioning('../AutomaticSigning.xcodeproj')
end
xcargs_string = xcargs.map { |key, value| "#{key}='#{value}'" }.join(" ")
gym(scheme: 'AutomaticSigning', codesigning_identity: 'iPhone Distribution: Brian Hardy (Y757T9GB83)', xcargs: xcargs_string)
end
end