diff --git a/.gitignore b/.gitignore index e7b722df..75118530 100644 --- a/.gitignore +++ b/.gitignore @@ -26,8 +26,12 @@ Carthage # We recommend against adding the Pods directory to your .gitignore. However # you should judge for yourself, the pros and cons are mentioned at: # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control -# +# # Note: if you ignore the Pods directory, make sure to uncomment # `pod install` in .travis.yml # # Pods/ + +Gemfile.lock +play +spec/staging diff --git a/.travis.yml b/.travis.yml index 45630e24..c8dd0563 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,15 @@ -# references: -# * http://www.objc.io/issue-6/travis-ci.html -# * https://github.com/supermarin/xcpretty#usage +language: ruby +sudo: false + +cache: bundler +rvm: + - 2.2.5 + - 2.2.2 + +# By default, this runs rake on the latest ruby and executes +# bundle install --jobs=3 --retry=3 +# rake -osx_image: xcode7.3 -language: objective-c -# cache: cocoapods -# podfile: Example/Podfile -# before_install: -# - gem install cocoapods # Since Travis is not always on latest version -# - pod install --project-directory=Example script: -- set -o pipefail && xcodebuild test -workspace Example/${POD_NAME}.xcworkspace -scheme ${POD_NAME}-Example -sdk iphonesimulator9.3 ONLY_ACTIVE_ARCH=NO | xcpretty -- pod lib lint + - git fetch --unshallow + - bundle exec rake diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..f19c1343 --- /dev/null +++ b/Gemfile @@ -0,0 +1,6 @@ +source 'https://rubygems.org' + +gem 'rake' +gem 'rspec' +gem 'cocoapods' + diff --git a/LICENSE b/LICENSE index 1328346d..d651fa4e 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ This project is licensed under the MIT license. -Copyright (c) 2013 - 2014 CocoaPods Dev Team +Copyright (c) 2013 - 2016 CocoaPods Dev Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/Pod/Assets/.gitkeep b/Pod/Assets/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/Pod/Classes/.gitkeep b/Pod/Classes/.gitkeep deleted file mode 100644 index e69de29b..00000000 diff --git a/README.md b/README.md index 61423d78..0604a405 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,42 @@ pod-template ============ -An opinionated template for creating a Pod with the following features: +[![Build Status](https://travis-ci.org/CocoaPods/pod-template.svg?branch=develop)](https://travis-ci.org/CocoaPods/pod-template) -- Git as the source control management system +An opinionated template for Swift and Objective-C frameworks with the following features: + +- Prompt-based project generation +- Support for CocoaPods, Carthage and project layout compatible with Swift Package Manager - Clean folder structure -- Project generation - MIT license - Testing as a standard - Turnkey access to Travis CI -- Also supports Carthage + ## Getting started -There are two reasons for wanting to work on this template, making your own or improving the one for everyone's. In both cases you will want to work with the ruby classes inside the `setup` folder, and the example base template that it works on from inside `template/ios/`. +Most CocoaPods framework developers will use `pod-template` by running `pod lib create POD_NAME`. You can also follow along with the guide at: https://guides.cocoapods.org/making/using-pod-lib-create.html -## Best practices +You must run **CocoaPods 1.0.0+** to use this template. -The command `pod lib create` aims to be ran along with this guide: http://guides.cocoapods.org/making/using-pod-lib-create.html so any changes of flow should be updated there also. -It is open to communal input, but adding new features, or new ideas are probably better off being discussed in an issue first. In general we try to think if an average Xcode user is going to use this feature or not, if it's unlikely is it a _very strongly_ encouraged best practice ( ala testing / CI. ) If it's something useful for saving a few minutes every deploy, or isn't easily documented in the guide it is likely to be denied in order to keep this project as simple as possible. +## Hacking -## Requirements: +- Clone and `cd` into the directory +- Run some stuff you need to run for any Ruby project: + - `gem install bundler` + - `bundle install` +- Run the included test suite: + - `rake` + - Note: this uses the latest released version of CocoaPods to run this template (retrieved with Bundler above) +- Try it for real: + - `cd ~/Desktop` + - `pod lib create --verbose --template-url='file:///PATH/TO/pod-template' NewPod` + - Note: this uses your INSTALLED VERSION of `pod` to run this template +- Hacking: + - **Note: you MUST commit to git BEFORE you do `rake` testing or `pod lib create` testing. Both of those tools pull from master in your local repository. Learn how to squash commits :-)** + + +## Best practices -- CocoaPods 1.0.0+ +This project welcomes communal input, but please discuss new features and new ideas as an issue before sending a pull request. In general we try to think if an average Xcode user is going to use this feature or not, if it's unlikely is it a _very strongly_ encouraged best practice (à la testing / continuous integration). If it's something useful for saving a few minutes every deploy, or isn't easily documented in the guide it is likely to be denied in order to keep this project as simple as possible. diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..8c272397 --- /dev/null +++ b/Rakefile @@ -0,0 +1,19 @@ +require 'rake' +require 'rspec/core/rake_task' +require 'colored' + +desc 'Run specs' +RSpec::Core::RakeTask.new do |t| + # Configure RSpec + t.pattern = './spec/**/*_spec.rb' + t.rspec_opts = '--format documentation' + # Prepare testing area + puts 'Wiping out staging area for testing' + FileUtils.rm_rf 'spec/staging' + FileUtils::mkdir_p 'spec/staging' +end + +task :default => :spec do + puts "All RSpec testing is complete".blue + puts "You can manually inspect test artifacts in spec/staging/".blue +end diff --git a/setup/TemplateConfigurator.rb b/configurator/MainConfigurator.rb similarity index 57% rename from setup/TemplateConfigurator.rb rename to configurator/MainConfigurator.rb index b0597317..32a064b2 100644 --- a/setup/TemplateConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -1,126 +1,91 @@ +# THIS IS THE MAIN ENTRY POINT FOR CONFIGURATION +# +# We are responsible to: +# - Prepare the staging/ directory +# - Ask some questions, delegate to other configurators if necessary +# - Do other stuff in staging/ directory +# - Deploy the staging/ directory +# + require 'fileutils' require 'colored' module Pod - class TemplateConfigurator - + class MainConfigurator attr_reader :pod_name, :pods_for_podfile, :prefixes, :test_example_file, :username, :email - def initialize(pod_name) - @pod_name = pod_name - @pods_for_podfile = [] - @prefixes = [] - @message_bank = MessageBank.new(self) + def user_name + (ENV['GIT_COMMITTER_NAME'] || `git config user.name`).strip end - def ask(question) - answer = "" - loop do - puts "\n#{question}?" - - @message_bank.show_prompt - answer = gets.chomp - - break if answer.length > 0 - - print "\nYou need to provide an answer." - end - answer + def user_email + (ENV['GIT_COMMITTER_EMAIL'] || `git config user.email`).strip end - def ask_with_answers(question, possible_answers) - - print "\n#{question}? [" - - print_info = Proc.new { - - possible_answers_string = possible_answers.each_with_index do |answer, i| - _answer = (i == 0) ? answer.underline : answer - print " " + _answer - print(" /") if i != possible_answers.length-1 - end - print " ]\n" - } - print_info.call - - answer = "" - - loop do - @message_bank.show_prompt - answer = gets.downcase.chomp - - answer = "yes" if answer == "y" - answer = "no" if answer == "n" - - # default to first answer - if answer == "" - answer = possible_answers[0].downcase - print answer.yellow - end + def year + Time.now.year.to_s + end - break if possible_answers.map { |a| a.downcase }.include? answer + def date + Time.now.strftime "%Y-%m-%d" + end - print "\nPossible answers are [" - print_info.call - end + def podfile_path + File.exist?('Example/Podfile') ? 'Example/Podfile' : 'Podfile' + end - answer + def initialize(pod_name) + @pod_name = pod_name + @pods_for_podfile = [] + @prefixes = [] + @message_bank = MessageBank.new(self) end + #----------------------------------------# + def run + abort_if_spaces_in_name @message_bank.welcome_message + prepare_staging_directory + use_baseline_template framework = self.ask_with_answers("What language do you want to use?", ["Swift", "ObjC"]).to_sym case framework when :swift - ConfigureSwift.perform(configurator: self) - + SwiftConfigurator.perform(configurator: self) when :objc - ConfigureIOS.perform(configurator: self) + ObjectiveCConfigurator.perform(configurator: self) end - replace_variables_in_files - clean_template_files - rename_template_files - add_pods_to_podfile - customise_prefix - rename_classes_folder - ensure_carthage_compatibility - reinitialize_git_repo - run_pod_install + Dir.chdir('staging') do + replace_variables_in_files + replace_variables_in_file_names + add_pods_to_podfile(podfile_path) + customise_prefix + run_pod_install + initialize_git_repo + end + + deploy_staging_directory @message_bank.farewell_message end - #----------------------------------------# - - def ensure_carthage_compatibility - FileUtils.ln_s('Example/Pods/Pods.xcodeproj', '_Pods.xcodeproj') + def prepare_staging_directory + FileUtils::mkdir_p 'staging' end - def run_pod_install - puts "\nRunning " + "pod install".magenta + " on your new library." - puts "" - - Dir.chdir("Example") do - system "pod install" - end - - `git add Example/#{pod_name}.xcodeproj/project.pbxproj` - `git commit -m "Initial commit"` - end - - def clean_template_files - ["./**/.gitkeep", "configure", "_CONFIGURE.rb", "README.md", "LICENSE", "templates", "setup", "CODE_OF_CONDUCT.md"].each do |asset| - `rm -rf #{asset}` - end + def use_baseline_template + FileUtils.cp_r 'templates/baseline/.', 'staging' end def replace_variables_in_files - file_names = ['POD_LICENSE', 'POD_README.md', 'NAME.podspec', '.travis.yml', podfile_path] - file_names.each do |file_name| - text = File.read(file_name) + Dir.glob("**/*") do |file_name| + next if File.directory?(file_name) + # See https://robots.thoughtbot.com/fight-back-utf-8-invalid-byte-sequences + text = File.read(file_name).encode('UTF-8', 'binary', invalid: :replace, undef: :replace, replace: '') text.gsub!("${POD_NAME}", @pod_name) + text.gsub!("PROJECT", @pod_name) text.gsub!("${REPO_NAME}", @pod_name.gsub('+', '-')) text.gsub!("${USER_NAME}", user_name) text.gsub!("${USER_EMAIL}", user_email) @@ -130,11 +95,21 @@ def replace_variables_in_files end end - def add_pod_to_podfile podname - @pods_for_podfile << podname + def replace_variables_in_file_names + Dir.foreach('.') do |file_name| + next if file_name == '.' or file_name == '..' + if file_name.match('PROJECT') + FileUtils.mv file_name, file_name.gsub('PROJECT', @pod_name) + end + if File.directory?(file_name.gsub('PROJECT', @pod_name)) + Dir.chdir(file_name.gsub('PROJECT', @pod_name)) do + replace_variables_in_file_names + end + end + end end - def add_pods_to_podfile + def add_pods_to_podfile(podfile_path) podfile = File.read podfile_path podfile_content = @pods_for_podfile.map do |pod| "pod '" + pod + "'" @@ -143,70 +118,110 @@ def add_pods_to_podfile File.open(podfile_path, "w") { |file| file.puts podfile } end - def add_line_to_pch line - @prefixes << line - end - def customise_prefix prefix_path = "Example/Tests/Tests-Prefix.pch" - return unless File.exists? prefix_path + return unless File.exist? prefix_path pch = File.read prefix_path pch.gsub!("${INCLUDED_PREFIXES}", @prefixes.join("\n ") ) File.open(prefix_path, "w") { |file| file.puts pch } end - def set_test_framework(test_type, extension) - content_path = "setup/test_examples/" + test_type + "." + extension - folder = extension == "m" ? "ios" : "swift" - tests_path = "templates/" + folder + "/Example/Tests/Tests." + extension - tests = File.read tests_path - tests.gsub!("${TEST_EXAMPLE}", File.read(content_path) ) - File.open(tests_path, "w") { |file| file.puts tests } - end - - def rename_template_files - FileUtils.mv "POD_README.md", "README.md" - FileUtils.mv "POD_LICENSE", "LICENSE" - FileUtils.mv "NAME.podspec", "#{pod_name}.podspec" - end + def run_pod_install + puts "\nRunning " + "pod install".magenta + " on your new library." + puts "" - def rename_classes_folder - FileUtils.mv "POD", @pod_name + Dir.chdir("Example") do + system "pod install" + end end - def reinitialize_git_repo - `rm -rf .git` + def initialize_git_repo `git init` `git add -A` + `git commit -m "Initial commit"` end - def validate_user_details - return (user_email.length > 0) && (user_name.length > 0) + def deploy_staging_directory + Dir.foreach('.') do |file_name| + next if file_name == '.' or file_name == '..' + next if file_name == 'staging' + FileUtils.rm_rf file_name + end + FileUtils.cp_r 'staging/.', '.' + FileUtils.rm_rf 'staging' end #----------------------------------------# - def user_name - (ENV['GIT_COMMITTER_NAME'] || `git config user.name`).strip + def ask(question) + answer = "" + loop do + puts "\n#{question}?" + + @message_bank.show_prompt + answer = gets.chomp + + break if answer.length > 0 + + print "\nYou need to provide an answer." + end + answer end - def user_email - (ENV['GIT_COMMITTER_EMAIL'] || `git config user.email`).strip + def ask_with_answers(question, possible_answers) + + print "\n#{question}? [" + + print_info = Proc.new { + + possible_answers_string = possible_answers.each_with_index do |answer, i| + _answer = (i == 0) ? answer.underline : answer + print " " + _answer + print(" /") if i != possible_answers.length-1 + end + print " ]\n" + } + print_info.call + + answer = "" + + loop do + @message_bank.show_prompt + answer = gets.downcase.chomp + + answer = "yes" if answer == "y" + answer = "no" if answer == "n" + + # default to first answer + if answer == "" + answer = possible_answers[0].downcase + print answer.yellow + end + + break if possible_answers.map(&:downcase).include? answer + + print "\nPossible answers are [" + print_info.call + end + + answer end - def year - Time.now.year.to_s + def add_pod_to_podfile(podname) + @pods_for_podfile << podname end - def date - Time.now.strftime "%m/%d/%Y" + def add_line_to_pch(line) + @prefixes << line end - def podfile_path - 'Example/Podfile' + def validate_user_details + return (user_email.length > 0) && (user_name.length > 0) end - #----------------------------------------# + def abort_if_spaces_in_name + abort("You cannot have a space in the Pod's name, please re-run the command with just a single word") if @pod_name.include? " " + end end end diff --git a/setup/MessageBank.rb b/configurator/MessageBank.rb similarity index 91% rename from setup/MessageBank.rb rename to configurator/MessageBank.rb index d95820c9..b3d82f60 100644 --- a/setup/MessageBank.rb +++ b/configurator/MessageBank.rb @@ -64,7 +64,11 @@ def farewell_message puts " Ace! you're ready to go!" puts " We will start you off by opening your project in Xcode" pod_name = @configurator.pod_name - run_command "open 'Example/#{pod_name}.xcworkspace'", "open '#{pod_name}/Example/#{pod_name}.xcworkspace'" + if File.exist? (pod_name + ".xcworkspace") + run_command "open '#{pod_name}.xcworkspace'", "open '#{pod_name}.xcworkspace'" + else + run_command "open '#{pod_name}.xcodeproj'", "open '#{pod_name}.xcodeproj'" + end end diff --git a/configurator/ObjectiveCConfigurator.rb b/configurator/ObjectiveCConfigurator.rb new file mode 100644 index 00000000..428328db --- /dev/null +++ b/configurator/ObjectiveCConfigurator.rb @@ -0,0 +1,59 @@ +# THIS PERFORMS ADDITIONAL CONFIGURATION IF THE USER SELECTS THE OBJECTIVE-C OPTION +# +# We are responsible to: +# - Prepare items in the templates/objective-c directory +# - Move items from templates/objective-c to the staging directory +# + +module Pod + class ObjectiveCConfigurator + attr_reader :configurator + + def self.perform(options) + new(options).perform + end + + def initialize(options) + @configurator = options.fetch(:configurator) + end + + def perform + keep_demo = configurator.ask_with_answers("Would you like to include a demo application with your library", ["Yes", "No"]).to_sym + + framework = configurator.ask_with_answers("Which testing frameworks will you use", ["Quick", "None"]).to_sym + case framework + when :quick + configurator.add_pod_to_podfile "Quick', '~> 0.10" + configurator.add_pod_to_podfile "Nimble', '~> 5.1" + `mv "templates/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` + when :none + `mv "templates/test_examples/xctest.swift" "templates/swift/Example/Tests/Tests.swift"` + end + + snapshots = configurator.ask_with_answers("Would you like to do view based testing", ["Yes", "No"]).to_sym + case snapshots + when :yes + configurator.add_pod_to_podfile "FBSnapshotTestCase" + + if keep_demo == :no + puts " - Putting the demo application back in, you cannot do view tests without a host application." + keep_demo = :yes + end + + if framework == :quick + configurator.add_pod_to_podfile "Nimble-Snapshots" + end + end + + Pod::ProjectManipulator.new({ + :configurator => @configurator, + :xcodeproj_path => "templates/objective-c/Example/iOS Example.xcodeproj", + :platform => :ios, + :remove_demo_project => (keep_demo == :no), + :prefix => "" + }).run + + `mv ./templates/objective-c/* ./staging` + end + end +end diff --git a/setup/ProjectManipulator.rb b/configurator/ProjectManipulator.rb similarity index 68% rename from setup/ProjectManipulator.rb rename to configurator/ProjectManipulator.rb index 3977dfca..174a8c15 100644 --- a/setup/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -28,7 +28,6 @@ def run replace_internal_project_settings @project = Xcodeproj::Project.open(@xcodeproj_path) - add_podspec_metadata remove_demo_project if @remove_demo_target @project.save @@ -36,13 +35,6 @@ def run rename_project_folder end - def add_podspec_metadata - project_metadata_item = @project.root_object.main_group.children.select { |group| group.name == "Podspec Metadata" }.first - project_metadata_item.new_file "../" + @configurator.pod_name + ".podspec" - project_metadata_item.new_file "../README.md" - project_metadata_item.new_file "../LICENSE" - end - def remove_demo_project app_project = @project.targets.select { |target| target.product_type == "com.apple.product-type.application" }.first test_target = @project.targets.select { |target| target.product_type == "com.apple.product-type.bundle.unit-test" }.first @@ -59,28 +51,33 @@ def remove_demo_project end # Remove the references in xcode - project_app_group = @project.root_object.main_group.children.select { |group| group.display_name.end_with? @configurator.pod_name }.first + project_app_group = @project.root_object.main_group.children.select { |group| group.display_name == @configurator.pod_name + ".xcodeproj" }.first project_app_group.remove_from_project # Remove the product reference - product = @project.products.select { |product| product.path == @configurator.pod_name + "_Example.app" }.first - product.remove_from_project + product = @project.products.select { |product| product.path == "iOS Example.app" }.first - # Remove the actual folder + files for both projects - `rm -rf templates/ios/Example/PROJECT` - `rm -rf templates/swift/Example/PROJECT` + product.remove_from_project - # Replace the Podfile with a simpler one with only one target - podfile_path = project_folder + "/Podfile" - podfile_text = <<-RUBY + # Remove the actual folder + files for all projects + `rm -rf templates/ios/Example` + `rm -rf templates/swift/Example` + `rm -rf templates/swift/PROJECT.xcworkspace` + `rm -rf templates/objective-c/Example` + `rm -rf templates/objective-c/PROJECT.xcworkspace` + + if @configurator.pods_for_podfile.length + # Replace the Podfile with a simpler one with only one target + podfile_path = "staging/Podfile" + podfile_text = <<-RUBY use_frameworks! -target '#{test_target.name}' do - pod '#{@configurator.pod_name}', :path => '../' - +target '#{configurator.pod_name}' do ${INCLUDED_PODS} end + RUBY - File.open(podfile_path, "w") { |file| file.puts podfile_text } + File.open(podfile_path, "w") { |file| file.puts podfile_text } + end end def project_folder @@ -88,18 +85,11 @@ def project_folder end def rename_files - # shared schemes have project specific names - scheme_path = project_folder + "/PROJECT.xcodeproj/xcshareddata/xcschemes/" - File.rename(scheme_path + "PROJECT.xcscheme", scheme_path + @configurator.pod_name + "-Example.xcscheme") - - # rename xcproject - File.rename(project_folder + "/PROJECT.xcodeproj", project_folder + "/" + @configurator.pod_name + ".xcodeproj") - unless @remove_demo_target # change app file prefixes ["CPDAppDelegate.h", "CPDAppDelegate.m", "CPDViewController.h", "CPDViewController.m"].each do |file| before = project_folder + "/PROJECT/" + file - next unless File.exists? before + next unless File.exist? before after = project_folder + "/PROJECT/" + file.gsub("CPD", prefix) File.rename before, after @@ -108,7 +98,7 @@ def rename_files # rename project related files ["PROJECT-Info.plist", "PROJECT-Prefix.pch"].each do |file| before = project_folder + "/PROJECT/" + file - next unless File.exists? before + next unless File.exist? before after = project_folder + "/PROJECT/" + file.gsub("PROJECT", @configurator.pod_name) File.rename before, after @@ -125,11 +115,12 @@ def rename_project_folder def replace_internal_project_settings Dir.glob(project_folder + "/**/**/**/**").each do |name| - next if Dir.exists? name - text = File.read(name) + next if Dir.exist? name + next if name.end_with? "png" + text = File.read(name) for find, replace in @string_replacements - text = text.gsub(find, replace) + text = text.gsub(find, replace) end File.open(name, "w") { |file| file.puts text } diff --git a/setup/ConfigureSwift.rb b/configurator/SwiftConfigurator.rb similarity index 64% rename from setup/ConfigureSwift.rb rename to configurator/SwiftConfigurator.rb index 18e2a2cd..32649ee4 100644 --- a/setup/ConfigureSwift.rb +++ b/configurator/SwiftConfigurator.rb @@ -1,6 +1,12 @@ -module Pod +# THIS PERFORMS ADDITIONAL CONFIGURATION IF THE USER SELECT THE SWIFT OPTION +# +# We are responsible to: +# - Prepare items in the templates/swift directory +# - Move items from templates/swift to the staging directory +# - class ConfigureSwift +module Pod + class SwiftConfigurator attr_reader :configurator def self.perform(options) @@ -19,19 +25,18 @@ def perform when :quick configurator.add_pod_to_podfile "Quick', '~> 0.8" configurator.add_pod_to_podfile "Nimble', '~> 3.0" - configurator.set_test_framework "quick", "swift" - + `mv "templates/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` when :none - configurator.set_test_framework "xctest", "swift" + `mv "templates/test_examples/xctest.swift" "templates/swift/Example/Tests/Tests.swift"` end snapshots = configurator.ask_with_answers("Would you like to do view based testing", ["Yes", "No"]).to_sym case snapshots when :yes configurator.add_pod_to_podfile "FBSnapshotTestCase" - + if keep_demo == :no - puts " Putting demo application back in, you cannot do view tests without a host application." + puts " - Putting demo application back in, you cannot do view tests without a host application." keep_demo = :yes end @@ -42,23 +47,13 @@ def perform Pod::ProjectManipulator.new({ :configurator => @configurator, - :xcodeproj_path => "templates/swift/Example/PROJECT.xcodeproj", + :xcodeproj_path => "templates/swift/Example/iOS Example.xcodeproj", :platform => :ios, :remove_demo_project => (keep_demo == :no), :prefix => "" }).run - `mv ./templates/swift/* ./` - - # There has to be a single file in the Classes dir - # or a framework won't be created - `touch Pod/Classes/ReplaceMe.swift` - - # The Podspec should be 8.0 instead of 7.0 - text = File.read("NAME.podspec") - text.gsub!("7.0", "8.0") - File.open("NAME.podspec", "w") { |file| file.puts text } + `mv ./templates/swift/* ./staging` end end - end diff --git a/configure b/configure index 82196edf..2492da96 100755 --- a/configure +++ b/configure @@ -1,9 +1,9 @@ #!/usr/bin/env ruby $current_dir = File.dirname(File.expand_path(__FILE__)) -Dir[File.join($current_dir, "setup/*.rb")].each do |file| +Dir[File.join($current_dir, "configurator/*.rb")].each do |file| require_relative(file) end pod_name = ARGV.shift -Pod::TemplateConfigurator.new(pod_name).run +Pod::MainConfigurator.new(pod_name).run diff --git a/setup/ConfigureiOS.rb b/setup/ConfigureiOS.rb deleted file mode 100644 index b229d4df..00000000 --- a/setup/ConfigureiOS.rb +++ /dev/null @@ -1,83 +0,0 @@ -module Pod - - class ConfigureIOS - attr_reader :configurator - - def self.perform(options) - new(options).perform - end - - def initialize(options) - @configurator = options.fetch(:configurator) - end - - def perform - - keep_demo = configurator.ask_with_answers("Would you like to include a demo application with your library", ["Yes", "No"]).to_sym - - framework = configurator.ask_with_answers("Which testing frameworks will you use", ["Specta", "Kiwi", "None"]).to_sym - case framework - when :specta - configurator.add_pod_to_podfile "Specta" - configurator.add_pod_to_podfile "Expecta" - - configurator.add_line_to_pch "@import Specta;" - configurator.add_line_to_pch "@import Expecta;" - - configurator.set_test_framework("specta", "m") - - when :kiwi - configurator.add_pod_to_podfile "Kiwi" - configurator.add_line_to_pch "@import Kiwi;" - configurator.set_test_framework("kiwi", "m") - - when :none - configurator.set_test_framework("xctest", "m") - end - - snapshots = configurator.ask_with_answers("Would you like to do view based testing", ["Yes", "No"]).to_sym - case snapshots - when :yes - configurator.add_pod_to_podfile "FBSnapshotTestCase" - configurator.add_line_to_pch "@import FBSnapshotTestCase;" - - if keep_demo == :no - puts " Putting demo application back in, you cannot do view tests without a host application." - keep_demo = :yes - end - - if framework == :specta - configurator.add_pod_to_podfile "Expecta+Snapshots" - configurator.add_line_to_pch "@import Expecta_Snapshots;" - end - end - - prefix = nil - - loop do - prefix = configurator.ask("What is your class prefix") - - if prefix.include?(' ') - puts 'Your class prefix cannot contain spaces.'.red - else - break - end - end - - Pod::ProjectManipulator.new({ - :configurator => @configurator, - :xcodeproj_path => "templates/ios/Example/PROJECT.xcodeproj", - :platform => :ios, - :remove_demo_project => (keep_demo == :no), - :prefix => prefix - }).run - - # There has to be a single file in the Classes dir - # or a framework won't be created, which is now default - `touch Pod/Classes/ReplaceMe.m` - - `mv ./templates/ios/* ./` - end - end - -end diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb new file mode 100644 index 00000000..319078b4 --- /dev/null +++ b/spec/default/basic_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "Idiot Mode" do +# before(:each) do +# FileUtils.rm_rf 'spec/staging' +# FileUtils::mkdir_p 'spec/staging' +# end + + it "should work if you just keep hitting enter" do + Dir.chdir('spec/staging') do + puts "Vendoring with simple settings" + path = Dir.pwd + '/../mock:' + ENV['PATH'] + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPodDefault1" + Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| + stdin.write "Bob Smith\nbob.smith@example.com\n\n\n\n\n\n" + stdin.close + print stdout_and_stderr.readlines.join {"\n"} + } + expect(1).to eq(1) + end + end +end diff --git a/spec/mock/open b/spec/mock/open new file mode 100755 index 00000000..1f91ec52 --- /dev/null +++ b/spec/mock/open @@ -0,0 +1,7 @@ +#!/usr/local/bin/ruby + +puts "Mock open:" + +ARGV.each do |a| + puts " Argument: #{a}" +end diff --git a/spec/objective-c/basic_spec.rb b/spec/objective-c/basic_spec.rb new file mode 100644 index 00000000..143a768d --- /dev/null +++ b/spec/objective-c/basic_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "Objective-C Integration" do +# before(:each) do +# FileUtils.rm_rf 'spec/staging' +# FileUtils::mkdir_p 'spec/staging' +# end + + it "should work if you select objective-c and keep hitting enter" do + Dir.chdir('spec/staging') do + puts "Vendoring with default settings" + path = Dir.pwd + '/../mock:' + ENV['PATH'] + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPodObjC1" + Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| + stdin.write "objc\n\n\n\n\n\n\n" + stdin.close + print stdout_and_stderr.readlines.join {"\n"} + } + expect(1).to eq(1) + end + end +end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 00000000..88cd9871 --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,7 @@ +require 'rspec' +require 'fileutils' +require 'open3' + +RSpec.configure do |config| + # no mocking +end diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb new file mode 100644 index 00000000..ead0d0cf --- /dev/null +++ b/spec/swift/basic_spec.rb @@ -0,0 +1,22 @@ +require 'spec_helper' + +describe "Swift Integration" do +# before(:each) do +# FileUtils.rm_rf 'spec/staging' +# FileUtils::mkdir_p 'spec/staging' +# end + + it "should work if you select swift and keep hitting enter" do + Dir.chdir('spec/staging') do + puts "Vendoring with default settings" + path = Dir.pwd + '/../mock:' + ENV['PATH'] + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPodSwift1" + Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| + stdin.write "swift\n\n\n\n\n\n\n" + stdin.close + print stdout_and_stderr.readlines.join {"\n"} + } + expect(1).to eq(1) + end + end +end diff --git a/templates/baseline/.gitignore b/templates/baseline/.gitignore new file mode 100644 index 00000000..fa77fd31 --- /dev/null +++ b/templates/baseline/.gitignore @@ -0,0 +1,61 @@ +# Reference: https://raw.githubusercontent.com/github/gitignore/master/Swift.gitignore + +## Build generated +build/ +DerivedData/ + +## Various settings +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata/ + +## Other +*.moved-aside +*.xcuserstate + +## Obj-C/Swift specific +*.hmap +*.ipa + +## Playgrounds +timeline.xctimeline +playground.xcworkspace + +# Swift Package Manager +# +# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. +# Packages/ +.build/ + +# CocoaPods +# +# We recommend against adding the Pods directory to your .gitignore. However +# you should judge for yourself, the pros and cons are mentioned at: +# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control +# +# Pods/ + +# Carthage +# +# Add this line if you want to avoid checking in source code from Carthage dependencies. +# Carthage/Checkouts + +Carthage/Build + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md + +fastlane/report.xml +fastlane/Preview.html +fastlane/screenshots +fastlane/test_output diff --git a/templates/baseline/.travis.yml b/templates/baseline/.travis.yml new file mode 100644 index 00000000..67ce9e9f --- /dev/null +++ b/templates/baseline/.travis.yml @@ -0,0 +1,13 @@ +# references: +# * http://www.objc.io/issue-6/travis-ci.html +# * https://github.com/supermarin/xcpretty#usage + +language: objective-c +# cache: cocoapods +# podfile: Example/Podfile +# before_install: +# - gem install cocoapods # Since Travis is not always on latest version +# - pod install --project-directory=Example +script: +- set -o pipefail && xcodebuild test -enableCodeCoverage YES -workspace Example/${POD_NAME}.xcworkspace -scheme ${POD_NAME}-Example -sdk iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty +- pod lib lint diff --git a/POD_LICENSE b/templates/baseline/LICENSE similarity index 100% rename from POD_LICENSE rename to templates/baseline/LICENSE diff --git a/NAME.podspec b/templates/baseline/PROJECT.podspec similarity index 93% rename from NAME.podspec rename to templates/baseline/PROJECT.podspec index 0d50981c..8e7ca3fc 100644 --- a/NAME.podspec +++ b/templates/baseline/PROJECT.podspec @@ -30,10 +30,10 @@ TODO: Add long description of the pod here. s.ios.deployment_target = '8.0' - s.source_files = '${POD_NAME}/Classes/**/*' - + s.source_files = 'Source/**/*' + # s.resource_bundles = { - # '${POD_NAME}' => ['${POD_NAME}/Assets/*.png'] + # '${POD_NAME}' => ['Resources/*.png'] # } # s.public_header_files = 'Pod/Classes/**/*.h' diff --git a/POD_README.md b/templates/baseline/README.md similarity index 100% rename from POD_README.md rename to templates/baseline/README.md diff --git a/templates/ios/Example/PROJECT.xcodeproj/project.pbxproj b/templates/ios/Example/PROJECT.xcodeproj/project.pbxproj deleted file mode 100644 index 1a5ff198..00000000 --- a/templates/ios/Example/PROJECT.xcodeproj/project.pbxproj +++ /dev/null @@ -1,486 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58F195388D20070C39A /* CoreGraphics.framework */; }; - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F596195388D20070C39A /* InfoPlist.strings */; }; - 6003F59A195388D20070C39A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F599195388D20070C39A /* main.m */; }; - 6003F59E195388D20070C39A /* CPDAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F59D195388D20070C39A /* CPDAppDelegate.m */; }; - 6003F5A7195388D20070C39A /* CPDViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5A6195388D20070C39A /* CPDViewController.m */; }; - 6003F5A9195388D20070C39A /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5A8195388D20070C39A /* Images.xcassets */; }; - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F5AF195388D20070C39A /* XCTest.framework */; }; - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F58D195388D20070C39A /* Foundation.framework */; }; - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6003F591195388D20070C39A /* UIKit.framework */; }; - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 6003F5B8195388D20070C39A /* InfoPlist.strings */; }; - 6003F5BC195388D20070C39A /* Tests.m in Sources */ = {isa = PBXBuildFile; fileRef = 6003F5BB195388D20070C39A /* Tests.m */; }; - 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 6003F5B3195388D20070C39A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 6003F582195388D10070C39A /* Project object */; - proxyType = 1; - remoteGlobalIDString = 6003F589195388D20070C39A; - remoteInfo = "PROJECT"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 6003F58A195388D20070C39A /* PROJECT_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PROJECT_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F58D195388D20070C39A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 6003F58F195388D20070C39A /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 6003F591195388D20070C39A /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 6003F595195388D20070C39A /* PROJECT-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "PROJECT-Info.plist"; sourceTree = ""; }; - 6003F597195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6003F599195388D20070C39A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 6003F59B195388D20070C39A /* PROJECT-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PROJECT-Prefix.pch"; sourceTree = ""; }; - 6003F59C195388D20070C39A /* CPDAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDAppDelegate.h; sourceTree = ""; }; - 6003F59D195388D20070C39A /* CPDAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDAppDelegate.m; sourceTree = ""; }; - 6003F5A5195388D20070C39A /* CPDViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CPDViewController.h; sourceTree = ""; }; - 6003F5A6195388D20070C39A /* CPDViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CPDViewController.m; sourceTree = ""; }; - 6003F5A8195388D20070C39A /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 6003F5AE195388D20070C39A /* PROJECT_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PROJECT_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 6003F5AF195388D20070C39A /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 6003F5B7195388D20070C39A /* Tests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Tests-Info.plist"; sourceTree = ""; }; - 6003F5B9195388D20070C39A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; - 6003F5BB195388D20070C39A /* Tests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Tests.m; sourceTree = ""; }; - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Tests-Prefix.pch"; sourceTree = ""; }; - 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 6003F587195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F590195388D20070C39A /* CoreGraphics.framework in Frameworks */, - 6003F592195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F58E195388D20070C39A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AB195388D20070C39A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5B0195388D20070C39A /* XCTest.framework in Frameworks */, - 6003F5B2195388D20070C39A /* UIKit.framework in Frameworks */, - 6003F5B1195388D20070C39A /* Foundation.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 6003F581195388D10070C39A = { - isa = PBXGroup; - children = ( - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */, - 6003F593195388D20070C39A /* Example for PROJECT */, - 6003F5B5195388D20070C39A /* Tests */, - 6003F58C195388D20070C39A /* Frameworks */, - 6003F58B195388D20070C39A /* Products */, - ); - sourceTree = ""; - }; - 6003F58B195388D20070C39A /* Products */ = { - isa = PBXGroup; - children = ( - 6003F58A195388D20070C39A /* PROJECT_Example.app */, - 6003F5AE195388D20070C39A /* PROJECT_Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 6003F58C195388D20070C39A /* Frameworks */ = { - isa = PBXGroup; - children = ( - 6003F58D195388D20070C39A /* Foundation.framework */, - 6003F58F195388D20070C39A /* CoreGraphics.framework */, - 6003F591195388D20070C39A /* UIKit.framework */, - 6003F5AF195388D20070C39A /* XCTest.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 6003F593195388D20070C39A /* Example for PROJECT */ = { - isa = PBXGroup; - children = ( - 6003F59C195388D20070C39A /* CPDAppDelegate.h */, - 6003F59D195388D20070C39A /* CPDAppDelegate.m */, - 873B8AEA1B1F5CCA007FD442 /* Main.storyboard */, - 6003F5A5195388D20070C39A /* CPDViewController.h */, - 6003F5A6195388D20070C39A /* CPDViewController.m */, - 6003F5A8195388D20070C39A /* Images.xcassets */, - 6003F594195388D20070C39A /* Supporting Files */, - ); - name = "Example for PROJECT"; - path = "PROJECT"; - sourceTree = ""; - }; - 6003F594195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F595195388D20070C39A /* PROJECT-Info.plist */, - 6003F596195388D20070C39A /* InfoPlist.strings */, - 6003F599195388D20070C39A /* main.m */, - 6003F59B195388D20070C39A /* PROJECT-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 6003F5B5195388D20070C39A /* Tests */ = { - isa = PBXGroup; - children = ( - 6003F5BB195388D20070C39A /* Tests.m */, - 6003F5B6195388D20070C39A /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 6003F5B6195388D20070C39A /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 6003F5B7195388D20070C39A /* Tests-Info.plist */, - 6003F5B8195388D20070C39A /* InfoPlist.strings */, - 606FC2411953D9B200FFA9A0 /* Tests-Prefix.pch */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 60FF7A9C1954A5C5007DD14C /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 6003F589195388D20070C39A /* PROJECT_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "PROJECT_Example" */; - buildPhases = ( - 6003F586195388D20070C39A /* Sources */, - 6003F587195388D20070C39A /* Frameworks */, - 6003F588195388D20070C39A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PROJECT_Example"; - productName = "PROJECT"; - productReference = 6003F58A195388D20070C39A /* PROJECT_Example.app */; - productType = "com.apple.product-type.application"; - }; - 6003F5AD195388D20070C39A /* PROJECT_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "PROJECT_Tests" */; - buildPhases = ( - 6003F5AA195388D20070C39A /* Sources */, - 6003F5AB195388D20070C39A /* Frameworks */, - 6003F5AC195388D20070C39A /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 6003F5B4195388D20070C39A /* PBXTargetDependency */, - ); - name = "PROJECT_Tests"; - productName = "PROJECTTests"; - productReference = 6003F5AE195388D20070C39A /* PROJECT_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 6003F582195388D10070C39A /* Project object */ = { - isa = PBXProject; - attributes = { - CLASSPREFIX = CPD; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = "PROJECT_OWNER"; - TargetAttributes = { - 6003F5AD195388D20070C39A = { - TestTargetID = 6003F589195388D20070C39A; - }; - }; - }; - buildConfigurationList = 6003F585195388D10070C39A /* Build configuration list for PBXProject "PROJECT" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 6003F581195388D10070C39A; - productRefGroup = 6003F58B195388D20070C39A /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 6003F589195388D20070C39A /* PROJECT_Example */, - 6003F5AD195388D20070C39A /* PROJECT_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 6003F588195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 873B8AEB1B1F5CCA007FD442 /* Main.storyboard in Resources */, - 6003F5A9195388D20070C39A /* Images.xcassets in Resources */, - 6003F598195388D20070C39A /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AC195388D20070C39A /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5BA195388D20070C39A /* InfoPlist.strings in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 6003F586195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F59E195388D20070C39A /* CPDAppDelegate.m in Sources */, - 6003F5A7195388D20070C39A /* CPDViewController.m in Sources */, - 6003F59A195388D20070C39A /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 6003F5AA195388D20070C39A /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 6003F5BC195388D20070C39A /* Tests.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 6003F5B4195388D20070C39A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 6003F589195388D20070C39A /* PROJECT_Example */; - targetProxy = 6003F5B3195388D20070C39A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 6003F596195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F597195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; - 6003F5B8195388D20070C39A /* InfoPlist.strings */ = { - isa = PBXVariantGroup; - children = ( - 6003F5B9195388D20070C39A /* en */, - ); - name = InfoPlist.strings; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 6003F5BD195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - 6003F5BE195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 6003F5C0195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PROJECT/PROJECT-Prefix.pch"; - INFOPLIST_FILE = "PROJECT/PROJECT-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 6003F5C1195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "PROJECT/PROJECT-Prefix.pch"; - INFOPLIST_FILE = "PROJECT/PROJECT-Info.plist"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; - 6003F5C3195388D20070C39A /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PROJECT_Example.app/PROJECT_Example"; - WRAPPER_EXTENSION = xctest; - }; - name = Debug; - }; - 6003F5C4195388D20070C39A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - BUNDLE_LOADER = "$(TEST_HOST)"; - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - "$(DEVELOPER_FRAMEWORKS_DIR)", - ); - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = "Tests/Tests-Prefix.pch"; - INFOPLIST_FILE = "Tests/Tests-Info.plist"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/PROJECT_Example.app/PROJECT_Example"; - WRAPPER_EXTENSION = xctest; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 6003F585195388D10070C39A /* Build configuration list for PBXProject "PROJECT" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5BD195388D20070C39A /* Debug */, - 6003F5BE195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5BF195388D20070C39A /* Build configuration list for PBXNativeTarget "PROJECT_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C0195388D20070C39A /* Debug */, - 6003F5C1195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 6003F5C2195388D20070C39A /* Build configuration list for PBXNativeTarget "PROJECT_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 6003F5C3195388D20070C39A /* Debug */, - 6003F5C4195388D20070C39A /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 6003F582195388D10070C39A /* Project object */; -} diff --git a/templates/ios/Example/PROJECT/CPDAppDelegate.h b/templates/ios/Example/PROJECT/CPDAppDelegate.h deleted file mode 100644 index 7d8ef160..00000000 --- a/templates/ios/Example/PROJECT/CPDAppDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// -// CPDAppDelegate.h -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -@import UIKit; - -@interface CPDAppDelegate : UIResponder - -@property (strong, nonatomic) UIWindow *window; - -@end diff --git a/templates/ios/Example/PROJECT/CPDAppDelegate.m b/templates/ios/Example/PROJECT/CPDAppDelegate.m deleted file mode 100644 index e3554f95..00000000 --- a/templates/ios/Example/PROJECT/CPDAppDelegate.m +++ /dev/null @@ -1,46 +0,0 @@ -// -// CPDAppDelegate.m -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -#import "CPDAppDelegate.h" - -@implementation CPDAppDelegate - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - // Override point for customization after application launch. - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. -} - -@end diff --git a/templates/ios/Example/PROJECT/CPDViewController.h b/templates/ios/Example/PROJECT/CPDViewController.h deleted file mode 100644 index fc66c485..00000000 --- a/templates/ios/Example/PROJECT/CPDViewController.h +++ /dev/null @@ -1,13 +0,0 @@ -// -// CPDViewController.h -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -@import UIKit; - -@interface CPDViewController : UIViewController - -@end diff --git a/templates/ios/Example/PROJECT/CPDViewController.m b/templates/ios/Example/PROJECT/CPDViewController.m deleted file mode 100644 index 96ab871d..00000000 --- a/templates/ios/Example/PROJECT/CPDViewController.m +++ /dev/null @@ -1,29 +0,0 @@ -// -// CPDViewController.m -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -#import "CPDViewController.h" - -@interface CPDViewController () - -@end - -@implementation CPDViewController - -- (void)viewDidLoad -{ - [super viewDidLoad]; - // Do any additional setup after loading the view, typically from a nib. -} - -- (void)didReceiveMemoryWarning -{ - [super didReceiveMemoryWarning]; - // Dispose of any resources that can be recreated. -} - -@end diff --git a/templates/ios/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json b/templates/ios/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 6f870a46..00000000 --- a/templates/ios/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json +++ /dev/null @@ -1,51 +0,0 @@ -{ - "images" : [ - { - "orientation" : "portrait", - "idiom" : "iphone", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "iphone", - "subtype" : "retina4", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "1x" - }, - { - "orientation" : "portrait", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - }, - { - "orientation" : "landscape", - "idiom" : "ipad", - "extent" : "full-screen", - "minimum-system-version" : "7.0", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/templates/ios/Example/PROJECT/Main.storyboard b/templates/ios/Example/PROJECT/Main.storyboard deleted file mode 100644 index f077b972..00000000 --- a/templates/ios/Example/PROJECT/Main.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/ios/Example/PROJECT/PROJECT-Prefix.pch b/templates/ios/Example/PROJECT/PROJECT-Prefix.pch deleted file mode 100644 index 7825372c..00000000 --- a/templates/ios/Example/PROJECT/PROJECT-Prefix.pch +++ /dev/null @@ -1,16 +0,0 @@ -// -// Prefix header -// -// The contents of this file are implicitly included at the beginning of every source file. -// - -#import - -#ifndef __IPHONE_5_0 -#warning "This project uses features only available in iOS SDK 5.0 and later." -#endif - -#ifdef __OBJC__ - @import UIKit; - @import Foundation; -#endif diff --git a/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings b/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/templates/ios/Example/PROJECT/main.m b/templates/ios/Example/PROJECT/main.m deleted file mode 100644 index 4dac91d0..00000000 --- a/templates/ios/Example/PROJECT/main.m +++ /dev/null @@ -1,17 +0,0 @@ -// -// main.m -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -@import UIKit; -#import "CPDAppDelegate.h" - -int main(int argc, char * argv[]) -{ - @autoreleasepool { - return UIApplicationMain(argc, argv, nil, NSStringFromClass([CPDAppDelegate class])); - } -} diff --git a/templates/ios/Example/Tests/Tests-Prefix.pch b/templates/ios/Example/Tests/Tests-Prefix.pch deleted file mode 100644 index 5e64e2fc..00000000 --- a/templates/ios/Example/Tests/Tests-Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// The contents of this file are implicitly included at the beginning of every test case source file. - -#ifdef __OBJC__ - - ${INCLUDED_PREFIXES} - -#endif \ No newline at end of file diff --git a/templates/ios/Example/Tests/Tests.m b/templates/ios/Example/Tests/Tests.m deleted file mode 100644 index cec41f61..00000000 --- a/templates/ios/Example/Tests/Tests.m +++ /dev/null @@ -1,9 +0,0 @@ -// -// PROJECTTests.m -// PROJECTTests -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -${TEST_EXAMPLE} diff --git a/templates/ios/Example/Tests/en.lproj/InfoPlist.strings b/templates/ios/Example/Tests/en.lproj/InfoPlist.strings deleted file mode 100644 index 477b28ff..00000000 --- a/templates/ios/Example/Tests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1,2 +0,0 @@ -/* Localized versions of Info.plist keys */ - diff --git a/templates/objective-c/Example/Podfile b/templates/objective-c/Example/Podfile new file mode 100644 index 00000000..57bc4d36 --- /dev/null +++ b/templates/objective-c/Example/Podfile @@ -0,0 +1,10 @@ +use_frameworks! + +target 'iOS Example' do + pod '${POD_NAME}', :path => '../' + + target 'Tests' do + inherit! :search_paths + ${INCLUDED_PODS} + end +end diff --git a/templates/swift/Example/PROJECT/AppDelegate.swift b/templates/objective-c/Example/Source/AppDelegate.swift similarity index 99% rename from templates/swift/Example/PROJECT/AppDelegate.swift rename to templates/objective-c/Example/Source/AppDelegate.swift index 3f6dd30d..91b22822 100644 --- a/templates/swift/Example/PROJECT/AppDelegate.swift +++ b/templates/objective-c/Example/Source/AppDelegate.swift @@ -1,6 +1,6 @@ // // AppDelegate.swift -// PROJECT +// PROJECT iOS // // Created by PROJECT_OWNER on TODAYS_DATE. // Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. @@ -43,4 +43,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } - diff --git a/templates/objective-c/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/templates/objective-c/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..eeea76c2 --- /dev/null +++ b/templates/objective-c/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/templates/objective-c/Example/Source/Assets.xcassets/Contents.json b/templates/objective-c/Example/Source/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/templates/objective-c/Example/Source/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/templates/objective-c/Example/Source/Base.lproj/Launch Screen.storyboard b/templates/objective-c/Example/Source/Base.lproj/Launch Screen.storyboard new file mode 100644 index 00000000..870275fa --- /dev/null +++ b/templates/objective-c/Example/Source/Base.lproj/Launch Screen.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/objective-c/Example/Source/Base.lproj/Main.storyboard b/templates/objective-c/Example/Source/Base.lproj/Main.storyboard new file mode 100644 index 00000000..40485627 --- /dev/null +++ b/templates/objective-c/Example/Source/Base.lproj/Main.storyboard @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 76% rename from templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json index 91bf9c14..36d2c80d 100644 --- a/templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json @@ -5,16 +5,31 @@ "size" : "29x29", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "40x40", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, { "idiom" : "iphone", "size" : "60x60", "scale" : "2x" }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, { "idiom" : "ipad", "size" : "29x29", diff --git a/templates/ios/Example/PROJECT/PROJECT-Info.plist b/templates/objective-c/Example/Source/Info.plist similarity index 89% rename from templates/ios/Example/PROJECT/PROJECT-Info.plist rename to templates/objective-c/Example/Source/Info.plist index b06b79c0..40c6215d 100644 --- a/templates/ios/Example/PROJECT/PROJECT-Info.plist +++ b/templates/objective-c/Example/Source/Info.plist @@ -4,16 +4,14 @@ CFBundleDevelopmentRegion en - CFBundleDisplayName - ${PRODUCT_NAME} CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName - ${PRODUCT_NAME} + $(PRODUCT_NAME) CFBundlePackageType APPL CFBundleShortVersionString @@ -21,9 +19,11 @@ CFBundleSignature ???? CFBundleVersion - 1.0 + 1 LSRequiresIPhoneOS + UILaunchStoryboardName + LaunchScreen UIMainStoryboardFile Main UIRequiredDeviceCapabilities diff --git a/templates/objective-c/Example/Source/ViewController.swift b/templates/objective-c/Example/Source/ViewController.swift new file mode 100644 index 00000000..065aa9f8 --- /dev/null +++ b/templates/objective-c/Example/Source/ViewController.swift @@ -0,0 +1,18 @@ +// +// ViewController.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +import UIKit +import PROJECT + +class ViewController: UIViewController { + @IBOutlet var theView: PROJECT! + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/templates/ios/Example/Tests/Tests-Info.plist b/templates/objective-c/Example/Tests/Info.plist similarity index 86% rename from templates/ios/Example/Tests/Tests-Info.plist rename to templates/objective-c/Example/Tests/Info.plist index 169b6f71..ba72822e 100644 --- a/templates/ios/Example/Tests/Tests-Info.plist +++ b/templates/objective-c/Example/Tests/Info.plist @@ -5,11 +5,13 @@ CFBundleDevelopmentRegion en CFBundleExecutable - ${EXECUTABLE_NAME} + $(EXECUTABLE_NAME) CFBundleIdentifier $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + $(PRODUCT_NAME) CFBundlePackageType BNDL CFBundleShortVersionString diff --git a/templates/objective-c/Example/Tests/Tests.swift b/templates/objective-c/Example/Tests/Tests.swift new file mode 100644 index 00000000..a6a86355 --- /dev/null +++ b/templates/objective-c/Example/Tests/Tests.swift @@ -0,0 +1 @@ +${TEST_EXAMPLE} \ No newline at end of file diff --git a/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj new file mode 100644 index 00000000..5a9c8649 --- /dev/null +++ b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj @@ -0,0 +1,487 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D904BBC31CDD3F170083BD78 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D904BBC21CDD3F170083BD78 /* Tests.swift */; }; + D94BE1BF1CCEBF2C0042282A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1BE1CCEBF2C0042282A /* ViewController.swift */; }; + D94BE1C21CCEBF2C0042282A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D94BE1C01CCEBF2C0042282A /* Main.storyboard */; }; + D94BE1C41CCEBF2C0042282A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D94BE1C31CCEBF2C0042282A /* Assets.xcassets */; }; + D94BE1D31CCEC1730042282A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1D21CCEC1730042282A /* AppDelegate.swift */; }; + D99B39051CD68FF400E56AE2 /* PROJECT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* PROJECT.framework */; }; + D99B39091CD6907300E56AE2 /* PROJECT.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* PROJECT.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D9CBAE971CCEC4ED006EC128 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D904BBC51CDD3F170083BD78 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D94BE1B11CCEBF2C0042282A /* Project object */; + proxyType = 1; + remoteGlobalIDString = D94BE1B81CCEBF2C0042282A; + remoteInfo = "iOS Example"; + }; + D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4B41CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; + D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4BE1CCEBC0F0013FBDD; + remoteInfo = "PROJECTTests"; + }; + D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D99B39081CD6904E00E56AE2 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D99B39091CD6907300E56AE2 /* PROJECT.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D904BBC01CDD3F170083BD78 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D904BBC21CDD3F170083BD78 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + D904BBC41CDD3F170083BD78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D94BE1B91CCEBF2C0042282A /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + D94BE1BE1CCEBF2C0042282A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + D94BE1C11CCEBF2C0042282A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + D94BE1C31CCEBF2C0042282A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Source/Assets.xcassets; sourceTree = ""; }; + D94BE1C81CCEBF2C0042282A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = ""; }; + D94BE1D21CCEC1730042282A /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PROJECT.xcodeproj; path = ../PROJECT.xcodeproj; sourceTree = ""; }; + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "Source/Base.lproj/Launch Screen.storyboard"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D904BBBD1CDD3F170083BD78 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B61CCEBF2C0042282A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D99B39051CD68FF400E56AE2 /* PROJECT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D904BBC11CDD3F170083BD78 /* Tests */ = { + isa = PBXGroup; + children = ( + D904BBC21CDD3F170083BD78 /* Tests.swift */, + D904BBC41CDD3F170083BD78 /* Info.plist */, + ); + path = Tests; + sourceTree = ""; + }; + D94BE1B01CCEBF2C0042282A = { + isa = PBXGroup; + children = ( + D94BE1BB1CCEBF2C0042282A /* Source */, + D9A11F981D507CB500348273 /* Supporting Files */, + D904BBC11CDD3F170083BD78 /* Tests */, + D94BE1BA1CCEBF2C0042282A /* Products */, + D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */, + ); + sourceTree = ""; + }; + D94BE1BA1CCEBF2C0042282A /* Products */ = { + isa = PBXGroup; + children = ( + D94BE1B91CCEBF2C0042282A /* iOS Example.app */, + D904BBC01CDD3F170083BD78 /* Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D94BE1BB1CCEBF2C0042282A /* Source */ = { + isa = PBXGroup; + children = ( + D94BE1D21CCEC1730042282A /* AppDelegate.swift */, + D94BE1BE1CCEBF2C0042282A /* ViewController.swift */, + ); + path = Source; + sourceTree = ""; + }; + D99B38FC1CD68FD900E56AE2 /* Products */ = { + isa = PBXGroup; + children = ( + D99B39011CD68FD900E56AE2 /* PROJECT.framework */, + D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D9A11F981D507CB500348273 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */, + D94BE1C01CCEBF2C0042282A /* Main.storyboard */, + D94BE1C31CCEBF2C0042282A /* Assets.xcassets */, + D94BE1C81CCEBF2C0042282A /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D904BBBF1CDD3F170083BD78 /* Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D904BBCA1CDD3F170083BD78 /* Build configuration list for PBXNativeTarget "Tests" */; + buildPhases = ( + D904BBBC1CDD3F170083BD78 /* Sources */, + D904BBBD1CDD3F170083BD78 /* Frameworks */, + D904BBBE1CDD3F170083BD78 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D904BBC61CDD3F170083BD78 /* PBXTargetDependency */, + ); + name = Tests; + productName = Tests; + productReference = D904BBC01CDD3F170083BD78 /* Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + D94BE1B81CCEBF2C0042282A /* iOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = D94BE1CB1CCEBF2C0042282A /* Build configuration list for PBXNativeTarget "iOS Example" */; + buildPhases = ( + D94BE1B51CCEBF2C0042282A /* Sources */, + D94BE1B61CCEBF2C0042282A /* Frameworks */, + D94BE1B71CCEBF2C0042282A /* Resources */, + D99B39081CD6904E00E56AE2 /* Copy Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + D99B39071CD6903C00E56AE2 /* PBXTargetDependency */, + ); + name = "iOS Example"; + productName = "PROJECT iOS"; + productReference = D94BE1B91CCEBF2C0042282A /* iOS Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D94BE1B11CCEBF2C0042282A /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "PROJECT_OWNER"; + TargetAttributes = { + D904BBBF1CDD3F170083BD78 = { + CreatedOnToolsVersion = 7.3.1; + TestTargetID = D94BE1B81CCEBF2C0042282A; + }; + D94BE1B81CCEBF2C0042282A = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D94BE1B01CCEBF2C0042282A; + productRefGroup = D94BE1BA1CCEBF2C0042282A /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = D99B38FC1CD68FD900E56AE2 /* Products */; + ProjectRef = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + D94BE1B81CCEBF2C0042282A /* iOS Example */, + D904BBBF1CDD3F170083BD78 /* Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + D99B39011CD68FD900E56AE2 /* PROJECT.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = "PROJECT.framework"; + remoteRef = D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "PROJECTTests.xctest"; + remoteRef = D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + D904BBBE1CDD3F170083BD78 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B71CCEBF2C0042282A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9CBAE971CCEC4ED006EC128 /* Launch Screen.storyboard in Resources */, + D94BE1C41CCEBF2C0042282A /* Assets.xcassets in Resources */, + D94BE1C21CCEBF2C0042282A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D904BBBC1CDD3F170083BD78 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D904BBC31CDD3F170083BD78 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B51CCEBF2C0042282A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D94BE1D31CCEC1730042282A /* AppDelegate.swift in Sources */, + D94BE1BF1CCEBF2C0042282A /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D904BBC61CDD3F170083BD78 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D94BE1B81CCEBF2C0042282A /* iOS Example */; + targetProxy = D904BBC51CDD3F170083BD78 /* PBXContainerItemProxy */; + }; + D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "PROJECT"; + targetProxy = D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D94BE1C01CCEBF2C0042282A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D94BE1C11CCEBF2C0042282A /* Base */, + ); + name = Main.storyboard; + path = Source; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D904BBC71CDD3F170083BD78 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example"; + }; + name = Debug; + }; + D904BBC81CDD3F170083BD78 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example"; + }; + name = Release; + }; + D94BE1C91CCEBF2C0042282A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D94BE1CA1CCEBF2C0042282A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + D94BE1CC1CCEBF2C0042282A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.phor.PROJECT.PROJECT-iOS"; + PRODUCT_NAME = "iOS Example"; + }; + name = Debug; + }; + D94BE1CD1CCEBF2C0042282A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.phor.PROJECT.PROJECT-iOS"; + PRODUCT_NAME = "iOS Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D904BBCA1CDD3F170083BD78 /* Build configuration list for PBXNativeTarget "Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D904BBC71CDD3F170083BD78 /* Debug */, + D904BBC81CDD3F170083BD78 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D94BE1C91CCEBF2C0042282A /* Debug */, + D94BE1CA1CCEBF2C0042282A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D94BE1CB1CCEBF2C0042282A /* Build configuration list for PBXNativeTarget "iOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D94BE1CC1CCEBF2C0042282A /* Debug */, + D94BE1CD1CCEBF2C0042282A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D94BE1B11CCEBF2C0042282A /* Project object */; +} diff --git a/templates/objective-c/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/objective-c/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..bfe77a2a --- /dev/null +++ b/templates/objective-c/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/templates/objective-c/LICENSE b/templates/objective-c/LICENSE new file mode 100644 index 00000000..80fd3df0 --- /dev/null +++ b/templates/objective-c/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 PROJECT_OWNER + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/templates/objective-c/PROJECT.podspec b/templates/objective-c/PROJECT.podspec new file mode 100644 index 00000000..9e4a1b40 --- /dev/null +++ b/templates/objective-c/PROJECT.podspec @@ -0,0 +1,25 @@ +Pod::Spec.new do |s| + s.name = '${POD_NAME}' + s.version = '0.1.0' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.summary = 'A short description of ${POD_NAME}.' + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + + s.description = <<-DESC + TODO: Add long description of the pod here. + DESC + + s.homepage = 'https://github.com//${POD_NAME}' + s.authors = { 'PROJECT_OWNER' => 'USER_EMAIL' } + s.source = { :git => 'https://github.com//PROJECT.git', :tag => s.version } + s.ios.deployment_target = '8.0' + s.source_files = 'Source/*.swift' + s.resource_bundles = { + 'PROJECT' => ['Resources/**/*.{png}'] + } +end diff --git a/templates/objective-c/PROJECT.xcodeproj/project.pbxproj b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj new file mode 100644 index 00000000..bc2a7a4c --- /dev/null +++ b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj @@ -0,0 +1,424 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D9A11F9C1D50804700348273 /* PROJECT.m in Sources */ = {isa = PBXBuildFile; fileRef = D9A11F9B1D50804700348273 /* PROJECT.m */; }; + D9A11F9E1D50807100348273 /* PROJECT.h in Headers */ = {isa = PBXBuildFile; fileRef = D9A11F9D1D50807100348273 /* PROJECT.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D9E066921CCECB3200E0D7CB /* wk.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066861CCECB3200E0D7CB /* wk.png */; }; + D9FEF4BF1CCEBC0F0013FBDD /* PROJECT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; }; + D9FEF4C41CCEBC100013FBDD /* PROJECTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D9FEF4C01CCEBC0F0013FBDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D9A11F9B1D50804700348273 /* PROJECT.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PROJECT.m; sourceTree = ""; }; + D9A11F9D1D50807100348273 /* PROJECT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PROJECT.h; sourceTree = ""; }; + D9E066861CCECB3200E0D7CB /* wk.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wk.png; sourceTree = ""; }; + D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PROJECT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = ""; }; + D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PROJECTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PROJECTTests.swift; sourceTree = ""; }; + D9FEF4C51CCEBC100013FBDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D9FEF4B01CCEBC0D0013FBDD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BB1CCEBC0F0013FBDD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D9FEF4BF1CCEBC0F0013FBDD /* PROJECT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D9A11F971D507C7D00348273 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D9E0667E1CCECAFF00E0D7CB /* Resources */ = { + isa = PBXGroup; + children = ( + D9E066861CCECB3200E0D7CB /* wk.png */, + ); + path = Resources; + sourceTree = ""; + }; + D9FEF4AA1CCEBC0D0013FBDD = { + isa = PBXGroup; + children = ( + D9FEF4B61CCEBC0D0013FBDD /* Source */, + D9E0667E1CCECAFF00E0D7CB /* Resources */, + D9A11F971D507C7D00348273 /* Supporting Files */, + D9FEF4C21CCEBC0F0013FBDD /* Tests */, + D9FEF4B51CCEBC0D0013FBDD /* Products */, + ); + sourceTree = ""; + }; + D9FEF4B51CCEBC0D0013FBDD /* Products */ = { + isa = PBXGroup; + children = ( + D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */, + D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D9FEF4B61CCEBC0D0013FBDD /* Source */ = { + isa = PBXGroup; + children = ( + D9A11F9D1D50807100348273 /* PROJECT.h */, + D9A11F9B1D50804700348273 /* PROJECT.m */, + ); + path = Source; + sourceTree = ""; + }; + D9FEF4C21CCEBC0F0013FBDD /* Tests */ = { + isa = PBXGroup; + children = ( + D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */, + D9FEF4C51CCEBC100013FBDD /* Info.plist */, + ); + path = Tests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D9FEF4B11CCEBC0D0013FBDD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + D9A11F9E1D50807100348273 /* PROJECT.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D9FEF4B31CCEBC0D0013FBDD /* PROJECT */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECT" */; + buildPhases = ( + D9FEF4AF1CCEBC0D0013FBDD /* Sources */, + D9FEF4B01CCEBC0D0013FBDD /* Frameworks */, + D9FEF4B11CCEBC0D0013FBDD /* Headers */, + D9FEF4B21CCEBC0D0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PROJECT; + productName = "PROJECT"; + productReference = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; + productType = "com.apple.product-type.framework"; + }; + D9FEF4BD1CCEBC0F0013FBDD /* PROJECTTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECTTests" */; + buildPhases = ( + D9FEF4BA1CCEBC0F0013FBDD /* Sources */, + D9FEF4BB1CCEBC0F0013FBDD /* Frameworks */, + D9FEF4BC1CCEBC0F0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */, + ); + name = "PROJECTTests"; + productName = "PROJECTTests"; + productReference = D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D9FEF4AB1CCEBC0D0013FBDD /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "PROJECT_OWNER"; + TargetAttributes = { + D9FEF4B31CCEBC0D0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + D9FEF4BD1CCEBC0F0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "PROJECT" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D9FEF4AA1CCEBC0D0013FBDD; + productRefGroup = D9FEF4B51CCEBC0D0013FBDD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D9FEF4B31CCEBC0D0013FBDD /* PROJECT */, + D9FEF4BD1CCEBC0F0013FBDD /* PROJECTTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D9FEF4B21CCEBC0D0013FBDD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9E066921CCECB3200E0D7CB /* wk.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BC1CCEBC0F0013FBDD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D9FEF4AF1CCEBC0D0013FBDD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9A11F9C1D50804700348273 /* PROJECT.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BA1CCEBC0F0013FBDD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9FEF4C41CCEBC100013FBDD /* PROJECTTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D9FEF4B31CCEBC0D0013FBDD /* PROJECT */; + targetProxy = D9FEF4C01CCEBC0F0013FBDD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + D9FEF4C61CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D9FEF4C71CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D9FEF4C91CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Source/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + D9FEF4CA1CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Source/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + }; + name = Release; + }; + D9FEF4CC1CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECTTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + D9FEF4CD1CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECTTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "PROJECT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C61CCEBC100013FBDD /* Debug */, + D9FEF4C71CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C91CCEBC100013FBDD /* Debug */, + D9FEF4CA1CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECTTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4CC1CCEBC100013FBDD /* Debug */, + D9FEF4CD1CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; +} diff --git a/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 71% rename from templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata index d38d26de..919434a6 100644 --- a/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme similarity index 71% rename from templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme rename to templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme index 11e5b490..3c3b72fb 100644 --- a/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -1,6 +1,6 @@ @@ -26,15 +26,16 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> @@ -42,9 +43,9 @@ @@ -61,16 +62,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -80,16 +80,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/templates/objective-c/PROJECT.xcworkspace/contents.xcworkspacedata b/templates/objective-c/PROJECT.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..7e86864c --- /dev/null +++ b/templates/objective-c/PROJECT.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/templates/objective-c/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme b/templates/objective-c/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme new file mode 100644 index 00000000..f3f8c68e --- /dev/null +++ b/templates/objective-c/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/objective-c/README.md b/templates/objective-c/README.md new file mode 100644 index 00000000..32a2b561 --- /dev/null +++ b/templates/objective-c/README.md @@ -0,0 +1,72 @@ +# PROJECT + +[![CI Status](http://img.shields.io/travis//PROJECT.svg?style=flat)](https://travis-ci.org//PROJECT) +[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Screenshot + + +## Example + +To run the example project, clone the repo, and run `pod install` from the Example directory first. + + +## Requirements + + +## Installation + +### CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: + +```bash +$ gem install cocoapods +``` + +To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +use_frameworks! + +pod 'PROJECT' +``` + +Then, run the following command: + +```bash +$ pod install +``` + + +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate PROJECT into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "/PROJECT" ~> 0.1 +``` + +Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. + + +## Author + +${USER_NAME}, ${USER_EMAIL} + + +## License + +${POD_NAME} is available under the MIT license. See the LICENSE file for more info. diff --git a/templates/objective-c/Resources/wk.png b/templates/objective-c/Resources/wk.png new file mode 100644 index 00000000..8786d743 Binary files /dev/null and b/templates/objective-c/Resources/wk.png differ diff --git a/templates/objective-c/Source/Info.plist b/templates/objective-c/Source/Info.plist new file mode 100644 index 00000000..d3de8eef --- /dev/null +++ b/templates/objective-c/Source/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/templates/objective-c/Source/PROJECT.h b/templates/objective-c/Source/PROJECT.h new file mode 100644 index 00000000..190aa2a8 --- /dev/null +++ b/templates/objective-c/Source/PROJECT.h @@ -0,0 +1,12 @@ +// +// ${POD_NAME}.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +@import UIKit; + +@interface PROJECT : UIView +@end \ No newline at end of file diff --git a/templates/objective-c/Source/PROJECT.m b/templates/objective-c/Source/PROJECT.m new file mode 100644 index 00000000..b29773d8 --- /dev/null +++ b/templates/objective-c/Source/PROJECT.m @@ -0,0 +1,42 @@ +// +// ${POD_NAME}.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +#import "PROJECT.h" + +@implementation PROJECT + +- (instancetype)initWithFrame:(CGRect)frame { + self = [super initWithFrame:frame]; + [self setup]; + return self; +} + +- (instancetype)initWithCoder:(NSCoder *)aDecoder { + self = [super initWithCoder:aDecoder]; + [self setup]; + return self; +} + +- (void)setup { + self.translatesAutoresizingMaskIntoConstraints = NO; + + NSBundle *bundle = [NSBundle bundleForClass:self.class]; + UIImage *image = [UIImage imageNamed:@"wk" inBundle:bundle compatibleWithTraitCollection:nil]; + UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; + [imageView setTranslatesAutoresizingMaskIntoConstraints:NO]; + [self addSubview:imageView]; + + [self addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeWidth relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeWidth multiplier:1 constant:0]]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeHeight relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeHeight multiplier:1 constant:0]]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeTop relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeTop multiplier:1 constant:0]]; + [self addConstraint:[NSLayoutConstraint constraintWithItem:imageView attribute:NSLayoutAttributeLeading relatedBy:NSLayoutRelationEqual toItem:self attribute:NSLayoutAttributeLeading multiplier:1 constant:0]]; + + [self layoutIfNeeded]; +} + +@end \ No newline at end of file diff --git a/templates/objective-c/Tests/Info.plist b/templates/objective-c/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/templates/objective-c/Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/templates/objective-c/Tests/PROJECTTests.swift b/templates/objective-c/Tests/PROJECTTests.swift new file mode 100644 index 00000000..d370bf7b --- /dev/null +++ b/templates/objective-c/Tests/PROJECTTests.swift @@ -0,0 +1,29 @@ +// +// PROJECTTests.swift +// PROJECTTests +// +// Created by PROJECT_OWNER on TODAYS_DATE. +// Copyright © 2016 PROJECT_OWNER. All rights reserved. +// + +import XCTest +@testable import PROJECT + +class PROJECTTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + XCTAssert(true) + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } +} diff --git a/templates/swift/Example/PROJECT.xcodeproj/project.pbxproj b/templates/swift/Example/PROJECT.xcodeproj/project.pbxproj deleted file mode 100644 index 1a4c8ad6..00000000 --- a/templates/swift/Example/PROJECT.xcodeproj/project.pbxproj +++ /dev/null @@ -1,439 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD51AFB9204008FA782 /* AppDelegate.swift */; }; - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACD71AFB9204008FA782 /* ViewController.swift */; }; - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 607FACD91AFB9204008FA782 /* Main.storyboard */; }; - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDC1AFB9204008FA782 /* Images.xcassets */; }; - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */; }; - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 607FACEB1AFB9204008FA782 /* Tests.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 607FACC81AFB9204008FA782 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 607FACCF1AFB9204008FA782; - remoteInfo = "PROJECT"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 607FACD01AFB9204008FA782 /* PROJECT_Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = PROJECT_Example.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACD41AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACD51AFB9204008FA782 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 607FACD71AFB9204008FA782 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; - 607FACDA1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; - 607FACDC1AFB9204008FA782 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - 607FACDF1AFB9204008FA782 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/LaunchScreen.xib; sourceTree = ""; }; - 607FACE51AFB9204008FA782 /* PROJECT_Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PROJECT_Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; - 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 607FACCD1AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE21AFB9204008FA782 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 607FACC71AFB9204008FA782 = { - isa = PBXGroup; - children = ( - 607FACF51AFB993E008FA782 /* Podspec Metadata */, - 607FACD21AFB9204008FA782 /* Example for PROJECT */, - 607FACE81AFB9204008FA782 /* Tests */, - 607FACD11AFB9204008FA782 /* Products */, - ); - sourceTree = ""; - }; - 607FACD11AFB9204008FA782 /* Products */ = { - isa = PBXGroup; - children = ( - 607FACD01AFB9204008FA782 /* PROJECT_Example.app */, - 607FACE51AFB9204008FA782 /* PROJECT_Tests.xctest */, - ); - name = Products; - sourceTree = ""; - }; - 607FACD21AFB9204008FA782 /* Example for PROJECT */ = { - isa = PBXGroup; - children = ( - 607FACD51AFB9204008FA782 /* AppDelegate.swift */, - 607FACD71AFB9204008FA782 /* ViewController.swift */, - 607FACD91AFB9204008FA782 /* Main.storyboard */, - 607FACDC1AFB9204008FA782 /* Images.xcassets */, - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */, - 607FACD31AFB9204008FA782 /* Supporting Files */, - ); - name = "Example for PROJECT"; - path = "PROJECT"; - sourceTree = ""; - }; - 607FACD31AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACD41AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACE81AFB9204008FA782 /* Tests */ = { - isa = PBXGroup; - children = ( - 607FACEB1AFB9204008FA782 /* Tests.swift */, - 607FACE91AFB9204008FA782 /* Supporting Files */, - ); - path = Tests; - sourceTree = ""; - }; - 607FACE91AFB9204008FA782 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 607FACEA1AFB9204008FA782 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; - 607FACF51AFB993E008FA782 /* Podspec Metadata */ = { - isa = PBXGroup; - children = ( - ); - name = "Podspec Metadata"; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 607FACCF1AFB9204008FA782 /* PROJECT_Example */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PROJECT_Example" */; - buildPhases = ( - 607FACCC1AFB9204008FA782 /* Sources */, - 607FACCD1AFB9204008FA782 /* Frameworks */, - 607FACCE1AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "PROJECT_Example"; - productName = "PROJECT"; - productReference = 607FACD01AFB9204008FA782 /* PROJECT_Example.app */; - productType = "com.apple.product-type.application"; - }; - 607FACE41AFB9204008FA782 /* PROJECT_Tests */ = { - isa = PBXNativeTarget; - buildConfigurationList = 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PROJECT_Tests" */; - buildPhases = ( - 607FACE11AFB9204008FA782 /* Sources */, - 607FACE21AFB9204008FA782 /* Frameworks */, - 607FACE31AFB9204008FA782 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 607FACE71AFB9204008FA782 /* PBXTargetDependency */, - ); - name = "PROJECT_Tests"; - productName = Tests; - productReference = 607FACE51AFB9204008FA782 /* PROJECT_Tests.xctest */; - productType = "com.apple.product-type.bundle.unit-test"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 607FACC81AFB9204008FA782 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0720; - ORGANIZATIONNAME = CocoaPods; - TargetAttributes = { - 607FACCF1AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - }; - 607FACE41AFB9204008FA782 = { - CreatedOnToolsVersion = 6.3.1; - TestTargetID = 607FACCF1AFB9204008FA782; - }; - }; - }; - buildConfigurationList = 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PROJECT" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 607FACC71AFB9204008FA782; - productRefGroup = 607FACD11AFB9204008FA782 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 607FACCF1AFB9204008FA782 /* PROJECT_Example */, - 607FACE41AFB9204008FA782 /* PROJECT_Tests */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 607FACCE1AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACDB1AFB9204008FA782 /* Main.storyboard in Resources */, - 607FACE01AFB9204008FA782 /* LaunchScreen.xib in Resources */, - 607FACDD1AFB9204008FA782 /* Images.xcassets in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE31AFB9204008FA782 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 607FACCC1AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACD81AFB9204008FA782 /* ViewController.swift in Sources */, - 607FACD61AFB9204008FA782 /* AppDelegate.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 607FACE11AFB9204008FA782 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 607FACEC1AFB9204008FA782 /* Tests.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 607FACE71AFB9204008FA782 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 607FACCF1AFB9204008FA782 /* PROJECT_Example */; - targetProxy = 607FACE61AFB9204008FA782 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 607FACD91AFB9204008FA782 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 607FACDA1AFB9204008FA782 /* Base */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 607FACDE1AFB9204008FA782 /* LaunchScreen.xib */ = { - isa = PBXVariantGroup; - children = ( - 607FACDF1AFB9204008FA782 /* Base */, - ); - name = LaunchScreen.xib; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 607FACED1AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = iphoneos; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 607FACEE1AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = iphoneos; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - 607FACF01AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "PROJECT/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 607FACF11AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - INFOPLIST_FILE = "PROJECT/Info.plist"; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MODULE_NAME = ExampleApp; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 607FACF31AFB9204008FA782 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 607FACF41AFB9204008FA782 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(SDKROOT)/Developer/Library/Frameworks", - "$(inherited)", - ); - INFOPLIST_FILE = Tests/Info.plist; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 607FACCB1AFB9204008FA782 /* Build configuration list for PBXProject "PROJECT" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACED1AFB9204008FA782 /* Debug */, - 607FACEE1AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACEF1AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PROJECT_Example" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF01AFB9204008FA782 /* Debug */, - 607FACF11AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 607FACF21AFB9204008FA782 /* Build configuration list for PBXNativeTarget "PROJECT_Tests" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 607FACF31AFB9204008FA782 /* Debug */, - 607FACF41AFB9204008FA782 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 607FACC81AFB9204008FA782 /* Project object */; -} diff --git a/templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib b/templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib deleted file mode 100644 index 5b3d2cc1..00000000 --- a/templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/swift/Example/PROJECT/Base.lproj/Main.storyboard b/templates/swift/Example/PROJECT/Base.lproj/Main.storyboard deleted file mode 100644 index 52ea29eb..00000000 --- a/templates/swift/Example/PROJECT/Base.lproj/Main.storyboard +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/swift/Example/PROJECT/ViewController.swift b/templates/swift/Example/PROJECT/ViewController.swift deleted file mode 100644 index 415a0401..00000000 --- a/templates/swift/Example/PROJECT/ViewController.swift +++ /dev/null @@ -1,24 +0,0 @@ -// -// ViewController.swift -// PROJECT -// -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. -// - -import UIKit - -class ViewController: UIViewController { - - override func viewDidLoad() { - super.viewDidLoad() - // Do any additional setup after loading the view, typically from a nib. - } - - override func didReceiveMemoryWarning() { - super.didReceiveMemoryWarning() - // Dispose of any resources that can be recreated. - } - -} - diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index f3abfead..57bc4d36 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -1,11 +1,10 @@ use_frameworks! -target '${POD_NAME}_Example' do +target 'iOS Example' do pod '${POD_NAME}', :path => '../' - target '${POD_NAME}_Tests' do + target 'Tests' do inherit! :search_paths - ${INCLUDED_PODS} end end diff --git a/templates/swift/Example/Source/AppDelegate.swift b/templates/swift/Example/Source/AppDelegate.swift new file mode 100644 index 00000000..91b22822 --- /dev/null +++ b/templates/swift/Example/Source/AppDelegate.swift @@ -0,0 +1,45 @@ +// +// AppDelegate.swift +// PROJECT iOS +// +// Created by PROJECT_OWNER on TODAYS_DATE. +// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. +// + +import UIKit + +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + + var window: UIWindow? + + + func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { + // Override point for customization after application launch. + return true + } + + func applicationWillResignActive(application: UIApplication) { + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. + // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. + } + + func applicationDidEnterBackground(application: UIApplication) { + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. + } + + func applicationWillEnterForeground(application: UIApplication) { + // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. + } + + func applicationDidBecomeActive(application: UIApplication) { + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. + } + + func applicationWillTerminate(application: UIApplication) { + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. + } + + +} diff --git a/templates/swift/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json b/templates/swift/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..eeea76c2 --- /dev/null +++ b/templates/swift/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,73 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "29x29", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "40x40", + "scale" : "3x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "60x60", + "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/templates/swift/Example/Source/Assets.xcassets/Contents.json b/templates/swift/Example/Source/Assets.xcassets/Contents.json new file mode 100644 index 00000000..da4a164c --- /dev/null +++ b/templates/swift/Example/Source/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard new file mode 100644 index 00000000..221ca492 --- /dev/null +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/swift/Example/Source/Base.lproj/Main.storyboard b/templates/swift/Example/Source/Base.lproj/Main.storyboard new file mode 100644 index 00000000..e4d1b0f7 --- /dev/null +++ b/templates/swift/Example/Source/Base.lproj/Main.storyboard @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/swift/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/swift/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 54% rename from templates/swift/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/swift/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json index 118c98f7..36d2c80d 100644 --- a/templates/swift/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/templates/swift/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json @@ -29,6 +29,36 @@ "idiom" : "iphone", "size" : "60x60", "scale" : "3x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "29x29", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "40x40", + "scale" : "2x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "76x76", + "scale" : "2x" } ], "info" : { diff --git a/templates/swift/Example/PROJECT/Info.plist b/templates/swift/Example/Source/Info.plist similarity index 76% rename from templates/swift/Example/PROJECT/Info.plist rename to templates/swift/Example/Source/Info.plist index eb18faac..40c6215d 100644 --- a/templates/swift/Example/PROJECT/Info.plist +++ b/templates/swift/Example/Source/Info.plist @@ -34,6 +34,14 @@ UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight diff --git a/templates/swift/Example/Source/ViewController.swift b/templates/swift/Example/Source/ViewController.swift new file mode 100644 index 00000000..065aa9f8 --- /dev/null +++ b/templates/swift/Example/Source/ViewController.swift @@ -0,0 +1,18 @@ +// +// ViewController.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +import UIKit +import PROJECT + +class ViewController: UIViewController { + @IBOutlet var theView: PROJECT! + + override func viewDidLoad() { + super.viewDidLoad() + } +} diff --git a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj new file mode 100644 index 00000000..5a9c8649 --- /dev/null +++ b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj @@ -0,0 +1,487 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D904BBC31CDD3F170083BD78 /* Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D904BBC21CDD3F170083BD78 /* Tests.swift */; }; + D94BE1BF1CCEBF2C0042282A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1BE1CCEBF2C0042282A /* ViewController.swift */; }; + D94BE1C21CCEBF2C0042282A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D94BE1C01CCEBF2C0042282A /* Main.storyboard */; }; + D94BE1C41CCEBF2C0042282A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D94BE1C31CCEBF2C0042282A /* Assets.xcassets */; }; + D94BE1D31CCEC1730042282A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1D21CCEC1730042282A /* AppDelegate.swift */; }; + D99B39051CD68FF400E56AE2 /* PROJECT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* PROJECT.framework */; }; + D99B39091CD6907300E56AE2 /* PROJECT.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* PROJECT.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D9CBAE971CCEC4ED006EC128 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D904BBC51CDD3F170083BD78 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D94BE1B11CCEBF2C0042282A /* Project object */; + proxyType = 1; + remoteGlobalIDString = D94BE1B81CCEBF2C0042282A; + remoteInfo = "iOS Example"; + }; + D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4B41CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; + D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4BE1CCEBC0F0013FBDD; + remoteInfo = "PROJECTTests"; + }; + D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D99B39081CD6904E00E56AE2 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D99B39091CD6907300E56AE2 /* PROJECT.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + D904BBC01CDD3F170083BD78 /* Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Tests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D904BBC21CDD3F170083BD78 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; + D904BBC41CDD3F170083BD78 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D94BE1B91CCEBF2C0042282A /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + D94BE1BE1CCEBF2C0042282A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; + D94BE1C11CCEBF2C0042282A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + D94BE1C31CCEBF2C0042282A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Source/Assets.xcassets; sourceTree = ""; }; + D94BE1C81CCEBF2C0042282A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = ""; }; + D94BE1D21CCEC1730042282A /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = PROJECT.xcodeproj; path = ../PROJECT.xcodeproj; sourceTree = ""; }; + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "Source/Base.lproj/Launch Screen.storyboard"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D904BBBD1CDD3F170083BD78 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B61CCEBF2C0042282A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D99B39051CD68FF400E56AE2 /* PROJECT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D904BBC11CDD3F170083BD78 /* Tests */ = { + isa = PBXGroup; + children = ( + D904BBC21CDD3F170083BD78 /* Tests.swift */, + D904BBC41CDD3F170083BD78 /* Info.plist */, + ); + path = Tests; + sourceTree = ""; + }; + D94BE1B01CCEBF2C0042282A = { + isa = PBXGroup; + children = ( + D94BE1BB1CCEBF2C0042282A /* Source */, + D9A11F981D507CB500348273 /* Supporting Files */, + D904BBC11CDD3F170083BD78 /* Tests */, + D94BE1BA1CCEBF2C0042282A /* Products */, + D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */, + ); + sourceTree = ""; + }; + D94BE1BA1CCEBF2C0042282A /* Products */ = { + isa = PBXGroup; + children = ( + D94BE1B91CCEBF2C0042282A /* iOS Example.app */, + D904BBC01CDD3F170083BD78 /* Tests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D94BE1BB1CCEBF2C0042282A /* Source */ = { + isa = PBXGroup; + children = ( + D94BE1D21CCEC1730042282A /* AppDelegate.swift */, + D94BE1BE1CCEBF2C0042282A /* ViewController.swift */, + ); + path = Source; + sourceTree = ""; + }; + D99B38FC1CD68FD900E56AE2 /* Products */ = { + isa = PBXGroup; + children = ( + D99B39011CD68FD900E56AE2 /* PROJECT.framework */, + D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D9A11F981D507CB500348273 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */, + D94BE1C01CCEBF2C0042282A /* Main.storyboard */, + D94BE1C31CCEBF2C0042282A /* Assets.xcassets */, + D94BE1C81CCEBF2C0042282A /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + D904BBBF1CDD3F170083BD78 /* Tests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D904BBCA1CDD3F170083BD78 /* Build configuration list for PBXNativeTarget "Tests" */; + buildPhases = ( + D904BBBC1CDD3F170083BD78 /* Sources */, + D904BBBD1CDD3F170083BD78 /* Frameworks */, + D904BBBE1CDD3F170083BD78 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D904BBC61CDD3F170083BD78 /* PBXTargetDependency */, + ); + name = Tests; + productName = Tests; + productReference = D904BBC01CDD3F170083BD78 /* Tests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + D94BE1B81CCEBF2C0042282A /* iOS Example */ = { + isa = PBXNativeTarget; + buildConfigurationList = D94BE1CB1CCEBF2C0042282A /* Build configuration list for PBXNativeTarget "iOS Example" */; + buildPhases = ( + D94BE1B51CCEBF2C0042282A /* Sources */, + D94BE1B61CCEBF2C0042282A /* Frameworks */, + D94BE1B71CCEBF2C0042282A /* Resources */, + D99B39081CD6904E00E56AE2 /* Copy Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + D99B39071CD6903C00E56AE2 /* PBXTargetDependency */, + ); + name = "iOS Example"; + productName = "PROJECT iOS"; + productReference = D94BE1B91CCEBF2C0042282A /* iOS Example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D94BE1B11CCEBF2C0042282A /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "PROJECT_OWNER"; + TargetAttributes = { + D904BBBF1CDD3F170083BD78 = { + CreatedOnToolsVersion = 7.3.1; + TestTargetID = D94BE1B81CCEBF2C0042282A; + }; + D94BE1B81CCEBF2C0042282A = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = D94BE1B01CCEBF2C0042282A; + productRefGroup = D94BE1BA1CCEBF2C0042282A /* Products */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = D99B38FC1CD68FD900E56AE2 /* Products */; + ProjectRef = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + D94BE1B81CCEBF2C0042282A /* iOS Example */, + D904BBBF1CDD3F170083BD78 /* Tests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + D99B39011CD68FD900E56AE2 /* PROJECT.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = "PROJECT.framework"; + remoteRef = D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = "PROJECTTests.xctest"; + remoteRef = D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + D904BBBE1CDD3F170083BD78 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B71CCEBF2C0042282A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9CBAE971CCEC4ED006EC128 /* Launch Screen.storyboard in Resources */, + D94BE1C41CCEBF2C0042282A /* Assets.xcassets in Resources */, + D94BE1C21CCEBF2C0042282A /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D904BBBC1CDD3F170083BD78 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D904BBC31CDD3F170083BD78 /* Tests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D94BE1B51CCEBF2C0042282A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D94BE1D31CCEC1730042282A /* AppDelegate.swift in Sources */, + D94BE1BF1CCEBF2C0042282A /* ViewController.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D904BBC61CDD3F170083BD78 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D94BE1B81CCEBF2C0042282A /* iOS Example */; + targetProxy = D904BBC51CDD3F170083BD78 /* PBXContainerItemProxy */; + }; + D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = "PROJECT"; + targetProxy = D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D94BE1C01CCEBF2C0042282A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D94BE1C11CCEBF2C0042282A /* Base */, + ); + name = Main.storyboard; + path = Source; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + D904BBC71CDD3F170083BD78 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example"; + }; + name = Debug; + }; + D904BBC81CDD3F170083BD78 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.Tests; + PRODUCT_NAME = "$(TARGET_NAME)"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/iOS Example.app/iOS Example"; + }; + name = Release; + }; + D94BE1C91CCEBF2C0042282A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + D94BE1CA1CCEBF2C0042282A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + D94BE1CC1CCEBF2C0042282A /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.phor.PROJECT.PROJECT-iOS"; + PRODUCT_NAME = "iOS Example"; + }; + name = Debug; + }; + D94BE1CD1CCEBF2C0042282A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Source/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "net.phor.PROJECT.PROJECT-iOS"; + PRODUCT_NAME = "iOS Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D904BBCA1CDD3F170083BD78 /* Build configuration list for PBXNativeTarget "Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D904BBC71CDD3F170083BD78 /* Debug */, + D904BBC81CDD3F170083BD78 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D94BE1C91CCEBF2C0042282A /* Debug */, + D94BE1CA1CCEBF2C0042282A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D94BE1CB1CCEBF2C0042282A /* Build configuration list for PBXNativeTarget "iOS Example" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D94BE1CC1CCEBF2C0042282A /* Debug */, + D94BE1CD1CCEBF2C0042282A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D94BE1B11CCEBF2C0042282A /* Project object */; +} diff --git a/templates/swift/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/swift/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..bfe77a2a --- /dev/null +++ b/templates/swift/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/templates/swift/LICENSE b/templates/swift/LICENSE new file mode 100644 index 00000000..80fd3df0 --- /dev/null +++ b/templates/swift/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2016 PROJECT_OWNER + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/templates/swift/PROJECT.podspec b/templates/swift/PROJECT.podspec new file mode 100644 index 00000000..9e4a1b40 --- /dev/null +++ b/templates/swift/PROJECT.podspec @@ -0,0 +1,25 @@ +Pod::Spec.new do |s| + s.name = '${POD_NAME}' + s.version = '0.1.0' + s.license = { :type => 'MIT', :file => 'LICENSE' } + s.summary = 'A short description of ${POD_NAME}.' + +# This description is used to generate tags and improve search results. +# * Think: What does it do? Why did you write it? What is the focus? +# * Try to keep it short, snappy and to the point. +# * Write the description between the DESC delimiters below. +# * Finally, don't worry about the indent, CocoaPods strips it! + + s.description = <<-DESC + TODO: Add long description of the pod here. + DESC + + s.homepage = 'https://github.com//${POD_NAME}' + s.authors = { 'PROJECT_OWNER' => 'USER_EMAIL' } + s.source = { :git => 'https://github.com//PROJECT.git', :tag => s.version } + s.ios.deployment_target = '8.0' + s.source_files = 'Source/*.swift' + s.resource_bundles = { + 'PROJECT' => ['Resources/**/*.{png}'] + } +end diff --git a/templates/swift/PROJECT.xcodeproj/project.pbxproj b/templates/swift/PROJECT.xcodeproj/project.pbxproj new file mode 100644 index 00000000..ad3b32f6 --- /dev/null +++ b/templates/swift/PROJECT.xcodeproj/project.pbxproj @@ -0,0 +1,424 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D94BE1CF1CCEBFD80042282A /* PROJECT.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1CE1CCEBFD80042282A /* PROJECT.swift */; }; + D9E066921CCECB3200E0D7CB /* wk.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066861CCECB3200E0D7CB /* wk.png */; }; + D9FEF4BF1CCEBC0F0013FBDD /* PROJECT.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; }; + D9FEF4C41CCEBC100013FBDD /* PROJECTTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D9FEF4C01CCEBC0F0013FBDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = "PROJECT"; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D94BE1CE1CCEBFD80042282A /* PROJECT.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PROJECT.swift; sourceTree = ""; }; + D9E066861CCECB3200E0D7CB /* wk.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wk.png; sourceTree = ""; }; + D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PROJECT.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Source/Info.plist; sourceTree = ""; }; + D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PROJECTTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PROJECTTests.swift; sourceTree = ""; }; + D9FEF4C51CCEBC100013FBDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D9FEF4B01CCEBC0D0013FBDD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BB1CCEBC0F0013FBDD /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D9FEF4BF1CCEBC0F0013FBDD /* PROJECT.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D9A11F971D507C7D00348273 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; + D9E0667E1CCECAFF00E0D7CB /* Resources */ = { + isa = PBXGroup; + children = ( + D9E066861CCECB3200E0D7CB /* wk.png */, + ); + path = Resources; + sourceTree = ""; + }; + D9FEF4AA1CCEBC0D0013FBDD = { + isa = PBXGroup; + children = ( + D9FEF4B61CCEBC0D0013FBDD /* Source */, + D9E0667E1CCECAFF00E0D7CB /* Resources */, + D9A11F971D507C7D00348273 /* Supporting Files */, + D9FEF4C21CCEBC0F0013FBDD /* Tests */, + D9FEF4B51CCEBC0D0013FBDD /* Products */, + ); + sourceTree = ""; + }; + D9FEF4B51CCEBC0D0013FBDD /* Products */ = { + isa = PBXGroup; + children = ( + D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */, + D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D9FEF4B61CCEBC0D0013FBDD /* Source */ = { + isa = PBXGroup; + children = ( + D94BE1CE1CCEBFD80042282A /* PROJECT.swift */, + ); + path = Source; + sourceTree = ""; + }; + D9FEF4C21CCEBC0F0013FBDD /* Tests */ = { + isa = PBXGroup; + children = ( + D9FEF4C31CCEBC100013FBDD /* PROJECTTests.swift */, + D9FEF4C51CCEBC100013FBDD /* Info.plist */, + ); + path = Tests; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + D9FEF4B11CCEBC0D0013FBDD /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + D9FEF4B31CCEBC0D0013FBDD /* PROJECT */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECT" */; + buildPhases = ( + D9FEF4AF1CCEBC0D0013FBDD /* Sources */, + D9FEF4B01CCEBC0D0013FBDD /* Frameworks */, + D9FEF4B11CCEBC0D0013FBDD /* Headers */, + D9FEF4B21CCEBC0D0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = "PROJECT"; + productName = "PROJECT"; + productReference = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; + productType = "com.apple.product-type.framework"; + }; + D9FEF4BD1CCEBC0F0013FBDD /* PROJECTTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECTTests" */; + buildPhases = ( + D9FEF4BA1CCEBC0F0013FBDD /* Sources */, + D9FEF4BB1CCEBC0F0013FBDD /* Frameworks */, + D9FEF4BC1CCEBC0F0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */, + ); + name = "PROJECTTests"; + productName = "PROJECTTests"; + productReference = D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + D9FEF4AB1CCEBC0D0013FBDD /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0730; + LastUpgradeCheck = 0730; + ORGANIZATIONNAME = "PROJECT_OWNER"; + TargetAttributes = { + D9FEF4B31CCEBC0D0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + D9FEF4BD1CCEBC0F0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "PROJECT" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D9FEF4AA1CCEBC0D0013FBDD; + productRefGroup = D9FEF4B51CCEBC0D0013FBDD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D9FEF4B31CCEBC0D0013FBDD /* PROJECT */, + D9FEF4BD1CCEBC0F0013FBDD /* PROJECTTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D9FEF4B21CCEBC0D0013FBDD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9E066921CCECB3200E0D7CB /* wk.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BC1CCEBC0F0013FBDD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + D9FEF4AF1CCEBC0D0013FBDD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D94BE1CF1CCEBFD80042282A /* PROJECT.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BA1CCEBC0F0013FBDD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9FEF4C41CCEBC100013FBDD /* PROJECTTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D9FEF4B31CCEBC0D0013FBDD /* PROJECT */; + targetProxy = D9FEF4C01CCEBC0F0013FBDD /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + D9FEF4C61CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + D9FEF4C71CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D9FEF4C91CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Source/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + D9FEF4CA1CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = Source/Info.plist; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECT; + PRODUCT_NAME = "$(TARGET_NAME)"; + SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; + D9FEF4CC1CCEBC100013FBDD /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECTTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Debug; + }; + D9FEF4CD1CCEBC100013FBDD /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = "$(SRCROOT)/**"; + INFOPLIST_FILE = Tests/Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECTTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 3.0; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "PROJECT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C61CCEBC100013FBDD /* Debug */, + D9FEF4C71CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECT" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C91CCEBC100013FBDD /* Debug */, + D9FEF4CA1CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "PROJECTTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4CC1CCEBC100013FBDD /* Debug */, + D9FEF4CD1CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; +} diff --git a/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 71% rename from templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/swift/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata index d38d26de..919434a6 100644 --- a/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/templates/swift/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme similarity index 61% rename from templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme rename to templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme index f5a56f3e..3c3b72fb 100644 --- a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -1,6 +1,6 @@ - - - - @@ -40,15 +26,16 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> @@ -56,9 +43,9 @@ @@ -75,16 +62,15 @@ debugDocumentVersioning = "YES" debugServiceExtension = "internal" allowLocationSimulation = "YES"> - + - + @@ -94,16 +80,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> - + - + diff --git a/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..7e86864c --- /dev/null +++ b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme b/templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme new file mode 100644 index 00000000..f3f8c68e --- /dev/null +++ b/templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/swift/README.md b/templates/swift/README.md new file mode 100644 index 00000000..32a2b561 --- /dev/null +++ b/templates/swift/README.md @@ -0,0 +1,72 @@ +# PROJECT + +[![CI Status](http://img.shields.io/travis//PROJECT.svg?style=flat)](https://travis-ci.org//PROJECT) +[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](https://cocoapods.org/pods/PROJECT) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + +Screenshot + + +## Example + +To run the example project, clone the repo, and run `pod install` from the Example directory first. + + +## Requirements + + +## Installation + +### CocoaPods + +[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command: + +```bash +$ gem install cocoapods +``` + +To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +use_frameworks! + +pod 'PROJECT' +``` + +Then, run the following command: + +```bash +$ pod install +``` + + +### Carthage + +[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. + +You can install Carthage with [Homebrew](http://brew.sh/) using the following command: + +```bash +$ brew update +$ brew install carthage +``` + +To integrate PROJECT into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "/PROJECT" ~> 0.1 +``` + +Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. + + +## Author + +${USER_NAME}, ${USER_EMAIL} + + +## License + +${POD_NAME} is available under the MIT license. See the LICENSE file for more info. diff --git a/templates/swift/Resources/wk.png b/templates/swift/Resources/wk.png new file mode 100644 index 00000000..8786d743 Binary files /dev/null and b/templates/swift/Resources/wk.png differ diff --git a/templates/swift/Source/Info.plist b/templates/swift/Source/Info.plist new file mode 100644 index 00000000..d3de8eef --- /dev/null +++ b/templates/swift/Source/Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + $(CURRENT_PROJECT_VERSION) + NSPrincipalClass + + + diff --git a/templates/swift/Source/PROJECT.h b/templates/swift/Source/PROJECT.h new file mode 100644 index 00000000..b1df71db --- /dev/null +++ b/templates/swift/Source/PROJECT.h @@ -0,0 +1,12 @@ +// +// ${POD_NAME}.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +@import Foundation; + +FOUNDATION_EXPORT double ${POD_NAME}VersionNumber; +FOUNDATION_EXPORT const unsigned char ${POD_NAME}VersionString[]; diff --git a/templates/swift/Source/PROJECT.swift b/templates/swift/Source/PROJECT.swift new file mode 100644 index 00000000..0c362193 --- /dev/null +++ b/templates/swift/Source/PROJECT.swift @@ -0,0 +1,38 @@ +// +// ${POD_NAME}.swift +// ${POD_NAME} +// +// Created by ${USER_NAME} on ${DATE}. +// Copyright © ${YEAR} ${USER_NAME}. All rights reserved. +// + +import Foundation +import UIKit + +open class PROJECT: UIView { + public override init(frame: CGRect) { + super.init(frame: frame) + setup() + } + + required public init?(coder aDecoder: NSCoder) { + super.init(coder: aDecoder) + setup() + } + + func setup() { + self.translatesAutoresizingMaskIntoConstraints = false + + let bundle = Bundle(for: type(of: self)) + let image = UIImage(named: "wk", in: bundle, compatibleWith: nil) + let imageView = UIImageView(image: image) + imageView.translatesAutoresizingMaskIntoConstraints = false + self.addSubview(imageView) + + self.addConstraint(NSLayoutConstraint(item: imageView, attribute: .width, relatedBy: .equal, toItem: self, attribute: .width, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: imageView, attribute: .height, relatedBy: .equal, toItem: self, attribute: .height, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: imageView, attribute: .top, relatedBy: .equal, toItem: self, attribute: .top, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: imageView, attribute: .leading, relatedBy: .equal, toItem: self, attribute: .leading, multiplier: 1, constant: 0)) + self.layoutIfNeeded() + } +} diff --git a/templates/swift/Tests/Info.plist b/templates/swift/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/templates/swift/Tests/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + + diff --git a/templates/swift/Tests/PROJECTTests.swift b/templates/swift/Tests/PROJECTTests.swift new file mode 100644 index 00000000..d370bf7b --- /dev/null +++ b/templates/swift/Tests/PROJECTTests.swift @@ -0,0 +1,29 @@ +// +// PROJECTTests.swift +// PROJECTTests +// +// Created by PROJECT_OWNER on TODAYS_DATE. +// Copyright © 2016 PROJECT_OWNER. All rights reserved. +// + +import XCTest +@testable import PROJECT + +class PROJECTTests: XCTestCase { + + override func setUp() { + super.setUp() + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDown() { + // Put teardown code here. This method is called after the invocation of each test method in the class. + super.tearDown() + } + + func testExample() { + XCTAssert(true) + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct results. + } +} diff --git a/setup/test_examples/kiwi.m b/templates/test_examples/kiwi.m similarity index 95% rename from setup/test_examples/kiwi.m rename to templates/test_examples/kiwi.m index 04a59982..20bd25c8 100644 --- a/setup/test_examples/kiwi.m +++ b/templates/test_examples/kiwi.m @@ -13,7 +13,7 @@ it(@"can read", ^{ [[@"number" should] equal:@"string"]; }); - + it(@"will wait and fail", ^{ NSObject *object = [[NSObject alloc] init]; [[expectFutureValue(object) shouldEventually] receive:@selector(autoContentAccessingProxy)]; @@ -21,16 +21,16 @@ }); context(@"will pass", ^{ - + it(@"can do maths", ^{ [[@1 should] beLessThan:@23]; }); - + it(@"can read", ^{ [[@"team" shouldNot] containString:@"I"]; - }); + }); }); - + }); SPEC_END diff --git a/setup/test_examples/quick.swift b/templates/test_examples/quick.swift similarity index 98% rename from setup/test_examples/quick.swift rename to templates/test_examples/quick.swift index c8e6e1d9..0ef7bb6c 100644 --- a/setup/test_examples/quick.swift +++ b/templates/test_examples/quick.swift @@ -19,7 +19,7 @@ class TableOfContentsSpec: QuickSpec { it("will eventually fail") { expect("time").toEventually( equal("done") ) } - + context("these will pass") { it("can do maths") { diff --git a/setup/test_examples/specta.m b/templates/test_examples/specta.m similarity index 95% rename from setup/test_examples/specta.m rename to templates/test_examples/specta.m index 507139b8..5295b716 100644 --- a/setup/test_examples/specta.m +++ b/templates/test_examples/specta.m @@ -11,24 +11,24 @@ it(@"can read", ^{ expect(@"number").to.equal(@"string"); }); - + it(@"will wait for 10 seconds and fail", ^{ waitUntil(^(DoneCallback done) { - + }); }); }); describe(@"these will pass", ^{ - + it(@"can do maths", ^{ expect(1).beLessThan(23); }); - + it(@"can read", ^{ expect(@"team").toNot.contain(@"I"); }); - + it(@"will wait and succeed", ^{ waitUntil(^(DoneCallback done) { done(); diff --git a/setup/test_examples/xctest.m b/templates/test_examples/xctest.m similarity index 100% rename from setup/test_examples/xctest.m rename to templates/test_examples/xctest.m diff --git a/setup/test_examples/xctest.swift b/templates/test_examples/xctest.swift similarity index 96% rename from setup/test_examples/xctest.swift rename to templates/test_examples/xctest.swift index 4a44d3ee..388a5a74 100644 --- a/setup/test_examples/xctest.swift +++ b/templates/test_examples/xctest.swift @@ -3,27 +3,27 @@ import XCTest import PROJECT class Tests: XCTestCase { - + override func setUp() { super.setUp() // Put setup code here. This method is called before the invocation of each test method in the class. } - + override func tearDown() { // Put teardown code here. This method is called after the invocation of each test method in the class. super.tearDown() } - + func testExample() { // This is an example of a functional test case. XCTAssert(true, "Pass") } - + func testPerformanceExample() { // This is an example of a performance test case. self.measureBlock() { // Put the code you want to measure the time of here. } } - + }