Created
November 26, 2017 12:43
-
-
Save mahmudahsan/d4803695003573d1c3956b3e49eca319 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/ruby | |
#XCode modification | |
require 'xcodeproj' | |
bundleId = ARGV[0] | |
path = ARGV[1] | |
project_path = path + "/XCodeProject.xcodeproj" | |
puts(project_path) | |
project = Xcodeproj::Project.open(project_path) | |
app = project.targets[0] | |
wkExApp = project.targets[1] | |
wkApp = project.targets[2] | |
puts app.name | |
puts wkApp.name | |
puts wkExApp.name | |
app.build_configurations.each do |config| | |
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundleId | |
end | |
wkApp.build_configurations.each do |config| | |
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundleId + ".watchkitapp" | |
end | |
wkExApp.build_configurations.each do |config| | |
config.build_settings['PRODUCT_BUNDLE_IDENTIFIER'] = bundleId + ".watchkitapp.watchkitextension" | |
end | |
project::save() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment