From 2541158240d5cdd9c48091e762bd92dd4cc4f539 Mon Sep 17 00:00:00 2001 From: Ste Prescott Date: Sun, 2 Dec 2018 16:25:56 +0000 Subject: [PATCH] Step 6 --- .gitignore | 4 +- README.md | 14 ++- XcodeGen/AppDelegate.swift | 5 + .../AppIcon.appiconset/Contents.json | 98 +++++++++++++++++++ XcodeGen/Assets.xcassets/Contents.json | 6 ++ XcodeGen/Base.lproj/LaunchScreen.storyboard | 25 +++++ XcodeGen/Base.lproj/Main.storyboard | 24 +++++ XcodeGen/Info.plist | 45 +++++++++ XcodeGen/ViewController.swift | 2 + XcodeGenTests/Info.plist | 22 +++++ XcodeGenTests/XcodeGenTests.swift | 6 ++ XcodeGenUITests/Info.plist | 22 +++++ XcodeGenUITests/XcodeGenUITests.swift | 8 ++ project.yml | 23 +++++ 14 files changed, 297 insertions(+), 7 deletions(-) create mode 100644 XcodeGen/AppDelegate.swift create mode 100644 XcodeGen/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 XcodeGen/Assets.xcassets/Contents.json create mode 100644 XcodeGen/Base.lproj/LaunchScreen.storyboard create mode 100644 XcodeGen/Base.lproj/Main.storyboard create mode 100644 XcodeGen/Info.plist create mode 100644 XcodeGen/ViewController.swift create mode 100644 XcodeGenTests/Info.plist create mode 100644 XcodeGenTests/XcodeGenTests.swift create mode 100644 XcodeGenUITests/Info.plist create mode 100644 XcodeGenUITests/XcodeGenUITests.swift create mode 100644 project.yml diff --git a/.gitignore b/.gitignore index 512e053..1c41a35 100644 --- a/.gitignore +++ b/.gitignore @@ -121,9 +121,7 @@ iOSInjectionProject/ ## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) ### Xcode Patch ### -*.xcodeproj/* -!*.xcodeproj/project.pbxproj -!*.xcodeproj/xcshareddata/ +*.xcodeproj !*.xcworkspace/contents.xcworkspacedata /*.gcno **/xcshareddata/WorkspaceSettings.xcsettings diff --git a/README.md b/README.md index bdd69e9..28dd5bf 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,20 @@ # XcodeGen -### Step 5 -This is just a step to remove all the files previously made so we can start with a clean slate. +### Step 6 +Now we are using XcodeGen to generate our project file for us. Notice we have also added `*.xcodeproj` to our `.gitignore`. From now on we won't be committing the project file into source control. + +To generate the project file we now need to run `xcodegen` from the root of the project. + +You must first have XcodeGen installed. The easiest way to get this is via homebrew. + +`brew install xcodegen` --- ### Next -Please now checkout `step-6` +Please now checkout `step-7` -`git checkout tags/step-6` +`git checkout tags/step-7` --- diff --git a/XcodeGen/AppDelegate.swift b/XcodeGen/AppDelegate.swift new file mode 100644 index 0000000..7698437 --- /dev/null +++ b/XcodeGen/AppDelegate.swift @@ -0,0 +1,5 @@ +import UIKit +@UIApplicationMain +class AppDelegate: UIResponder, UIApplicationDelegate { + var window: UIWindow? +} diff --git a/XcodeGen/Assets.xcassets/AppIcon.appiconset/Contents.json b/XcodeGen/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d8db8d6 --- /dev/null +++ b/XcodeGen/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,98 @@ +{ + "images" : [ + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "2x" + }, + { + "idiom" : "iphone", + "size" : "20x20", + "scale" : "3x" + }, + { + "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" : "20x20", + "scale" : "1x" + }, + { + "idiom" : "ipad", + "size" : "20x20", + "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" + }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, + { + "idiom" : "ios-marketing", + "size" : "1024x1024", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/XcodeGen/Assets.xcassets/Contents.json b/XcodeGen/Assets.xcassets/Contents.json new file mode 100644 index 0000000..da4a164 --- /dev/null +++ b/XcodeGen/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "version" : 1, + "author" : "xcode" + } +} \ No newline at end of file diff --git a/XcodeGen/Base.lproj/LaunchScreen.storyboard b/XcodeGen/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..bfa3612 --- /dev/null +++ b/XcodeGen/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/XcodeGen/Base.lproj/Main.storyboard b/XcodeGen/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f1bcf38 --- /dev/null +++ b/XcodeGen/Base.lproj/Main.storyboard @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/XcodeGen/Info.plist b/XcodeGen/Info.plist new file mode 100644 index 0000000..16be3b6 --- /dev/null +++ b/XcodeGen/Info.plist @@ -0,0 +1,45 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/XcodeGen/ViewController.swift b/XcodeGen/ViewController.swift new file mode 100644 index 0000000..bd1e7ba --- /dev/null +++ b/XcodeGen/ViewController.swift @@ -0,0 +1,2 @@ +import UIKit +class ViewController: UIViewController { } diff --git a/XcodeGenTests/Info.plist b/XcodeGenTests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/XcodeGenTests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/XcodeGenTests/XcodeGenTests.swift b/XcodeGenTests/XcodeGenTests.swift new file mode 100644 index 0000000..39cfa25 --- /dev/null +++ b/XcodeGenTests/XcodeGenTests.swift @@ -0,0 +1,6 @@ +import XCTest +@testable import XcodeGen +class XcodeGenTests: XCTestCase { + func testExample() { } + func testPerformanceExample() { } +} diff --git a/XcodeGenUITests/Info.plist b/XcodeGenUITests/Info.plist new file mode 100644 index 0000000..6c40a6c --- /dev/null +++ b/XcodeGenUITests/Info.plist @@ -0,0 +1,22 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0 + CFBundleVersion + 1 + + diff --git a/XcodeGenUITests/XcodeGenUITests.swift b/XcodeGenUITests/XcodeGenUITests.swift new file mode 100644 index 0000000..e0086a8 --- /dev/null +++ b/XcodeGenUITests/XcodeGenUITests.swift @@ -0,0 +1,8 @@ +import XCTest +class XcodeGenUITests: XCTestCase { + override func setUp() { + continueAfterFailure = false + XCUIApplication().launch() + } + func testExample() { } +} diff --git a/project.yml b/project.yml new file mode 100644 index 0000000..4af02e0 --- /dev/null +++ b/project.yml @@ -0,0 +1,23 @@ +name: XcodeGen +options: + bundleIdPrefix: me.steprescott +targets: + XcodeGen: + platform: iOS + type: application + sources: + - XcodeGen + XcodeGenTests: + platform: iOS + type: bundle.unit-test + sources: + - XcodeGenTests + dependencies: + - target: XcodeGen + XcodeGenUITests: + platform: iOS + type: bundle.ui-testing + sources: + - XcodeGenUITests + dependencies: + - target: XcodeGen \ No newline at end of file