From fee6176bec29646e0aed45625cb4541f085a2941 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Sat, 14 Nov 2015 14:18:35 -0500 Subject: [PATCH 01/62] =?UTF-8?q?Use=20past=20participle=20=E2=80=9Crun?= =?UTF-8?q?=E2=80=9D=20instead=20of=20past=20tense=20=E2=80=9Cran=E2=80=9D?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 88918a86..3fc9b0f8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ There are two reasons for wanting to work on this template, making your own or i ## Best practices -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. +The command `pod lib create` aims to be run 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. From 9e04ab794ba036c938c159607542036049bc6638 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Sat, 14 Nov 2015 14:58:55 -0500 Subject: [PATCH 02/62] Enable gathering coverage data on example project. It may seem like this changes more lines than it needs to, but this is everything that Xcode 7.1.1 changed when I checked the coverage box, and it appears that none of it can be left out for the box to stay checked. --- .../PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme | 1 + .../PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme | 1 + 2 files changed, 2 insertions(+) diff --git a/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme index 11e5b490..4f010b83 100644 --- a/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -27,6 +27,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + codeCoverageEnabled = "YES"> diff --git a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme index f5a56f3e..d1abcd83 100644 --- a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -41,6 +41,7 @@ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + codeCoverageEnabled = "YES"> From 748bde41f1b9f82ac386975970b3db9eac550e17 Mon Sep 17 00:00:00 2001 From: Zev Eisenberg Date: Sat, 21 Nov 2015 22:56:59 -0500 Subject: [PATCH 03/62] Add post_install scripts to support gathering code coverage data. --- templates/ios/Example/Podfile | 24 ++++++++++++++++++++++++ templates/swift/Example/Podfile | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/templates/ios/Example/Podfile b/templates/ios/Example/Podfile index fc61b173..cd9f4e10 100644 --- a/templates/ios/Example/Podfile +++ b/templates/ios/Example/Podfile @@ -9,3 +9,27 @@ target '${POD_NAME}_Tests', :exclusive => true do ${INCLUDED_PODS} end + +# Add ${POD_NAME} target to build step of the example project +# so that we get code coverage reports for ${POD_NAME} +post_install do |installer| + # get ${POD_NAME} target from Pods project + pods_project = installer.pods_project + pods_targets = pods_project.targets + pod_target = pods_targets.select { |target| target.name == "${POD_NAME}" }.uniq.first + + # get example project scheme + example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first + example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) + example_scheme_filename = "${POD_NAME}-Example.xcscheme" + example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) + + # create a build action that points to the pod target + pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target + + # add the pod build action to the example project's build actions + example_build_action = example_scheme.build_action + example_build_action.add_entry(pod_build_action_entry) + + example_scheme.save! +end diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index fc61b173..cd9f4e10 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -9,3 +9,27 @@ target '${POD_NAME}_Tests', :exclusive => true do ${INCLUDED_PODS} end + +# Add ${POD_NAME} target to build step of the example project +# so that we get code coverage reports for ${POD_NAME} +post_install do |installer| + # get ${POD_NAME} target from Pods project + pods_project = installer.pods_project + pods_targets = pods_project.targets + pod_target = pods_targets.select { |target| target.name == "${POD_NAME}" }.uniq.first + + # get example project scheme + example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first + example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) + example_scheme_filename = "${POD_NAME}-Example.xcscheme" + example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) + + # create a build action that points to the pod target + pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target + + # add the pod build action to the example project's build actions + example_build_action = example_scheme.build_action + example_build_action.add_entry(pod_build_action_entry) + + example_scheme.save! +end From f539662be0d690f63d99e4dd8bb17c5971f3c1cc Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Mon, 2 May 2016 07:06:54 +0100 Subject: [PATCH 04/62] Move the work for setting up the code coverage into a separate file --- templates/ios/Example/Podfile | 23 +++---------------- .../ios/Example/Tests/setup_code_coverage.rb | 23 +++++++++++++++++++ templates/swift/Example/Podfile | 23 +++---------------- .../Example/Tests/setup_code_coverage.rb | 23 +++++++++++++++++++ 4 files changed, 52 insertions(+), 40 deletions(-) create mode 100644 templates/ios/Example/Tests/setup_code_coverage.rb create mode 100644 templates/swift/Example/Tests/setup_code_coverage.rb diff --git a/templates/ios/Example/Podfile b/templates/ios/Example/Podfile index cd9f4e10..34b183d6 100644 --- a/templates/ios/Example/Podfile +++ b/templates/ios/Example/Podfile @@ -10,26 +10,9 @@ target '${POD_NAME}_Tests', :exclusive => true do ${INCLUDED_PODS} end -# Add ${POD_NAME} target to build step of the example project +# Add a ${POD_NAME} target to the build steps of the example project # so that we get code coverage reports for ${POD_NAME} post_install do |installer| - # get ${POD_NAME} target from Pods project - pods_project = installer.pods_project - pods_targets = pods_project.targets - pod_target = pods_targets.select { |target| target.name == "${POD_NAME}" }.uniq.first - - # get example project scheme - example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first - example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) - example_scheme_filename = "${POD_NAME}-Example.xcscheme" - example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) - - # create a build action that points to the pod target - pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target - - # add the pod build action to the example project's build actions - example_build_action = example_scheme.build_action - example_build_action.add_entry(pod_build_action_entry) - - example_scheme.save! + require_relative "Tests/setup_code_coverage.rb" + enable_code_coverage "${POD_NAME}", installer end diff --git a/templates/ios/Example/Tests/setup_code_coverage.rb b/templates/ios/Example/Tests/setup_code_coverage.rb new file mode 100644 index 00000000..60ae4152 --- /dev/null +++ b/templates/ios/Example/Tests/setup_code_coverage.rb @@ -0,0 +1,23 @@ +# Keeps the Podfile simple and to the point + +def enable_code_coverage(name, installer) + # get the library's target from Pods project + pods_project = installer.pods_project + pods_targets = pods_project.targets + pod_target = pods_targets.find { |target| target.name == name } + + # get the example's project scheme + example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first + example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) + example_scheme_filename = "#{name}-Example.xcscheme" + example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) + + # create a build action that points to the pod target + pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target + + # add the pod build action to the example project's build actions + example_build_action = example_scheme.build_action + example_build_action.add_entry(pod_build_action_entry) + + example_scheme.save! +end diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index cd9f4e10..34b183d6 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -10,26 +10,9 @@ target '${POD_NAME}_Tests', :exclusive => true do ${INCLUDED_PODS} end -# Add ${POD_NAME} target to build step of the example project +# Add a ${POD_NAME} target to the build steps of the example project # so that we get code coverage reports for ${POD_NAME} post_install do |installer| - # get ${POD_NAME} target from Pods project - pods_project = installer.pods_project - pods_targets = pods_project.targets - pod_target = pods_targets.select { |target| target.name == "${POD_NAME}" }.uniq.first - - # get example project scheme - example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first - example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) - example_scheme_filename = "${POD_NAME}-Example.xcscheme" - example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) - - # create a build action that points to the pod target - pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target - - # add the pod build action to the example project's build actions - example_build_action = example_scheme.build_action - example_build_action.add_entry(pod_build_action_entry) - - example_scheme.save! + require_relative "Tests/setup_code_coverage.rb" + enable_code_coverage "${POD_NAME}", installer end diff --git a/templates/swift/Example/Tests/setup_code_coverage.rb b/templates/swift/Example/Tests/setup_code_coverage.rb new file mode 100644 index 00000000..60ae4152 --- /dev/null +++ b/templates/swift/Example/Tests/setup_code_coverage.rb @@ -0,0 +1,23 @@ +# Keeps the Podfile simple and to the point + +def enable_code_coverage(name, installer) + # get the library's target from Pods project + pods_project = installer.pods_project + pods_targets = pods_project.targets + pod_target = pods_targets.find { |target| target.name == name } + + # get the example's project scheme + example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first + example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) + example_scheme_filename = "#{name}-Example.xcscheme" + example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) + + # create a build action that points to the pod target + pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target + + # add the pod build action to the example project's build actions + example_build_action = example_scheme.build_action + example_build_action.add_entry(pod_build_action_entry) + + example_scheme.save! +end From 51a3558bc48e79606cb9362ce87f07887d821d9a Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sun, 1 May 2016 17:59:21 -0400 Subject: [PATCH 05/62] Follow CocoaPods migration per http://blog.cocoapods.org/CocoaPods-1.0/ --- templates/ios/Example/Podfile | 2 +- templates/swift/Example/Podfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/ios/Example/Podfile b/templates/ios/Example/Podfile index f3abfead..905ff0b9 100644 --- a/templates/ios/Example/Podfile +++ b/templates/ios/Example/Podfile @@ -1,3 +1,4 @@ +source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target '${POD_NAME}_Example' do @@ -5,7 +6,6 @@ target '${POD_NAME}_Example' do target '${POD_NAME}_Tests' do inherit! :search_paths - ${INCLUDED_PODS} end end diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index f3abfead..905ff0b9 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -1,3 +1,4 @@ +source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target '${POD_NAME}_Example' do @@ -5,7 +6,6 @@ target '${POD_NAME}_Example' do target '${POD_NAME}_Tests' do inherit! :search_paths - ${INCLUDED_PODS} end end From b7519a069023a7c871ea2972a485d71e16ce5ead Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 16:40:35 -0400 Subject: [PATCH 06/62] import fdchessboardview --- LICENSE | 2 +- Pod/Assets/.gitkeep | 0 Pod/Classes/.gitkeep | 0 README.md | 24 +- templates/baseline/.gitignore | 61 +++ .travis.yml => templates/baseline/.travis.yml | 0 POD_LICENSE => templates/baseline/LICENSE | 0 .../baseline/NAME.podspec | 6 +- POD_README.md => templates/baseline/README.md | 0 .../Example/PROJECT.xcodeproj/project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcshareddata/xcschemes/PROJECT.xcscheme | 0 .../Example/PROJECT/CPDAppDelegate.h | 0 .../Example/PROJECT/CPDAppDelegate.m | 0 .../Example/PROJECT/CPDViewController.h | 0 .../Example/PROJECT/CPDViewController.m | 0 .../AppIcon.appiconset/Contents.json | 0 .../LaunchImage.launchimage/Contents.json | 0 .../Example/PROJECT/Main.storyboard | 0 .../Example/PROJECT/PROJECT-Info.plist | 0 .../Example/PROJECT/PROJECT-Prefix.pch | 0 .../PROJECT/en.lproj/InfoPlist.strings | 1 - .../Example/PROJECT/main.m | 0 .../{ios => objective-c}/Example/Podfile | 0 .../Example/Tests/Tests-Info.plist | 0 .../Example/Tests/Tests-Prefix.pch | 0 .../Example/Tests/Tests.m | 0 .../Example/Tests/en.lproj/InfoPlist.strings | 1 - .../Example/PROJECT.xcodeproj/project.pbxproj | 439 ----------------- .../PROJECT/Base.lproj/LaunchScreen.xib | 41 -- .../PROJECT/Base.lproj/Main.storyboard | 25 - .../Example/PROJECT/ViewController.swift | 24 - templates/swift/Example/Podfile | 11 - .../{PROJECT => Source}/AppDelegate.swift | 7 +- .../AppIcon.appiconset/Contents.json | 73 +++ .../Source/Assets.xcassets/Contents.json | 6 + .../Base.lproj/Launch Screen.storyboard | 50 ++ .../Example/Source/Base.lproj/Main.storyboard | 77 +++ .../AppIcon.appiconset/Contents.json | 30 ++ .../Example/{PROJECT => Source}/Info.plist | 8 + .../swift/Example/Source/ViewController.swift | 68 +++ templates/swift/Example/Tests/Tests.swift | 1 - .../iOS Example.xcodeproj/project.pbxproj | 373 ++++++++++++++ .../contents.xcworkspacedata | 7 + templates/swift/FDChessboardView.podspec | 14 + .../project.pbxproj | 456 ++++++++++++++++++ .../contents.xcworkspacedata | 2 +- .../xcschemes/FDChessboardView.xcscheme | 99 ++++ .../contents.xcworkspacedata | 10 + .../xcschemes/iOS Example.xcscheme} | 58 +-- templates/swift/LICENSE | 21 + templates/swift/Package.swift | 5 + templates/swift/README.md | 108 +++++ templates/swift/Resources/bb.png | Bin 0 -> 2580 bytes templates/swift/Resources/bb.svg | 17 + templates/swift/Resources/bk.png | Bin 0 -> 5339 bytes templates/swift/Resources/bk.svg | 25 + templates/swift/Resources/bn.png | Bin 0 -> 3656 bytes templates/swift/Resources/bn.svg | 22 + templates/swift/Resources/bp.png | Bin 0 -> 1597 bytes templates/swift/Resources/bp.svg | 7 + templates/swift/Resources/bq.png | Bin 0 -> 5468 bytes templates/swift/Resources/bq.svg | 34 ++ templates/swift/Resources/br.png | Bin 0 -> 1241 bytes templates/swift/Resources/br.svg | 39 ++ templates/swift/Resources/wb.png | Bin 0 -> 4090 bytes templates/swift/Resources/wb.svg | 17 + templates/swift/Resources/wk.png | Bin 0 -> 4740 bytes templates/swift/Resources/wk.svg | 27 ++ templates/swift/Resources/wn.png | Bin 0 -> 4386 bytes templates/swift/Resources/wn.svg | 19 + templates/swift/Resources/wp.png | Bin 0 -> 2792 bytes templates/swift/Resources/wp.svg | 7 + templates/swift/Resources/wq.png | Bin 0 -> 6353 bytes templates/swift/Resources/wq.svg | 33 ++ templates/swift/Resources/wr.png | Bin 0 -> 1300 bytes templates/swift/Resources/wr.svg | 25 + templates/swift/Source/FDChessboardView.swift | 239 +++++++++ templates/swift/Source/Info.plist | 26 + .../swift/Tests/FDChessboardViewTests.swift | 29 ++ .../swift/{Example => }/Tests/Info.plist | 0 81 files changed, 2071 insertions(+), 603 deletions(-) delete mode 100644 Pod/Assets/.gitkeep delete mode 100644 Pod/Classes/.gitkeep create mode 100644 templates/baseline/.gitignore rename .travis.yml => templates/baseline/.travis.yml (100%) rename POD_LICENSE => templates/baseline/LICENSE (100%) rename NAME.podspec => templates/baseline/NAME.podspec (93%) rename POD_README.md => templates/baseline/README.md (100%) rename templates/{ios => objective-c}/Example/PROJECT.xcodeproj/project.pbxproj (100%) rename templates/{ios => objective-c}/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata (100%) rename templates/{ios => objective-c}/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme (100%) rename templates/{ios => objective-c}/Example/PROJECT/CPDAppDelegate.h (100%) rename templates/{ios => objective-c}/Example/PROJECT/CPDAppDelegate.m (100%) rename templates/{ios => objective-c}/Example/PROJECT/CPDViewController.h (100%) rename templates/{ios => objective-c}/Example/PROJECT/CPDViewController.m (100%) rename templates/{ios => objective-c}/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json (100%) rename templates/{ios => objective-c}/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json (100%) rename templates/{ios => objective-c}/Example/PROJECT/Main.storyboard (100%) rename templates/{ios => objective-c}/Example/PROJECT/PROJECT-Info.plist (100%) rename templates/{ios => objective-c}/Example/PROJECT/PROJECT-Prefix.pch (100%) rename templates/{ios => objective-c}/Example/PROJECT/en.lproj/InfoPlist.strings (97%) rename templates/{ios => objective-c}/Example/PROJECT/main.m (100%) rename templates/{ios => objective-c}/Example/Podfile (100%) rename templates/{ios => objective-c}/Example/Tests/Tests-Info.plist (100%) rename templates/{ios => objective-c}/Example/Tests/Tests-Prefix.pch (100%) rename templates/{ios => objective-c}/Example/Tests/Tests.m (100%) rename templates/{ios => objective-c}/Example/Tests/en.lproj/InfoPlist.strings (97%) delete mode 100644 templates/swift/Example/PROJECT.xcodeproj/project.pbxproj delete mode 100644 templates/swift/Example/PROJECT/Base.lproj/LaunchScreen.xib delete mode 100644 templates/swift/Example/PROJECT/Base.lproj/Main.storyboard delete mode 100644 templates/swift/Example/PROJECT/ViewController.swift delete mode 100644 templates/swift/Example/Podfile rename templates/swift/Example/{PROJECT => Source}/AppDelegate.swift (94%) create mode 100644 templates/swift/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 templates/swift/Example/Source/Assets.xcassets/Contents.json create mode 100644 templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard create mode 100644 templates/swift/Example/Source/Base.lproj/Main.storyboard rename templates/swift/Example/{PROJECT => Source}/Images.xcassets/AppIcon.appiconset/Contents.json (54%) rename templates/swift/Example/{PROJECT => Source}/Info.plist (76%) create mode 100644 templates/swift/Example/Source/ViewController.swift delete mode 100644 templates/swift/Example/Tests/Tests.swift create mode 100644 templates/swift/Example/iOS Example.xcodeproj/project.pbxproj create mode 100644 templates/swift/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 templates/swift/FDChessboardView.podspec create mode 100644 templates/swift/FDChessboardView.xcodeproj/project.pbxproj rename templates/swift/{Example/PROJECT.xcodeproj => FDChessboardView.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (71%) create mode 100644 templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme create mode 100644 templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata rename templates/swift/{Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme => FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme} (55%) create mode 100644 templates/swift/LICENSE create mode 100644 templates/swift/Package.swift create mode 100644 templates/swift/README.md create mode 100644 templates/swift/Resources/bb.png create mode 100644 templates/swift/Resources/bb.svg create mode 100644 templates/swift/Resources/bk.png create mode 100644 templates/swift/Resources/bk.svg create mode 100644 templates/swift/Resources/bn.png create mode 100644 templates/swift/Resources/bn.svg create mode 100644 templates/swift/Resources/bp.png create mode 100644 templates/swift/Resources/bp.svg create mode 100644 templates/swift/Resources/bq.png create mode 100644 templates/swift/Resources/bq.svg create mode 100644 templates/swift/Resources/br.png create mode 100644 templates/swift/Resources/br.svg create mode 100644 templates/swift/Resources/wb.png create mode 100644 templates/swift/Resources/wb.svg create mode 100644 templates/swift/Resources/wk.png create mode 100644 templates/swift/Resources/wk.svg create mode 100644 templates/swift/Resources/wn.png create mode 100644 templates/swift/Resources/wn.svg create mode 100644 templates/swift/Resources/wp.png create mode 100644 templates/swift/Resources/wp.svg create mode 100644 templates/swift/Resources/wq.png create mode 100644 templates/swift/Resources/wq.svg create mode 100644 templates/swift/Resources/wr.png create mode 100644 templates/swift/Resources/wr.svg create mode 100644 templates/swift/Source/FDChessboardView.swift create mode 100644 templates/swift/Source/Info.plist create mode 100644 templates/swift/Tests/FDChessboardViewTests.swift rename templates/swift/{Example => }/Tests/Info.plist (100%) 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..ef8e5ba3 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,30 @@ pod-template ============ -An opinionated template for creating a Pod with the following features: +An opinionated template for Swift and Objective-C frameworks with the following features: -- Git as the source control management system +- Prompt-based project generation +- Support for CocoaPods, Carthage and 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 + +You must run **CocoaPods 1.0.0+** to use this template. -## Best practices -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. +## Hacking -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. +To modify these templates or to create your own, please fork this repository or edit locally. Test your changes by running `pod lib create --template-url='YOUR_GIT_URL' POD_NAME`. Note that you can use a local git URL such as `file:///Users/username/Developer/pod-template`. -## Requirements: +To understand how this repository is used by CocoaPods, please start with `configure`. You can see the calling code in `configure_template` defined in [lib/cocoapods/command/lib.rb](https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/command/lib.rb). + + +## 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/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/.travis.yml b/templates/baseline/.travis.yml similarity index 100% rename from .travis.yml rename to templates/baseline/.travis.yml 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/NAME.podspec similarity index 93% rename from NAME.podspec rename to templates/baseline/NAME.podspec index 0d50981c..8e7ca3fc 100644 --- a/NAME.podspec +++ b/templates/baseline/NAME.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/objective-c/Example/PROJECT.xcodeproj/project.pbxproj similarity index 100% rename from templates/ios/Example/PROJECT.xcodeproj/project.pbxproj rename to templates/objective-c/Example/PROJECT.xcodeproj/project.pbxproj diff --git a/templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from templates/ios/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme similarity index 100% rename from templates/ios/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme rename to templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme diff --git a/templates/ios/Example/PROJECT/CPDAppDelegate.h b/templates/objective-c/Example/PROJECT/CPDAppDelegate.h similarity index 100% rename from templates/ios/Example/PROJECT/CPDAppDelegate.h rename to templates/objective-c/Example/PROJECT/CPDAppDelegate.h diff --git a/templates/ios/Example/PROJECT/CPDAppDelegate.m b/templates/objective-c/Example/PROJECT/CPDAppDelegate.m similarity index 100% rename from templates/ios/Example/PROJECT/CPDAppDelegate.m rename to templates/objective-c/Example/PROJECT/CPDAppDelegate.m diff --git a/templates/ios/Example/PROJECT/CPDViewController.h b/templates/objective-c/Example/PROJECT/CPDViewController.h similarity index 100% rename from templates/ios/Example/PROJECT/CPDViewController.h rename to templates/objective-c/Example/PROJECT/CPDViewController.h diff --git a/templates/ios/Example/PROJECT/CPDViewController.m b/templates/objective-c/Example/PROJECT/CPDViewController.m similarity index 100% rename from templates/ios/Example/PROJECT/CPDViewController.m rename to templates/objective-c/Example/PROJECT/CPDViewController.m diff --git a/templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json similarity index 100% rename from templates/ios/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json rename to templates/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json diff --git a/templates/ios/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json b/templates/objective-c/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json similarity index 100% rename from templates/ios/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json rename to templates/objective-c/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json diff --git a/templates/ios/Example/PROJECT/Main.storyboard b/templates/objective-c/Example/PROJECT/Main.storyboard similarity index 100% rename from templates/ios/Example/PROJECT/Main.storyboard rename to templates/objective-c/Example/PROJECT/Main.storyboard diff --git a/templates/ios/Example/PROJECT/PROJECT-Info.plist b/templates/objective-c/Example/PROJECT/PROJECT-Info.plist similarity index 100% rename from templates/ios/Example/PROJECT/PROJECT-Info.plist rename to templates/objective-c/Example/PROJECT/PROJECT-Info.plist diff --git a/templates/ios/Example/PROJECT/PROJECT-Prefix.pch b/templates/objective-c/Example/PROJECT/PROJECT-Prefix.pch similarity index 100% rename from templates/ios/Example/PROJECT/PROJECT-Prefix.pch rename to templates/objective-c/Example/PROJECT/PROJECT-Prefix.pch diff --git a/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings b/templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings similarity index 97% rename from templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings rename to templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings index 477b28ff..b92732c7 100644 --- a/templates/ios/Example/PROJECT/en.lproj/InfoPlist.strings +++ b/templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings @@ -1,2 +1 @@ /* Localized versions of Info.plist keys */ - diff --git a/templates/ios/Example/PROJECT/main.m b/templates/objective-c/Example/PROJECT/main.m similarity index 100% rename from templates/ios/Example/PROJECT/main.m rename to templates/objective-c/Example/PROJECT/main.m diff --git a/templates/ios/Example/Podfile b/templates/objective-c/Example/Podfile similarity index 100% rename from templates/ios/Example/Podfile rename to templates/objective-c/Example/Podfile diff --git a/templates/ios/Example/Tests/Tests-Info.plist b/templates/objective-c/Example/Tests/Tests-Info.plist similarity index 100% rename from templates/ios/Example/Tests/Tests-Info.plist rename to templates/objective-c/Example/Tests/Tests-Info.plist diff --git a/templates/ios/Example/Tests/Tests-Prefix.pch b/templates/objective-c/Example/Tests/Tests-Prefix.pch similarity index 100% rename from templates/ios/Example/Tests/Tests-Prefix.pch rename to templates/objective-c/Example/Tests/Tests-Prefix.pch diff --git a/templates/ios/Example/Tests/Tests.m b/templates/objective-c/Example/Tests/Tests.m similarity index 100% rename from templates/ios/Example/Tests/Tests.m rename to templates/objective-c/Example/Tests/Tests.m diff --git a/templates/ios/Example/Tests/en.lproj/InfoPlist.strings b/templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings similarity index 97% rename from templates/ios/Example/Tests/en.lproj/InfoPlist.strings rename to templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings index 477b28ff..b92732c7 100644 --- a/templates/ios/Example/Tests/en.lproj/InfoPlist.strings +++ b/templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings @@ -1,2 +1 @@ /* Localized versions of Info.plist keys */ - 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 deleted file mode 100644 index 905ff0b9..00000000 --- a/templates/swift/Example/Podfile +++ /dev/null @@ -1,11 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -use_frameworks! - -target '${POD_NAME}_Example' do - pod '${POD_NAME}', :path => '../' - - target '${POD_NAME}_Tests' do - inherit! :search_paths - ${INCLUDED_PODS} - end -end diff --git a/templates/swift/Example/PROJECT/AppDelegate.swift b/templates/swift/Example/Source/AppDelegate.swift similarity index 94% rename from templates/swift/Example/PROJECT/AppDelegate.swift rename to templates/swift/Example/Source/AppDelegate.swift index 3f6dd30d..bfeb45e9 100644 --- a/templates/swift/Example/PROJECT/AppDelegate.swift +++ b/templates/swift/Example/Source/AppDelegate.swift @@ -1,9 +1,9 @@ // // AppDelegate.swift -// PROJECT +// FDChessboardView iOS // -// Created by PROJECT_OWNER on TODAYS_DATE. -// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. +// Created by Full Decent on 4/25/16. +// Copyright © 2016 William Entriken. All rights reserved. // import UIKit @@ -43,4 +43,3 @@ class AppDelegate: UIResponder, UIApplicationDelegate { } - 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..3b4572e6 --- /dev/null +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..76d8b8c3 --- /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..1ca0e765 --- /dev/null +++ b/templates/swift/Example/Source/ViewController.swift @@ -0,0 +1,68 @@ +// +// ViewController.swift +// FDChessboardView +// +// Created by William Entriken on 2/3/16. +// Copyright © 2016 William Entriken. All rights reserved. +// + +import UIKit +import FDChessboardView + +class ViewController: UIViewController { + @IBOutlet var chessboard: FDChessboardView! + + var piecesByIndex = [Int : FDChessboardPiece]() + + override func viewDidLoad() { + super.viewDidLoad() + + let position: String = "RNBQKBNRPPPPPPPP................................pppppppprnbqkbnr" + + for (index, letter) in position.characters.enumerate() { + switch letter { + case "K": + piecesByIndex[index] = .WhiteKing + case "k": + piecesByIndex[index] = .BlackKing + case "Q": + piecesByIndex[index] = .WhiteQueen + case "q": + piecesByIndex[index] = .BlackQueen + case "R": + piecesByIndex[index] = .WhiteRook + case "r": + piecesByIndex[index] = .BlackRook + case "B": + piecesByIndex[index] = .WhiteBishop + case "b": + piecesByIndex[index] = .BlackBishop + case "N": + piecesByIndex[index] = .WhiteKnight + case "n": + piecesByIndex[index] = .BlackKnight + case "P": + piecesByIndex[index] = .WhitePawn + case "p": + piecesByIndex[index] = .BlackPawn + default: + break + } + } + self.chessboard.dataSource = self + } +} + +extension ViewController: FDChessboardViewDataSource { + func chessboardView(board: FDChessboardView, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? { + return piecesByIndex[square.index] + } + + func chessboardViewLastMove(board: FDChessboardView) -> (from: FDChessboardSquare, to: FDChessboardSquare)? { + return nil + } + + func chessboardViewPremove(board: FDChessboardView) -> (from: FDChessboardSquare, to: FDChessboardSquare)? { + return nil + } +} diff --git a/templates/swift/Example/Tests/Tests.swift b/templates/swift/Example/Tests/Tests.swift deleted file mode 100644 index a6a86355..00000000 --- a/templates/swift/Example/Tests/Tests.swift +++ /dev/null @@ -1 +0,0 @@ -${TEST_EXAMPLE} \ No newline at end of file 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..ed90b05b --- /dev/null +++ b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj @@ -0,0 +1,373 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 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 /* FDChessboardView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* FDChessboardView.framework */; }; + D99B39091CD6907300E56AE2 /* FDChessboardView.framework in Copy Frameworks */ = {isa = PBXBuildFile; fileRef = D99B39011CD68FD900E56AE2 /* FDChessboardView.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; + D9CBAE971CCEC4ED006EC128 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4B41CCEBC0D0013FBDD; + remoteInfo = FDChessboardView; + }; + D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D9FEF4BE1CCEBC0F0013FBDD; + remoteInfo = FDChessboardViewTests; + }; + D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = FDChessboardView; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + D99B39081CD6904E00E56AE2 /* Copy Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + D99B39091CD6907300E56AE2 /* FDChessboardView.framework in Copy Frameworks */, + ); + name = "Copy Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 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; path = Assets.xcassets; sourceTree = ""; }; + D94BE1C81CCEBF2C0042282A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D94BE1D21CCEC1730042282A /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = FDChessboardView.xcodeproj; path = ../FDChessboardView.xcodeproj; sourceTree = ""; }; + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; name = "Launch Screen.storyboard"; path = "Base.lproj/Launch Screen.storyboard"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + D94BE1B61CCEBF2C0042282A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + D99B39051CD68FF400E56AE2 /* FDChessboardView.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D94BE1B01CCEBF2C0042282A = { + isa = PBXGroup; + children = ( + D94BE1BB1CCEBF2C0042282A /* Source */, + D94BE1BA1CCEBF2C0042282A /* Products */, + D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */, + ); + sourceTree = ""; + }; + D94BE1BA1CCEBF2C0042282A /* Products */ = { + isa = PBXGroup; + children = ( + D94BE1B91CCEBF2C0042282A /* iOS Example.app */, + ); + name = Products; + sourceTree = ""; + }; + D94BE1BB1CCEBF2C0042282A /* Source */ = { + isa = PBXGroup; + children = ( + D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */, + D94BE1D21CCEC1730042282A /* AppDelegate.swift */, + D94BE1BE1CCEBF2C0042282A /* ViewController.swift */, + D94BE1C01CCEBF2C0042282A /* Main.storyboard */, + D94BE1C31CCEBF2C0042282A /* Assets.xcassets */, + D94BE1C81CCEBF2C0042282A /* Info.plist */, + ); + path = Source; + sourceTree = ""; + }; + D99B38FC1CD68FD900E56AE2 /* Products */ = { + isa = PBXGroup; + children = ( + D99B39011CD68FD900E56AE2 /* FDChessboardView.framework */, + D99B39031CD68FD900E56AE2 /* FDChessboardViewTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 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 = "FDChessboardView 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 = "William Entriken"; + TargetAttributes = { + 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 /* FDChessboardView.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + D94BE1B81CCEBF2C0042282A /* iOS Example */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + D99B39011CD68FD900E56AE2 /* FDChessboardView.framework */ = { + isa = PBXReferenceProxy; + fileType = wrapper.framework; + path = FDChessboardView.framework; + remoteRef = D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + D99B39031CD68FD900E56AE2 /* FDChessboardViewTests.xctest */ = { + isa = PBXReferenceProxy; + fileType = wrapper.cfbundle; + path = FDChessboardViewTests.xctest; + remoteRef = D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXResourcesBuildPhase section */ + 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 */ + 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 */ + D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = FDChessboardView; + targetProxy = D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + D94BE1C01CCEBF2C0042282A /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + D94BE1C11CCEBF2C0042282A /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 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.FDChessboardView.FDChessboardView-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.FDChessboardView.FDChessboardView-iOS"; + PRODUCT_NAME = "iOS Example"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 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/FDChessboardView.podspec b/templates/swift/FDChessboardView.podspec new file mode 100644 index 00000000..0b572715 --- /dev/null +++ b/templates/swift/FDChessboardView.podspec @@ -0,0 +1,14 @@ +Pod::Spec.new do |s| + s.name = 'FDChessboardView' + s.version = '0.1.0' + s.license = 'MIT' + s.summary = 'A view controller for chess boards' + s.homepage = 'https://github.com/fulldecent/FDChessboardView' + s.authors = { 'William Entriken' => 'github.com@phor.net' } + s.source = { :git => 'https://github.com/fulldecent/FDChessboardView.git', :tag => s.version } + s.ios.deployment_target = '8.0' + s.source_files = 'Source/*.swift' + s.resource_bundles = { + 'FDChessboardView' => ['Resources/**/*.{png}'] + } +end diff --git a/templates/swift/FDChessboardView.xcodeproj/project.pbxproj b/templates/swift/FDChessboardView.xcodeproj/project.pbxproj new file mode 100644 index 00000000..d1ff241a --- /dev/null +++ b/templates/swift/FDChessboardView.xcodeproj/project.pbxproj @@ -0,0 +1,456 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + D94BE1CF1CCEBFD80042282A /* FDChessboardView.swift in Sources */ = {isa = PBXBuildFile; fileRef = D94BE1CE1CCEBFD80042282A /* FDChessboardView.swift */; }; + D9E0668B1CCECB3200E0D7CB /* bb.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E0667F1CCECB3200E0D7CB /* bb.png */; }; + D9E0668C1CCECB3200E0D7CB /* bk.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066801CCECB3200E0D7CB /* bk.png */; }; + D9E0668D1CCECB3200E0D7CB /* bn.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066811CCECB3200E0D7CB /* bn.png */; }; + D9E0668E1CCECB3200E0D7CB /* bp.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066821CCECB3200E0D7CB /* bp.png */; }; + D9E0668F1CCECB3200E0D7CB /* bq.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066831CCECB3200E0D7CB /* bq.png */; }; + D9E066901CCECB3200E0D7CB /* br.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066841CCECB3200E0D7CB /* br.png */; }; + D9E066911CCECB3200E0D7CB /* wb.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066851CCECB3200E0D7CB /* wb.png */; }; + D9E066921CCECB3200E0D7CB /* wk.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066861CCECB3200E0D7CB /* wk.png */; }; + D9E066931CCECB3200E0D7CB /* wn.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066871CCECB3200E0D7CB /* wn.png */; }; + D9E066941CCECB3200E0D7CB /* wp.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066881CCECB3200E0D7CB /* wp.png */; }; + D9E066951CCECB3200E0D7CB /* wq.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E066891CCECB3200E0D7CB /* wq.png */; }; + D9E066961CCECB3200E0D7CB /* wr.png in Resources */ = {isa = PBXBuildFile; fileRef = D9E0668A1CCECB3200E0D7CB /* wr.png */; }; + D9FEF4BF1CCEBC0F0013FBDD /* FDChessboardView.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9FEF4B41CCEBC0D0013FBDD /* FDChessboardView.framework */; }; + D9FEF4C41CCEBC100013FBDD /* FDChessboardViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9FEF4C31CCEBC100013FBDD /* FDChessboardViewTests.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + D9FEF4C01CCEBC0F0013FBDD /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; + proxyType = 1; + remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; + remoteInfo = FDChessboardView; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXFileReference section */ + D94BE1CE1CCEBFD80042282A /* FDChessboardView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FDChessboardView.swift; sourceTree = ""; }; + D9E0667F1CCECB3200E0D7CB /* bb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bb.png; sourceTree = ""; }; + D9E066801CCECB3200E0D7CB /* bk.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bk.png; sourceTree = ""; }; + D9E066811CCECB3200E0D7CB /* bn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bn.png; sourceTree = ""; }; + D9E066821CCECB3200E0D7CB /* bp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bp.png; sourceTree = ""; }; + D9E066831CCECB3200E0D7CB /* bq.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = bq.png; sourceTree = ""; }; + D9E066841CCECB3200E0D7CB /* br.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = br.png; sourceTree = ""; }; + D9E066851CCECB3200E0D7CB /* wb.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wb.png; sourceTree = ""; }; + D9E066861CCECB3200E0D7CB /* wk.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wk.png; sourceTree = ""; }; + D9E066871CCECB3200E0D7CB /* wn.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wn.png; sourceTree = ""; }; + D9E066881CCECB3200E0D7CB /* wp.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wp.png; sourceTree = ""; }; + D9E066891CCECB3200E0D7CB /* wq.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wq.png; sourceTree = ""; }; + D9E0668A1CCECB3200E0D7CB /* wr.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = wr.png; sourceTree = ""; }; + D9FEF4B41CCEBC0D0013FBDD /* FDChessboardView.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = FDChessboardView.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D9FEF4BE1CCEBC0F0013FBDD /* FDChessboardViewTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FDChessboardViewTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + D9FEF4C31CCEBC100013FBDD /* FDChessboardViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FDChessboardViewTests.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 /* FDChessboardView.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + D9E0667E1CCECAFF00E0D7CB /* Resources */ = { + isa = PBXGroup; + children = ( + D9E0667F1CCECB3200E0D7CB /* bb.png */, + D9E066801CCECB3200E0D7CB /* bk.png */, + D9E066811CCECB3200E0D7CB /* bn.png */, + D9E066821CCECB3200E0D7CB /* bp.png */, + D9E066831CCECB3200E0D7CB /* bq.png */, + D9E066841CCECB3200E0D7CB /* br.png */, + D9E066851CCECB3200E0D7CB /* wb.png */, + D9E066861CCECB3200E0D7CB /* wk.png */, + D9E066871CCECB3200E0D7CB /* wn.png */, + D9E066881CCECB3200E0D7CB /* wp.png */, + D9E066891CCECB3200E0D7CB /* wq.png */, + D9E0668A1CCECB3200E0D7CB /* wr.png */, + ); + path = Resources; + sourceTree = ""; + }; + D9FEF4AA1CCEBC0D0013FBDD = { + isa = PBXGroup; + children = ( + D9FEF4B61CCEBC0D0013FBDD /* Source */, + D9E0667E1CCECAFF00E0D7CB /* Resources */, + D9FEF4C21CCEBC0F0013FBDD /* Tests */, + D9FEF4B51CCEBC0D0013FBDD /* Products */, + ); + sourceTree = ""; + }; + D9FEF4B51CCEBC0D0013FBDD /* Products */ = { + isa = PBXGroup; + children = ( + D9FEF4B41CCEBC0D0013FBDD /* FDChessboardView.framework */, + D9FEF4BE1CCEBC0F0013FBDD /* FDChessboardViewTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + D9FEF4B61CCEBC0D0013FBDD /* Source */ = { + isa = PBXGroup; + children = ( + D94BE1CE1CCEBFD80042282A /* FDChessboardView.swift */, + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */, + ); + path = Source; + sourceTree = ""; + }; + D9FEF4C21CCEBC0F0013FBDD /* Tests */ = { + isa = PBXGroup; + children = ( + D9FEF4C31CCEBC100013FBDD /* FDChessboardViewTests.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 /* FDChessboardView */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "FDChessboardView" */; + buildPhases = ( + D9FEF4AF1CCEBC0D0013FBDD /* Sources */, + D9FEF4B01CCEBC0D0013FBDD /* Frameworks */, + D9FEF4B11CCEBC0D0013FBDD /* Headers */, + D9FEF4B21CCEBC0D0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = FDChessboardView; + productName = FDChessboardView; + productReference = D9FEF4B41CCEBC0D0013FBDD /* FDChessboardView.framework */; + productType = "com.apple.product-type.framework"; + }; + D9FEF4BD1CCEBC0F0013FBDD /* FDChessboardViewTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "FDChessboardViewTests" */; + buildPhases = ( + D9FEF4BA1CCEBC0F0013FBDD /* Sources */, + D9FEF4BB1CCEBC0F0013FBDD /* Frameworks */, + D9FEF4BC1CCEBC0F0013FBDD /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */, + ); + name = FDChessboardViewTests; + productName = FDChessboardViewTests; + productReference = D9FEF4BE1CCEBC0F0013FBDD /* FDChessboardViewTests.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 = "William Entriken"; + TargetAttributes = { + D9FEF4B31CCEBC0D0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + D9FEF4BD1CCEBC0F0013FBDD = { + CreatedOnToolsVersion = 7.3; + }; + }; + }; + buildConfigurationList = D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "FDChessboardView" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + ); + mainGroup = D9FEF4AA1CCEBC0D0013FBDD; + productRefGroup = D9FEF4B51CCEBC0D0013FBDD /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + D9FEF4B31CCEBC0D0013FBDD /* FDChessboardView */, + D9FEF4BD1CCEBC0F0013FBDD /* FDChessboardViewTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + D9FEF4B21CCEBC0D0013FBDD /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9E066941CCECB3200E0D7CB /* wp.png in Resources */, + D9E0668F1CCECB3200E0D7CB /* bq.png in Resources */, + D9E066951CCECB3200E0D7CB /* wq.png in Resources */, + D9E0668C1CCECB3200E0D7CB /* bk.png in Resources */, + D9E0668D1CCECB3200E0D7CB /* bn.png in Resources */, + D9E066921CCECB3200E0D7CB /* wk.png in Resources */, + D9E066961CCECB3200E0D7CB /* wr.png in Resources */, + D9E066901CCECB3200E0D7CB /* br.png in Resources */, + D9E0668B1CCECB3200E0D7CB /* bb.png in Resources */, + D9E066911CCECB3200E0D7CB /* wb.png in Resources */, + D9E066931CCECB3200E0D7CB /* wn.png in Resources */, + D9E0668E1CCECB3200E0D7CB /* bp.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 /* FDChessboardView.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D9FEF4BA1CCEBC0F0013FBDD /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D9FEF4C41CCEBC100013FBDD /* FDChessboardViewTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D9FEF4B31CCEBC0D0013FBDD /* FDChessboardView */; + 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.FDChessboardView.FDChessboardView; + 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.FDChessboardView.FDChessboardView; + 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.FDChessboardView.FDChessboardViewTests; + 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.FDChessboardView.FDChessboardViewTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + D9FEF4AE1CCEBC0D0013FBDD /* Build configuration list for PBXProject "FDChessboardView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C61CCEBC100013FBDD /* Debug */, + D9FEF4C71CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4C81CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "FDChessboardView" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D9FEF4C91CCEBC100013FBDD /* Debug */, + D9FEF4CA1CCEBC100013FBDD /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + D9FEF4CB1CCEBC100013FBDD /* Build configuration list for PBXNativeTarget "FDChessboardViewTests" */ = { + 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/FDChessboardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 71% rename from templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/swift/FDChessboardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata index d38d26de..919434a6 100644 --- a/templates/swift/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ b/templates/swift/FDChessboardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -2,6 +2,6 @@ + location = "self:"> diff --git a/templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme b/templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme new file mode 100644 index 00000000..133f3251 --- /dev/null +++ b/templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata b/templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..0513f31f --- /dev/null +++ b/templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme similarity index 55% rename from templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme rename to templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme index f5a56f3e..f9442eaa 100644 --- a/templates/swift/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme @@ -1,6 +1,6 @@ - - - - + BlueprintIdentifier = "D94BE1B81CCEBF2C0042282A" + BuildableName = "iOS Example.app" + BlueprintName = "iOS Example" + ReferencedContainer = "container:Example/iOS Example.xcodeproj"> @@ -42,24 +28,14 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> - - - - + BlueprintIdentifier = "D94BE1B81CCEBF2C0042282A" + BuildableName = "iOS Example.app" + BlueprintName = "iOS Example" + ReferencedContainer = "container:Example/iOS Example.xcodeproj"> @@ -79,10 +55,10 @@ runnableDebuggingMode = "0"> + BlueprintIdentifier = "D94BE1B81CCEBF2C0042282A" + BuildableName = "iOS Example.app" + BlueprintName = "iOS Example" + ReferencedContainer = "container:Example/iOS Example.xcodeproj"> @@ -98,10 +74,10 @@ runnableDebuggingMode = "0"> + BlueprintIdentifier = "D94BE1B81CCEBF2C0042282A" + BuildableName = "iOS Example.app" + BlueprintName = "iOS Example" + ReferencedContainer = "container:Example/iOS Example.xcodeproj"> diff --git a/templates/swift/LICENSE b/templates/swift/LICENSE new file mode 100644 index 00000000..764e23b4 --- /dev/null +++ b/templates/swift/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 William Entriken + +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/Package.swift b/templates/swift/Package.swift new file mode 100644 index 00000000..b9419ac2 --- /dev/null +++ b/templates/swift/Package.swift @@ -0,0 +1,5 @@ +import PackageDescription + +let package = Package( + name: "FDChessboardView" +) diff --git a/templates/swift/README.md b/templates/swift/README.md new file mode 100644 index 00000000..eabd2fc1 --- /dev/null +++ b/templates/swift/README.md @@ -0,0 +1,108 @@ +FDChessboardView +================ + +[![CI Status](http://img.shields.io/travis/fulldecent/FDChessboardView.svg?style=flat)](https://travis-ci.org/fulldecent/FDChessboardView) +[![Version](https://img.shields.io/cocoapods/v/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) +[![License](https://img.shields.io/cocoapods/l/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) +[![Platform](https://img.shields.io/cocoapods/p/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) +[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) + + + +Features +======== + + * High resolution graphics + * Customizable themes and game graphics + * Supports all single board chess variants: suicide, losers, atomic, etc. + * Supports games with odd piece arrangement and non-standard castling (Fisher 960) + * Very clean API, this is just a view + * Supports a minimum deployment target of iOS 8 or OS X Mavericks (10.9) + +Usage +===== + +Import, add the view to your storyboard and then set it up with: + +```swift +import FDChessboardView +... +self.chessboard.dataSource = self +``` + +Then implement the data source: + +```swift +func chessboardView(board: FDChessboardView, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? { + return piecesByIndex[square.index] // you figure out which piece to show +} +``` + + +Installation +============ + +## 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 +``` + +> CocoaPods 0.39.0+ is required to build FDChessboardView 0.1.0+. + +To integrate FDChessboardView into your Xcode project using CocoaPods, specify it in your `Podfile`: + +```ruby +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '9.0' +use_frameworks! + +pod 'FDChessboardView', '~> 0.1' +``` + +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 FDChessboardView into your Xcode project using Carthage, specify it in your `Cartfile`: + +```ogdl +github "fulldecent/FDChessboardView" ~> 0.1 +``` + +Run `carthage update` to build the framework and drag the built `FDChessboardView.framework` into your Xcode project. + + +Upcoming Features +================= + +These following items are in the API for discussion and awaiting implementation: + + * Display for last move + * Mutable game state (i.e. can move the pieces) + * Animation for piece moves + * Highlighting of legal squares for a piece after begin dragging + * Premove + + +See Also +=========== + +See also Kibitz for Mac which is making a comeback https://github.com/fulldecent/kibitz diff --git a/templates/swift/Resources/bb.png b/templates/swift/Resources/bb.png new file mode 100644 index 0000000000000000000000000000000000000000..fc5b7b180b9c79807eb9fac2dff5e1a284331afc GIT binary patch literal 2580 zcmV+v3hVWWP)lTt?Atm{rz4BQa zDAy)4yEE_P`Q5n7vo`bYyclDQF~%5Uj4{R-V~jDz7-Nhv#u#IaF~%5Uj4{R-V~jB_ z=)gpl^E#iAm*_KIXE_sSPvn`J%w;3`oi;F=nnaX|a~Zj4@3EOnsY>LSF1&}5>|^#L zQp|XEpfa?Bu|$R$MiDAwMT{a6%qjee%F!;)z&LL|cA#>$oo*PXWwH`^=xr)t95x(z zYzW3#8GMF3_9-!pqk1DB`Xk0s*~o`(!Z>OJ@}adDCpAYt)db_9qmWPi5#ylI$frhP z95e&@)O3u479yWofU$c3W6uFh1$`CpCrpJt4$u_iq>adj)?plVtDOt5X90E`uma2A z3*@oS$iO&j1oGHWjKeZnWorT}GFugF?0o@dEGlzFjK)O9BzB@Qw37*#$Y?`$nFrt& zT4N%hAy<%(%25F~(iG#cdR)PF#hJKB=h0@sVRKPs8D1h=f0~4?q=Tn3Ns)%zi0m>vB1>8+!VggZ(M^OlRni`n2YrqN=lHR5s zCavnQ0)?nGHUjBXn-wTzt+o+Jm%6M%A#5deFe#VCt0<(sMI4h-F&3i`cQ+ZB6uK6L zyely&Gafn6C`?N9Bp>-(JQ04kgYFpL)n*;?vp?xA6()Ks@g@B2b82FI72`hSXD4cx z{?{&@=>L;J45=OSkZK+MMz(~vx;2jCYP;eq)(a(V#74VZFk z$ad!kU>o%@<#Z`>egMRUm~yE>P9z54XR2e$VG@eO0Elsza#)GH)?JJAiPrAcH!AI$ zJ^ZLov`F2B_uiz;OjqQ!vs56j3KG8x-s?;mnd^|Z>MB=$$W>k8wW~-s+wNtE{4zv% zZ6jr3_CsEqBfrcM-s?ho*{+|b%P*%3@6DqO%&W+2Sz0eYtXG!s-isv7{K22~zx(T3 zdG)RK_iL?i6_R8QME+Dq)3sQ4@77By?WH~ZsKuJDI>N7dkt8z>k;wHUfu)*4lFS{E z9Dv(Nl6gIn1Mn(IGCxFe0KO$DrY4Hy0Ep@&!E}!70JJ9w=8(t^Ku?ljj*sjB^d|bRMHBOj*cS<<|vfA zub&fNBOM(<5=te?ohB<+3_v6f-HUmDiohGWX04*4iTZKpP-OzuVz zY6+%{PCyar7)%*u@F9vw?-9e4*-#Xb24Kn|leH)UeNH7p$`*%(d?A>53OU}RcwjoP z9XZ@q+Te*9ha7GMo|$`)qbf63cW~tAjVf!99ts3 zjw+Z6{chn=7$3ds;DRvYo5PTU9gOkG-;smefbq$C+JTlKBhkF{2%*DvzF2*BsFmkxV z@W@o+M~8O{u8e19k!=-Mu^qw|N3Rs#3FC_c`3X7JW{$-8rn6&9!`IOT?VpB8nKlBk$=4L36t|17d4v1-2bVCD5u8SEdeDW|)Ta(HOj4@Qj2@iGaHg_= zEBGh3ad)BzcqY*ctVpz)wZ(l$PH~0EkqXHv?mN~Nx0)4+UgViX4{>**JNYM9u#l+? z=R|tYjLJk_bIxEs*}TGcXt%6yd6{hHaXQV2kcRw;i7YD9u{&!6is`5(;tNL{earGaC(mOIFc+%s>&ZZpXb<$9P2g$ z^#=#e|L5`{&v6qoIhIz$*qa!wIF6az#B+Q^t^= + + + + + + + + + + + diff --git a/templates/swift/Resources/bk.png b/templates/swift/Resources/bk.png new file mode 100644 index 0000000000000000000000000000000000000000..921409056f1be70e15636a03071a73e12fdebdba GIT binary patch literal 5339 zcmZ{oWmFUlv&WYZmJXNhrKP)T*hZL4hffoc( z@b&p{@0WY-{O6qiocT0o=J#om4D~h0h#83i005bmCKLex;QTFd06_e|_9M*x6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&t z>f7-zA6^ed{WiT5M0~>@)2g%%XH7aAng7zn%QBE~xCRBeix!XhB%hmUhQ0~-7n{2h zArr*sw?#3G_ADW$+8n7kQ*gN>Al{@kW@*@P4LL^73z ztg~G^N8J=iF+f3fsr~LLe=?#y_Ig%^%w12^R0dPdNaRsT*KQLV{OB%0-_$|~cI19v z#tFt3SO`#R+-qokN6#%_%ne3bRR?hMl?}=t@K2f4zYBbIs9xM$M&!{bkXv+LK)$U{fv|w+v~UUfRC1GH%xs zrphLFZ-yUn+ccRGx4yS1uCYefY!x)ntW=5{z45!sZMhQZtNs;OVkH2LgVps>2PU0; z$X#W!K;TpnrtkhR6sZ1L`| emH+#n{NIo*@&!+EGr!OHx1$Bqhc-j(qyG!kBkO4Z literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/bk.svg b/templates/swift/Resources/bk.svg new file mode 100644 index 00000000..d90dc737 --- /dev/null +++ b/templates/swift/Resources/bk.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + diff --git a/templates/swift/Resources/bn.png b/templates/swift/Resources/bn.png new file mode 100644 index 0000000000000000000000000000000000000000..a71e0cde5a2f8c4d1bce617a6f19f85ab5a15801 GIT binary patch literal 3656 zcmV-O4!7}%P)k7ssByMCDXD^OrQ|6|Io*9Yj zu~px*Bq3S#9K;{k)LU%LAavJUe2DG(i8%;KnviF(T`w^c-LW#iVu!uU;3Oy1@;r9f z?`%p@n^3_{+lSU zHpT*-K~lmgn6o|U$T<9n1-hRBDh`0(n4b2o!$N()02K#-yvQK5wlo&3!XP9hoPY&7 zjFxJ74GT9O2?@JlfqrLOHfrj4>_#(@kgx{!b6@f(m$DzLGA)AY5f`#PBNO_`a+qKh9%5%EA@sRgKEPyqnLQYb(5H6A za$CpC-PMI1rL(KSovh6egg!C|A7Po@ZKKb;-Gg1!A*F5KaV+B#`oJLkgyl87zuVRy zKIXno*Zx{?4f7Iu+45LsYumYZJ;rIJb&skPWpBk-&mDcrV%~QpY3^rsrkX;+2z-j^G>Q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/bp.png b/templates/swift/Resources/bp.png new file mode 100644 index 0000000000000000000000000000000000000000..f49df994032932d33ba60595b7ca49bc8601873e GIT binary patch literal 1597 zcmV-D2EzG?P))LZQHgz^J71Yca`)cnV{-^yX*O!KcaZ+X4Z#+SW&t$Cwp)?kMS8bgb?5I z5?65~%Q66KT3uP3OZXZMqjv6KBL-kirWafBCi;ba$MH;rHH~%n0F7WR97#W{;Z4Dv zXe4`wrLl�$-p}sK&|kz#7y6)X*q*8w0S0(}h#fXzFps#Tv{BXf*Z&1F;6OCmPM& zP7ka>EKVmH?VUhFunGADC8)*<#Ao~&CF(;45}Yl85_U47Sr?u~32SF+0<#rR;?5y3 zyALIZc?4wppiDhTKz0$z z)E5L~ccN_dCmeeWWoshBv6oP`rY9VG8D(oa!m%e&wk9DQy8~sb9~RDqC{v$e0qu=4 z^#B&oyeLygVFC5zdz7W6u#j#?8ER)B7Sf(&&j4%!T2b;g!os>7CGInNV`0sW5_cpP z*!Fayr2UlvSV(=i9A)SQrp3aUfG1FMM=ls8cY zwXzsixiNVeRn%9^idCuyx1kDqpUJQaoq#It8Tw!qS%w;_yfd*%jK^mvL@Qzy_&*e+ z4;X}HwiF7~nOIicc@YJwgPF06wnD+W0n4T*@1bzbfn~A@3fPrcCNH3XbutZ>!F(ua zM`9UVgo5@FJ+Q=j@eK;w;#gwKpunAhC3Xf1-1}H!FQL#)gC#T`H59r{NywH*!8@CT zY;P322T8~-N5T7sE+k_QqVSDFGWHG%-)tmfttfm;l8E&{#BVhcv4M#Atw$m@HX?qT zkcjm{#BU9fv6iwYf%Yj1-&`bPucGkHL^5_C3g1{HV`rk^eLzCCEehVvBxDPq;2lds zHWoD$x(!Lno<^aYoTTh96u4(e%;rXcJDkLI|?;W_cMU_eCU&~`{{>`COe@9>^6E6 zpC5%t*fsQE6xmwTP{Vc!qr`s852&Hri;-p%@d0Y^I$42{V!e3;H9_Ao8}a$~FbR8$ zu^B*O|f6BI}f5J>wBihexXB96ZSYgv0q?LI#5$~Fg9G>coH>f zt;~Q8#}258yNzM8@%aihb*nQBb{T5&K4c*LJX??&YWj|apJxxD0{V$b!0Ii73h8v} z8IPbsYGX=l2rHt3Iu{#E7oI`|)yCBP4_gTp*7^Joy9*Uo3*%t`z)aLoaqWo#0B52C zdxvfqFo^F^k*$aUJEB6n6$4&Ig;rxaiZ?qdxPvI(F{t2Prf^+&3l-h06m3pac!yB5 z<51zfLczN5HY&bfQ>@=3$H5e9FXXtNV%>}!ZSiQGKSQ)vxZlV}#AXnFY6k~nl>Uw}; zY=T@}4^xb-kgMxaim^R%bv;2bc0;bNrzplg$kp`>#W)DLx}KvLha*?li + + + + diff --git a/templates/swift/Resources/bq.png b/templates/swift/Resources/bq.png new file mode 100644 index 0000000000000000000000000000000000000000..9636b193160489db20a5f9025782a53e4d2e8c5f GIT binary patch literal 5468 zcmY*dbyO7Iwx(<7fssyWq(oYJ96(~|K>=w{5J{<_ht6S$p-VzgYLF0+t|259q&q~V z8BpN*yYIer-#crsbl#sYzs{<|5|SMT+_>- zhzmP`q?3?`7abqI!<)-1(w=Z~;Aha}GhL+kG=q*pm0jL31L5)urzk$KkqeYcRT2;}1)?s8^DajIegt z+!EZjqf=JBcT~B4XLRkC2{6Shv5zOOm(D?2gRj{xt*}q2L7u@oP{MO}^f!9*;qC7! ztl$>8?m3M@@rmU2DWQ+TeG*jgL8tx80X~?h%9}?acA{PSE+!{ppb^039p(j_`VQu# zAN6?6;0+nkrl)E6s>CWb^)DT0DJtyo3!;1QSnB6)H2G8q4ACRb&=wBB;S+{}UP}%V zX2-WK3q0E8rV|W?TGS7}grS zKvyX`ej)jJZ=pzv#k);WScLqUgZN}JV(;^3^eWqVYGF<*zWJU)FjGogvc0^|>%P44 zvJZdmJ0-L_l95a0WfxGgcX#|moeKA`Dy}7!zPMOQY@3v0L*;iv=}QPZ?RRDBkaBNj zNxfU{cs}n>lGgl_`>H6jHgmdzGpYFa!1^I6?Z7G0q;d!~p1txG%`!YJ*<@X8YzP4`go+ z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-Im_?$LNjU4#!A@N9&^%UV`ET(0AT)BKQO95BJlSkvbJLq$6JLv2D9AW2Z zgNhGRBAnyot}6M1Hl?~p_JHShN^V>QtuAfY{)iZk z%snaNsRe?ijbS~W9I2s-m(kc=Pl%~e^qmqFWfj${$7aZg-)}sV@AXNd>f!yQno~La zCfw;<>3V7iqbUAH{xlj~yyxiMDnR2SM#e3B-iAy52YW=DW~Gwv4LLuhS#hWDg) z={fJn?HyQNtr1c55^vLKlLda7ejx~aTjt1v5tVi%%GK`HGMein%du0-ZnoTVP7b3vwnpcf_)X0EvX=fslmL!4JF|X+9JiK(% z*Dq&ftN3euGNfUy={yZJ1WU|gE3Jv3d!a9i#evz z1)nXweZz2@&A`{}GnO6I`^R1wT8p!qa#svJm`=o$l(E|7!?eMc>FS?ZO-`4Fo8nTP z;BfOR!)q(l*(a8fXV&7eg)iPF*quIpKf}GmNIb{RK0`5P)~HZj{%6yaD5|pN+dezh zEakPeNTU_R$6~lAD$Umd(r7hu7NnP@_p36A$3)kfLlm}U`uNM~x3W8B1>+?gHShLj xjpT{1p9OiS{#|lL;8osMw;585a{hPYS@%xBh9aMN + + + + + + + + + + + + + + + + + + + diff --git a/templates/swift/Resources/br.png b/templates/swift/Resources/br.png new file mode 100644 index 0000000000000000000000000000000000000000..51dad86ff487032653f593795336f3e9402a78e6 GIT binary patch literal 1241 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K588}#g)VJz{w+sv{3p`yMLn;{G9NfsrARxf9 z;WguL{cN`TUX%1eYOw(8=MQ~+&uhM0In#1`Z8gUPmEJ`fHQvd$x8=S)wk`MeH=W}^ z(#$M5`t6#&J-NzCT1CSDt?%Crf29+*^2oAahgd6L`_ro5*Y*YMK6S%6{)Fha)^7ol zZ>^l}pHlt4*)MoHQ|4vnBL4EFUDly_2mL||!%x}XVa^Jcn0-og+p4aa;k-LpvoqpE zH?N9GoUPTf`YD%n^wBr^+cSQzp0W8U*Y2o98-?&2Q?;In>~ytuJsP7KeuFtnlgT19 z@1mb71Cs(AHN4_zV9}H6;8OwG~}kwvjs+=1npGFkg*p?9FzuRo(TBeaL`81+R0Zx=EH3tiNi*}!uU4jZ|#{-E^zLx`<>gR*KhY%y!+HH&z?B@ezDfQ;^>Em`HyQ) ze%d;BQtMj9(k!;#^gJ^RCVeo>&=ny2>-x ziP8FmbJ^D5!mXw`x3$HWUF!cdVQY2%{YSgA_eJm7etT`=Z`aEj?0S=g@3o#f`1AS% z;kf2tgYSR5tLHRXK96rGPkQ2y2!Hf_U_s*}p!b_RdnX_~cniwff%{r+35es@`~ zz1TgU;onsET%-7>b$+4t@lQ{#x%ge5vEt3v>R&F`^LnkBIQBi@P_SU)=woP7ZotRv zXW&S%wST|9>22kDakU1^t=s$NKiIS5xAmfbad$QW+25|s@j6gg`Tt$zw8d81|KovP zIr~=W`CAkB(pgjY$A)CjKV3Qd{(tL5|84hA-G4qbdGcx3ZFAm#*?q8V`Si_QxkXp6 zeKA_S=VdStN+vK&u1 vK;M~D8prXjr)z4*}Q$iB}?9TAS literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/br.svg b/templates/swift/Resources/br.svg new file mode 100644 index 00000000..337af8f4 --- /dev/null +++ b/templates/swift/Resources/br.svg @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + diff --git a/templates/swift/Resources/wb.png b/templates/swift/Resources/wb.png new file mode 100644 index 0000000000000000000000000000000000000000..02d3e2b367afd8bbf4cb5ade3b17abc507c02f90 GIT binary patch literal 4090 zcmVWY7duX8u z*+T83X2EQwc_KpdwY5y zSQ@J4WGYcmyUAo$seTr2TQZFxQ`ijo`$;7-8MVG}+l__fvXFg{zjb6X>NeqRUFOl4 zd8~!pZkEZYD$%eqeqeFFr4)JlO(v823U8Z{kByL9FPRM5KzO^6d|ca1{uN;M72ZA} zA0HvNy=5}!DB*1~`Iv~@j+DuulZCfA^C!S0URHH!2EyFT7cOg>}ufN&1yB!lrd&_!*}h-SMd(AchEW9I_Q{vvb> zwXd2DbBO9hi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;gDIR#<-mDNWe1j8LrG$fVJWkjsa(u4RAkpGaV(cG zl`UAxJVH{dz=s%e8(73t?q@8WX-tGfMQBVH#&SPXSh2T)T@qxi4^2?D3_HXC&v4O$XZ1oJt%>=`^Q39b)f4 zlJQ*1wSk*r?{_EH?&2!O$BbiOAb9^kUpgd^&B?JLx}HaPgPbDFZm*I-2ukBJqPS20 z;4ubqI5kKWznUD*ARgl%xKB|oB0^|7j3>#*xbk?PLDZ%2rK-zdCi5f4^&^k-D?(RO zM)EwX$wOo-i+PvJ=u8HwidF_)xSaP`%vMD5Sk1GHpfREEP*SDF=s(+oV*vmF0DwXM s)|1#-0RR9100000000000001^0CCYpfG?FbwEzGB07*qoM6N<$g6^Hx)c^nh literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/wb.svg b/templates/swift/Resources/wb.svg new file mode 100644 index 00000000..a4b5b770 --- /dev/null +++ b/templates/swift/Resources/wb.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + diff --git a/templates/swift/Resources/wk.png b/templates/swift/Resources/wk.png new file mode 100644 index 0000000000000000000000000000000000000000..8786d743a0163edab3a466f2bb818be23d649898 GIT binary patch literal 4740 zcma)AS5OlSvrUZjj-dnzy#x^Wq)TrJB~k*Rh*W`4LT^$vl+cBQ4hl#ULI=f~1m1aCyAc*L*soU*tkR zWse#@@g%5@Dp_aB->2Z0OlO!45c`30jd>5Grz z%qxFT0RK4Py8XEV_Mu@p{x#Hf!jA`r@7nNH`Vd7SQE1riu`An3Z8;OIcX#-3Y-&2b z%g3u!;Qn@!_654g*%r3j;w((8EfJ*MQw>Wd))(Vjf;L&6H0bM{{3!_vOZ0DRJcUh$ zQ{zKOs{IEZC5<7sTy<+w%ZOe0qhY~RbG$t7kHi71vwz;xhs`xb|b)!N`XlLxMnuuU@!8VLx7N%CJ;qKYU ztybgpWNKrlp}x8zbeweqtI2W*D}S`%OFx5hD11>9RM~vo86YSB5v=y&cKhASX-j#6 z$&h>A(zFfA=|avyHt6Lqa%J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#A7YpNMCL9p9K#q~(X+h7F8gX#Ssd$| z4PgWk?jU2DQEkLQ=?5~AeOibCka&C8mqec;mEsn}+Lnt4>^gg8WO3CzJ>db6k;yZH zgeRPReyn7gp05pLJx*tf&|9D43RF%%e0U85NaE?yZob3Fd!#Gb7NeRx4iMMCfg(pt zl?9n*^Y}Xljb(A6RE^K5w&PUo?I<%%dg%FbfZ!t;QQ9&nD6f)JLwgBMEE9b&p=>WDKCYVOU0YPgPTjj)oA~k*C9`b4Tj7o-qa>@TMS8 z;YPk53u)C2@_3!A{V5Q=0ayrxynjgm>^DU#wiWgtm#&4H@Bpie@wP@>&2CE+=z;Fy<#z#_hdd308(ymO zs_&q^h=YiI>J#Sq-Xg&S$nWesw;tT65LybA#jR`HXf4K%t==2_CvJHvlYKh*;*q^u z8h^@SKKcHbTS}P7ge#~q3i)M&8;Q(%%Qcl7xVsE?rz8{ruUqFe`_h0*fkOdmCNc>E zR~&O|LgGyj8ME=}F z*kgoAuToB1GuNuHl%^J-1Ank!-Z1;8a>BgonAo%|NPh{i<460xiBWNJsJJa-69c$y z%`sl{Te!2=r?WKmJ*2l613=A7^lg=CG?*rGP~?rX5tn7Tor-AQw!Qe&8_?;)@qUsH z-_YH5jk$jRZUwdPMXEUpE^p58uOS+Z+{Zxe(PT6uob8lpCe&N7n@L|ZGWowW>~+-*X$* zzBJj}d|O#u&vjBgT`|#%eU0*hyoO-Zo>XuExyJeDVUo7L_3o`VXP`g!>Z!inIJ=Yk( + + + + + + + + + + + + diff --git a/templates/swift/Resources/wn.png b/templates/swift/Resources/wn.png new file mode 100644 index 0000000000000000000000000000000000000000..60f52dab3eba462c979230c8c679524621d5788c GIT binary patch literal 4386 zcmV+-5#8>IP)!Qxi; zH!qiL8xfS~R4ih@BqJt<|JQn&w_=KR-~ zlJ0&&7Z*Uz^`yApn4V(SVYYev)x5rH*=ci0m(WfW zkQ1=5786y!bQ~$}FbXyE8m4RZK?@xz*~TLZ$ZnYKJ^%H%ZIbPGwq>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#@4r#|K}cSCELlg-k&ksX6DO^+0#zRS&UKG z+HO?!ZF@_$d+9KFs}yl_JKTKPM#6p|LF-e8t!ZYP)c2fKvVBQET5CH>7}wWf=FOoJ zR-y|DT8b}m(mT+GvD-)E8d;In+KNVu>*Rgr&rpe*jU>&$9XP4YW^XCqF|^i}G-6zh zmzYOaNZcYMYXzRfDbm%{Ov!gY4mF?dmbleP+FYE#vy8?vji!VX(Q|aAb+)DvvmIq# zJuh)vkps2N%_?lop8ws}tj0pjLO0-PoM4|b1Ff?Q&6sUxOXk&w61Oiowj)lUPnn(8 z*^6e(wtsn|2&68ap&Ak~pic7eYXL*Dh7|Qzer1g%& za&2P0)nJ7dA1B-H5G>bbHdr0jm#}vzvdAu!Fx!?kSS_}ZurDaC$o4d2wry;*dh8)# zzfx3@jcLSeyW4CvIaI=$0NSleJ!ae2lGWuTiR(_`&CSo4ZGTHvo1qdnJq7m%KE!Oh zTC)0_Cvih4v<}>l**3GuYIL>4EkvQ6irF@@!RmCo#4S&Otw}S+t!bUr>Jf=si^A%| z7Z|sQBduOfOWXz&)|D7Hqn}&NUXr-YDX0xGuB$Iv-QJYA?J1-#e1LK1S?%7JxLqlv zV=!)8tKX**w+{t0BO@?u7Jsq&eIs!PQ$S~9SdI5s1V2mMQ54P}7?qv!T@1fT+=&#< zDHzt>&n<>Vi94Nw>B^57c8bMOD`9`7V79`r-#NnK=qO=-qhRjAuoEqkP7-z|g)$RO z@%R6a7D*QgJDWn;AH%k{Sh`BsITXrW81|6G(k**But2&nDm#|GSb9jT>eft$au|EM;$FTD) zlJ;K#yI|P!7Ejj#uLPciVc%OkwFSNzbV0laxMcCvNZ6kXdmnI!#nU8lXHXc=#xH>L z3)jCS?i32+b!@N5djf}Hdzp@ + + + + + + + + + diff --git a/templates/swift/Resources/wp.png b/templates/swift/Resources/wp.png new file mode 100644 index 0000000000000000000000000000000000000000..39437236af057c7966c970efeccbf950d29c141f GIT binary patch literal 2792 zcmaJ@c{tPy7oNKL7_vv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$OGzTPWvXa?WTI=dRZEFTUTR?yU2#ujVyu zJEEUz&=`B7b?@Vn=4NmOKKo0La|(5~rSzoAf<4zqiC%9AeWU2uDb=1rh)JYs=n-NA zu*B67%=s=QkMk%GSQ-~%j3IbUi)6aTfZSd+d2_HJM10`V86wyj1zP)+DOQ0E@?Lss za{V6aKT7%uqH7%)vM^fDkLBA({pHM**w>f`e0r=V1YCc+&(xxyLR*3Wg}sPTS+QFhby``xQj@v!15 zwmQ$U*a$23-Fn4}V>`AgGwRrXC|d34n0fGv1T8Q3VoUeUzA;@q>W9UO)rjrb+IF;K zzg8*1s8V7$LD; z#ETNMcF9=-&7O=;J*mcc3?(>ez@=`VTG{)VmcMbTRyQ*2cx~m~p00TVL^&he$=+OX zYC5!yyP80cu|PdsSsvd*zXk)kE? zZv$(}mu(`|5LORd_pM#u4^6DBcgtQnoQi$9-rypO4Y~a+tx_ zYFxZ9iU2qbq#z1lus~5VE5shGcsVOTW*R7R3(F&MotB$&4op+GnLxc)6D~pDI9&gb zo>Pb&$nF5y1VuHWd!;*%29*!%TG+LT8>!1}9ZZ(GZF(ZS9w1At&Vc}=K_RuezJP4Z zi6Q3~YjDTp&K+5jZw&A`xNe1;Uz`{|V!97Yq{iB#xV7RGl!I8akeFR&=^=&Hif^z+I{p}h2%Z)2t$SOks!Rr@7 z@>m+Ievc2U$v3>twlC*awq!vXe<&M0OTV-GYhkMux@YFA=an`A;nl2gJ7n3SFer&0 zeYP;nXysur$s}j+)&%VONNb5+clIlDaD;u#RmHovn?DEZeoSD<%{d0#O7D8Q+mMy( m-~3sv)=fkWF9rX9>3fLmzFA!n+e+x)_Y`68Y}X9;yZ>Jt%YQZi literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/wp.svg b/templates/swift/Resources/wp.svg new file mode 100644 index 00000000..11425163 --- /dev/null +++ b/templates/swift/Resources/wp.svg @@ -0,0 +1,7 @@ + + + + + diff --git a/templates/swift/Resources/wq.png b/templates/swift/Resources/wq.png new file mode 100644 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;NB?v1a>tu(hOF-L*d=>p+TTF=3}vpB>*I8or@U9w+I4I_`t~=kzpA?HH>3WA zMLq;Z)~TKsWjP_(?CX@4QHPB3De?4br`hOjdA4<8UVK>luCA-7HZ39SYe`#OLs4x# z*az{$EAwb8%byGzecEy4llj970j|v~s%>c7Y+Zlim~3G?He)*BlLTd|T{yAdI;;rC zRR}sTr*GGx)+fc!%MVZN+nH<0AAh{8tthH%qZEE#a`DMtznWc`w`;Q|zSOMVX6Ms~ z-6HV28;xm^I&20`<`SCGZW9IG<%+@exxs?Z?b{w+`q0vl0{|B*{4k)A^dH*xe?J`l bzflcTCL)!8>wPQa>QYbJNUKT1IpO~RWz37r literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/wq.svg b/templates/swift/Resources/wq.svg new file mode 100644 index 00000000..97043c5a --- /dev/null +++ b/templates/swift/Resources/wq.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + diff --git a/templates/swift/Resources/wr.png b/templates/swift/Resources/wr.png new file mode 100644 index 0000000000000000000000000000000000000000..eeda04d045d07a320daad5ed75a9b1900cf93aea GIT binary patch literal 1300 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K588}#g)VJz{w+sv{w>@1PLn;{G-f(V6372X8 zXl$0Hw(aebOS=n%Z*Mc(`1YZenR#M<((P@z(rbkm8<@VoT6?he`|r7bOTPcvzX)g! z0icq(M$6JH>aFBTui4Tozx9Nv9zUk#*jzH@-sIwUyl)r(JC)3CtIz(X^6dhfU)l0| z6`$X!w(@G8GNJC(l-qY^o_go8vq5&{n{!ic$1MM)Df#*o@I39+-HZhmF&Fwc>KRXL@DuG~=$pcQYa)w4 z55uf}295@Xv@b1U(qRz{$19!MWWysE4oCf)Bgy%oU-wa%Rx9g=-pxOjZD7#KOPyH8 zq`<(W&=6i)xy&{=g5iA1pU(CFj2Q(S4lprsL{~7dIDnDCJ*|xUmfi2yG?~p~=;BDQ zTs`6JlQn6ZxNa7)1h_B+uXWnCe)FyCS}DPt3pyBf?O7(eXVw0qu=t%>togp>f)0X= zH*D=rudZf1fBl-+*HiP}yq|mg`@A<(ZR2N0-&y@z=lhLFW`%|j0R~1a=s?8#X%CJG zF?gFcSU+joXg#H;|7qLC{;56Zfz?E8>hXgbjPpP$3#Cq zIluXUPv2P|n_taB75hpU_sn?yXUBpP#ux}gm*v=%9bI+b zT1wOBxXRAD<<@S?BYS6SY}qnn*OObi&*hGUs`fGLk;?@t_>-UK2Os?Fza@W&aXJ4}a^>|W! zq1dcid&kOWqIKa{9~U)M$Aofrzs|P2SiANp=YuTEhq1m4@h3Rnb2Ak@@|Iy#>0=0T zXE5bh@T%5(&#N!MWb7Q1){dEgfa-+Y89J34jtDwD;!r4Lnb2@^>t?=r&ti6m+AKU0 z4fNT;%XiMrid8L`ukp#= zQv%BYjt3d_*GlAnZawmCqJ8$R#iwNtuq@un$udCz9^oni2i)vdKfU2rBYc9RL6AYY z;e|T`^A*+23raH^l*-ngX)0U0Xj{v^Ns+gIdwFXVdB5cQdQ#{6uafp@L7F`mYjnOJ g%A2mk;8 literal 0 HcmV?d00001 diff --git a/templates/swift/Resources/wr.svg b/templates/swift/Resources/wr.svg new file mode 100644 index 00000000..8d2d9320 --- /dev/null +++ b/templates/swift/Resources/wr.svg @@ -0,0 +1,25 @@ + + + + + + + + + + + + + diff --git a/templates/swift/Source/FDChessboardView.swift b/templates/swift/Source/FDChessboardView.swift new file mode 100644 index 00000000..7461e183 --- /dev/null +++ b/templates/swift/Source/FDChessboardView.swift @@ -0,0 +1,239 @@ +// +// FDChessboardView.swift +// FDChessboardView +// +// Created by William Entriken on 2/2/16. +// Copyright © 2016 William Entriken. All rights reserved. +// + +import Foundation +import UIKit + +public struct FDChessboardSquare { + /// From 0...7 + public var file: Int + + /// From 0...7 + public var rank: Int + + /// A format like a4 + public var algebriac: String { + get { + return String(UnicodeScalar(96 + file)) + String(rank + 1) + } + } + + public var index: Int { + get { + return rank * 8 + file + } + set { + file = index % 8 + rank = index / 8 + } + } + + public init(index newIndex: Int) { + file = newIndex % 8 + rank = newIndex / 8 + } +} + +public enum FDChessboardPiece: String { + case WhitePawn = "wp" + case BlackPawn = "bp" + case WhiteKnight = "wn" + case BlackKnight = "bn" + case WhiteBishop = "wb" + case BlackBishop = "bb" + case WhiteRook = "wr" + case BlackRook = "br" + case WhiteQueen = "wq" + case BlackQueen = "bq" + case WhiteKing = "wk" + case BlackKing = "bk" +} + +public protocol FDChessboardViewDataSource: class { + /// What piece is on the square? + func chessboardView(board: FDChessboardView, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? + + /// The last move + func chessboardViewLastMove(board: FDChessboardView) -> (from:FDChessboardSquare, to:FDChessboardSquare)? + + /// The premove + func chessboardViewPremove(board: FDChessboardView) -> (from:FDChessboardSquare, to:FDChessboardSquare)? +} + +public protocol FDChessboardViewDelegate: class { + /// Where can this piece move to? + func chessboardView(board: FDChessboardView, legalDestinationsForPieceAtSquare from: FDChessboardSquare) -> [FDChessboardSquare] + + /// Before a move happens (cannot be stopped) + func chessboardView(board: FDChessboardView, willMoveFrom from: FDChessboardSquare, to: FDChessboardSquare) + + /// After a move happened + func chessboardView(board: FDChessboardView, didMoveFrom from: FDChessboardSquare, to: FDChessboardSquare) + + /// Before a move happens (cannot be stopped) + func chessboardView(board: FDChessboardView, willMoveFrom from: FDChessboardSquare, to: FDChessboardSquare, withPromotion promotion: FDChessboardPiece) + + /// After a move happened + func chessboardView(board: FDChessboardView, didMoveFrom from: FDChessboardSquare, to: FDChessboardSquare, withPromotion promotion: FDChessboardPiece) +} + +public class FDChessboardView: UIView { + public var lightBackgroundColor = UIColor(red: 222.0/255, green:196.0/255, blue:160.0/255, alpha:1) + public var darkBackgroundColor = UIColor(red: 160.0/255, green:120.0/255, blue:55.0/255, alpha:1) + public var targetBackgroundColor = UIColor(hue: 0.75, saturation:0.5, brightness:0.5, alpha:1.0) + public var legalBackgroundColor = UIColor(hue: 0.25, saturation:0.5, brightness:0.5, alpha:1.0) + public var lastMoveColor = UIColor(hue: 0.35, saturation:0.5, brightness:0.5, alpha:1.0) + public var premoveColor = UIColor(hue: 0.15, saturation:0.5, brightness:0.5, alpha:1.0) + public var pieceGraphicsDirectoryPath: String? = nil + + public weak var dataSource: FDChessboardViewDataSource? = nil { + didSet { + reloadData() + } + } + + public weak var delegate: FDChessboardViewDelegate? = nil + + public var doesAnimate: Bool = true + public var doesShowLegalSquares: Bool = true + public var doesShowLastMove: Bool = true + public var doesShowPremove: Bool = true + + private lazy var tilesAtIndex = [UIView]() + + private var pieceAtIndex = [Int : FDChessboardPiece]() + + private var pieceImageViewAtIndex = [Int : UIImageView]() + + private var lastMoveArrow: UIView? = nil + + private var premoveArrow: UIView? = nil + + 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 + + for index in 0..<64 { + let square = FDChessboardSquare(index: index) + let tile = UIView() + tile.backgroundColor = (index + index/8) % 2 == 0 ? darkBackgroundColor : lightBackgroundColor + tile.translatesAutoresizingMaskIntoConstraints = false + addSubview(tile) + tilesAtIndex.append(tile) + + switch square.rank { + case 0: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: self, attribute: .Bottom, multiplier: 1, constant: 0)) + case 7: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Top, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Top, relatedBy: .Equal, toItem: self, attribute: .Top, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Height, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Height, multiplier: 1, constant: 0)) + default: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Top, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Height, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Height, multiplier: 1, constant: 0)) + } + switch square.file { + case 0: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: self, attribute: .Left, multiplier: 1, constant: 0)) + case 7: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Right, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Right, relatedBy: .Equal, toItem: self, attribute: .Right, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Width, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Width, multiplier: 1, constant: 0)) + default: + addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Right, multiplier: 1, constant: 0)) + addConstraint(NSLayoutConstraint(item: tile, attribute: .Width, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Width, multiplier: 1, constant: 0)) + } + } + self.layoutIfNeeded() + } + + /* +- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event +{ +UITouch *touch = [touches anyObject]; +CGPoint point = [touch locationInView:self]; +NSInteger x = point.x*8/self.frame.size.width; +NSInteger y = 8-point.y*8/self.frame.size.height; +UIView *tile = self.tilesPerSquare[y*8+x]; +tile.backgroundColor = self.targetBackgroundColor; +} + +- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event +{ +UITouch *touch = [touches anyObject]; +CGPoint point = [touch locationInView:self]; +if (![self pointInside:point withEvent:event]) +return; +NSInteger x = point.x*8/self.frame.size.width; +NSInteger y = 8-point.y*8/self.frame.size.height; +UIView *tile = self.tilesPerSquare[y*8+x]; +tile.backgroundColor = self.legalBackgroundColor; +} +*/ + + public func setPiece(piece: FDChessboardPiece?, forSquare square: FDChessboardSquare){ + let index = square.index + pieceAtIndex[index] = piece + self.pieceImageViewAtIndex[index]?.removeFromSuperview() + self.pieceImageViewAtIndex.removeValueForKey(index) + guard let piece = piece else { + return + } + + let pieceImageView: UIImageView + let fileName = piece.rawValue + let bundle = NSBundle(forClass: self.dynamicType) + let image = UIImage(named: fileName, inBundle: bundle, compatibleWithTraitCollection: nil) + pieceImageView = UIImageView(image: image) + pieceImageView.translatesAutoresizingMaskIntoConstraints = false + self.pieceImageViewAtIndex[index] = pieceImageView + self.addSubview(pieceImageView) + + let squareOne = self.tilesAtIndex.first! + self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Width, relatedBy: .Equal, toItem: squareOne, attribute: .Width, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Height, relatedBy: .Equal, toItem: squareOne, attribute: .Height, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Top, relatedBy: .Equal, toItem: self.tilesAtIndex[index], attribute: .Top, multiplier: 1, constant: 0)) + self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Leading, relatedBy: .Equal, toItem: self.tilesAtIndex[index], attribute: .Leading, multiplier: 1, constant: 0)) + self.layoutIfNeeded() + } + + public func reloadData() { + for index in 0 ..< 64 { + let square = FDChessboardSquare(index: index) + let newPiece = dataSource?.chessboardView(self, pieceForSquare:square) + setPiece(newPiece, forSquare: square) + } + self.layoutIfNeeded() + } + + public func movePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare) -> Bool { + return true + } + + public func movePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare, andPromoteTo piece: FDChessboardPiece) -> Bool { + return true + } + + public func premovePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare) -> Bool { + return true + } + + public func premovePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare, andPromoteTo piece: FDChessboardPiece) -> Bool { + return true + } + +} \ No newline at end of file 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/Tests/FDChessboardViewTests.swift b/templates/swift/Tests/FDChessboardViewTests.swift new file mode 100644 index 00000000..9de78012 --- /dev/null +++ b/templates/swift/Tests/FDChessboardViewTests.swift @@ -0,0 +1,29 @@ +// +// FDChessboardViewTests.swift +// FDChessboardViewTests +// +// Created by William Entriken on 4/25/16. +// Copyright © 2016 William Entriken. All rights reserved. +// + +import XCTest +@testable import FDChessboardView + +class FDChessboardViewTests: 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/Tests/Info.plist b/templates/swift/Tests/Info.plist similarity index 100% rename from templates/swift/Example/Tests/Info.plist rename to templates/swift/Tests/Info.plist From 08805bee7eb9f3e4839f2585decde2a39429c1bb Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 16:58:57 -0400 Subject: [PATCH 07/62] work --- setup/{ConfigureiOS.rb => ConfigureObjC.rb} | 4 +- setup/ConfigureSwift.rb | 17 +- setup/ProjectManipulator.rb | 12 +- setup/TemplateConfigurator.rb | 209 ++++++++---------- templates/swift/Example/Tests/Info.plist | 24 ++ templates/swift/Example/Tests/Tests.swift | 1 + .../iOS Example.xcodeproj/project.pbxproj | 104 +++++++++ ...ChessboardView.podspec => PROJECT.podspec} | 0 .../project.pbxproj | 0 .../contents.xcworkspacedata | 0 .../xcschemes/FDChessboardView.xcscheme | 0 .../contents.xcworkspacedata | 0 .../xcschemes/iOS Example.xcscheme | 10 + 13 files changed, 247 insertions(+), 134 deletions(-) rename setup/{ConfigureiOS.rb => ConfigureObjC.rb} (98%) create mode 100644 templates/swift/Example/Tests/Info.plist create mode 100644 templates/swift/Example/Tests/Tests.swift rename templates/swift/{FDChessboardView.podspec => PROJECT.podspec} (100%) rename templates/swift/{FDChessboardView.xcodeproj => PROJECT.xcodeproj}/project.pbxproj (100%) rename templates/swift/{FDChessboardView.xcodeproj => PROJECT.xcodeproj}/project.xcworkspace/contents.xcworkspacedata (100%) rename templates/swift/{FDChessboardView.xcodeproj => PROJECT.xcodeproj}/xcshareddata/xcschemes/FDChessboardView.xcscheme (100%) rename templates/swift/{FDChessboardView.xcworkspace => PROJECT.xcworkspace}/contents.xcworkspacedata (100%) rename templates/swift/{FDChessboardView.xcworkspace => PROJECT.xcworkspace}/xcshareddata/xcschemes/iOS Example.xcscheme (88%) diff --git a/setup/ConfigureiOS.rb b/setup/ConfigureObjC.rb similarity index 98% rename from setup/ConfigureiOS.rb rename to setup/ConfigureObjC.rb index b229d4df..2c15246e 100644 --- a/setup/ConfigureiOS.rb +++ b/setup/ConfigureObjC.rb @@ -1,6 +1,6 @@ module Pod - class ConfigureIOS + class ConfigureObjC attr_reader :configurator def self.perform(options) @@ -71,7 +71,7 @@ def perform :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` diff --git a/setup/ConfigureSwift.rb b/setup/ConfigureSwift.rb index 18e2a2cd..b7991085 100644 --- a/setup/ConfigureSwift.rb +++ b/setup/ConfigureSwift.rb @@ -1,5 +1,4 @@ module Pod - class ConfigureSwift attr_reader :configurator @@ -19,17 +18,16 @@ 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" - + `cp "setup/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` when :none - configurator.set_test_framework "xctest", "swift" + `cp "setup/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." keep_demo = :yes @@ -42,23 +40,22 @@ 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 + + # 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 } end end - end diff --git a/setup/ProjectManipulator.rb b/setup/ProjectManipulator.rb index 3977dfca..9d106618 100644 --- a/setup/ProjectManipulator.rb +++ b/setup/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 @@ -89,8 +81,8 @@ def project_folder 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") +# 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") diff --git a/setup/TemplateConfigurator.rb b/setup/TemplateConfigurator.rb index b0597317..7b754b72 100644 --- a/setup/TemplateConfigurator.rb +++ b/setup/TemplateConfigurator.rb @@ -6,65 +6,33 @@ class TemplateConfigurator 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" + def year + Time.now.year.to_s + end - # default to first answer - if answer == "" - answer = possible_answers[0].downcase - print answer.yellow - end + def date + Time.now.strftime "%m/%d/%Y" + end - break if possible_answers.map { |a| a.downcase }.include? answer + def podfile_path + 'Example/Podfile' + end - print "\nPossible answers are [" - print_info.call - end + #----------------------------------------# - answer + def initialize(pod_name) + @pod_name = pod_name + @pods_for_podfile = [] + @prefixes = [] + @message_bank = MessageBank.new(self) end def run @@ -76,7 +44,7 @@ def run ConfigureSwift.perform(configurator: self) when :objc - ConfigureIOS.perform(configurator: self) + ConfigureObjC.perform(configurator: self) end replace_variables_in_files @@ -85,39 +53,14 @@ def run add_pods_to_podfile customise_prefix rename_classes_folder - ensure_carthage_compatibility reinitialize_git_repo run_pod_install @message_bank.farewell_message end - #----------------------------------------# - - def ensure_carthage_compatibility - FileUtils.ln_s('Example/Pods/Pods.xcodeproj', '_Pods.xcodeproj') - 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 - end - def replace_variables_in_files - file_names = ['POD_LICENSE', 'POD_README.md', 'NAME.podspec', '.travis.yml', podfile_path] + file_names = ['LICENSE', 'README.md', 'NAME.podspec', '.travis.yml', podfile_path] file_names.each do |file_name| text = File.read(file_name) text.gsub!("${POD_NAME}", @pod_name) @@ -130,8 +73,16 @@ def replace_variables_in_files end end - def add_pod_to_podfile podname - @pods_for_podfile << podname + def clean_template_files + ["setup", "templates", ".gitignore", "configure", "LICENSE", "README"].each do |asset| + `rm -rf #{asset}` + end + 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 add_pods_to_podfile @@ -143,10 +94,6 @@ 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 @@ -156,21 +103,6 @@ def customise_prefix 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 rename_classes_folder FileUtils.mv "POD", @pod_name end @@ -181,32 +113,85 @@ def reinitialize_git_repo `git add -A` end - def validate_user_details - return (user_email.length > 0) && (user_name.length > 0) + 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 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 { |a| a.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 - #----------------------------------------# end end diff --git a/templates/swift/Example/Tests/Info.plist b/templates/swift/Example/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/templates/swift/Example/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/Example/Tests/Tests.swift b/templates/swift/Example/Tests/Tests.swift new file mode 100644 index 00000000..a6a86355 --- /dev/null +++ b/templates/swift/Example/Tests/Tests.swift @@ -0,0 +1 @@ +${TEST_EXAMPLE} \ No newline at end of file diff --git a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj index ed90b05b..f074ddaf 100644 --- a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj +++ b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ 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 */; }; @@ -17,6 +18,13 @@ /* 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 /* FDChessboardView.xcodeproj */; @@ -55,6 +63,9 @@ /* 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 = ""; }; @@ -66,6 +77,13 @@ /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + D904BBBD1CDD3F170083BD78 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D94BE1B61CCEBF2C0042282A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -77,10 +95,20 @@ /* 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 */, + D904BBC11CDD3F170083BD78 /* Tests */, D94BE1BA1CCEBF2C0042282A /* Products */, D99B38FB1CD68FD900E56AE2 /* FDChessboardView.xcodeproj */, ); @@ -90,6 +118,7 @@ isa = PBXGroup; children = ( D94BE1B91CCEBF2C0042282A /* iOS Example.app */, + D904BBC01CDD3F170083BD78 /* Tests.xctest */, ); name = Products; sourceTree = ""; @@ -119,6 +148,24 @@ /* 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" */; @@ -148,6 +195,10 @@ LastUpgradeCheck = 0730; ORGANIZATIONNAME = "William Entriken"; TargetAttributes = { + D904BBBF1CDD3F170083BD78 = { + CreatedOnToolsVersion = 7.3.1; + TestTargetID = D94BE1B81CCEBF2C0042282A; + }; D94BE1B81CCEBF2C0042282A = { CreatedOnToolsVersion = 7.3; }; @@ -173,6 +224,7 @@ projectRoot = ""; targets = ( D94BE1B81CCEBF2C0042282A /* iOS Example */, + D904BBBF1CDD3F170083BD78 /* Tests */, ); }; /* End PBXProject section */ @@ -195,6 +247,13 @@ /* End PBXReferenceProxy section */ /* Begin PBXResourcesBuildPhase section */ + D904BBBE1CDD3F170083BD78 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; D94BE1B71CCEBF2C0042282A /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; @@ -208,6 +267,14 @@ /* 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; @@ -220,6 +287,11 @@ /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ + D904BBC61CDD3F170083BD78 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = D94BE1B81CCEBF2C0042282A /* iOS Example */; + targetProxy = D904BBC51CDD3F170083BD78 /* PBXContainerItemProxy */; + }; D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = FDChessboardView; @@ -239,6 +311,30 @@ /* 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 = { @@ -349,6 +445,14 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ + D904BBCA1CDD3F170083BD78 /* Build configuration list for PBXNativeTarget "Tests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + D904BBC71CDD3F170083BD78 /* Debug */, + D904BBC81CDD3F170083BD78 /* Release */, + ); + defaultConfigurationIsVisible = 0; + }; D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */ = { isa = XCConfigurationList; buildConfigurations = ( diff --git a/templates/swift/FDChessboardView.podspec b/templates/swift/PROJECT.podspec similarity index 100% rename from templates/swift/FDChessboardView.podspec rename to templates/swift/PROJECT.podspec diff --git a/templates/swift/FDChessboardView.xcodeproj/project.pbxproj b/templates/swift/PROJECT.xcodeproj/project.pbxproj similarity index 100% rename from templates/swift/FDChessboardView.xcodeproj/project.pbxproj rename to templates/swift/PROJECT.xcodeproj/project.pbxproj diff --git a/templates/swift/FDChessboardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from templates/swift/FDChessboardView.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to templates/swift/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme b/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme similarity index 100% rename from templates/swift/FDChessboardView.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme rename to templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/FDChessboardView.xcscheme diff --git a/templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata similarity index 100% rename from templates/swift/FDChessboardView.xcworkspace/contents.xcworkspacedata rename to templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata diff --git a/templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme b/templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme similarity index 88% rename from templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme rename to templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme index f9442eaa..f3f8c68e 100644 --- a/templates/swift/FDChessboardView.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme +++ b/templates/swift/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme @@ -28,6 +28,16 @@ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" shouldUseLaunchSchemeArgsEnv = "YES"> + + + + Date: Fri, 6 May 2016 17:17:50 -0400 Subject: [PATCH 08/62] work --- {setup => configurator}/ConfigureObjC.rb | 0 {setup => configurator}/ConfigureSwift.rb | 5 - {setup => configurator}/MessageBank.rb | 0 {setup => configurator}/ProjectManipulator.rb | 2 +- configurator/TemplateConfigurator.rb | 202 ++++++++++++++++++ configure | 2 +- setup/TemplateConfigurator.rb | 18 +- .../{NAME.podspec => PROJECT.podspec} | 0 {setup => templates}/test_examples/kiwi.m | 10 +- .../test_examples/quick.swift | 2 +- {setup => templates}/test_examples/specta.m | 10 +- {setup => templates}/test_examples/xctest.m | 0 .../test_examples/xctest.swift | 10 +- 13 files changed, 233 insertions(+), 28 deletions(-) rename {setup => configurator}/ConfigureObjC.rb (100%) rename {setup => configurator}/ConfigureSwift.rb (90%) rename {setup => configurator}/MessageBank.rb (100%) rename {setup => configurator}/ProjectManipulator.rb (97%) create mode 100644 configurator/TemplateConfigurator.rb rename templates/baseline/{NAME.podspec => PROJECT.podspec} (100%) rename {setup => templates}/test_examples/kiwi.m (95%) rename {setup => templates}/test_examples/quick.swift (98%) rename {setup => templates}/test_examples/specta.m (95%) rename {setup => templates}/test_examples/xctest.m (100%) rename {setup => templates}/test_examples/xctest.swift (96%) diff --git a/setup/ConfigureObjC.rb b/configurator/ConfigureObjC.rb similarity index 100% rename from setup/ConfigureObjC.rb rename to configurator/ConfigureObjC.rb diff --git a/setup/ConfigureSwift.rb b/configurator/ConfigureSwift.rb similarity index 90% rename from setup/ConfigureSwift.rb rename to configurator/ConfigureSwift.rb index b7991085..452830a5 100644 --- a/setup/ConfigureSwift.rb +++ b/configurator/ConfigureSwift.rb @@ -51,11 +51,6 @@ def perform # 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 } end end end diff --git a/setup/MessageBank.rb b/configurator/MessageBank.rb similarity index 100% rename from setup/MessageBank.rb rename to configurator/MessageBank.rb diff --git a/setup/ProjectManipulator.rb b/configurator/ProjectManipulator.rb similarity index 97% rename from setup/ProjectManipulator.rb rename to configurator/ProjectManipulator.rb index 9d106618..d4427af0 100644 --- a/setup/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -85,7 +85,7 @@ def rename_files # 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") +# File.rename(project_folder + "/PROJECT.xcodeproj", project_folder + "/" + @configurator.pod_name + ".xcodeproj") unless @remove_demo_target # change app file prefixes diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb new file mode 100644 index 00000000..15a23524 --- /dev/null +++ b/configurator/TemplateConfigurator.rb @@ -0,0 +1,202 @@ +require 'fileutils' +require 'colored' + +module Pod + class TemplateConfigurator + + attr_reader :pod_name, :pods_for_podfile, :prefixes, :test_example_file, :username, :email + + def user_name + (ENV['GIT_COMMITTER_NAME'] || `git config user.name`).strip + end + + def user_email + (ENV['GIT_COMMITTER_EMAIL'] || `git config user.email`).strip + end + + def year + Time.now.year.to_s + end + + def date + Time.now.strftime "%m/%d/%Y" + end + + def podfile_path + 'Example/Podfile' + end + + #----------------------------------------# + + def initialize(pod_name) + @pod_name = pod_name + @pods_for_podfile = [] + @prefixes = [] + @message_bank = MessageBank.new(self) + end + + def run + @message_bank.welcome_message + create_staging_directory + + framework = self.ask_with_answers("What language do you want to use?", ["Swift", "ObjC"]).to_sym + case framework + when :swift + ConfigureSwift.perform(configurator: self) + + when :objc + ConfigureObjC.perform(configurator: self) + end + + replace_variables_in_files + clean_template_files + rename_template_files + add_pods_to_podfile + customise_prefix + rename_classes_folder + reinitialize_git_repo + run_pod_install + + @message_bank.farewell_message + end + + def create_staging_directory + FileUtils.mv "templates/baseline", "staging" + end + + def replace_variables_in_files + file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', podfile_path] + file_names.each do |file_name| + text = File.read('staging/' + file_name) + text.gsub!("${POD_NAME}", @pod_name) + text.gsub!("${REPO_NAME}", @pod_name.gsub('+', '-')) + text.gsub!("${USER_NAME}", user_name) + text.gsub!("${USER_EMAIL}", user_email) + text.gsub!("${YEAR}", year) + text.gsub!("${DATE}", date) + File.open(file_name, "w") { |file| file.puts text } + end + end + + def clean_template_files + ["setup", "templates", ".gitignore", "configure", "LICENSE", "README"].each do |asset| + `rm -rf #{asset}` + end + 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 add_pods_to_podfile + podfile = File.read podfile_path + podfile_content = @pods_for_podfile.map do |pod| + "pod '" + pod + "'" + end.join("\n ") + podfile.gsub!("${INCLUDED_PODS}", podfile_content) + File.open(podfile_path, "w") { |file| file.puts podfile } + end + + def customise_prefix + prefix_path = "Example/Tests/Tests-Prefix.pch" + return unless File.exists? 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 rename_classes_folder + FileUtils.mv "POD", @pod_name + end + + def reinitialize_git_repo + `rm -rf .git` + `git init` + `git add -A` + 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 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 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 { |a| a.downcase }.include? answer + + print "\nPossible answers are [" + print_info.call + end + + answer + end + + def add_pod_to_podfile podname + @pods_for_podfile << podname + end + + def add_line_to_pch line + @prefixes << line + end + + def validate_user_details + return (user_email.length > 0) && (user_name.length > 0) + end + + end +end diff --git a/configure b/configure index 82196edf..5aad1bd5 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #!/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 diff --git a/setup/TemplateConfigurator.rb b/setup/TemplateConfigurator.rb index 7b754b72..a884cc22 100644 --- a/setup/TemplateConfigurator.rb +++ b/setup/TemplateConfigurator.rb @@ -19,15 +19,13 @@ def year end def date - Time.now.strftime "%m/%d/%Y" + Time.now.strftime "%Y-%m-/%d" end def podfile_path 'Example/Podfile' end - #----------------------------------------# - def initialize(pod_name) @pod_name = pod_name @pods_for_podfile = [] @@ -35,8 +33,11 @@ def initialize(pod_name) @message_bank = MessageBank.new(self) end + #----------------------------------------# + def run @message_bank.welcome_message + prepare_staging_directory framework = self.ask_with_answers("What language do you want to use?", ["Swift", "ObjC"]).to_sym case framework @@ -59,10 +60,17 @@ def run @message_bank.farewell_message end + def prepare_staging_directory + [".git", "configurator", ".gitignore", "configure", "LICENSE", "README"].each do |asset| + `rm -rf #{asset}` + end + FileUtils.cp_r 'templates/baseline/.', '.' + end + def replace_variables_in_files - file_names = ['LICENSE', 'README.md', 'NAME.podspec', '.travis.yml', podfile_path] + file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', podfile_path] file_names.each do |file_name| - text = File.read(file_name) + text = File.read('staging/' + file_name) text.gsub!("${POD_NAME}", @pod_name) text.gsub!("${REPO_NAME}", @pod_name.gsub('+', '-')) text.gsub!("${USER_NAME}", user_name) diff --git a/templates/baseline/NAME.podspec b/templates/baseline/PROJECT.podspec similarity index 100% rename from templates/baseline/NAME.podspec rename to templates/baseline/PROJECT.podspec 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. } } - + } From 1c1ba46b0c12756d82c162830a7eae100122a962 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 17:56:58 -0400 Subject: [PATCH 09/62] work --- configurator/ConfigureSwift.rb | 8 +- configurator/TemplateConfigurator.rb | 28 ++-- setup/TemplateConfigurator.rb | 205 --------------------------- templates/swift/Example/Podfile | 11 ++ 4 files changed, 24 insertions(+), 228 deletions(-) delete mode 100644 setup/TemplateConfigurator.rb create mode 100644 templates/swift/Example/Podfile diff --git a/configurator/ConfigureSwift.rb b/configurator/ConfigureSwift.rb index 452830a5..97ed7211 100644 --- a/configurator/ConfigureSwift.rb +++ b/configurator/ConfigureSwift.rb @@ -18,9 +18,9 @@ def perform when :quick configurator.add_pod_to_podfile "Quick', '~> 0.8" configurator.add_pod_to_podfile "Nimble', '~> 3.0" - `cp "setup/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` + `cp "templates/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` when :none - `cp "setup/test_examples/xctest.swift" "templates/swift/Example/Tests/Tests.swift"` + `cp "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 @@ -47,10 +47,6 @@ def perform }).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` end end end diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 15a23524..8b587b5a 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -19,15 +19,13 @@ def year end def date - Time.now.strftime "%m/%d/%Y" + Time.now.strftime "%Y-%m-/%d" end def podfile_path 'Example/Podfile' end - #----------------------------------------# - def initialize(pod_name) @pod_name = pod_name @pods_for_podfile = [] @@ -35,9 +33,11 @@ def initialize(pod_name) @message_bank = MessageBank.new(self) end + #----------------------------------------# + def run @message_bank.welcome_message - create_staging_directory + prepare_staging_directory framework = self.ask_with_answers("What language do you want to use?", ["Swift", "ObjC"]).to_sym case framework @@ -49,7 +49,6 @@ def run end replace_variables_in_files - clean_template_files rename_template_files add_pods_to_podfile customise_prefix @@ -60,14 +59,17 @@ def run @message_bank.farewell_message end - def create_staging_directory - FileUtils.mv "templates/baseline", "staging" + def prepare_staging_directory + [".git", "configurator", ".gitignore", "configure", "LICENSE", "README"].each do |asset| + `rm -rf #{asset}` + end + FileUtils.cp_r 'templates/baseline/.', '.' end def replace_variables_in_files file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', podfile_path] file_names.each do |file_name| - text = File.read('staging/' + file_name) + text = File.read(file_name) text.gsub!("${POD_NAME}", @pod_name) text.gsub!("${REPO_NAME}", @pod_name.gsub('+', '-')) text.gsub!("${USER_NAME}", user_name) @@ -78,16 +80,8 @@ def replace_variables_in_files end end - def clean_template_files - ["setup", "templates", ".gitignore", "configure", "LICENSE", "README"].each do |asset| - `rm -rf #{asset}` - end - end - def rename_template_files - FileUtils.mv "POD_README.md", "README.md" - FileUtils.mv "POD_LICENSE", "LICENSE" - FileUtils.mv "NAME.podspec", "#{pod_name}.podspec" + FileUtils.mv "PROJECT.podspec", "#{pod_name}.podspec" end def add_pods_to_podfile diff --git a/setup/TemplateConfigurator.rb b/setup/TemplateConfigurator.rb deleted file mode 100644 index a884cc22..00000000 --- a/setup/TemplateConfigurator.rb +++ /dev/null @@ -1,205 +0,0 @@ -require 'fileutils' -require 'colored' - -module Pod - class TemplateConfigurator - - attr_reader :pod_name, :pods_for_podfile, :prefixes, :test_example_file, :username, :email - - def user_name - (ENV['GIT_COMMITTER_NAME'] || `git config user.name`).strip - end - - def user_email - (ENV['GIT_COMMITTER_EMAIL'] || `git config user.email`).strip - end - - def year - Time.now.year.to_s - end - - def date - Time.now.strftime "%Y-%m-/%d" - end - - def podfile_path - 'Example/Podfile' - end - - def initialize(pod_name) - @pod_name = pod_name - @pods_for_podfile = [] - @prefixes = [] - @message_bank = MessageBank.new(self) - end - - #----------------------------------------# - - def run - @message_bank.welcome_message - prepare_staging_directory - - framework = self.ask_with_answers("What language do you want to use?", ["Swift", "ObjC"]).to_sym - case framework - when :swift - ConfigureSwift.perform(configurator: self) - - when :objc - ConfigureObjC.perform(configurator: self) - end - - replace_variables_in_files - clean_template_files - rename_template_files - add_pods_to_podfile - customise_prefix - rename_classes_folder - reinitialize_git_repo - run_pod_install - - @message_bank.farewell_message - end - - def prepare_staging_directory - [".git", "configurator", ".gitignore", "configure", "LICENSE", "README"].each do |asset| - `rm -rf #{asset}` - end - FileUtils.cp_r 'templates/baseline/.', '.' - end - - def replace_variables_in_files - file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', podfile_path] - file_names.each do |file_name| - text = File.read('staging/' + file_name) - text.gsub!("${POD_NAME}", @pod_name) - text.gsub!("${REPO_NAME}", @pod_name.gsub('+', '-')) - text.gsub!("${USER_NAME}", user_name) - text.gsub!("${USER_EMAIL}", user_email) - text.gsub!("${YEAR}", year) - text.gsub!("${DATE}", date) - File.open(file_name, "w") { |file| file.puts text } - end - end - - def clean_template_files - ["setup", "templates", ".gitignore", "configure", "LICENSE", "README"].each do |asset| - `rm -rf #{asset}` - end - 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 add_pods_to_podfile - podfile = File.read podfile_path - podfile_content = @pods_for_podfile.map do |pod| - "pod '" + pod + "'" - end.join("\n ") - podfile.gsub!("${INCLUDED_PODS}", podfile_content) - File.open(podfile_path, "w") { |file| file.puts podfile } - end - - def customise_prefix - prefix_path = "Example/Tests/Tests-Prefix.pch" - return unless File.exists? 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 rename_classes_folder - FileUtils.mv "POD", @pod_name - end - - def reinitialize_git_repo - `rm -rf .git` - `git init` - `git add -A` - 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 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 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 { |a| a.downcase }.include? answer - - print "\nPossible answers are [" - print_info.call - end - - answer - end - - def add_pod_to_podfile podname - @pods_for_podfile << podname - end - - def add_line_to_pch line - @prefixes << line - end - - def validate_user_details - return (user_email.length > 0) && (user_name.length > 0) - end - - end -end diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile new file mode 100644 index 00000000..fc61b173 --- /dev/null +++ b/templates/swift/Example/Podfile @@ -0,0 +1,11 @@ +use_frameworks! + +target '${POD_NAME}_Example', :exclusive => true do + pod '${POD_NAME}', :path => '../' +end + +target '${POD_NAME}_Tests', :exclusive => true do + pod '${POD_NAME}', :path => '../' + + ${INCLUDED_PODS} +end From d26b4d4f3438b97ec13338535cddaeda2604098d Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 18:07:20 -0400 Subject: [PATCH 10/62] work --- configurator/ConfigureSwift.rb | 4 ++-- configurator/TemplateConfigurator.rb | 23 ++++++++++------------- templates/swift/Example/Podfile | 12 ++++++------ templates/swift/PROJECT.podspec | 2 +- 4 files changed, 19 insertions(+), 22 deletions(-) diff --git a/configurator/ConfigureSwift.rb b/configurator/ConfigureSwift.rb index 97ed7211..e5e3ae57 100644 --- a/configurator/ConfigureSwift.rb +++ b/configurator/ConfigureSwift.rb @@ -18,9 +18,9 @@ def perform when :quick configurator.add_pod_to_podfile "Quick', '~> 0.8" configurator.add_pod_to_podfile "Nimble', '~> 3.0" - `cp "templates/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` + `mv "templates/test_examples/quick.swift" "templates/swift/Example/Tests/Tests.swift"` when :none - `cp "templates/test_examples/xctest.swift" "templates/swift/Example/Tests/Tests.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 diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 8b587b5a..272af46f 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -52,9 +52,8 @@ def run rename_template_files add_pods_to_podfile customise_prefix - rename_classes_folder - reinitialize_git_repo run_pod_install + initialize_git_repo @message_bank.farewell_message end @@ -102,16 +101,6 @@ def customise_prefix File.open(prefix_path, "w") { |file| file.puts pch } end - def rename_classes_folder - FileUtils.mv "POD", @pod_name - end - - def reinitialize_git_repo - `rm -rf .git` - `git init` - `git add -A` - end - def run_pod_install puts "\nRunning " + "pod install".magenta + " on your new library." puts "" @@ -119,11 +108,19 @@ def run_pod_install Dir.chdir("Example") do system "pod install" end + end - `git add Example/#{pod_name}.xcodeproj/project.pbxproj` + def initialize_git_repo + `git init` + `git add -A` `git commit -m "Initial commit"` end + def finalize_staging_directory + `rm -rf templates` + end + end + #----------------------------------------# def ask(question) diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index fc61b173..b5de64b4 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -1,11 +1,11 @@ +source 'https://github.com/CocoaPods/Specs.git' use_frameworks! -target '${POD_NAME}_Example', :exclusive => true do - pod '${POD_NAME}', :path => '../' -end - -target '${POD_NAME}_Tests', :exclusive => true do +target 'iOS Example' do pod '${POD_NAME}', :path => '../' - ${INCLUDED_PODS} + target 'Tests' do + inherit! :search_paths + ${INCLUDED_PODS} + end end diff --git a/templates/swift/PROJECT.podspec b/templates/swift/PROJECT.podspec index 0b572715..1f693784 100644 --- a/templates/swift/PROJECT.podspec +++ b/templates/swift/PROJECT.podspec @@ -1,5 +1,5 @@ Pod::Spec.new do |s| - s.name = 'FDChessboardView' + s.name = '${POD_NAME}' s.version = '0.1.0' s.license = 'MIT' s.summary = 'A view controller for chess boards' From 0b500fb3a47ec983498b48cf2b0c0f99c96409f7 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 18:42:52 -0400 Subject: [PATCH 11/62] work --- configurator/MessageBank.rb | 2 +- configurator/TemplateConfigurator.rb | 8 +++++--- .../swift/PROJECT.xcworkspace/contents.xcworkspacedata | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/configurator/MessageBank.rb b/configurator/MessageBank.rb index d95820c9..9afca4a1 100644 --- a/configurator/MessageBank.rb +++ b/configurator/MessageBank.rb @@ -64,7 +64,7 @@ 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'" + run_command "open '#{pod_name}.xcworkspace'", "open '#{pod_name}.xcworkspace'" end diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 272af46f..c41eb9c1 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -54,6 +54,7 @@ def run customise_prefix run_pod_install initialize_git_repo + finalize_staging_directory @message_bank.farewell_message end @@ -66,7 +67,7 @@ def prepare_staging_directory end def replace_variables_in_files - file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', podfile_path] + file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', 'PROJECT.xcworkspace/contents.xcworkspacedata', podfile_path] file_names.each do |file_name| text = File.read(file_name) text.gsub!("${POD_NAME}", @pod_name) @@ -81,6 +82,8 @@ def replace_variables_in_files def rename_template_files FileUtils.mv "PROJECT.podspec", "#{pod_name}.podspec" + FileUtils.mv "PROJECT.xcodeproj", "#{pod_name}.xcodeproj" + FileUtils.mv "PROJECT.xcworkspace", "#{pod_name}.xcworkspace" end def add_pods_to_podfile @@ -117,8 +120,7 @@ def initialize_git_repo end def finalize_staging_directory - `rm -rf templates` - end + `rm -rf templates` end #----------------------------------------# diff --git a/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata index 0513f31f..6ec61329 100644 --- a/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata +++ b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:${POD_NAME}.xcodeproj"> From 7ee6a7acd3304f2678aeeb81d6cbf9d271527125 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Fri, 6 May 2016 18:54:44 -0400 Subject: [PATCH 12/62] work --- configurator/ConfigureObjC.rb | 83 --- configurator/TemplateConfigurator.rb | 7 + .../Example/PROJECT.xcodeproj/project.pbxproj | 486 ------------------ .../contents.xcworkspacedata | 7 - .../xcshareddata/xcschemes/PROJECT.xcscheme | 101 ---- .../Example/PROJECT/CPDAppDelegate.h | 15 - .../Example/PROJECT/CPDAppDelegate.m | 46 -- .../Example/PROJECT/CPDViewController.h | 13 - .../Example/PROJECT/CPDViewController.m | 29 -- .../AppIcon.appiconset/Contents.json | 53 -- .../LaunchImage.launchimage/Contents.json | 51 -- .../Example/PROJECT/Main.storyboard | 27 - .../Example/PROJECT/PROJECT-Info.plist | 47 -- .../Example/PROJECT/PROJECT-Prefix.pch | 16 - .../PROJECT/en.lproj/InfoPlist.strings | 1 - templates/objective-c/Example/PROJECT/main.m | 17 - templates/objective-c/Example/Podfile | 11 - .../Example/Tests/Tests-Info.plist | 22 - .../Example/Tests/Tests-Prefix.pch | 7 - templates/objective-c/Example/Tests/Tests.m | 9 - .../Example/Tests/en.lproj/InfoPlist.strings | 1 - .../swift/Example/Source/AppDelegate.swift | 2 +- .../Base.lproj/Launch Screen.storyboard | 2 +- .../Example/Source/Base.lproj/Main.storyboard | 4 +- .../swift/Example/Source/ViewController.swift | 60 +-- .../iOS Example.xcodeproj/project.pbxproj | 46 +- templates/swift/PROJECT.podspec | 6 +- .../swift/PROJECT.xcodeproj/project.pbxproj | 116 ++--- ...essboardView.xcscheme => PROJECT.xcscheme} | 30 +- .../contents.xcworkspacedata | 2 +- templates/swift/Package.swift | 2 +- templates/swift/README.md | 26 +- templates/swift/Resources/bb.png | Bin 2580 -> 0 bytes templates/swift/Resources/bb.svg | 17 - templates/swift/Resources/bk.png | Bin 5339 -> 0 bytes templates/swift/Resources/bk.svg | 25 - templates/swift/Resources/bn.png | Bin 3656 -> 0 bytes templates/swift/Resources/bn.svg | 22 - templates/swift/Resources/bp.png | Bin 1597 -> 0 bytes templates/swift/Resources/bp.svg | 7 - templates/swift/Resources/bq.png | Bin 5468 -> 0 bytes templates/swift/Resources/bq.svg | 34 -- templates/swift/Resources/br.png | Bin 1241 -> 0 bytes templates/swift/Resources/br.svg | 39 -- templates/swift/Resources/wb.png | Bin 4090 -> 0 bytes templates/swift/Resources/wb.svg | 17 - templates/swift/Resources/wk.svg | 27 - templates/swift/Resources/wn.png | Bin 4386 -> 0 bytes templates/swift/Resources/wn.svg | 19 - templates/swift/Resources/wp.png | Bin 2792 -> 0 bytes templates/swift/Resources/wp.svg | 7 - templates/swift/Resources/wq.png | Bin 6353 -> 0 bytes templates/swift/Resources/wq.svg | 33 -- templates/swift/Resources/wr.png | Bin 1300 -> 0 bytes templates/swift/Resources/wr.svg | 25 - templates/swift/Source/FDChessboardView.swift | 239 --------- templates/swift/Source/PROJECT.swift | 38 ++ .../swift/Tests/FDChessboardViewTests.swift | 8 +- 58 files changed, 150 insertions(+), 1752 deletions(-) delete mode 100644 configurator/ConfigureObjC.rb delete mode 100644 templates/objective-c/Example/PROJECT.xcodeproj/project.pbxproj delete mode 100644 templates/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme delete mode 100644 templates/objective-c/Example/PROJECT/CPDAppDelegate.h delete mode 100644 templates/objective-c/Example/PROJECT/CPDAppDelegate.m delete mode 100644 templates/objective-c/Example/PROJECT/CPDViewController.h delete mode 100644 templates/objective-c/Example/PROJECT/CPDViewController.m delete mode 100644 templates/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 templates/objective-c/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json delete mode 100644 templates/objective-c/Example/PROJECT/Main.storyboard delete mode 100644 templates/objective-c/Example/PROJECT/PROJECT-Info.plist delete mode 100644 templates/objective-c/Example/PROJECT/PROJECT-Prefix.pch delete mode 100644 templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings delete mode 100644 templates/objective-c/Example/PROJECT/main.m delete mode 100644 templates/objective-c/Example/Podfile delete mode 100644 templates/objective-c/Example/Tests/Tests-Info.plist delete mode 100644 templates/objective-c/Example/Tests/Tests-Prefix.pch delete mode 100644 templates/objective-c/Example/Tests/Tests.m delete mode 100644 templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings rename templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/{FDChessboardView.xcscheme => PROJECT.xcscheme} (75%) delete mode 100644 templates/swift/Resources/bb.png delete mode 100644 templates/swift/Resources/bb.svg delete mode 100644 templates/swift/Resources/bk.png delete mode 100644 templates/swift/Resources/bk.svg delete mode 100644 templates/swift/Resources/bn.png delete mode 100644 templates/swift/Resources/bn.svg delete mode 100644 templates/swift/Resources/bp.png delete mode 100644 templates/swift/Resources/bp.svg delete mode 100644 templates/swift/Resources/bq.png delete mode 100644 templates/swift/Resources/bq.svg delete mode 100644 templates/swift/Resources/br.png delete mode 100644 templates/swift/Resources/br.svg delete mode 100644 templates/swift/Resources/wb.png delete mode 100644 templates/swift/Resources/wb.svg delete mode 100644 templates/swift/Resources/wk.svg delete mode 100644 templates/swift/Resources/wn.png delete mode 100644 templates/swift/Resources/wn.svg delete mode 100644 templates/swift/Resources/wp.png delete mode 100644 templates/swift/Resources/wp.svg delete mode 100644 templates/swift/Resources/wq.png delete mode 100644 templates/swift/Resources/wq.svg delete mode 100644 templates/swift/Resources/wr.png delete mode 100644 templates/swift/Resources/wr.svg delete mode 100644 templates/swift/Source/FDChessboardView.swift create mode 100644 templates/swift/Source/PROJECT.swift diff --git a/configurator/ConfigureObjC.rb b/configurator/ConfigureObjC.rb deleted file mode 100644 index 2c15246e..00000000 --- a/configurator/ConfigureObjC.rb +++ /dev/null @@ -1,83 +0,0 @@ -module Pod - - class ConfigureObjC - 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/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index c41eb9c1..58ffdbfd 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -71,6 +71,7 @@ def replace_variables_in_files file_names.each do |file_name| text = File.read(file_name) 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) @@ -80,7 +81,13 @@ def replace_variables_in_files end end + + def rename_template_files + # Move schemes + FileUtils.mv "PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme", "PROJECT.xcodeproj/xcshareddata/xcschemes/#{pod_name}.xcscheme" + + # Move project files FileUtils.mv "PROJECT.podspec", "#{pod_name}.podspec" FileUtils.mv "PROJECT.xcodeproj", "#{pod_name}.xcodeproj" FileUtils.mv "PROJECT.xcworkspace", "#{pod_name}.xcworkspace" diff --git a/templates/objective-c/Example/PROJECT.xcodeproj/project.pbxproj b/templates/objective-c/Example/PROJECT.xcodeproj/project.pbxproj deleted file mode 100644 index 1a5ff198..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d38d26de..00000000 --- a/templates/objective-c/Example/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme deleted file mode 100644 index 11e5b490..00000000 --- a/templates/objective-c/Example/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/objective-c/Example/PROJECT/CPDAppDelegate.h b/templates/objective-c/Example/PROJECT/CPDAppDelegate.h deleted file mode 100644 index 7d8ef160..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/CPDAppDelegate.m b/templates/objective-c/Example/PROJECT/CPDAppDelegate.m deleted file mode 100644 index e3554f95..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/CPDViewController.h b/templates/objective-c/Example/PROJECT/CPDViewController.h deleted file mode 100644 index fc66c485..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/CPDViewController.m b/templates/objective-c/Example/PROJECT/CPDViewController.m deleted file mode 100644 index 96ab871d..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index 91bf9c14..00000000 --- a/templates/objective-c/Example/PROJECT/Images.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "images" : [ - { - "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" - }, - { - "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" - }, - { - "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" : { - "version" : 1, - "author" : "xcode" - } -} \ No newline at end of file diff --git a/templates/objective-c/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json b/templates/objective-c/Example/PROJECT/Images.xcassets/LaunchImage.launchimage/Contents.json deleted file mode 100644 index 6f870a46..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/Main.storyboard b/templates/objective-c/Example/PROJECT/Main.storyboard deleted file mode 100644 index f077b972..00000000 --- a/templates/objective-c/Example/PROJECT/Main.storyboard +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/objective-c/Example/PROJECT/PROJECT-Info.plist b/templates/objective-c/Example/PROJECT/PROJECT-Info.plist deleted file mode 100644 index b06b79c0..00000000 --- a/templates/objective-c/Example/PROJECT/PROJECT-Info.plist +++ /dev/null @@ -1,47 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleDisplayName - ${PRODUCT_NAME} - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1.0 - LSRequiresIPhoneOS - - UIMainStoryboardFile - Main - UIRequiredDeviceCapabilities - - armv7 - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - UISupportedInterfaceOrientations~ipad - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/templates/objective-c/Example/PROJECT/PROJECT-Prefix.pch b/templates/objective-c/Example/PROJECT/PROJECT-Prefix.pch deleted file mode 100644 index 7825372c..00000000 --- a/templates/objective-c/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/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings b/templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings deleted file mode 100644 index b92732c7..00000000 --- a/templates/objective-c/Example/PROJECT/en.lproj/InfoPlist.strings +++ /dev/null @@ -1 +0,0 @@ -/* Localized versions of Info.plist keys */ diff --git a/templates/objective-c/Example/PROJECT/main.m b/templates/objective-c/Example/PROJECT/main.m deleted file mode 100644 index 4dac91d0..00000000 --- a/templates/objective-c/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/objective-c/Example/Podfile b/templates/objective-c/Example/Podfile deleted file mode 100644 index 905ff0b9..00000000 --- a/templates/objective-c/Example/Podfile +++ /dev/null @@ -1,11 +0,0 @@ -source 'https://github.com/CocoaPods/Specs.git' -use_frameworks! - -target '${POD_NAME}_Example' do - pod '${POD_NAME}', :path => '../' - - target '${POD_NAME}_Tests' do - inherit! :search_paths - ${INCLUDED_PODS} - end -end diff --git a/templates/objective-c/Example/Tests/Tests-Info.plist b/templates/objective-c/Example/Tests/Tests-Info.plist deleted file mode 100644 index 169b6f71..00000000 --- a/templates/objective-c/Example/Tests/Tests-Info.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - CFBundleDevelopmentRegion - en - CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundlePackageType - BNDL - CFBundleShortVersionString - 1.0 - CFBundleSignature - ???? - CFBundleVersion - 1 - - diff --git a/templates/objective-c/Example/Tests/Tests-Prefix.pch b/templates/objective-c/Example/Tests/Tests-Prefix.pch deleted file mode 100644 index 5e64e2fc..00000000 --- a/templates/objective-c/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/objective-c/Example/Tests/Tests.m b/templates/objective-c/Example/Tests/Tests.m deleted file mode 100644 index cec41f61..00000000 --- a/templates/objective-c/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/objective-c/Example/Tests/en.lproj/InfoPlist.strings b/templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings deleted file mode 100644 index b92732c7..00000000 --- a/templates/objective-c/Example/Tests/en.lproj/InfoPlist.strings +++ /dev/null @@ -1 +0,0 @@ -/* Localized versions of Info.plist keys */ diff --git a/templates/swift/Example/Source/AppDelegate.swift b/templates/swift/Example/Source/AppDelegate.swift index bfeb45e9..b39b3389 100644 --- a/templates/swift/Example/Source/AppDelegate.swift +++ b/templates/swift/Example/Source/AppDelegate.swift @@ -1,6 +1,6 @@ // // AppDelegate.swift -// FDChessboardView iOS +// PROJECT iOS // // Created by Full Decent on 4/25/16. // Copyright © 2016 William Entriken. All rights reserved. diff --git a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard index 3b4572e6..e503cbce 100644 --- a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -24,7 +24,7 @@ - @@ -43,9 +43,9 @@ + BuildableName = "PROJECT.framework" + BlueprintName = "PROJECT" + ReferencedContainer = "container:PROJECT.xcodeproj"> @@ -65,9 +65,9 @@ + BuildableName = "PROJECT.framework" + BlueprintName = "PROJECT" + ReferencedContainer = "container:PROJECT.xcodeproj"> @@ -83,9 +83,9 @@ + BuildableName = "PROJECT.framework" + BlueprintName = "PROJECT" + ReferencedContainer = "container:PROJECT.xcodeproj"> diff --git a/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata index 6ec61329..7e86864c 100644 --- a/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata +++ b/templates/swift/PROJECT.xcworkspace/contents.xcworkspacedata @@ -2,7 +2,7 @@ + location = "group:PROJECT.xcodeproj"> diff --git a/templates/swift/Package.swift b/templates/swift/Package.swift index b9419ac2..35d7a8e7 100644 --- a/templates/swift/Package.swift +++ b/templates/swift/Package.swift @@ -1,5 +1,5 @@ import PackageDescription let package = Package( - name: "FDChessboardView" + name: "PROJECT" ) diff --git a/templates/swift/README.md b/templates/swift/README.md index eabd2fc1..1d4ba4f5 100644 --- a/templates/swift/README.md +++ b/templates/swift/README.md @@ -1,10 +1,10 @@ -FDChessboardView +PROJECT ================ -[![CI Status](http://img.shields.io/travis/fulldecent/FDChessboardView.svg?style=flat)](https://travis-ci.org/fulldecent/FDChessboardView) -[![Version](https://img.shields.io/cocoapods/v/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) -[![License](https://img.shields.io/cocoapods/l/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) -[![Platform](https://img.shields.io/cocoapods/p/FDChessboardView.svg?style=flat)](http://cocoadocs.org/docsets/FDChessboardView) +[![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/PROJECT) +[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) +[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) +[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) @@ -25,7 +25,7 @@ Usage Import, add the view to your storyboard and then set it up with: ```swift -import FDChessboardView +import PROJECT ... self.chessboard.dataSource = self ``` @@ -33,7 +33,7 @@ self.chessboard.dataSource = self Then implement the data source: ```swift -func chessboardView(board: FDChessboardView, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? { +func chessboardView(board: PROJECT, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? { return piecesByIndex[square.index] // you figure out which piece to show } ``` @@ -52,16 +52,16 @@ Installation $ gem install cocoapods ``` -> CocoaPods 0.39.0+ is required to build FDChessboardView 0.1.0+. +> CocoaPods 0.39.0+ is required to build PROJECT 0.1.0+. -To integrate FDChessboardView into your Xcode project using CocoaPods, specify it in your `Podfile`: +To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! -pod 'FDChessboardView', '~> 0.1' +pod 'PROJECT', '~> 0.1' ``` Then, run the following command: @@ -81,13 +81,13 @@ $ brew update $ brew install carthage ``` -To integrate FDChessboardView into your Xcode project using Carthage, specify it in your `Cartfile`: +To integrate PROJECT into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "fulldecent/FDChessboardView" ~> 0.1 +github "fulldecent/PROJECT" ~> 0.1 ``` -Run `carthage update` to build the framework and drag the built `FDChessboardView.framework` into your Xcode project. +Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. Upcoming Features diff --git a/templates/swift/Resources/bb.png b/templates/swift/Resources/bb.png deleted file mode 100644 index fc5b7b180b9c79807eb9fac2dff5e1a284331afc..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2580 zcmV+v3hVWWP)lTt?Atm{rz4BQa zDAy)4yEE_P`Q5n7vo`bYyclDQF~%5Uj4{R-V~jDz7-Nhv#u#IaF~%5Uj4{R-V~jB_ z=)gpl^E#iAm*_KIXE_sSPvn`J%w;3`oi;F=nnaX|a~Zj4@3EOnsY>LSF1&}5>|^#L zQp|XEpfa?Bu|$R$MiDAwMT{a6%qjee%F!;)z&LL|cA#>$oo*PXWwH`^=xr)t95x(z zYzW3#8GMF3_9-!pqk1DB`Xk0s*~o`(!Z>OJ@}adDCpAYt)db_9qmWPi5#ylI$frhP z95e&@)O3u479yWofU$c3W6uFh1$`CpCrpJt4$u_iq>adj)?plVtDOt5X90E`uma2A z3*@oS$iO&j1oGHWjKeZnWorT}GFugF?0o@dEGlzFjK)O9BzB@Qw37*#$Y?`$nFrt& zT4N%hAy<%(%25F~(iG#cdR)PF#hJKB=h0@sVRKPs8D1h=f0~4?q=Tn3Ns)%zi0m>vB1>8+!VggZ(M^OlRni`n2YrqN=lHR5s zCavnQ0)?nGHUjBXn-wTzt+o+Jm%6M%A#5deFe#VCt0<(sMI4h-F&3i`cQ+ZB6uK6L zyely&Gafn6C`?N9Bp>-(JQ04kgYFpL)n*;?vp?xA6()Ks@g@B2b82FI72`hSXD4cx z{?{&@=>L;J45=OSkZK+MMz(~vx;2jCYP;eq)(a(V#74VZFk z$ad!kU>o%@<#Z`>egMRUm~yE>P9z54XR2e$VG@eO0Elsza#)GH)?JJAiPrAcH!AI$ zJ^ZLov`F2B_uiz;OjqQ!vs56j3KG8x-s?;mnd^|Z>MB=$$W>k8wW~-s+wNtE{4zv% zZ6jr3_CsEqBfrcM-s?ho*{+|b%P*%3@6DqO%&W+2Sz0eYtXG!s-isv7{K22~zx(T3 zdG)RK_iL?i6_R8QME+Dq)3sQ4@77By?WH~ZsKuJDI>N7dkt8z>k;wHUfu)*4lFS{E z9Dv(Nl6gIn1Mn(IGCxFe0KO$DrY4Hy0Ep@&!E}!70JJ9w=8(t^Ku?ljj*sjB^d|bRMHBOj*cS<<|vfA zub&fNBOM(<5=te?ohB<+3_v6f-HUmDiohGWX04*4iTZKpP-OzuVz zY6+%{PCyar7)%*u@F9vw?-9e4*-#Xb24Kn|leH)UeNH7p$`*%(d?A>53OU}RcwjoP z9XZ@q+Te*9ha7GMo|$`)qbf63cW~tAjVf!99ts3 zjw+Z6{chn=7$3ds;DRvYo5PTU9gOkG-;smefbq$C+JTlKBhkF{2%*DvzF2*BsFmkxV z@W@o+M~8O{u8e19k!=-Mu^qw|N3Rs#3FC_c`3X7JW{$-8rn6&9!`IOT?VpB8nKlBk$=4L36t|17d4v1-2bVCD5u8SEdeDW|)Ta(HOj4@Qj2@iGaHg_= zEBGh3ad)BzcqY*ctVpz)wZ(l$PH~0EkqXHv?mN~Nx0)4+UgViX4{>**JNYM9u#l+? z=R|tYjLJk_bIxEs*}TGcXt%6yd6{hHaXQV2kcRw;i7YD9u{&!6is`5(;tNL{earGaC(mOIFc+%s>&ZZpXb<$9P2g$ z^#=#e|L5`{&v6qoIhIz$*qa!wIF6az#B+Q^t^= - - - - - - - - - - - diff --git a/templates/swift/Resources/bk.png b/templates/swift/Resources/bk.png deleted file mode 100644 index 921409056f1be70e15636a03071a73e12fdebdba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5339 zcmZ{oWmFUlv&WYZmJXNhrKP)T*hZL4hffoc( z@b&p{@0WY-{O6qiocT0o=J#om4D~h0h#83i005bmCKLex;QTFd06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by&beICPX+Y&t z>f7-zA6^ed{WiT5M0~>@)2g%%XH7aAng7zn%QBE~xCRBeix!XhB%hmUhQ0~-7n{2h zArr*sw?#3G_ADW$+8n7kQ*gN>Al{@kW@*@P4LL^73z ztg~G^N8J=iF+f3fsr~LLe=?#y_Ig%^%w12^R0dPdNaRsT*KQLV{OB%0-_$|~cI19v z#tFt3SO`#R+-qokN6#%_%ne3bRR?hMl?}=t@K2f4zYBbIs9xM$M&!{bkXv+LK)$U{fv|w+v~UUfRC1GH%xs zrphLFZ-yUn+ccRGx4yS1uCYefY!x)ntW=5{z45!sZMhQZtNs;OVkH2LgVps>2PU0; z$X#W!K;TpnrtkhR6sZ1L`| emH+#n{NIo*@&!+EGr!OHx1$Bqhc-j(qyG!kBkO4Z diff --git a/templates/swift/Resources/bk.svg b/templates/swift/Resources/bk.svg deleted file mode 100644 index d90dc737..00000000 --- a/templates/swift/Resources/bk.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/swift/Resources/bn.png b/templates/swift/Resources/bn.png deleted file mode 100644 index a71e0cde5a2f8c4d1bce617a6f19f85ab5a15801..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3656 zcmV-O4!7}%P)k7ssByMCDXD^OrQ|6|Io*9Yj zu~px*Bq3S#9K;{k)LU%LAavJUe2DG(i8%;KnviF(T`w^c-LW#iVu!uU;3Oy1@;r9f z?`%p@n^3_{+lSU zHpT*-K~lmgn6o|U$T<9n1-hRBDh`0(n4b2o!$N()02K#-yvQK5wlo&3!XP9hoPY&7 zjFxJ74GT9O2?@JlfqrLOHfrj4>_#(@kgx{!b6@f(m$DzLGA)AY5f`#PBNO_`a+qKh9%5%EA@sRgKEPyqnLQYb(5H6A za$CpC-PMI1rL(KSovh6egg!C|A7Po@ZKKb;-Gg1!A*F5KaV+B#`oJLkgyl87zuVRy zKIXno*Zx{?4f7Iu+45LsYumYZJ;rIJb&skPWpBk-&mDcrV%~QpY3^rsrk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a/templates/swift/Resources/bp.png b/templates/swift/Resources/bp.png deleted file mode 100644 index f49df994032932d33ba60595b7ca49bc8601873e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1597 zcmV-D2EzG?P))LZQHgz^J71Yca`)cnV{-^yX*O!KcaZ+X4Z#+SW&t$Cwp)?kMS8bgb?5I z5?65~%Q66KT3uP3OZXZMqjv6KBL-kirWafBCi;ba$MH;rHH~%n0F7WR97#W{;Z4Dv zXe4`wrLl�$-p}sK&|kz#7y6)X*q*8w0S0(}h#fXzFps#Tv{BXf*Z&1F;6OCmPM& zP7ka>EKVmH?VUhFunGADC8)*<#Ao~&CF(;45}Yl85_U47Sr?u~32SF+0<#rR;?5y3 zyALIZc?4wppiDhTKz0$z z)E5L~ccN_dCmeeWWoshBv6oP`rY9VG8D(oa!m%e&wk9DQy8~sb9~RDqC{v$e0qu=4 z^#B&oyeLygVFC5zdz7W6u#j#?8ER)B7Sf(&&j4%!T2b;g!os>7CGInNV`0sW5_cpP z*!Fayr2UlvSV(=i9A)SQrp3aUfG1FMM=ls8cY zwXzsixiNVeRn%9^idCuyx1kDqpUJQaoq#It8Tw!qS%w;_yfd*%jK^mvL@Qzy_&*e+ z4;X}HwiF7~nOIicc@YJwgPF06wnD+W0n4T*@1bzbfn~A@3fPrcCNH3XbutZ>!F(ua zM`9UVgo5@FJ+Q=j@eK;w;#gwKpunAhC3Xf1-1}H!FQL#)gC#T`H59r{NywH*!8@CT zY;P322T8~-N5T7sE+k_QqVSDFGWHG%-)tmfttfm;l8E&{#BVhcv4M#Atw$m@HX?qT zkcjm{#BU9fv6iwYf%Yj1-&`bPucGkHL^5_C3g1{HV`rk^eLzCCEehVvBxDPq;2lds zHWoD$x(!Lno<^aYoTTh96u4(e%;rXcJDkLI|?;W_cMU_eCU&~`{{>`COe@9>^6E6 zpC5%t*fsQE6xmwTP{Vc!qr`s852&Hri;-p%@d0Y^I$42{V!e3;H9_Ao8}a$~FbR8$ zu^B*O|f6BI}f5J>wBihexXB96ZSYgv0q?LI#5$~Fg9G>coH>f zt;~Q8#}258yNzM8@%aihb*nQBb{T5&K4c*LJX??&YWj|apJxxD0{V$b!0Ii73h8v} z8IPbsYGX=l2rHt3Iu{#E7oI`|)yCBP4_gTp*7^Joy9*Uo3*%t`z)aLoaqWo#0B52C zdxvfqFo^F^k*$aUJEB6n6$4&Ig;rxaiZ?qdxPvI(F{t2Prf^+&3l-h06m3pac!yB5 z<51zfLczN5HY&bfQ>@=3$H5e9FXXtNV%>}!ZSiQGKSQ)vxZlV}#AXnFY6k~nl>Uw}; zY=T@}4^xb-kgMxaim^R%bv;2bc0;bNrzplg$kp`>#W)DLx}KvLha*?li - - - - diff --git a/templates/swift/Resources/bq.png b/templates/swift/Resources/bq.png deleted file mode 100644 index 9636b193160489db20a5f9025782a53e4d2e8c5f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5468 zcmY*dbyO7Iwx(<7fssyWq(oYJ96(~|K>=w{5J{<_ht6S$p-VzgYLF0+t|259q&q~V z8BpN*yYIer-#crsbl#sYzs{<|5|SMT+_>- zhzmP`q?3?`7abqI!<)-1(w=Z~;Aha}GhL+kG=q*pm0jL31L5)urzk$KkqeYcRT2;}1)?s8^DajIegt z+!EZjqf=JBcT~B4XLRkC2{6Shv5zOOm(D?2gRj{xt*}q2L7u@oP{MO}^f!9*;qC7! ztl$>8?m3M@@rmU2DWQ+TeG*jgL8tx80X~?h%9}?acA{PSE+!{ppb^039p(j_`VQu# zAN6?6;0+nkrl)E6s>CWb^)DT0DJtyo3!;1QSnB6)H2G8q4ACRb&=wBB;S+{}UP}%V zX2-WK3q0E8rV|W?TGS7}grS zKvyX`ej)jJZ=pzv#k);WScLqUgZN}JV(;^3^eWqVYGF<*zWJU)FjGogvc0^|>%P44 zvJZdmJ0-L_l95a0WfxGgcX#|moeKA`Dy}7!zPMOQY@3v0L*;iv=}QPZ?RRDBkaBNj zNxfU{cs}n>lGgl_`>H6jHgmdzG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Y%u6P_Kx-z<_ty;(n4fO6}T|$eY6aO?{-c zPbtH3o%-Im_?$LNjU4#!A@N9&^%UV`ET(0AT)BKQO95BJlSkvbJLq$6JLv2D9AW2Z zgNhGRBAnyot}6M1Hl?~p_JHShN^V>QtuAfY{)iZk z%snaNsRe?ijbS~W9I2s-m(kc=Pl%~e^qmqFWfj${$7aZg-)}sV@AXNd>f!yQno~La zCfw;<>3V7iqbUAH{xlj~yyxiMDnR2SM#e3B-iAy52YW=DW~Gwv4LLuhS#hWDg) z={fJn?HyQNtr1c55^vLKlLda7ejx~aTjt1v5tVi%%GK`HGMein%du0-ZnoTVP7b3vwnpcf_)X0EvX=fslmL!4JF|X+9JiK(% z*Dq&ftN3euGNfUy={yZJ1WU|gE3Jv3d!a9i#evz z1)nXweZz2@&A`{}GnO6I`^R1wT8p!qa#svJm`=o$l(E|7!?eMc>FS?ZO-`4Fo8nTP z;BfOR!)q(l*(a8fXV&7eg)iPF*quIpKf}GmNIb{RK0`5P)~HZj{%6yaD5|pN+dezh zEakPeNTU_R$6~lAD$Umd(r7hu7NnP@_p36A$3)kfLlm}U`uNM~x3W8B1>+?gHShLj xjpT{1p9OiS{#|lL;8osMw;585a{hPYS@%xBh9aMN - - - - - - - - - - - - - - - - - - - diff --git a/templates/swift/Resources/br.png b/templates/swift/Resources/br.png deleted file mode 100644 index 51dad86ff487032653f593795336f3e9402a78e6..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1241 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K588}#g)VJz{w+sv{3p`yMLn;{G9NfsrARxf9 z;WguL{cN`TUX%1eYOw(8=MQ~+&uhM0In#1`Z8gUPmEJ`fHQvd$x8=S)wk`MeH=W}^ z(#$M5`t6#&J-NzCT1CSDt?%Crf29+*^2oAahgd6L`_ro5*Y*YMK6S%6{)Fha)^7ol zZ>^l}pHlt4*)MoHQ|4vnBL4EFUDly_2mL||!%x}XVa^Jcn0-og+p4aa;k-LpvoqpE zH?N9GoUPTf`YD%n^wBr^+cSQzp0W8U*Y2o98-?&2Q?;In>~ytuJsP7KeuFtnlgT19 z@1mb71Cs(AHN4_zV9}H6;8OwG~}kwvjs+=1npGFkg*p?9FzuRo(TBeaL`81+R0Zx=EH3tiNi*}!uU4jZ|#{-E^zLx`<>gR*KhY%y!+HH&z?B@ezDfQ;^>Em`HyQ) ze%d;BQtMj9(k!;#^gJ^RCVeo>&=ny2>-x ziP8FmbJ^D5!mXw`x3$HWUF!cdVQY2%{YSgA_eJm7etT`=Z`aEj?0S=g@3o#f`1AS% z;kf2tgYSR5tLHRXK96rGPkQ2y2!Hf_U_s*}p!b_RdnX_~cniwff%{r+35es@`~ zz1TgU;onsET%-7>b$+4t@lQ{#x%ge5vEt3v>R&F`^LnkBIQBi@P_SU)=woP7ZotRv zXW&S%wST|9>22kDakU1^t=s$NKiIS5xAmfbad$QW+25|s@j6gg`Tt$zw8d81|KovP zIr~=W`CAkB(pgjY$A)CjKV3Qd{(tL5|84hA-G4qbdGcx3ZFAm#*?q8V`Si_QxkXp6 zeKA_S=VdStN+vK&u1 vK;M~D8prXjr)z4*}Q$iB}?9TAS diff --git a/templates/swift/Resources/br.svg b/templates/swift/Resources/br.svg deleted file mode 100644 index 337af8f4..00000000 --- a/templates/swift/Resources/br.svg +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/templates/swift/Resources/wb.png b/templates/swift/Resources/wb.png deleted file mode 100644 index 02d3e2b367afd8bbf4cb5ade3b17abc507c02f90..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4090 zcmVWY7duX8u z*+T83X2EQwc_KpdwY5y zSQ@J4WGYcmyUAo$seTr2TQZFxQ`ijo`$;7-8MVG}+l__fvXFg{zjb6X>NeqRUFOl4 zd8~!pZkEZYD$%eqeqeFFr4)JlO(v823U8Z{kByL9FPRM5KzO^6d|ca1{uN;M72ZA} zA0HvNy=5}!DB*1~`Iv~@j+DuulZCfA^C!S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GUAxZ;63B`77q4uFZCP`x4fhru<{=6xnAmJ4z{tx zQ-`D!VJ((&+XI$zYl)DghGMC;gDIR#<-mDNWe1j8LrG$fVJWkjsa(u4RAkpGaV(cG zl`UAxJVH{dz=s%e8(73t?q@8WX-tGfMQBVH#&SPXSh2T)T@qxi4^2?D3_HXC&v4O$XZ1oJt%>=`^Q39b)f4 zlJQ*1wSk*r?{_EH?&2!O$BbiOAb9^kUpgd^&B?JLx}HaPgPbDFZm*I-2ukBJqPS20 z;4ubqI5kKWznUD*ARgl%xKB|oB0^|7j3>#*xbk?PLDZ%2rK-zdCi5f4^&^k-D?(RO zM)EwX$wOo-i+PvJ=u8HwidF_)xSaP`%vMD5Sk1GHpfREEP*SDF=s(+oV*vmF0DwXM s)|1#-0RR9100000000000001^0CCYpfG?FbwEzGB07*qoM6N<$g6^Hx)c^nh diff --git a/templates/swift/Resources/wb.svg b/templates/swift/Resources/wb.svg deleted file mode 100644 index a4b5b770..00000000 --- a/templates/swift/Resources/wb.svg +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/swift/Resources/wk.svg b/templates/swift/Resources/wk.svg deleted file mode 100644 index 8b2d7b77..00000000 --- a/templates/swift/Resources/wk.svg +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - diff --git a/templates/swift/Resources/wn.png b/templates/swift/Resources/wn.png deleted file mode 100644 index 60f52dab3eba462c979230c8c679524621d5788c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4386 zcmV+-5#8>IP)!Qxi; zH!qiL8xfS~R4ih@BqJt<|JQn&w_=KR-~ zlJ0&&7Z*Uz^`yApn4V(SVYYev)x5rH*=ci0m(WfW zkQ1=5786y!bQ~$}FbXyE8m4RZK?@xz*~TLZ$ZnYKJ^%H%ZIbPGwq>J19go@eHtizG zHWN`m*1&X^n0LI?+2sCa+HI2UOCIG?_G4A1Wia|#G&QDM&AgloN*y(LuUSt@rEw}hQuu(hW9|0zq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QET5CH>7}wWf=FOoJ zR-y|DT8b}m(mT+GvD-)E8d;In+KNVu>*Rgr&rpe*jU>&$9XP4YW^XCqF|^i}G-6zh zmzYOaNZcYMYXzRfDbm%{Ov!gY4mF?dmbleP+FYE#vy8?vji!VX(Q|aAb+)DvvmIq# zJuh)vkps2N%_?lop8ws}tj0pjLO0-PoM4|b1Ff?Q&6sUxOXk&w61Oiowj)lUPnn(8 z*^6e(wtsn|2&68ap&Ak~pic7eYXL*Dh7|Qzer1g%& za&2P0)nJ7dA1B-H5G>bbHdr0jm#}vzvdAu!Fx!?kSS_}ZurDaC$o4d2wry;*dh8)# zzfx3@jcLSeyW4CvIaI=$0NSleJ!ae2lGWuTiR(_`&CSo4ZGTHvo1qdnJq7m%KE!Oh zTC)0_Cvih4v<}>l**3GuYIL>4EkvQ6irF@@!RmCo#4S&Otw}S+t!bUr>Jf=si^A%| z7Z|sQBduOfOWXz&)|D7Hqn}&NUXr-YDX0xGuB$Iv-QJYA?J1-#e1LK1S?%7JxLqlv zV=!)8tKX**w+{t0BO@?u7Jsq&eIs!PQ$S~9SdI5s1V2mMQ54P}7?qv!T@1fT+=&#< zDHzt>&n<>Vi94Nw>B^57c8bMOD`9`7V79`r-#NnK=qO=-qhRjAuoEqkP7-z|g)$RO z@%R6a7D*QgJDWn;AH%k{Sh`BsITXrW81|6G(k**But2&nDm#|GSb9jT>eft$au|EM;$FTD) zlJ;K#yI|P!7Ejj#uLPciVc%OkwFSNzbV0laxMcCvNZ6kXdmnI!#nU8lXHXc=#xH>L z3)jCS?i32+b!@N5djf}Hdzp@ - - - - - - - - - diff --git a/templates/swift/Resources/wp.png b/templates/swift/Resources/wp.png deleted file mode 100644 index 39437236af057c7966c970efeccbf950d29c141f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2792 zcmaJ@c{tPy7oNKL7_vvmkc{2fa%D@IC^Li>B3UMx%r#@*t}QZdWQ(ycX)?CUFqnS! zZ4^z$6bdtwC51{umpdad*X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oAf<4zqiC%9AeWU2uDb=1rh)JYs=n-NA zu*B67%=s=QkMk%GSQ-~%j3IbUi)6aTfZSd+d2_HJM10`V86wyj1zP)+DOQ0E@?Lss za{V6aKT7%uqH7%)vM^fDkLBA({pHM**w>f`e0r=V1YCc+&(xxyLR*3Wg}sPTS+QFhby``xQj@v!15 zwmQ$U*a$23-Fn4}V>`AgGwRrXC|d34n0fGv1T8Q3VoUeUzA;@q>W9UO)rjrb+IF;K zzg8*1s8V7$LD; z#ETNMcF9=-&7O=;J*mcc3?(>ez@=`VTG{)VmcMbTRyQ*2cx~m~p00TVL^&he$=+OX zYC5!yyP80cu|PdsSsvd*zXk)kE? zZv$(}mu(`|5LORd_pM#u4^6DBcgtQnoQi$9-rypO4Y~a+tx_ zYFxZ9iU2qbq#z1lus~5VE5shGcsVOTW*R7R3(F&MotB$&4op+GnLxc)6D~pDI9&gb zo>Pb&$nF5y1VuHWd!;*%29*!%TG+LT8>!1}9ZZ(GZF(ZS9w1At&Vc}=K_RuezJP4Z zi6Q3~YjDTp&K+5jZw&A`xNe1;Uz`{|V!97Yq{iB#xV7RGl!I8akeFR&=^=&Hif^z+I{p}h2%Z)2t$SOks!Rr@7 z@>m+Ievc2U$v3>twlC*awq!vXe<&M0OTV-GYhkMux@YFA=an`A;nl2gJ7n3SFer&0 zeYP;nXysur$s}j+)&%VONNb5+clIlDaD;u#RmHovn?DEZeoSD<%{d0#O7D8Q+mMy( m-~3sv)=fkWF9rX9>3fLmzFA!n+e+x)_Y`68Y}X9;yZ>Jt%YQZi diff --git a/templates/swift/Resources/wp.svg b/templates/swift/Resources/wp.svg deleted file mode 100644 index 11425163..00000000 --- a/templates/swift/Resources/wp.svg +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/templates/swift/Resources/wq.png b/templates/swift/Resources/wq.png deleted file mode 100644 index 962e52aa4aea3f24a12c5f9b8d6148c01be5c6cb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6353 zcm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q;Z)~TKsWjP_(?CX@4QHPB3De?4br`hOjdA4<8UVK>luCA-7HZ39SYe`#OLs4x# z*az{$EAwb8%byGzecEy4llj970j|v~s%>c7Y+Zlim~3G?He)*BlLTd|T{yAdI;;rC zRR}sTr*GGx)+fc!%MVZN+nH<0AAh{8tthH%qZEE#a`DMtznWc`w`;Q|zSOMVX6Ms~ z-6HV28;xm^I&20`<`SCGZW9IG<%+@exxs?Z?b{w+`q0vl0{|B*{4k)A^dH*xe?J`l bzflcTCL)!8>wPQa>QYbJNUKT1IpO~RWz37r diff --git a/templates/swift/Resources/wq.svg b/templates/swift/Resources/wq.svg deleted file mode 100644 index 97043c5a..00000000 --- a/templates/swift/Resources/wq.svg +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/templates/swift/Resources/wr.png b/templates/swift/Resources/wr.png deleted file mode 100644 index eeda04d045d07a320daad5ed75a9b1900cf93aea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1300 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K588}#g)VJz{w+sv{w>@1PLn;{G-f(V6372X8 zXl$0Hw(aebOS=n%Z*Mc(`1YZenR#M<((P@z(rbkm8<@VoT6?he`|r7bOTPcvzX)g! z0icq(M$6JH>aFBTui4Tozx9Nv9zUk#*jzH@-sIwUyl)r(JC)3CtIz(X^6dhfU)l0| z6`$X!w(@G8GNJC(l-qY^o_go8vq5&{n{!ic$1MM)Df#*o@I39+-HZhmF&Fwc>KRXL@DuG~=$pcQYa)w4 z55uf}295@Xv@b1U(qRz{$19!MWWysE4oCf)Bgy%oU-wa%Rx9g=-pxOjZD7#KOPyH8 zq`<(W&=6i)xy&{=g5iA1pU(CFj2Q(S4lprsL{~7dIDnDCJ*|xUmfi2yG?~p~=;BDQ zTs`6JlQn6ZxNa7)1h_B+uXWnCe)FyCS}DPt3pyBf?O7(eXVw0qu=t%>togp>f)0X= zH*D=rudZf1fBl-+*HiP}yq|mg`@A<(ZR2N0-&y@z=lhLFW`%|j0R~1a=s?8#X%CJG zF?gFcSU+joXg#H;|7qLC{;56Zfz?E8>hXgbjPpP$3#Cq zIluXUPv2P|n_taB75hpU_sn?yXUBpP#ux}gm*v=%9bI+b zT1wOBxXRAD<<@S?BYS6SY}qnn*OObi&*hGUs`fGLk;?@t_>-UK2Os?Fza@W&aXJ4}a^>|W! zq1dcid&kOWqIKa{9~U)M$Aofrzs|P2SiANp=YuTEhq1m4@h3Rnb2Ak@@|Iy#>0=0T zXE5bh@T%5(&#N!MWb7Q1){dEgfa-+Y89J34jtDwD;!r4Lnb2@^>t?=r&ti6m+AKU0 z4fNT;%XiMrid8L`ukp#= zQv%BYjt3d_*GlAnZawmCqJ8$R#iwNtuq@un$udCz9^oni2i)vdKfU2rBYc9RL6AYY z;e|T`^A*+23raH^l*-ngX)0U0Xj{v^Ns+gIdwFXVdB5cQdQ#{6uafp@L7F`mYjnOJ g%A2mk;8 diff --git a/templates/swift/Resources/wr.svg b/templates/swift/Resources/wr.svg deleted file mode 100644 index 8d2d9320..00000000 --- a/templates/swift/Resources/wr.svg +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - diff --git a/templates/swift/Source/FDChessboardView.swift b/templates/swift/Source/FDChessboardView.swift deleted file mode 100644 index 7461e183..00000000 --- a/templates/swift/Source/FDChessboardView.swift +++ /dev/null @@ -1,239 +0,0 @@ -// -// FDChessboardView.swift -// FDChessboardView -// -// Created by William Entriken on 2/2/16. -// Copyright © 2016 William Entriken. All rights reserved. -// - -import Foundation -import UIKit - -public struct FDChessboardSquare { - /// From 0...7 - public var file: Int - - /// From 0...7 - public var rank: Int - - /// A format like a4 - public var algebriac: String { - get { - return String(UnicodeScalar(96 + file)) + String(rank + 1) - } - } - - public var index: Int { - get { - return rank * 8 + file - } - set { - file = index % 8 - rank = index / 8 - } - } - - public init(index newIndex: Int) { - file = newIndex % 8 - rank = newIndex / 8 - } -} - -public enum FDChessboardPiece: String { - case WhitePawn = "wp" - case BlackPawn = "bp" - case WhiteKnight = "wn" - case BlackKnight = "bn" - case WhiteBishop = "wb" - case BlackBishop = "bb" - case WhiteRook = "wr" - case BlackRook = "br" - case WhiteQueen = "wq" - case BlackQueen = "bq" - case WhiteKing = "wk" - case BlackKing = "bk" -} - -public protocol FDChessboardViewDataSource: class { - /// What piece is on the square? - func chessboardView(board: FDChessboardView, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? - - /// The last move - func chessboardViewLastMove(board: FDChessboardView) -> (from:FDChessboardSquare, to:FDChessboardSquare)? - - /// The premove - func chessboardViewPremove(board: FDChessboardView) -> (from:FDChessboardSquare, to:FDChessboardSquare)? -} - -public protocol FDChessboardViewDelegate: class { - /// Where can this piece move to? - func chessboardView(board: FDChessboardView, legalDestinationsForPieceAtSquare from: FDChessboardSquare) -> [FDChessboardSquare] - - /// Before a move happens (cannot be stopped) - func chessboardView(board: FDChessboardView, willMoveFrom from: FDChessboardSquare, to: FDChessboardSquare) - - /// After a move happened - func chessboardView(board: FDChessboardView, didMoveFrom from: FDChessboardSquare, to: FDChessboardSquare) - - /// Before a move happens (cannot be stopped) - func chessboardView(board: FDChessboardView, willMoveFrom from: FDChessboardSquare, to: FDChessboardSquare, withPromotion promotion: FDChessboardPiece) - - /// After a move happened - func chessboardView(board: FDChessboardView, didMoveFrom from: FDChessboardSquare, to: FDChessboardSquare, withPromotion promotion: FDChessboardPiece) -} - -public class FDChessboardView: UIView { - public var lightBackgroundColor = UIColor(red: 222.0/255, green:196.0/255, blue:160.0/255, alpha:1) - public var darkBackgroundColor = UIColor(red: 160.0/255, green:120.0/255, blue:55.0/255, alpha:1) - public var targetBackgroundColor = UIColor(hue: 0.75, saturation:0.5, brightness:0.5, alpha:1.0) - public var legalBackgroundColor = UIColor(hue: 0.25, saturation:0.5, brightness:0.5, alpha:1.0) - public var lastMoveColor = UIColor(hue: 0.35, saturation:0.5, brightness:0.5, alpha:1.0) - public var premoveColor = UIColor(hue: 0.15, saturation:0.5, brightness:0.5, alpha:1.0) - public var pieceGraphicsDirectoryPath: String? = nil - - public weak var dataSource: FDChessboardViewDataSource? = nil { - didSet { - reloadData() - } - } - - public weak var delegate: FDChessboardViewDelegate? = nil - - public var doesAnimate: Bool = true - public var doesShowLegalSquares: Bool = true - public var doesShowLastMove: Bool = true - public var doesShowPremove: Bool = true - - private lazy var tilesAtIndex = [UIView]() - - private var pieceAtIndex = [Int : FDChessboardPiece]() - - private var pieceImageViewAtIndex = [Int : UIImageView]() - - private var lastMoveArrow: UIView? = nil - - private var premoveArrow: UIView? = nil - - 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 - - for index in 0..<64 { - let square = FDChessboardSquare(index: index) - let tile = UIView() - tile.backgroundColor = (index + index/8) % 2 == 0 ? darkBackgroundColor : lightBackgroundColor - tile.translatesAutoresizingMaskIntoConstraints = false - addSubview(tile) - tilesAtIndex.append(tile) - - switch square.rank { - case 0: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: self, attribute: .Bottom, multiplier: 1, constant: 0)) - case 7: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Top, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Top, relatedBy: .Equal, toItem: self, attribute: .Top, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Height, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Height, multiplier: 1, constant: 0)) - default: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Bottom, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Top, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Height, relatedBy: .Equal, toItem: tilesAtIndex[index - 8], attribute: .Height, multiplier: 1, constant: 0)) - } - switch square.file { - case 0: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: self, attribute: .Left, multiplier: 1, constant: 0)) - case 7: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Right, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Right, relatedBy: .Equal, toItem: self, attribute: .Right, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Width, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Width, multiplier: 1, constant: 0)) - default: - addConstraint(NSLayoutConstraint(item: tile, attribute: .Left, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Right, multiplier: 1, constant: 0)) - addConstraint(NSLayoutConstraint(item: tile, attribute: .Width, relatedBy: .Equal, toItem: tilesAtIndex[index - 1], attribute: .Width, multiplier: 1, constant: 0)) - } - } - self.layoutIfNeeded() - } - - /* -- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event -{ -UITouch *touch = [touches anyObject]; -CGPoint point = [touch locationInView:self]; -NSInteger x = point.x*8/self.frame.size.width; -NSInteger y = 8-point.y*8/self.frame.size.height; -UIView *tile = self.tilesPerSquare[y*8+x]; -tile.backgroundColor = self.targetBackgroundColor; -} - -- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event -{ -UITouch *touch = [touches anyObject]; -CGPoint point = [touch locationInView:self]; -if (![self pointInside:point withEvent:event]) -return; -NSInteger x = point.x*8/self.frame.size.width; -NSInteger y = 8-point.y*8/self.frame.size.height; -UIView *tile = self.tilesPerSquare[y*8+x]; -tile.backgroundColor = self.legalBackgroundColor; -} -*/ - - public func setPiece(piece: FDChessboardPiece?, forSquare square: FDChessboardSquare){ - let index = square.index - pieceAtIndex[index] = piece - self.pieceImageViewAtIndex[index]?.removeFromSuperview() - self.pieceImageViewAtIndex.removeValueForKey(index) - guard let piece = piece else { - return - } - - let pieceImageView: UIImageView - let fileName = piece.rawValue - let bundle = NSBundle(forClass: self.dynamicType) - let image = UIImage(named: fileName, inBundle: bundle, compatibleWithTraitCollection: nil) - pieceImageView = UIImageView(image: image) - pieceImageView.translatesAutoresizingMaskIntoConstraints = false - self.pieceImageViewAtIndex[index] = pieceImageView - self.addSubview(pieceImageView) - - let squareOne = self.tilesAtIndex.first! - self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Width, relatedBy: .Equal, toItem: squareOne, attribute: .Width, multiplier: 1, constant: 0)) - self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Height, relatedBy: .Equal, toItem: squareOne, attribute: .Height, multiplier: 1, constant: 0)) - self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Top, relatedBy: .Equal, toItem: self.tilesAtIndex[index], attribute: .Top, multiplier: 1, constant: 0)) - self.addConstraint(NSLayoutConstraint(item: pieceImageView, attribute: .Leading, relatedBy: .Equal, toItem: self.tilesAtIndex[index], attribute: .Leading, multiplier: 1, constant: 0)) - self.layoutIfNeeded() - } - - public func reloadData() { - for index in 0 ..< 64 { - let square = FDChessboardSquare(index: index) - let newPiece = dataSource?.chessboardView(self, pieceForSquare:square) - setPiece(newPiece, forSquare: square) - } - self.layoutIfNeeded() - } - - public func movePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare) -> Bool { - return true - } - - public func movePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare, andPromoteTo piece: FDChessboardPiece) -> Bool { - return true - } - - public func premovePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare) -> Bool { - return true - } - - public func premovePieceAtCoordinate(from: FDChessboardSquare, toCoordinate to: FDChessboardSquare, andPromoteTo piece: FDChessboardPiece) -> Bool { - return true - } - -} \ No newline at end of file diff --git a/templates/swift/Source/PROJECT.swift b/templates/swift/Source/PROJECT.swift new file mode 100644 index 00000000..9a2f33ba --- /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 + +public 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 = NSBundle(forClass: self.dynamicType) + let image = UIImage(named: "wk", inBundle: bundle, compatibleWithTraitCollection: 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/FDChessboardViewTests.swift b/templates/swift/Tests/FDChessboardViewTests.swift index 9de78012..1d840faa 100644 --- a/templates/swift/Tests/FDChessboardViewTests.swift +++ b/templates/swift/Tests/FDChessboardViewTests.swift @@ -1,15 +1,15 @@ // -// FDChessboardViewTests.swift -// FDChessboardViewTests +// PROJECTTests.swift +// PROJECTTests // // Created by William Entriken on 4/25/16. // Copyright © 2016 William Entriken. All rights reserved. // import XCTest -@testable import FDChessboardView +@testable import PROJECT -class FDChessboardViewTests: XCTestCase { +class PROJECTTests: XCTestCase { override func setUp() { super.setUp() From 8d415d08282b02305f9ae3648383bcdc6155150b Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 7 May 2016 11:20:25 -0400 Subject: [PATCH 13/62] add testing and travis ci --- .gitignore | 6 +++++- .travis.yml | 3 +++ Gemfile | 5 +++++ Rakefile | 9 +++++++++ configurator/TemplateConfigurator.rb | 2 -- spec/mock/open | 7 +++++++ spec/spec_helper.rb | 7 +++++++ spec/swift/basic_spec.rb | 22 ++++++++++++++++++++++ 8 files changed, 58 insertions(+), 3 deletions(-) create mode 100644 .travis.yml create mode 100644 Gemfile create mode 100644 Rakefile create mode 100755 spec/mock/open create mode 100644 spec/spec_helper.rb create mode 100644 spec/swift/basic_spec.rb 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 new file mode 100644 index 00000000..1f4f11e0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: ruby +sudo: false +# By default, this runs rake on the latest ruby \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..19dfbe96 --- /dev/null +++ b/Gemfile @@ -0,0 +1,5 @@ +source 'https://rubygems.org' + +gem 'rake' +gem 'rspec' +gem "cocoapods", ">= 1.0.0.beta" diff --git a/Rakefile b/Rakefile new file mode 100644 index 00000000..dc2e04fb --- /dev/null +++ b/Rakefile @@ -0,0 +1,9 @@ +require 'rake' +require 'rspec/core/rake_task' + +desc 'Run specs' +RSpec::Core::RakeTask.new do |t| + t.pattern = './spec/**/*_spec.rb' +end + +task :default => :spec diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 58ffdbfd..8d7406e7 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -81,8 +81,6 @@ def replace_variables_in_files end end - - def rename_template_files # Move schemes FileUtils.mv "PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme", "PROJECT.xcodeproj/xcshareddata/xcschemes/#{pod_name}.xcscheme" 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/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..96dd1abe --- /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 compile with default settings" do + FileUtils::mkdir_p 'spec/staging' + Dir.chdir('spec/staging') do + puts "Vendoring with default settings" + path = Dir.pwd + '/../mock:' + ENV['PATH'] + command = "bundle exec pod lib create --template-url='file://#{Dir.pwd}/../../' TestPod" + Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| + stdin.write "\n\n\n\n" + print stdout.readlines.join {"\n"} + print stderr.readlines.join {"\n"} + } + end + end +end From 5e2a105480d2bb57189e3006c81241729ec5c918 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 7 May 2016 11:23:38 -0400 Subject: [PATCH 14/62] clean project dir --- configurator/TemplateConfigurator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 8d7406e7..402116ad 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -60,7 +60,7 @@ def run end def prepare_staging_directory - [".git", "configurator", ".gitignore", "configure", "LICENSE", "README"].each do |asset| + [".git", "configurator", "spec", ".gitignore", ".travis.yml", "configure", "Gemfile", "LICENSE", "Rakefile", "README.md", ].each do |asset| `rm -rf #{asset}` end FileUtils.cp_r 'templates/baseline/.', '.' From 4fca88b0a71cf6c01ee22ea519ff6aa1f55bce43 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 7 May 2016 11:24:18 -0400 Subject: [PATCH 15/62] add travis status --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index ef8e5ba3..78702815 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ pod-template ============ +[![Build Status](https://travis-ci.org/fulldecent/pod-template.svg?branch=master)](https://travis-ci.org/fulldecent/pod-template) + An opinionated template for Swift and Objective-C frameworks with the following features: - Prompt-based project generation From e2b028e322ff6f85bbbe153aa969efae8b9e1ac5 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 7 May 2016 11:25:42 -0400 Subject: [PATCH 16/62] remove SPM --- README.md | 2 +- templates/swift/Package.swift | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) delete mode 100644 templates/swift/Package.swift diff --git a/README.md b/README.md index 78702815..d66fbd32 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ pod-template An opinionated template for Swift and Objective-C frameworks with the following features: - Prompt-based project generation -- Support for CocoaPods, Carthage and Swift Package Manager +- Support for CocoaPods, Carthage and project layout compatible with Swift Package Manager - Clean folder structure - MIT license - Testing as a standard diff --git a/templates/swift/Package.swift b/templates/swift/Package.swift deleted file mode 100644 index 35d7a8e7..00000000 --- a/templates/swift/Package.swift +++ /dev/null @@ -1,5 +0,0 @@ -import PackageDescription - -let package = Package( - name: "PROJECT" -) From 65f5ebe5001fb099f815bf654260affdf18dca52 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 10 May 2016 14:06:38 -0400 Subject: [PATCH 17/62] rebase --- configurator/ProjectManipulator.rb | 2 +- templates/ios/Example/Podfile | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 templates/ios/Example/Podfile diff --git a/configurator/ProjectManipulator.rb b/configurator/ProjectManipulator.rb index d4427af0..00792368 100644 --- a/configurator/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -68,7 +68,7 @@ def remove_demo_project use_frameworks! target '#{test_target.name}' do pod '#{@configurator.pod_name}', :path => '../' - + ${INCLUDED_PODS} end RUBY diff --git a/templates/ios/Example/Podfile b/templates/ios/Example/Podfile new file mode 100644 index 00000000..f3abfead --- /dev/null +++ b/templates/ios/Example/Podfile @@ -0,0 +1,11 @@ +use_frameworks! + +target '${POD_NAME}_Example' do + pod '${POD_NAME}', :path => '../' + + target '${POD_NAME}_Tests' do + inherit! :search_paths + + ${INCLUDED_PODS} + end +end From bb8c7c0b500313f1342a9dc404040738d1fa3369 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 19:43:12 -0400 Subject: [PATCH 18/62] add spec for basic configuration --- spec/default/basic_spec.rb | 23 +++++++++++++++++++++++ spec/swift/basic_spec.rb | 5 +++-- 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 spec/default/basic_spec.rb diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb new file mode 100644 index 00000000..da98c334 --- /dev/null +++ b/spec/default/basic_spec.rb @@ -0,0 +1,23 @@ +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 + FileUtils::mkdir_p 'spec/staging' + Dir.chdir('spec/staging') do + puts "Vendoring with default settings" + path = Dir.pwd + '/../mock:' + ENV['PATH'] + command = "bundle exec pod lib create --template-url='file://#{Dir.pwd}/../../' TestPod" + Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| + stdin.write "\n\n\n\n\n\n\n" + print stdout.readlines.join {"\n"} + print stderr.readlines.join {"\n"} + } + expect(1).to eq(1) + end + end +end diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index 96dd1abe..c5037564 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -6,17 +6,18 @@ FileUtils::mkdir_p 'spec/staging' end - it "should compile with default settings" do + it "should work if you select swift and keep hitting enter" do FileUtils::mkdir_p 'spec/staging' Dir.chdir('spec/staging') do puts "Vendoring with default settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] command = "bundle exec pod lib create --template-url='file://#{Dir.pwd}/../../' TestPod" Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| - stdin.write "\n\n\n\n" + stdin.write "swift\n\n\n\n\n\n\n" print stdout.readlines.join {"\n"} print stderr.readlines.join {"\n"} } + expect(1).to eq(1) end end end From 7bb316c1d7c94707ac0720ad29504862603ce9ed Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 19:46:41 -0400 Subject: [PATCH 19/62] add default notes --- .travis.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1f4f11e0..c9f1ca0b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,5 @@ language: ruby sudo: false -# By default, this runs rake on the latest ruby \ No newline at end of file +# By default, this runs rake on the latest ruby and executes +# bundle install --jobs=3 --retry=3 +# rake From 7b0e69d4d8bc135a6c623cb5b25a906880ea32ad Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 20:57:42 -0400 Subject: [PATCH 20/62] travis ruby version --- .travis.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.travis.yml b/.travis.yml index c9f1ca0b..40f887c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,16 @@ language: ruby sudo: false + +cache: bundler +rvm: + # OS X 10.9.5-10.10.0 (2.0.0-p481) + - system + # OS X 10.9.3-10.9.4 + - 2.0.0-p451 + # OS X 10.9.0-10.9.2 + # TODO: currently unavailable: https://github.com/travis-ci/travis-ci/issues/2918 + # - 2.0.0-p247 + # By default, this runs rake on the latest ruby and executes # bundle install --jobs=3 --retry=3 # rake From ebb7b290177f71f6000dc60a76a4a21987c5b093 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 21:08:18 -0400 Subject: [PATCH 21/62] new versions --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 40f887c8..fc618fbc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,13 +3,9 @@ sudo: false cache: bundler rvm: - # OS X 10.9.5-10.10.0 (2.0.0-p481) - - system + - 2.2 # OS X 10.9.3-10.9.4 - 2.0.0-p451 - # OS X 10.9.0-10.9.2 - # TODO: currently unavailable: https://github.com/travis-ci/travis-ci/issues/2918 - # - 2.0.0-p247 # By default, this runs rake on the latest ruby and executes # bundle install --jobs=3 --retry=3 From 3d55de1111eb180c9a4fd482e4292beb241887fc Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 21:37:03 -0400 Subject: [PATCH 22/62] this is a hunch --- .travis.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.travis.yml b/.travis.yml index fc618fbc..0b167dd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,3 +10,12 @@ rvm: # By default, this runs rake on the latest ruby and executes # bundle install --jobs=3 --retry=3 # rake + +# HACK TO GET GIT 1.9 +# see also https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/command/lib.rb#L70 +addons: + apt: + sources: + - git-core + packages: + - git From d22f766be1fd2e5c6d48a05e5322bd8721c910fc Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 12 May 2016 21:50:03 -0400 Subject: [PATCH 23/62] hunch, see https://travis-ci.org/CocoaPods/pod-template/jobs/129887616 --- .travis.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0b167dd0..5b9e5406 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,11 +11,6 @@ rvm: # bundle install --jobs=3 --retry=3 # rake -# HACK TO GET GIT 1.9 -# see also https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/command/lib.rb#L70 -addons: - apt: - sources: - - git-core - packages: - - git +script: + - git fetch --unshallow + - rake From b017c8ed5eb302f9e4d7288f8d7338a6fe6813a8 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 20:28:40 -0400 Subject: [PATCH 24/62] rake with bundle --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5b9e5406..4fdd04b2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,4 +13,4 @@ rvm: script: - git fetch --unshallow - - rake + - bundle exec rake From 25ab393289204724dfad927ad5997e3572860a30 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 21:50:31 -0400 Subject: [PATCH 25/62] latest cocoapods --- Gemfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 19dfbe96..f19c1343 100644 --- a/Gemfile +++ b/Gemfile @@ -2,4 +2,5 @@ source 'https://rubygems.org' gem 'rake' gem 'rspec' -gem "cocoapods", ">= 1.0.0.beta" +gem 'cocoapods' + From feca9777c9128f9f23db28f2259881de2e3f6408 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 21:52:29 -0400 Subject: [PATCH 26/62] add verbose --- spec/default/basic_spec.rb | 2 +- spec/swift/basic_spec.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb index da98c334..9150eeaa 100644 --- a/spec/default/basic_spec.rb +++ b/spec/default/basic_spec.rb @@ -11,7 +11,7 @@ Dir.chdir('spec/staging') do puts "Vendoring with default settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] - command = "bundle exec pod lib create --template-url='file://#{Dir.pwd}/../../' TestPod" + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| stdin.write "\n\n\n\n\n\n\n" print stdout.readlines.join {"\n"} diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index c5037564..156c6fb5 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -11,7 +11,7 @@ Dir.chdir('spec/staging') do puts "Vendoring with default settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] - command = "bundle exec pod lib create --template-url='file://#{Dir.pwd}/../../' TestPod" + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| stdin.write "swift\n\n\n\n\n\n\n" print stdout.readlines.join {"\n"} From 3c66328f041c29c88e5e19893cd02c463e9a2908 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 21:58:24 -0400 Subject: [PATCH 27/62] close stdin --- spec/swift/basic_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index 156c6fb5..d4e27f61 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -14,6 +14,7 @@ command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| stdin.write "swift\n\n\n\n\n\n\n" + stdin.close print stdout.readlines.join {"\n"} print stderr.readlines.join {"\n"} } From 91acd3a8e68d69dd9bdcb3a67391043498182f66 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 22:14:25 -0400 Subject: [PATCH 28/62] popen2e --- spec/default/basic_spec.rb | 6 +++--- spec/swift/basic_spec.rb | 5 ++--- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb index 9150eeaa..e9fd9a9b 100644 --- a/spec/default/basic_spec.rb +++ b/spec/default/basic_spec.rb @@ -12,10 +12,10 @@ puts "Vendoring with default settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" - Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| + Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| stdin.write "\n\n\n\n\n\n\n" - print stdout.readlines.join {"\n"} - print stderr.readlines.join {"\n"} + stdin.close + print stdout_and_stderr.readlines.join {"\n"} } expect(1).to eq(1) end diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index d4e27f61..d64e4c43 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -12,11 +12,10 @@ puts "Vendoring with default settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" - Open3.popen3({'PATH' => path}, command) {|stdin, stdout, stderr, wait_thr| + 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.readlines.join {"\n"} - print stderr.readlines.join {"\n"} + print stdout_and_stderr.readlines.join {"\n"} } expect(1).to eq(1) end From 21a9fe29c1b749658decb7b424e163783aa8d7c6 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 19 May 2016 22:18:58 -0400 Subject: [PATCH 29/62] answer questions --- spec/default/basic_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb index e9fd9a9b..be6f601a 100644 --- a/spec/default/basic_spec.rb +++ b/spec/default/basic_spec.rb @@ -9,11 +9,11 @@ it "should work if you just keep hitting enter" do FileUtils::mkdir_p 'spec/staging' Dir.chdir('spec/staging') do - puts "Vendoring with default settings" + puts "Vendoring with simple settings" path = Dir.pwd + '/../mock:' + ENV['PATH'] command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod" Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| - stdin.write "\n\n\n\n\n\n\n" + stdin.write "Bob Smith\nbob.smith@example.com\n\n\n\n\n\n" stdin.close print stdout_and_stderr.readlines.join {"\n"} } From a38d43973dda8e7a1a868989825c43086171581e Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sun, 26 Jun 2016 18:46:03 -0400 Subject: [PATCH 30/62] remove old, commented code --- configurator/ProjectManipulator.rb | 7 ------- 1 file changed, 7 deletions(-) diff --git a/configurator/ProjectManipulator.rb b/configurator/ProjectManipulator.rb index 00792368..19ba6a1d 100644 --- a/configurator/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -80,13 +80,6 @@ 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| From ed0103ec67adbc4bbbb7ccc18ff8b1b3a8848fd3 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sun, 26 Jun 2016 18:49:40 -0400 Subject: [PATCH 31/62] remove unnecessary source --- templates/swift/Example/Podfile | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index b5de64b4..57bc4d36 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -1,4 +1,3 @@ -source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target 'iOS Example' do From 1319e9ff8e164a12786f1e60d379d18a0be5923d Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sun, 26 Jun 2016 18:57:22 -0400 Subject: [PATCH 32/62] use name templating --- templates/swift/Example/Source/AppDelegate.swift | 4 ++-- .../swift/Example/Source/Base.lproj/Launch Screen.storyboard | 2 +- templates/swift/Example/iOS Example.xcodeproj/project.pbxproj | 2 +- templates/swift/LICENSE | 2 +- templates/swift/PROJECT.podspec | 4 ++-- templates/swift/PROJECT.xcodeproj/project.pbxproj | 2 +- templates/swift/Tests/FDChessboardViewTests.swift | 4 ++-- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/templates/swift/Example/Source/AppDelegate.swift b/templates/swift/Example/Source/AppDelegate.swift index b39b3389..91b22822 100644 --- a/templates/swift/Example/Source/AppDelegate.swift +++ b/templates/swift/Example/Source/AppDelegate.swift @@ -2,8 +2,8 @@ // AppDelegate.swift // PROJECT iOS // -// Created by Full Decent on 4/25/16. -// Copyright © 2016 William Entriken. All rights reserved. +// Created by PROJECT_OWNER on TODAYS_DATE. +// Copyright (c) TODAYS_YEAR PROJECT_OWNER. All rights reserved. // import UIKit diff --git a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard index e503cbce..b235fc1c 100644 --- a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -18,7 +18,7 @@ - +Screenshot -Features -======== - * High resolution graphics - * Customizable themes and game graphics - * Supports all single board chess variants: suicide, losers, atomic, etc. - * Supports games with odd piece arrangement and non-standard castling (Fisher 960) - * Very clean API, this is just a view - * Supports a minimum deployment target of iOS 8 or OS X Mavericks (10.9) +## Example -Usage -===== +To run the example project, clone the repo, and run `pod install` from the Example directory first. -Import, add the view to your storyboard and then set it up with: -```swift -import PROJECT -... -self.chessboard.dataSource = self -``` - -Then implement the data source: - -```swift -func chessboardView(board: PROJECT, pieceForSquare square: FDChessboardSquare) -> FDChessboardPiece? { - return piecesByIndex[square.index] // you figure out which piece to show -} -``` +## Requirements -Installation -============ - ## Installation ### CocoaPods @@ -52,8 +27,6 @@ Installation $ gem install cocoapods ``` -> CocoaPods 0.39.0+ is required to build PROJECT 0.1.0+. - To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby @@ -61,7 +34,7 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '9.0' use_frameworks! -pod 'PROJECT', '~> 0.1' +pod 'PROJECT' ``` Then, run the following command: @@ -70,6 +43,7 @@ Then, run the following command: $ pod install ``` + ### Carthage [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. @@ -90,19 +64,11 @@ github "fulldecent/PROJECT" ~> 0.1 Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. -Upcoming Features -================= - -These following items are in the API for discussion and awaiting implementation: +## Author - * Display for last move - * Mutable game state (i.e. can move the pieces) - * Animation for piece moves - * Highlighting of legal squares for a piece after begin dragging - * Premove +${USER_NAME}, ${USER_EMAIL} -See Also -=========== +## License -See also Kibitz for Mac which is making a comeback https://github.com/fulldecent/kibitz +${POD_NAME} is available under the MIT license. See the LICENSE file for more info. From 56d07df2d0afc67a1449801ac8c1d1b6d3851b56 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sun, 26 Jun 2016 20:09:22 -0400 Subject: [PATCH 34/62] Add enable_code_coverage, credit to Orta and commit f539662be0d690f63d99e4dd8bb17c5971f3c1cc --- templates/swift/Example/Podfile | 7 ++++++ .../xcshareddata/xcschemes/PROJECT.xcscheme | 3 ++- templates/swift/Tests/setup_code_coverage.rb | 23 +++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 templates/swift/Tests/setup_code_coverage.rb diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index 57bc4d36..8032e48a 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -8,3 +8,10 @@ target 'iOS Example' do ${INCLUDED_PODS} end end + +# Add a ${POD_NAME} target to the build steps of the example project +# so that we get code coverage reports for ${POD_NAME} +post_install do |installer| + require_relative "Tests/setup_code_coverage.rb" + enable_code_coverage "${POD_NAME}", installer +end diff --git a/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme index 75ef3a69..3c3b72fb 100644 --- a/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme +++ b/templates/swift/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -26,7 +26,8 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" - shouldUseLaunchSchemeArgsEnv = "YES"> + shouldUseLaunchSchemeArgsEnv = "YES" + codeCoverageEnabled = "YES"> diff --git a/templates/swift/Tests/setup_code_coverage.rb b/templates/swift/Tests/setup_code_coverage.rb new file mode 100644 index 00000000..82dbf6fb --- /dev/null +++ b/templates/swift/Tests/setup_code_coverage.rb @@ -0,0 +1,23 @@ +# Supping functionality for Podfile, so it is kept simple + +def enable_code_coverage(name, installer) + # get the library's target from Pods project + pods_project = installer.pods_project + pods_targets = pods_project.targets + pod_target = pods_targets.find { |target| target.name == name } + + # get the example's project scheme + example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first + example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) + example_scheme_filename = "#{name}-Example.xcscheme" + example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) + + # create a build action that points to the pod target + pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target + + # add the pod build action to the example project's build actions + example_build_action = example_scheme.build_action + example_build_action.add_entry(pod_build_action_entry) + + example_scheme.save! +end From eb0828976581d671a718f3dd3cb161a4f8555df5 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 28 Jun 2016 22:49:46 -0400 Subject: [PATCH 35/62] Enable code coverage, fixes #135 --- templates/baseline/.travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/baseline/.travis.yml b/templates/baseline/.travis.yml index 6061633c..67ce9e9f 100644 --- a/templates/baseline/.travis.yml +++ b/templates/baseline/.travis.yml @@ -9,5 +9,5 @@ language: objective-c # - 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 iphonesimulator ONLY_ACTIVE_ARCH=NO | xcpretty +- 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 From bacbd4b5e5cc89bb5996bad12773eb61f164019c Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 28 Jun 2016 22:58:24 -0400 Subject: [PATCH 36/62] Genericize test filename --- .../Tests/{FDChessboardViewTests.swift => PROJECTTests.swift} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename templates/swift/Tests/{FDChessboardViewTests.swift => PROJECTTests.swift} (100%) diff --git a/templates/swift/Tests/FDChessboardViewTests.swift b/templates/swift/Tests/PROJECTTests.swift similarity index 100% rename from templates/swift/Tests/FDChessboardViewTests.swift rename to templates/swift/Tests/PROJECTTests.swift From 45915fdd36b9538429340e65688d3d0f067d0af9 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 29 Jun 2016 22:54:51 -0400 Subject: [PATCH 37/62] Remove code coverage post_install --- templates/swift/Example/Podfile | 7 ------ templates/swift/Tests/setup_code_coverage.rb | 23 -------------------- 2 files changed, 30 deletions(-) delete mode 100644 templates/swift/Tests/setup_code_coverage.rb diff --git a/templates/swift/Example/Podfile b/templates/swift/Example/Podfile index 8032e48a..57bc4d36 100644 --- a/templates/swift/Example/Podfile +++ b/templates/swift/Example/Podfile @@ -8,10 +8,3 @@ target 'iOS Example' do ${INCLUDED_PODS} end end - -# Add a ${POD_NAME} target to the build steps of the example project -# so that we get code coverage reports for ${POD_NAME} -post_install do |installer| - require_relative "Tests/setup_code_coverage.rb" - enable_code_coverage "${POD_NAME}", installer -end diff --git a/templates/swift/Tests/setup_code_coverage.rb b/templates/swift/Tests/setup_code_coverage.rb deleted file mode 100644 index 82dbf6fb..00000000 --- a/templates/swift/Tests/setup_code_coverage.rb +++ /dev/null @@ -1,23 +0,0 @@ -# Supping functionality for Podfile, so it is kept simple - -def enable_code_coverage(name, installer) - # get the library's target from Pods project - pods_project = installer.pods_project - pods_targets = pods_project.targets - pod_target = pods_targets.find { |target| target.name == name } - - # get the example's project scheme - example_project = installer.aggregate_targets.map(&:user_project_path).uniq.first - example_shared_data_dir = Xcodeproj::XCScheme.shared_data_dir(example_project) - example_scheme_filename = "#{name}-Example.xcscheme" - example_scheme = Xcodeproj::XCScheme.new File.join(example_shared_data_dir, example_scheme_filename) - - # create a build action that points to the pod target - pod_build_action_entry = Xcodeproj::XCScheme::BuildAction::Entry.new pod_target - - # add the pod build action to the example project's build actions - example_build_action = example_scheme.build_action - example_build_action.add_entry(pod_build_action_entry) - - example_scheme.save! -end From 4464aa92d15119c1a9c625fe7d91a9d3b5ca6798 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 29 Jun 2016 23:02:12 -0400 Subject: [PATCH 38/62] Init git repo last --- configurator/TemplateConfigurator.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index 402116ad..c1b3dad3 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -53,8 +53,8 @@ def run add_pods_to_podfile customise_prefix run_pod_install - initialize_git_repo finalize_staging_directory + initialize_git_repo @message_bank.farewell_message end @@ -118,16 +118,16 @@ def run_pod_install end end + def finalize_staging_directory + `rm -rf templates` + end + def initialize_git_repo `git init` `git add -A` `git commit -m "Initial commit"` end - def finalize_staging_directory - `rm -rf templates` - end - #----------------------------------------# def ask(question) From 18a8a512607e226b42adb7637d08a693524f5710 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 29 Jun 2016 23:17:10 -0400 Subject: [PATCH 39/62] Fix date formatting --- configurator/TemplateConfigurator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/TemplateConfigurator.rb b/configurator/TemplateConfigurator.rb index c1b3dad3..44f2b58b 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/TemplateConfigurator.rb @@ -19,7 +19,7 @@ def year end def date - Time.now.strftime "%Y-%m-/%d" + Time.now.strftime "%Y-%m-%d" end def podfile_path From 40a2a51fd1ee56dd2248c6f69280568d584b7050 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Wed, 29 Jun 2016 23:17:22 -0400 Subject: [PATCH 40/62] Save test artifacts after RSpec --- Rakefile | 12 +++++++++++- spec/default/basic_spec.rb | 11 +++++------ spec/swift/basic_spec.rb | 11 +++++------ 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/Rakefile b/Rakefile index dc2e04fb..8c272397 100644 --- a/Rakefile +++ b/Rakefile @@ -1,9 +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 +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/spec/default/basic_spec.rb b/spec/default/basic_spec.rb index be6f601a..4e03af47 100644 --- a/spec/default/basic_spec.rb +++ b/spec/default/basic_spec.rb @@ -1,17 +1,16 @@ require 'spec_helper' describe "Idiot Mode" do - before(:each) do - FileUtils.rm_rf 'spec/staging' - FileUtils::mkdir_p 'spec/staging' - end +# before(:each) do +# FileUtils.rm_rf 'spec/staging' +# FileUtils::mkdir_p 'spec/staging' +# end it "should work if you just keep hitting enter" do - FileUtils::mkdir_p 'spec/staging' 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}/../../' TestPod" + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod-default1" 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 diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index d64e4c43..08c2a2d2 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -1,17 +1,16 @@ require 'spec_helper' describe "Swift Integration" do - before(:each) do - FileUtils.rm_rf 'spec/staging' - FileUtils::mkdir_p 'spec/staging' - end +# 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 - FileUtils::mkdir_p 'spec/staging' 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}/../../' TestPod" + command = "bundle exec pod lib create --verbose --template-url='file://#{Dir.pwd}/../../' TestPod-swift1" Open3.popen2e({'PATH' => path}, command) { |stdin, stdout_and_stderr, wait_thr| stdin.write "swift\n\n\n\n\n\n\n" stdin.close From bbf31495cbc90577ef294c0e46d16c889d22ea4c Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 30 Jun 2016 00:57:36 -0400 Subject: [PATCH 41/62] Refactor configurator to handle all xcodeproj --- ...ateConfigurator.rb => MainConfigurator.rb} | 80 ++++++++++++------- ...ConfigureSwift.rb => SwiftConfigurator.rb} | 11 ++- configure | 2 +- 3 files changed, 60 insertions(+), 33 deletions(-) rename configurator/{TemplateConfigurator.rb => MainConfigurator.rb} (72%) rename configurator/{ConfigureSwift.rb => SwiftConfigurator.rb} (85%) diff --git a/configurator/TemplateConfigurator.rb b/configurator/MainConfigurator.rb similarity index 72% rename from configurator/TemplateConfigurator.rb rename to configurator/MainConfigurator.rb index 44f2b58b..e31e751b 100644 --- a/configurator/TemplateConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -1,9 +1,17 @@ +# 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 user_name @@ -38,37 +46,40 @@ def initialize(pod_name) def run @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 - ConfigureObjC.perform(configurator: self) + ObjCConfigurator.perform(configurator: self) + end + + Dir.chdir('spec/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 - replace_variables_in_files - rename_template_files - add_pods_to_podfile - customise_prefix - run_pod_install finalize_staging_directory - initialize_git_repo @message_bank.farewell_message end def prepare_staging_directory - [".git", "configurator", "spec", ".gitignore", ".travis.yml", "configure", "Gemfile", "LICENSE", "Rakefile", "README.md", ].each do |asset| - `rm -rf #{asset}` - end - FileUtils.cp_r 'templates/baseline/.', '.' + FileUtils::mkdir_p 'staging' + end + + def use_baseline_template + FileUtils.cp_r 'templates/baseline/.', 'staging' end def replace_variables_in_files - file_names = ['LICENSE', 'README.md', 'PROJECT.podspec', '.travis.yml', 'PROJECT.xcworkspace/contents.xcworkspacedata', podfile_path] - file_names.each do |file_name| + Dir.glob("**/*") do |file_name| text = File.read(file_name) text.gsub!("${POD_NAME}", @pod_name) text.gsub!("PROJECT", @pod_name) @@ -81,17 +92,20 @@ def replace_variables_in_files end end - def rename_template_files - # Move schemes - FileUtils.mv "PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme", "PROJECT.xcodeproj/xcshareddata/xcschemes/#{pod_name}.xcscheme" - - # Move project files - FileUtils.mv "PROJECT.podspec", "#{pod_name}.podspec" - FileUtils.mv "PROJECT.xcodeproj", "#{pod_name}.xcodeproj" - FileUtils.mv "PROJECT.xcworkspace", "#{pod_name}.xcworkspace" + def replace_variables_in_file_names + Dir.foreach('.') do |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('spec/staging') 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 + "'" @@ -118,16 +132,22 @@ def run_pod_install end end - def finalize_staging_directory - `rm -rf templates` - end - def initialize_git_repo `git init` `git add -A` `git commit -m "Initial commit"` end + 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 ask(question) diff --git a/configurator/ConfigureSwift.rb b/configurator/SwiftConfigurator.rb similarity index 85% rename from configurator/ConfigureSwift.rb rename to configurator/SwiftConfigurator.rb index e5e3ae57..8820b798 100644 --- a/configurator/ConfigureSwift.rb +++ b/configurator/SwiftConfigurator.rb @@ -1,5 +1,12 @@ +# 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 +# + module Pod - class ConfigureSwift + class SwiftConfigurator attr_reader :configurator def self.perform(options) @@ -46,7 +53,7 @@ def perform :prefix => "" }).run - `mv ./templates/swift/* ./` + `mv ./templates/swift/* ./staging` end end end diff --git a/configure b/configure index 5aad1bd5..2492da96 100755 --- a/configure +++ b/configure @@ -6,4 +6,4 @@ Dir[File.join($current_dir, "configurator/*.rb")].each do |file| end pod_name = ARGV.shift -Pod::TemplateConfigurator.new(pod_name).run +Pod::MainConfigurator.new(pod_name).run From fbbaba0f312260d50d8592eb774f38b1536ab3fe Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 30 Jun 2016 00:59:58 -0400 Subject: [PATCH 42/62] fix testing dir --- configurator/MainConfigurator.rb | 2 +- spec/default/basic_spec.rb | 2 +- spec/swift/basic_spec.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index e31e751b..76e4064e 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -56,7 +56,7 @@ def run ObjCConfigurator.perform(configurator: self) end - Dir.chdir('spec/staging') do + Dir.chdir('staging') do replace_variables_in_files replace_variables_in_file_names add_pods_to_podfile(podfile_path) diff --git a/spec/default/basic_spec.rb b/spec/default/basic_spec.rb index 4e03af47..319078b4 100644 --- a/spec/default/basic_spec.rb +++ b/spec/default/basic_spec.rb @@ -10,7 +10,7 @@ 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}/../../' TestPod-default1" + 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 diff --git a/spec/swift/basic_spec.rb b/spec/swift/basic_spec.rb index 08c2a2d2..ead0d0cf 100644 --- a/spec/swift/basic_spec.rb +++ b/spec/swift/basic_spec.rb @@ -10,7 +10,7 @@ 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}/../../' TestPod-swift1" + 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 From 052ceeb3197e0155f7a8941fe53f95c2be88b56e Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 30 Jun 2016 01:01:55 -0400 Subject: [PATCH 43/62] deploy staging directory --- configurator/MainConfigurator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index 76e4064e..c6240323 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -65,7 +65,7 @@ def run initialize_git_repo end - finalize_staging_directory + deploy_staging_directory @message_bank.farewell_message end @@ -80,6 +80,7 @@ def use_baseline_template def replace_variables_in_files Dir.glob("**/*") do |file_name| + next if File.directory?(file_name) text = File.read(file_name) text.gsub!("${POD_NAME}", @pod_name) text.gsub!("PROJECT", @pod_name) From e18e630d2162e1a0785e97bddde51aedc047a96a Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 30 Jun 2016 01:03:05 -0400 Subject: [PATCH 44/62] chdir properly --- configurator/MainConfigurator.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index c6240323..782fdfc3 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -99,7 +99,7 @@ def replace_variables_in_file_names FileUtils.mv file_name, file_name.gsub('PROJECT', @pod_name) end if File.directory?(file_name.gsub('PROJECT', @pod_name)) - Dir.chdir('spec/staging') do + Dir.chdir(file_name.gsub('PROJECT', @pod_name)) do replace_variables_in_file_names end end From a0b41b329f214797d8864e7993e8975324c12b77 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Thu, 30 Jun 2016 01:04:12 -0400 Subject: [PATCH 45/62] no recurse bomb --- configurator/MainConfigurator.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index 782fdfc3..270988db 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -95,6 +95,7 @@ def replace_variables_in_files 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 From a086c03248c99b45684ef62586d2ee99ee9b0f27 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Mon, 1 Aug 2016 23:57:05 -0700 Subject: [PATCH 46/62] Add PROJECT.h file like AlamoFire --- templates/swift/Source/PROJECT.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 templates/swift/Source/PROJECT.h 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[]; From b7400e4a67bff394b0add11607e66b40e448c5a4 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 2 Aug 2016 00:00:44 -0700 Subject: [PATCH 47/62] Move all the Info.plist files into a Supporting Files Xcode group. It just helps remove the noise. --- templates/swift/PROJECT.xcodeproj/project.pbxproj | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/templates/swift/PROJECT.xcodeproj/project.pbxproj b/templates/swift/PROJECT.xcodeproj/project.pbxproj index 9f0eb6b7..785c1a53 100644 --- a/templates/swift/PROJECT.xcodeproj/project.pbxproj +++ b/templates/swift/PROJECT.xcodeproj/project.pbxproj @@ -27,7 +27,7 @@ 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; path = Info.plist; sourceTree = ""; }; + 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 = ""; }; @@ -52,6 +52,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + D9A11F971D507C7D00348273 /* Supporting Files */ = { + isa = PBXGroup; + children = ( + D9FEF4B91CCEBC0D0013FBDD /* Info.plist */, + ); + name = "Supporting Files"; + sourceTree = ""; + }; D9E0667E1CCECAFF00E0D7CB /* Resources */ = { isa = PBXGroup; children = ( @@ -65,6 +73,7 @@ children = ( D9FEF4B61CCEBC0D0013FBDD /* Source */, D9E0667E1CCECAFF00E0D7CB /* Resources */, + D9A11F971D507C7D00348273 /* Supporting Files */, D9FEF4C21CCEBC0F0013FBDD /* Tests */, D9FEF4B51CCEBC0D0013FBDD /* Products */, ); @@ -83,7 +92,6 @@ isa = PBXGroup; children = ( D94BE1CE1CCEBFD80042282A /* PROJECT.swift */, - D9FEF4B91CCEBC0D0013FBDD /* Info.plist */, ); path = Source; sourceTree = ""; @@ -154,7 +162,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = "PROJECT_OWNER"; + ORGANIZATIONNAME = PROJECT_OWNER; TargetAttributes = { D9FEF4B31CCEBC0D0013FBDD = { CreatedOnToolsVersion = 7.3; From 0764862741323c26b3084a3e1153be9ac6ea7dc0 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 2 Aug 2016 00:02:13 -0700 Subject: [PATCH 48/62] Add a Supporting Files Xcode group to the iOS Example/Source group and tuck the storyboards, asset catalog and Info.plist in there. --- .../Base.lproj/Launch Screen.storyboard | 2 +- .../iOS Example.xcodeproj/project.pbxproj | 26 +++++++++++++------ 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard index b235fc1c..870275fa 100644 --- a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -1,5 +1,5 @@ - + diff --git a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj index 14a92634..0513ef18 100644 --- a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj +++ b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj @@ -69,11 +69,11 @@ 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; path = Assets.xcassets; sourceTree = ""; }; - D94BE1C81CCEBF2C0042282A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; 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 = "Base.lproj/Launch Screen.storyboard"; 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 */ @@ -108,6 +108,7 @@ isa = PBXGroup; children = ( D94BE1BB1CCEBF2C0042282A /* Source */, + D9A11F981D507CB500348273 /* Supporting Files */, D904BBC11CDD3F170083BD78 /* Tests */, D94BE1BA1CCEBF2C0042282A /* Products */, D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */, @@ -126,12 +127,8 @@ D94BE1BB1CCEBF2C0042282A /* Source */ = { isa = PBXGroup; children = ( - D9CBAE961CCEC4ED006EC128 /* Launch Screen.storyboard */, D94BE1D21CCEC1730042282A /* AppDelegate.swift */, D94BE1BE1CCEBF2C0042282A /* ViewController.swift */, - D94BE1C01CCEBF2C0042282A /* Main.storyboard */, - D94BE1C31CCEBF2C0042282A /* Assets.xcassets */, - D94BE1C81CCEBF2C0042282A /* Info.plist */, ); path = Source; sourceTree = ""; @@ -145,6 +142,17 @@ 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 */ @@ -193,7 +201,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = "PROJECT_OWNER"; + ORGANIZATIONNAME = PROJECT_OWNER; TargetAttributes = { D904BBBF1CDD3F170083BD78 = { CreatedOnToolsVersion = 7.3.1; @@ -306,6 +314,7 @@ D94BE1C11CCEBF2C0042282A /* Base */, ); name = Main.storyboard; + path = Source; sourceTree = ""; }; /* End PBXVariantGroup section */ @@ -452,6 +461,7 @@ D904BBC81CDD3F170083BD78 /* Release */, ); defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; }; D94BE1B41CCEBF2C0042282A /* Build configuration list for PBXProject "iOS Example" */ = { isa = XCConfigurationList; From 23c2daee443328cffaa01abb14ecacf2d943d977 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 2 Aug 2016 00:08:22 -0700 Subject: [PATCH 49/62] Add dev notes to README --- README.md | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d66fbd32..0604a405 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ pod-template ============ -[![Build Status](https://travis-ci.org/fulldecent/pod-template.svg?branch=master)](https://travis-ci.org/fulldecent/pod-template) +[![Build Status](https://travis-ci.org/CocoaPods/pod-template.svg?branch=develop)](https://travis-ci.org/CocoaPods/pod-template) An opinionated template for Swift and Objective-C frameworks with the following features: @@ -22,9 +22,19 @@ You must run **CocoaPods 1.0.0+** to use this template. ## Hacking -To modify these templates or to create your own, please fork this repository or edit locally. Test your changes by running `pod lib create --template-url='YOUR_GIT_URL' POD_NAME`. Note that you can use a local git URL such as `file:///Users/username/Developer/pod-template`. - -To understand how this repository is used by CocoaPods, please start with `configure`. You can see the calling code in `configure_template` defined in [lib/cocoapods/command/lib.rb](https://github.com/CocoaPods/CocoaPods/blob/master/lib/cocoapods/command/lib.rb). +- 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 From 9e3ebf1fe7ecac51b781f75e1ed6d71a408f15b6 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Tue, 2 Aug 2016 00:37:28 -0700 Subject: [PATCH 50/62] Add objective-c support --- configurator/MainConfigurator.rb | 2 +- configurator/ObjectiveCConfigurator.rb | 59 +++ spec/objective-c/basic_spec.rb | 22 + templates/objective-c/Example/Podfile | 10 + .../Example/Source/AppDelegate.swift | 45 ++ .../AppIcon.appiconset/Contents.json | 73 +++ .../Source/Assets.xcassets/Contents.json | 6 + .../Base.lproj/Launch Screen.storyboard | 50 ++ .../Example/Source/Base.lproj/Main.storyboard | 77 +++ .../AppIcon.appiconset/Contents.json | 68 +++ .../objective-c/Example/Source/Info.plist | 47 ++ .../Example/Source/ViewController.swift | 18 + .../objective-c/Example/Tests/Info.plist | 24 + .../objective-c/Example/Tests/Tests.swift | 1 + .../iOS Example.xcodeproj/project.pbxproj | 487 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + templates/objective-c/LICENSE | 21 + templates/objective-c/PROJECT.podspec | 25 + .../PROJECT.xcodeproj/project.pbxproj | 424 +++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/xcschemes/PROJECT.xcscheme | 100 ++++ .../contents.xcworkspacedata | 10 + .../xcschemes/iOS Example.xcscheme | 101 ++++ templates/objective-c/README.md | 74 +++ templates/objective-c/Resources/wk.png | Bin 0 -> 4740 bytes templates/objective-c/Source/Info.plist | 26 + templates/objective-c/Source/PROJECT.h | 12 + templates/objective-c/Source/PROJECT.m | 42 ++ templates/objective-c/Tests/Info.plist | 24 + .../objective-c/Tests/PROJECTTests.swift | 29 ++ .../Base.lproj/Launch Screen.storyboard | 1 - 31 files changed, 1890 insertions(+), 2 deletions(-) create mode 100644 configurator/ObjectiveCConfigurator.rb create mode 100644 spec/objective-c/basic_spec.rb create mode 100644 templates/objective-c/Example/Podfile create mode 100644 templates/objective-c/Example/Source/AppDelegate.swift create mode 100644 templates/objective-c/Example/Source/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 templates/objective-c/Example/Source/Assets.xcassets/Contents.json create mode 100644 templates/objective-c/Example/Source/Base.lproj/Launch Screen.storyboard create mode 100644 templates/objective-c/Example/Source/Base.lproj/Main.storyboard create mode 100644 templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json create mode 100644 templates/objective-c/Example/Source/Info.plist create mode 100644 templates/objective-c/Example/Source/ViewController.swift create mode 100644 templates/objective-c/Example/Tests/Info.plist create mode 100644 templates/objective-c/Example/Tests/Tests.swift create mode 100644 templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj create mode 100644 templates/objective-c/Example/iOS Example.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 templates/objective-c/LICENSE create mode 100644 templates/objective-c/PROJECT.podspec create mode 100644 templates/objective-c/PROJECT.xcodeproj/project.pbxproj create mode 100644 templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme create mode 100644 templates/objective-c/PROJECT.xcworkspace/contents.xcworkspacedata create mode 100644 templates/objective-c/PROJECT.xcworkspace/xcshareddata/xcschemes/iOS Example.xcscheme create mode 100644 templates/objective-c/README.md create mode 100644 templates/objective-c/Resources/wk.png create mode 100644 templates/objective-c/Source/Info.plist create mode 100644 templates/objective-c/Source/PROJECT.h create mode 100644 templates/objective-c/Source/PROJECT.m create mode 100644 templates/objective-c/Tests/Info.plist create mode 100644 templates/objective-c/Tests/PROJECTTests.swift diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index 270988db..3886beb9 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -53,7 +53,7 @@ def run when :swift SwiftConfigurator.perform(configurator: self) when :objc - ObjCConfigurator.perform(configurator: self) + ObjectiveCConfigurator.perform(configurator: self) end Dir.chdir('staging') do diff --git a/configurator/ObjectiveCConfigurator.rb b/configurator/ObjectiveCConfigurator.rb new file mode 100644 index 00000000..5f431f3e --- /dev/null +++ b/configurator/ObjectiveCConfigurator.rb @@ -0,0 +1,59 @@ +# THIS PERFORMS ADDITIONAL CONFIGURATION IF THE USER SELECT 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.8" + configurator.add_pod_to_podfile "Nimble', '~> 3.0" + `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 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/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/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/objective-c/Example/Source/AppDelegate.swift b/templates/objective-c/Example/Source/AppDelegate.swift new file mode 100644 index 00000000..91b22822 --- /dev/null +++ b/templates/objective-c/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/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/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json b/templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 00000000..36d2c80d --- /dev/null +++ b/templates/objective-c/Example/Source/Images.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "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" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/templates/objective-c/Example/Source/Info.plist b/templates/objective-c/Example/Source/Info.plist new file mode 100644 index 00000000..40c6215d --- /dev/null +++ b/templates/objective-c/Example/Source/Info.plist @@ -0,0 +1,47 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + 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/objective-c/Example/Tests/Info.plist b/templates/objective-c/Example/Tests/Info.plist new file mode 100644 index 00000000..ba72822e --- /dev/null +++ b/templates/objective-c/Example/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/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..0513ef18 --- /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..d3a79229 --- /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/GITHUB_USERNAME/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..65e8b0ec --- /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/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000..919434a6 --- /dev/null +++ b/templates/objective-c/PROJECT.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme b/templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme new file mode 100644 index 00000000..3c3b72fb --- /dev/null +++ b/templates/objective-c/PROJECT.xcodeproj/xcshareddata/xcschemes/PROJECT.xcscheme @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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..6d6b393e --- /dev/null +++ b/templates/objective-c/README.md @@ -0,0 +1,74 @@ +# PROJECT + +[![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/PROJECT) +[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) +[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) +[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/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 +source 'https://github.com/CocoaPods/Specs.git' +platform :ios, '9.0' +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 "fulldecent/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 0000000000000000000000000000000000000000..8786d743a0163edab3a466f2bb818be23d649898 GIT binary patch literal 4740 zcma)AS5OlSvrUZjj-dnzy#x^Wq)TrJB~k*Rh*W`4LT^$vl+cBQ4hl#ULI=f~1m1aCyAc*L*soU*tkR zWse#@@g%5@Dp_aB->2Z0OlO!45c`30jd>5Grz z%qxFT0RK4Py8XEV_Mu@p{x#Hf!jA`r@7nNH`Vd7SQE1riu`An3Z8;OIcX#-3Y-&2b z%g3u!;Qn@!_654g*%r3j;w((8EfJ*MQw>Wd))(Vjf;L&6H0bM{{3!_vOZ0DRJcUh$ zQ{zKOs{IEZC5<7sTy<+w%ZOe0qhY~RbG$t7kHi71vwz;xhs`xb|b)!N`XlLxMnuuU@!8VLx7N%CJ;qKYU ztybgpWNKrlp}x8zbeweqtI2W*D}S`%OFx5hD11>9RM~vo86YSB5v=y&cKhASX-j#6 z$&h>A(zFfA=|avyHt6Lqa%JAfbX=OCeK%q@2XTqjFn%azm0}?-?v<`Sr)2j$ry3Zk ztYy9$s_I;`G%N2(a^GXw=tv8-!`JSih1BFNi)&2ZTIau+F5D^etReb*FheDc$XWH5 z%^ zm*godT2UJ5oHR$Ca6pDpc@!kWrxt2ZhPiI%K^?Skv&EXBnOjr5(K<uxVdKB!^O@3kQs z*nyFc)N19z?qbJpu+3%Ggyy8*(-Qk@F=D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LwgBMEE9b&p=>WDKCYVOU0YPgPTjj)oA~k*C9`b4Tj7o-qa>@TMS8 z;YPk53u)C2@_3!A{V5Q=0ayrxynjgm>^DU#wiWgtm#&4H@Bpie@wP@>&2CE+=z;Fy<#z#_hdd308(ymO zs_&q^h=YiI>J#Sq-Xg&S$nWesw;tT65LybA#jR`HXf4K%t==2_CvJHvlYKh*;*q^u z8h^@SKKcHbTS}P7ge#~q3i)M&8;Q(%%Qcl7xVsE?rz8{ruUqFe`_h0*fkOdmCNc>E zR~&O|LgGyj8ME=}F z*kgoAuToB1GuNuHl%^J-1Ank!-Z1;8a>BgonAo%|NPh{i<460xiBWNJsJJa-69c$y z%`sl{Te!2=r?WKmJ*2l613=A7^lg=CG?*rGP~?rX5tn7Tor-AQw!Qe&8_?;)@qUsH z-_YH5jk$jRZUwdPMXEUpE^p58uOS+Z+{Zxe(PT6uob8lpCe&N7n@L|ZGWowW>~+-*X$* zzBJj}d|O#u&vjBgT`|#%eU0*hyoO-Zo>XuExyJeDVUo7L_3o`VXP`g!>Z!inIJ=Yk( + + + + 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/Source/Base.lproj/Launch Screen.storyboard b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard index 870275fa..221ca492 100644 --- a/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard +++ b/templates/swift/Example/Source/Base.lproj/Launch Screen.storyboard @@ -1,7 +1,6 @@ - From ad39d3612fc60dfa3a9a66d8b684b852fca67c48 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 6 Aug 2016 22:37:04 -0700 Subject: [PATCH 51/62] Remove unnecessary lines from Obj-C pod --- templates/objective-c/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/templates/objective-c/README.md b/templates/objective-c/README.md index 6d6b393e..cd148039 100644 --- a/templates/objective-c/README.md +++ b/templates/objective-c/README.md @@ -30,8 +30,6 @@ $ gem install cocoapods To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '9.0' use_frameworks! pod 'PROJECT' From 68830d8920b4b7fc9b6b2db3afa8f773ec90ad1c Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 6 Aug 2016 22:40:50 -0700 Subject: [PATCH 52/62] Update badge urls --- templates/objective-c/README.md | 6 +++--- templates/swift/README.md | 8 +++----- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/templates/objective-c/README.md b/templates/objective-c/README.md index cd148039..05e493ae 100644 --- a/templates/objective-c/README.md +++ b/templates/objective-c/README.md @@ -1,9 +1,9 @@ # PROJECT [![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/PROJECT) -[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) -[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) -[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/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 diff --git a/templates/swift/README.md b/templates/swift/README.md index 6d6b393e..05e493ae 100644 --- a/templates/swift/README.md +++ b/templates/swift/README.md @@ -1,9 +1,9 @@ # PROJECT [![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/PROJECT) -[![Version](https://img.shields.io/cocoapods/v/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) -[![License](https://img.shields.io/cocoapods/l/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/PROJECT) -[![Platform](https://img.shields.io/cocoapods/p/PROJECT.svg?style=flat)](http://cocoadocs.org/docsets/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 @@ -30,8 +30,6 @@ $ gem install cocoapods To integrate PROJECT into your Xcode project using CocoaPods, specify it in your `Podfile`: ```ruby -source 'https://github.com/CocoaPods/Specs.git' -platform :ios, '9.0' use_frameworks! pod 'PROJECT' From 8657fe8b77f501dfc747943ad3331733ee8a3c07 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 6 Aug 2016 22:43:24 -0700 Subject: [PATCH 53/62] Fix vendoring for username --- templates/objective-c/PROJECT.podspec | 2 +- templates/objective-c/README.md | 4 ++-- templates/swift/PROJECT.podspec | 2 +- templates/swift/README.md | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/objective-c/PROJECT.podspec b/templates/objective-c/PROJECT.podspec index d3a79229..9e4a1b40 100644 --- a/templates/objective-c/PROJECT.podspec +++ b/templates/objective-c/PROJECT.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com//${POD_NAME}' s.authors = { 'PROJECT_OWNER' => 'USER_EMAIL' } - s.source = { :git => 'https://github.com/GITHUB_USERNAME/PROJECT.git', :tag => s.version } + 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 = { diff --git a/templates/objective-c/README.md b/templates/objective-c/README.md index 05e493ae..32a2b561 100644 --- a/templates/objective-c/README.md +++ b/templates/objective-c/README.md @@ -1,6 +1,6 @@ # PROJECT -[![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/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) @@ -56,7 +56,7 @@ $ brew install carthage To integrate PROJECT into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "fulldecent/PROJECT" ~> 0.1 +github "/PROJECT" ~> 0.1 ``` Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. diff --git a/templates/swift/PROJECT.podspec b/templates/swift/PROJECT.podspec index d3a79229..9e4a1b40 100644 --- a/templates/swift/PROJECT.podspec +++ b/templates/swift/PROJECT.podspec @@ -16,7 +16,7 @@ Pod::Spec.new do |s| s.homepage = 'https://github.com//${POD_NAME}' s.authors = { 'PROJECT_OWNER' => 'USER_EMAIL' } - s.source = { :git => 'https://github.com/GITHUB_USERNAME/PROJECT.git', :tag => s.version } + 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 = { diff --git a/templates/swift/README.md b/templates/swift/README.md index 05e493ae..32a2b561 100644 --- a/templates/swift/README.md +++ b/templates/swift/README.md @@ -1,6 +1,6 @@ # PROJECT -[![CI Status](http://img.shields.io/travis/fulldecent/PROJECT.svg?style=flat)](https://travis-ci.org/fulldecent/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) @@ -56,7 +56,7 @@ $ brew install carthage To integrate PROJECT into your Xcode project using Carthage, specify it in your `Cartfile`: ```ogdl -github "fulldecent/PROJECT" ~> 0.1 +github "/PROJECT" ~> 0.1 ``` Run `carthage update` to build the framework and drag the built `PROJECT.framework` into your Xcode project. From 22844a2680bd8243abf9801bd02c1e8ef47a97ba Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 13 Aug 2016 19:40:09 -0400 Subject: [PATCH 54/62] add quoting to replacable variables --- .../Example/iOS Example.xcodeproj/project.pbxproj | 12 ++++++------ .../objective-c/PROJECT.xcodeproj/project.pbxproj | 12 ++++++------ .../Example/iOS Example.xcodeproj/project.pbxproj | 14 +++++++------- templates/swift/PROJECT.xcodeproj/project.pbxproj | 12 ++++++------ 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj index 0513ef18..6aa673b0 100644 --- a/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj +++ b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj @@ -30,7 +30,7 @@ containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 2; remoteGlobalIDString = D9FEF4B41CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT"; }; D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -44,7 +44,7 @@ containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 1; remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT"; }; /* End PBXContainerItemProxy section */ @@ -201,7 +201,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = PROJECT_OWNER; + ORGANIZATIONNAME = "PROJECT_OWNER"; TargetAttributes = { D904BBBF1CDD3F170083BD78 = { CreatedOnToolsVersion = 7.3.1; @@ -241,14 +241,14 @@ D99B39011CD68FD900E56AE2 /* PROJECT.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = PROJECT.framework; + path = "PROJECT.framework"; remoteRef = D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; - path = PROJECTTests.xctest; + path = "PROJECTTests.xctest"; remoteRef = D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -302,7 +302,7 @@ }; D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PROJECT; + name = "PROJECT"; targetProxy = D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ diff --git a/templates/objective-c/PROJECT.xcodeproj/project.pbxproj b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj index 65e8b0ec..37e1dcfd 100644 --- a/templates/objective-c/PROJECT.xcodeproj/project.pbxproj +++ b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; proxyType = 1; remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT; }; /* End PBXContainerItemProxy section */ @@ -135,8 +135,8 @@ ); dependencies = ( ); - name = PROJECT; - productName = PROJECT; + name = "PROJECT; + productName = "PROJECT"; productReference = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; productType = "com.apple.product-type.framework"; }; @@ -153,8 +153,8 @@ dependencies = ( D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */, ); - name = PROJECTTests; - productName = PROJECTTests; + name = "PROJECTTests"; + productName = "PROJECTTests"; productReference = D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; @@ -166,7 +166,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = PROJECT_OWNER; + ORGANIZATIONNAME = "PROJECT_OWNER"; TargetAttributes = { D9FEF4B31CCEBC0D0013FBDD = { CreatedOnToolsVersion = 7.3; diff --git a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj index 0513ef18..5a9c8649 100644 --- a/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj +++ b/templates/swift/Example/iOS Example.xcodeproj/project.pbxproj @@ -30,21 +30,21 @@ containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 2; remoteGlobalIDString = D9FEF4B41CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT"; }; D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 2; remoteGlobalIDString = D9FEF4BE1CCEBC0F0013FBDD; - remoteInfo = PROJECTTests; + remoteInfo = "PROJECTTests"; }; D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 1; remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT"; }; /* End PBXContainerItemProxy section */ @@ -201,7 +201,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = PROJECT_OWNER; + ORGANIZATIONNAME = "PROJECT_OWNER"; TargetAttributes = { D904BBBF1CDD3F170083BD78 = { CreatedOnToolsVersion = 7.3.1; @@ -241,14 +241,14 @@ D99B39011CD68FD900E56AE2 /* PROJECT.framework */ = { isa = PBXReferenceProxy; fileType = wrapper.framework; - path = PROJECT.framework; + path = "PROJECT.framework"; remoteRef = D99B39001CD68FD900E56AE2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; D99B39031CD68FD900E56AE2 /* PROJECTTests.xctest */ = { isa = PBXReferenceProxy; fileType = wrapper.cfbundle; - path = PROJECTTests.xctest; + path = "PROJECTTests.xctest"; remoteRef = D99B39021CD68FD900E56AE2 /* PBXContainerItemProxy */; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -302,7 +302,7 @@ }; D99B39071CD6903C00E56AE2 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = PROJECT; + name = "PROJECT"; targetProxy = D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ diff --git a/templates/swift/PROJECT.xcodeproj/project.pbxproj b/templates/swift/PROJECT.xcodeproj/project.pbxproj index 785c1a53..b0c0f473 100644 --- a/templates/swift/PROJECT.xcodeproj/project.pbxproj +++ b/templates/swift/PROJECT.xcodeproj/project.pbxproj @@ -19,7 +19,7 @@ containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; proxyType = 1; remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; - remoteInfo = PROJECT; + remoteInfo = "PROJECT"; }; /* End PBXContainerItemProxy section */ @@ -131,8 +131,8 @@ ); dependencies = ( ); - name = PROJECT; - productName = PROJECT; + name = "PROJECT"; + productName = "PROJECT"; productReference = D9FEF4B41CCEBC0D0013FBDD /* PROJECT.framework */; productType = "com.apple.product-type.framework"; }; @@ -149,8 +149,8 @@ dependencies = ( D9FEF4C11CCEBC0F0013FBDD /* PBXTargetDependency */, ); - name = PROJECTTests; - productName = PROJECTTests; + name = "PROJECTTests"; + productName = "PROJECTTests"; productReference = D9FEF4BE1CCEBC0F0013FBDD /* PROJECTTests.xctest */; productType = "com.apple.product-type.bundle.unit-test"; }; @@ -162,7 +162,7 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0730; - ORGANIZATIONNAME = PROJECT_OWNER; + ORGANIZATIONNAME = "PROJECT_OWNER"; TargetAttributes = { D9FEF4B31CCEBC0D0013FBDD = { CreatedOnToolsVersion = 7.3; From efb976a4b7e9a2243389f049c25da09f0f73cd93 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 13 Aug 2016 19:47:29 -0400 Subject: [PATCH 55/62] add quoting to replacable variables --- .../objective-c/Example/iOS Example.xcodeproj/project.pbxproj | 2 +- templates/objective-c/PROJECT.xcodeproj/project.pbxproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj index 6aa673b0..5a9c8649 100644 --- a/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj +++ b/templates/objective-c/Example/iOS Example.xcodeproj/project.pbxproj @@ -37,7 +37,7 @@ containerPortal = D99B38FB1CD68FD900E56AE2 /* PROJECT.xcodeproj */; proxyType = 2; remoteGlobalIDString = D9FEF4BE1CCEBC0F0013FBDD; - remoteInfo = PROJECTTests; + remoteInfo = "PROJECTTests"; }; D99B39061CD6903C00E56AE2 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; diff --git a/templates/objective-c/PROJECT.xcodeproj/project.pbxproj b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj index 37e1dcfd..bc2a7a4c 100644 --- a/templates/objective-c/PROJECT.xcodeproj/project.pbxproj +++ b/templates/objective-c/PROJECT.xcodeproj/project.pbxproj @@ -20,7 +20,7 @@ containerPortal = D9FEF4AB1CCEBC0D0013FBDD /* Project object */; proxyType = 1; remoteGlobalIDString = D9FEF4B31CCEBC0D0013FBDD; - remoteInfo = "PROJECT; + remoteInfo = "PROJECT"; }; /* End PBXContainerItemProxy section */ From 487bd659cc73044d0eb2bfd6ce0ee5ad90a80519 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 13 Aug 2016 19:51:50 -0400 Subject: [PATCH 56/62] update travis ruby versions for activesupport --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4fdd04b2..dfa84466 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,9 +3,8 @@ sudo: false cache: bundler rvm: - - 2.2 - # OS X 10.9.3-10.9.4 - - 2.0.0-p451 + - 2.2.5 + - head # By default, this runs rake on the latest ruby and executes # bundle install --jobs=3 --retry=3 From dba31ad732a446550da6152cd9ca3cbf2487e407 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 13 Aug 2016 19:59:55 -0400 Subject: [PATCH 57/62] update travis ruby versions for activesupport --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dfa84466..c8dd0563 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ sudo: false cache: bundler rvm: - 2.2.5 - - head + - 2.2.2 # By default, this runs rake on the latest ruby and executes # bundle install --jobs=3 --retry=3 From 520c0234f03d27821e78395b68faded99c1aeac4 Mon Sep 17 00:00:00 2001 From: William Entriken Date: Sat, 13 Aug 2016 20:36:34 -0400 Subject: [PATCH 58/62] fix utf 8 issues --- configurator/MainConfigurator.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index 3886beb9..bba6aa98 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -81,7 +81,8 @@ def use_baseline_template def replace_variables_in_files Dir.glob("**/*") do |file_name| next if File.directory?(file_name) - text = File.read(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('+', '-')) From 8aff40c67d962414d6c8301067c4dd7b8b2cd5b3 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sun, 14 Aug 2016 13:37:07 -0400 Subject: [PATCH 59/62] handle some minor Rubocop complaints --- configurator/ObjectiveCConfigurator.rb | 32 +++++++++++++------------- configurator/ProjectManipulator.rb | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/configurator/ObjectiveCConfigurator.rb b/configurator/ObjectiveCConfigurator.rb index 5f431f3e..34ccb60d 100644 --- a/configurator/ObjectiveCConfigurator.rb +++ b/configurator/ObjectiveCConfigurator.rb @@ -1,4 +1,4 @@ -# THIS PERFORMS ADDITIONAL CONFIGURATION IF THE USER SELECT THE OBJECTIVE-C OPTION +# THIS PERFORMS ADDITIONAL CONFIGURATION IF THE USER SELECTS THE OBJECTIVE-C OPTION # # We are responsible to: # - Prepare items in the templates/objective-c directory @@ -22,27 +22,27 @@ def perform 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.8" - configurator.add_pod_to_podfile "Nimble', '~> 3.0" - `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"` + when :quick + configurator.add_pod_to_podfile "Quick', '~> 0.8" + configurator.add_pod_to_podfile "Nimble', '~> 3.0" + `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" + 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." - keep_demo = :yes - end + 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 == :quick - configurator.add_pod_to_podfile "Nimble-Snapshots" - end + if framework == :quick + configurator.add_pod_to_podfile "Nimble-Snapshots" + end end Pod::ProjectManipulator.new({ diff --git a/configurator/ProjectManipulator.rb b/configurator/ProjectManipulator.rb index 19ba6a1d..375789ec 100644 --- a/configurator/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -51,7 +51,7 @@ 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 From 6de1248bea7282be88cc65b60044bcb44a3066c4 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sun, 14 Aug 2016 13:50:24 -0400 Subject: [PATCH 60/62] Add a check for spaces in the pod name --- configurator/MainConfigurator.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index bba6aa98..331b3528 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -44,6 +44,7 @@ def initialize(pod_name) #----------------------------------------# def run + abort_if_spaces_in_name @message_bank.welcome_message prepare_staging_directory use_baseline_template @@ -198,7 +199,7 @@ def ask_with_answers(question, possible_answers) print answer.yellow end - break if possible_answers.map { |a| a.downcase }.include? answer + break if possible_answers.map(&:downcase).include? answer print "\nPossible answers are [" print_info.call @@ -207,17 +208,20 @@ def ask_with_answers(question, possible_answers) answer end - def add_pod_to_podfile podname + def add_pod_to_podfile(podname) @pods_for_podfile << podname end - def add_line_to_pch line + def add_line_to_pch(line) @prefixes << line end def validate_user_details - return (user_email.length > 0) && (user_name.length > 0) + 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 From fe170a13e8249715aa9e191fd486bc6c7d2847ce Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Sun, 30 Oct 2016 20:52:40 +0000 Subject: [PATCH 61/62] Swift 3.0 support as default, fixes project removal, handling adding Pods to framework with no example app. --- configurator/MainConfigurator.rb | 4 +- configurator/MessageBank.rb | 6 ++- configurator/ObjectiveCConfigurator.rb | 2 +- configurator/ProjectManipulator.rb | 40 +++++++++++-------- configurator/SwiftConfigurator.rb | 2 +- .../swift/PROJECT.xcodeproj/project.pbxproj | 4 ++ templates/swift/Source/PROJECT.swift | 14 +++---- 7 files changed, 43 insertions(+), 29 deletions(-) diff --git a/configurator/MainConfigurator.rb b/configurator/MainConfigurator.rb index 331b3528..32a064b2 100644 --- a/configurator/MainConfigurator.rb +++ b/configurator/MainConfigurator.rb @@ -31,7 +31,7 @@ def date end def podfile_path - 'Example/Podfile' + File.exist?('Example/Podfile') ? 'Example/Podfile' : 'Podfile' end def initialize(pod_name) @@ -120,7 +120,7 @@ def add_pods_to_podfile(podfile_path) 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 ") ) diff --git a/configurator/MessageBank.rb b/configurator/MessageBank.rb index 9afca4a1..b3d82f60 100644 --- a/configurator/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 '#{pod_name}.xcworkspace'", "open '#{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 index 34ccb60d..d4dae47e 100644 --- a/configurator/ObjectiveCConfigurator.rb +++ b/configurator/ObjectiveCConfigurator.rb @@ -36,7 +36,7 @@ def perform 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 the demo application back in, you cannot do view tests without a host application." keep_demo = :yes end diff --git a/configurator/ProjectManipulator.rb b/configurator/ProjectManipulator.rb index 375789ec..174a8c15 100644 --- a/configurator/ProjectManipulator.rb +++ b/configurator/ProjectManipulator.rb @@ -55,24 +55,29 @@ def remove_demo_project 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 @@ -84,7 +89,7 @@ def rename_files # 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 @@ -93,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 @@ -110,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/configurator/SwiftConfigurator.rb b/configurator/SwiftConfigurator.rb index 8820b798..32649ee4 100644 --- a/configurator/SwiftConfigurator.rb +++ b/configurator/SwiftConfigurator.rb @@ -36,7 +36,7 @@ def perform 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 diff --git a/templates/swift/PROJECT.xcodeproj/project.pbxproj b/templates/swift/PROJECT.xcodeproj/project.pbxproj index b0c0f473..ad3b32f6 100644 --- a/templates/swift/PROJECT.xcodeproj/project.pbxproj +++ b/templates/swift/PROJECT.xcodeproj/project.pbxproj @@ -342,6 +342,7 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -359,6 +360,7 @@ PRODUCT_BUNDLE_IDENTIFIER = net.phor.PROJECT.PROJECT; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -370,6 +372,7 @@ 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; }; @@ -381,6 +384,7 @@ 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; }; diff --git a/templates/swift/Source/PROJECT.swift b/templates/swift/Source/PROJECT.swift index 9a2f33ba..0c362193 100644 --- a/templates/swift/Source/PROJECT.swift +++ b/templates/swift/Source/PROJECT.swift @@ -9,7 +9,7 @@ import Foundation import UIKit -public class PROJECT: UIView { +open class PROJECT: UIView { public override init(frame: CGRect) { super.init(frame: frame) setup() @@ -23,16 +23,16 @@ public class PROJECT: UIView { func setup() { self.translatesAutoresizingMaskIntoConstraints = false - let bundle = NSBundle(forClass: self.dynamicType) - let image = UIImage(named: "wk", inBundle: bundle, compatibleWithTraitCollection: nil) + 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.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() } } From 76dc7e256f343414a4efae6cff0f74fbbe13e1b2 Mon Sep 17 00:00:00 2001 From: Orta Therox Date: Mon, 31 Oct 2016 07:50:18 +0000 Subject: [PATCH 62/62] Update Quick/Nimble for Swift 3 --- configurator/ObjectiveCConfigurator.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configurator/ObjectiveCConfigurator.rb b/configurator/ObjectiveCConfigurator.rb index d4dae47e..428328db 100644 --- a/configurator/ObjectiveCConfigurator.rb +++ b/configurator/ObjectiveCConfigurator.rb @@ -23,8 +23,8 @@ def perform 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.8" - configurator.add_pod_to_podfile "Nimble', '~> 3.0" + 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"`