lib/cocoapods-playgrounds/workspace.rb in cocoapods-playgrounds-1.2.1 vs lib/cocoapods-playgrounds/workspace.rb in cocoapods-playgrounds-1.2.2
- old
+ new
@@ -13,11 +13,11 @@
raise "Unsupported tool #{tool}" unless SUPPORTED_TOOLS.include?(tool)
@tool = tool
end
- def generate(install = true, open = true)
+ def generate(install = true)
@cwd = Pathname.getwd
`rm -fr '#{target_dir}'`
FileUtils.mkdir_p(target_dir)
Dir.chdir(target_dir) do
@@ -26,12 +26,11 @@
generator = Pod::PlaygroundGenerator.new(@platform)
path = generator.generate(names.first)
generate_swift_code(path)
end
- `open #{workspace_path}` if install && open
- names.first
+ `open #{workspace_path}` if install
end
private
def setup_project(install = true)
@@ -146,15 +145,20 @@
def generate_project
project_path = "#{names.first}.xcodeproj"
project = Xcodeproj::Project.new(project_path)
- target = project.new_target(:framework,
+ target = project.new_target(:application,
target_name,
@platform,
@deployment_target)
target.build_configurations.each do |config|
+ config.build_settings['ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME'] = 'LaunchImage'
+ config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = ''
+ config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
+ config.build_settings['CODE_SIGNING_REQUIRED'] = 'NO'
config.build_settings['DEFINES_MODULE'] = 'NO'
+ config.build_settings['EMBEDDED_CONTENT_CONTAINS_SWIFT'] = 'NO'
end
# TODO: Should be at the root of the project
project.new_file("#{names.first}.playground")
project.save