rswift 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +2 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +56 -0
- data/Rakefile +6 -0
- data/bin/rswift +7 -0
- data/lib/ext/array.rb +12 -0
- data/lib/ext/group.rb +24 -0
- data/lib/ext/native_target.rb +54 -0
- data/lib/ext/project.rb +68 -0
- data/lib/rswift.rb +22 -0
- data/lib/rswift/attributes_configurator.rb +20 -0
- data/lib/rswift/build_settings_configurator.rb +26 -0
- data/lib/rswift/build_settings_provider.rb +84 -0
- data/lib/rswift/cli.rb +33 -0
- data/lib/rswift/configuration.rb +41 -0
- data/lib/rswift/constants.rb +106 -0
- data/lib/rswift/device_provider.rb +25 -0
- data/lib/rswift/files_references_manager.rb +17 -0
- data/lib/rswift/group_references_manager.rb +114 -0
- data/lib/rswift/project_configurator.rb +41 -0
- data/lib/rswift/scheme_configurator.rb +10 -0
- data/lib/rswift/target_configurator.rb +22 -0
- data/lib/rswift/template_manager.rb +28 -0
- data/lib/rswift/templates/app/ios/.gitignore.erb +22 -0
- data/lib/rswift/templates/app/ios/Gemfile.erb +4 -0
- data/lib/rswift/templates/app/ios/Podfile.erb +11 -0
- data/lib/rswift/templates/app/ios/Rakefile.erb +1 -0
- data/lib/rswift/templates/app/ios/app/AppDelegate.swift.erb +15 -0
- data/lib/rswift/templates/app/ios/app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +73 -0
- data/lib/rswift/templates/app/ios/app/Info.plist.erb +45 -0
- data/lib/rswift/templates/app/ios/app/LaunchScreen.storyboard.erb +28 -0
- data/lib/rswift/templates/app/ios/package.json.erb +14 -0
- data/lib/rswift/templates/app/ios/spec/AppDelegateSpec.swift.erb +24 -0
- data/lib/rswift/templates/app/ios/spec/Info.plist.erb +24 -0
- data/lib/rswift/templates/app/osx/.gitignore.erb +21 -0
- data/lib/rswift/templates/app/osx/Gemfile.erb +4 -0
- data/lib/rswift/templates/app/osx/Podfile.erb +7 -0
- data/lib/rswift/templates/app/osx/Rakefile.erb +1 -0
- data/lib/rswift/templates/app/osx/app/AppDelegate.swift.erb +30 -0
- data/lib/rswift/templates/app/osx/app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +58 -0
- data/lib/rswift/templates/app/osx/app/Info.plist.erb +30 -0
- data/lib/rswift/templates/app/osx/app/main.swift.erb +5 -0
- data/lib/rswift/templates/app/osx/spec/AppDelegateSpec.swift.erb +24 -0
- data/lib/rswift/templates/app/osx/spec/Info.plist.erb +24 -0
- data/lib/rswift/templates/app/tvos/.gitignore.erb +21 -0
- data/lib/rswift/templates/app/tvos/Gemfile.erb +4 -0
- data/lib/rswift/templates/app/tvos/Podfile.erb +11 -0
- data/lib/rswift/templates/app/tvos/Rakefile.erb +1 -0
- data/lib/rswift/templates/app/tvos/app/AppDelegate.swift.erb +15 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Contents.json.erb +17 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Contents.json.erb +17 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/Contents.json.erb +26 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/AppIcon.brandassets/Top Shelf Image.imageset/Contents.json.erb +12 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/Contents.json.erb +6 -0
- data/lib/rswift/templates/app/tvos/app/Assets.xcassets/LaunchImage.launchimage/Contents.json.erb +15 -0
- data/lib/rswift/templates/app/tvos/app/Info.plist.erb +30 -0
- data/lib/rswift/templates/app/tvos/spec/AppDelegateSpec.swift.erb +24 -0
- data/lib/rswift/templates/app/tvos/spec/Info.plist.erb +24 -0
- data/lib/rswift/templates/app/watchos/wk_app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb +55 -0
- data/lib/rswift/templates/app/watchos/wk_app/Info.plist.erb +35 -0
- data/lib/rswift/templates/app/watchos/wk_app/Interface.storyboard.erb +15 -0
- data/lib/rswift/templates/app/watchos/wk_ext/Assets.xcassets/README__ignoredByTemplate__ +1 -0
- data/lib/rswift/templates/app/watchos/wk_ext/ExtensionDelegate.swift.erb +4 -0
- data/lib/rswift/templates/app/watchos/wk_ext/Info.plist.erb +40 -0
- data/lib/rswift/templates/app/watchos/wk_ext/InterfaceController.swift.erb +6 -0
- data/lib/rswift/version.rb +3 -0
- data/lib/rswift/workspace_provider.rb +11 -0
- data/rswift.gemspec +26 -0
- metadata +227 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
import Quick
|
2
|
+
import Nimble
|
3
|
+
|
4
|
+
@testable import <%= @name %>
|
5
|
+
|
6
|
+
class AppDelegateSpec: QuickSpec {
|
7
|
+
|
8
|
+
override func spec() {
|
9
|
+
|
10
|
+
var sut: AppDelegate!
|
11
|
+
|
12
|
+
beforeEach {
|
13
|
+
sut = AppDelegate()
|
14
|
+
}
|
15
|
+
|
16
|
+
afterEach {
|
17
|
+
sut = nil
|
18
|
+
}
|
19
|
+
|
20
|
+
it("should pass") {
|
21
|
+
expect(true).to(beTruthy())
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>BNDL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
</dict>
|
24
|
+
</plist>
|
@@ -0,0 +1,21 @@
|
|
1
|
+
build/
|
2
|
+
*.pbxuser
|
3
|
+
!default.pbxuser
|
4
|
+
*.mode1v3
|
5
|
+
!default.mode1v3
|
6
|
+
*.mode2v3
|
7
|
+
!default.mode2v3
|
8
|
+
*.perspectivev3
|
9
|
+
!default.perspectivev3
|
10
|
+
xcuserdata
|
11
|
+
*.xccheckout
|
12
|
+
*.moved-aside
|
13
|
+
DerivedData
|
14
|
+
*.hmap
|
15
|
+
*.ipa
|
16
|
+
*.xcuserstate
|
17
|
+
*.xcworkspacedata
|
18
|
+
.idea/
|
19
|
+
Pods/
|
20
|
+
Carthage/
|
21
|
+
.irb-history
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'rswift/tvos'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
import UIKit
|
2
|
+
|
3
|
+
@UIApplicationMain
|
4
|
+
class AppDelegate: UIResponder, UIApplicationDelegate {
|
5
|
+
|
6
|
+
var window: UIWindow?
|
7
|
+
|
8
|
+
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject:AnyObject]?) -> Bool {
|
9
|
+
window = UIWindow(frame: UIScreen.mainScreen().bounds)
|
10
|
+
window?.rootViewController = UIViewController()
|
11
|
+
window?.backgroundColor = UIColor.whiteColor()
|
12
|
+
window?.makeKeyAndVisible()
|
13
|
+
return true
|
14
|
+
}
|
15
|
+
}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
{
|
2
|
+
"assets" : [
|
3
|
+
{
|
4
|
+
"size" : "1280x768",
|
5
|
+
"idiom" : "tv",
|
6
|
+
"filename" : "App Icon - Large.imagestack",
|
7
|
+
"role" : "primary-app-icon"
|
8
|
+
},
|
9
|
+
{
|
10
|
+
"size" : "400x240",
|
11
|
+
"idiom" : "tv",
|
12
|
+
"filename" : "App Icon - Small.imagestack",
|
13
|
+
"role" : "primary-app-icon"
|
14
|
+
},
|
15
|
+
{
|
16
|
+
"size" : "1920x720",
|
17
|
+
"idiom" : "tv",
|
18
|
+
"filename" : "Top Shelf Image.imageset",
|
19
|
+
"role" : "top-shelf-image"
|
20
|
+
}
|
21
|
+
],
|
22
|
+
"info" : {
|
23
|
+
"version" : 1,
|
24
|
+
"author" : "xcode"
|
25
|
+
}
|
26
|
+
}
|
@@ -0,0 +1,30 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>APPL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
<key>LSRequiresIPhoneOS</key>
|
24
|
+
<true/>
|
25
|
+
<key>UIRequiredDeviceCapabilities</key>
|
26
|
+
<array>
|
27
|
+
<string>arm64</string>
|
28
|
+
</array>
|
29
|
+
</dict>
|
30
|
+
</plist>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import Quick
|
2
|
+
import Nimble
|
3
|
+
|
4
|
+
@testable import <%= @name %>
|
5
|
+
|
6
|
+
class AppDelegateSpec: QuickSpec {
|
7
|
+
|
8
|
+
override func spec() {
|
9
|
+
|
10
|
+
var sut: AppDelegate!
|
11
|
+
|
12
|
+
beforeEach {
|
13
|
+
sut = AppDelegate()
|
14
|
+
}
|
15
|
+
|
16
|
+
afterEach {
|
17
|
+
sut = nil
|
18
|
+
}
|
19
|
+
|
20
|
+
it("should pass") {
|
21
|
+
expect(true).to(beTruthy())
|
22
|
+
}
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
6
|
+
<string>en</string>
|
7
|
+
<key>CFBundleExecutable</key>
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
9
|
+
<key>CFBundleIdentifier</key>
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
12
|
+
<string>6.0</string>
|
13
|
+
<key>CFBundleName</key>
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
15
|
+
<key>CFBundlePackageType</key>
|
16
|
+
<string>BNDL</string>
|
17
|
+
<key>CFBundleShortVersionString</key>
|
18
|
+
<string>1.0</string>
|
19
|
+
<key>CFBundleSignature</key>
|
20
|
+
<string>????</string>
|
21
|
+
<key>CFBundleVersion</key>
|
22
|
+
<string>1</string>
|
23
|
+
</dict>
|
24
|
+
</plist>
|
data/lib/rswift/templates/app/watchos/wk_app/Assets.xcassets/AppIcon.appiconset/Contents.json.erb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
{
|
2
|
+
"images" : [
|
3
|
+
{
|
4
|
+
"size" : "24x24",
|
5
|
+
"idiom" : "watch",
|
6
|
+
"scale" : "2x",
|
7
|
+
"role" : "notificationCenter",
|
8
|
+
"subtype" : "38mm"
|
9
|
+
},
|
10
|
+
{
|
11
|
+
"size" : "27.5x27.5",
|
12
|
+
"idiom" : "watch",
|
13
|
+
"scale" : "2x",
|
14
|
+
"role" : "notificationCenter",
|
15
|
+
"subtype" : "42mm"
|
16
|
+
},
|
17
|
+
{
|
18
|
+
"size" : "29x29",
|
19
|
+
"idiom" : "watch",
|
20
|
+
"role" : "companionSettings",
|
21
|
+
"scale" : "2x"
|
22
|
+
},
|
23
|
+
{
|
24
|
+
"size" : "29x29",
|
25
|
+
"idiom" : "watch",
|
26
|
+
"role" : "companionSettings",
|
27
|
+
"scale" : "3x"
|
28
|
+
},
|
29
|
+
{
|
30
|
+
"size" : "40x40",
|
31
|
+
"idiom" : "watch",
|
32
|
+
"scale" : "2x",
|
33
|
+
"role" : "appLauncher",
|
34
|
+
"subtype" : "38mm"
|
35
|
+
},
|
36
|
+
{
|
37
|
+
"size" : "86x86",
|
38
|
+
"idiom" : "watch",
|
39
|
+
"scale" : "2x",
|
40
|
+
"role" : "quickLook",
|
41
|
+
"subtype" : "38mm"
|
42
|
+
},
|
43
|
+
{
|
44
|
+
"size" : "98x98",
|
45
|
+
"idiom" : "watch",
|
46
|
+
"scale" : "2x",
|
47
|
+
"role" : "quickLook",
|
48
|
+
"subtype" : "42mm"
|
49
|
+
}
|
50
|
+
],
|
51
|
+
"info" : {
|
52
|
+
"version" : 1,
|
53
|
+
"author" : "xcode"
|
54
|
+
}
|
55
|
+
}
|