Created
December 15, 2016 15:17
-
-
Save k3muri84/c4d2fb14b1590cad055a9a3995197f7c to your computer and use it in GitHub Desktop.
switch xcode to manual signing for Unity 5.3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'xcodeproj' | |
# utility for unity 5.3 to use xcode 8 with manual signing | |
# for Unity 5.4 see https://gist.github.com/echorebel/b073bc7858c36218610e63f2b7664639 | |
# Usage: | |
# ruby xcode_manual_signing.rb -p <path/to/xcode_project> | |
# default path is Build/iOS/Unity-iPhone.xcodeproj | |
args = ARGV | |
project_path = 'Build/iOS/Unity-iPhone.xcodeproj' | |
args.each_with_index do |arg, index| | |
case arg | |
when '--project_path', '-p' | |
project_path = args[index + 1] | |
unless File.exist?(project_path) | |
abort('There is no file at specified path.') | |
end | |
end | |
end | |
project = Xcodeproj::Project.open(project_path) | |
target_id = project.targets.first.uuid | |
attributes = project.root_object.attributes['TargetAttributes'] | |
attributes[target_id] = {'ProvisioningStyle' => 'Manual'} | |
target_attributes = attributes[target_id] | |
project.save |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment