├── .gitignore
├── .travis.yml
├── Examples
├── iOS Example
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Base.lproj
│ │ ├── LaunchScreen.storyboard
│ │ └── Main.storyboard
│ ├── Resources
│ │ └── Acknowledgements.plist
│ ├── Supporting Files
│ │ └── Info.plist
│ └── ViewController.swift
└── tvOS Example
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── App Icon & Top Shelf Image.brandassets
│ │ ├── App Icon - Large.imagestack
│ │ │ ├── Back.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Front.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ └── Middle.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ ├── App Icon - Small.imagestack
│ │ │ ├── Back.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ ├── Contents.json
│ │ │ ├── Front.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ │ └── Middle.imagestacklayer
│ │ │ │ ├── Content.imageset
│ │ │ │ └── Contents.json
│ │ │ │ └── Contents.json
│ │ ├── Contents.json
│ │ └── Top Shelf Image.imageset
│ │ │ └── Contents.json
│ ├── Contents.json
│ └── LaunchImage.launchimage
│ │ └── Contents.json
│ ├── Base.lproj
│ └── Main.storyboard
│ ├── Resources
│ └── Acknowledgements.plist
│ ├── Supporting Files
│ └── Info.plist
│ └── ViewController.swift
├── LICENSE
├── Libraries
├── Library 1
│ └── LICENSE.txt
├── Library 2
│ └── LICENSE.txt
└── Library 3
│ └── Subfolder
│ └── LICENSE
├── README.md
├── Scripts
└── GenerateLicenseFile.swift
├── SwiftyAcknowledgements.xcodeproj
├── project.pbxproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── xcshareddata
│ └── xcschemes
│ ├── SwiftyAcknowledgements iOS Tests.xcscheme
│ ├── SwiftyAcknowledgements iOS.xcscheme
│ ├── SwiftyAcknowledgements tvOS Tests.xcscheme
│ ├── SwiftyAcknowledgements tvOS.xcscheme
│ ├── iOS Example.xcscheme
│ └── tvOS Example.xcscheme
├── SwiftyAcknowledgements
├── Acknowledgement.swift
├── AcknowledgementViewController.swift
├── AcknowledgementsTableViewController.swift
├── Supporting Files
│ └── Info.plist
├── SwiftyAcknowledgements.h
└── UIFontDescriptorExtensions.swift
└── Tests
├── AcknowledgementTests.swift
├── AcknowledgementsTableViewControllerTests.swift
├── BaseTestCase.swift
├── Resources
└── Acknowledgements.plist
└── Supporting Files
└── Info.plist
/.gitignore:
--------------------------------------------------------------------------------
1 | # Mac OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | *.moved-aside
17 | DerivedData
18 | *.hmap
19 | *.ipa
20 | *.xcuserstate
21 |
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: objective-c
2 | osx_image: xcode8.2
3 | env:
4 | global:
5 | - PROJECT=SwiftyAcknowledgements.xcodeproj
6 | - IOS_FRAMEWORK_SCHEME="SwiftyAcknowledgements iOS"
7 | - TVOS_FRAMEWORK_SCHEME="SwiftyAcknowledgements tvOS"
8 | - IOS_SDK=iphonesimulator10.2
9 | - TVOS_SDK=appletvsimulator10.1
10 | - IOS_EXAMPLE_SCHEME="iOS Example"
11 | - TVOS_EXAMPLE_SCHEME="tvOS Example"
12 | matrix:
13 | - DESTINATION="OS=8.4,name=iPhone 5" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$IOS_EXAMPLE_SCHEME"
14 | - DESTINATION="OS=9.3,name=iPhone 6" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$IOS_EXAMPLE_SCHEME"
15 | - DESTINATION="OS=10.1,name=iPhone 7" SCHEME="$IOS_FRAMEWORK_SCHEME" SDK="$IOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$IOS_EXAMPLE_SCHEME"
16 | - DESTINATION="OS=9.2,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$TVOS_EXAMPLE_SCHEME"
17 | - DESTINATION="OS=10.1,name=Apple TV 1080p" SCHEME="$TVOS_FRAMEWORK_SCHEME" SDK="$TVOS_SDK" RUN_TESTS="YES" BUILD_EXAMPLE="YES" EXAMPLE_SCHEME="$TVOS_EXAMPLE_SCHEME"
18 |
19 | before_install:
20 | - gem install xcpretty --no-rdoc --no-ri --no-document --quiet
21 |
22 | script:
23 | - set -o pipefail
24 | - xcodebuild -version
25 | - xcodebuild -showsdks
26 |
27 | # Build Framework in Debug and Run Tests if specified
28 | - if [ $RUN_TESTS == "YES" ]; then
29 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
30 | else
31 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
32 | fi
33 |
34 | # Build Framework in Release and Run Tests if specified
35 | - if [ $RUN_TESTS == "YES" ]; then
36 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO test | xcpretty -c;
37 | else
38 | xcodebuild -project "$PROJECT" -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
39 | fi
40 |
41 | # Build Example in Debug if specified
42 | - if [ $BUILD_EXAMPLE == "YES" ]; then
43 | xcodebuild -project "$PROJECT" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
44 | fi
45 |
46 | # Build Example in Release if specified
47 | - if [ $BUILD_EXAMPLE == "YES" ]; then
48 | xcodebuild -project "$PROJECT" -scheme "$EXAMPLE_SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Release ONLY_ACTIVE_ARCH=NO build | xcpretty -c;
49 | fi
50 |
--------------------------------------------------------------------------------
/Examples/iOS Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // iOS Example
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Examples/iOS Example/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/Examples/iOS Example/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/Examples/iOS Example/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
30 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 | This is a length test. This is a length test. This is a length test. This is a length test. This is a length test. This is a length test. This is a length test. This is a length test.
85 |
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 |
99 |
100 |
101 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
--------------------------------------------------------------------------------
/Examples/iOS Example/Resources/Acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | text
7 | The MIT License (MIT)
8 |
9 | Copyright (c) 2015 Mathias Nagler
10 |
11 | Permission is hereby granted, free of charge, to any person obtaining a copy
12 | of this software and associated documentation files (the "Software"), to deal
13 | in the Software without restriction, including without limitation the rights
14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is
16 | furnished to do so, subject to the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | THE SOFTWARE.
28 |
29 | title
30 | Library 1
31 |
32 |
33 | text
34 | The MIT License (MIT)
35 |
36 | Copyright (c) 2015 Mathias Nagler
37 |
38 | Permission is hereby granted, free of charge, to any person obtaining a copy
39 | of this software and associated documentation files (the "Software"), to deal
40 | in the Software without restriction, including without limitation the rights
41 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42 | copies of the Software, and to permit persons to whom the Software is
43 | furnished to do so, subject to the following conditions:
44 |
45 | The above copyright notice and this permission notice shall be included in
46 | all copies or substantial portions of the Software.
47 |
48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54 | THE SOFTWARE.
55 |
56 | title
57 | Library 2
58 |
59 |
60 | text
61 | The MIT License (MIT)
62 |
63 | Copyright (c) 2015 Mathias Nagler
64 |
65 | Permission is hereby granted, free of charge, to any person obtaining a copy
66 | of this software and associated documentation files (the "Software"), to deal
67 | in the Software without restriction, including without limitation the rights
68 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69 | copies of the Software, and to permit persons to whom the Software is
70 | furnished to do so, subject to the following conditions:
71 |
72 | The above copyright notice and this permission notice shall be included in
73 | all copies or substantial portions of the Software.
74 |
75 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81 | THE SOFTWARE.
82 |
83 | title
84 | Library 3
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Examples/iOS Example/Supporting Files/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 | UIInterfaceOrientationPortraitUpsideDown
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/Examples/iOS Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // iOS Example
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SwiftyAcknowledgements
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBAction func showAcknowledgements() {
15 | let vc = AcknowledgementsTableViewController()
16 | vc.headerText = "SwiftyAcknowledgements makes use of the following third party libraries:"
17 | vc.footerText = "Third party libraries integrated using Carthage:\nhttp://github.com/carthage"
18 |
19 | vc.acknowledgements.append(Acknowledgement(title: "Custom Acknowledgement", text: "This is a custom acknowledgement added via code."))
20 |
21 | navigationController?.pushViewController(vc, animated: true)
22 | }
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | // tvOS Example
4 | //
5 | // Created by Mathias Nagler on 27.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | @UIApplicationMain
12 | class AppDelegate: UIResponder, UIApplicationDelegate {
13 |
14 | var window: UIWindow?
15 |
16 |
17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool {
18 | // Override point for customization after application launch.
19 | return true
20 | }
21 |
22 | func applicationWillResignActive(_ application: UIApplication) {
23 | // 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.
24 | // 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.
25 | }
26 |
27 | func applicationDidEnterBackground(_ application: UIApplication) {
28 | // 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.
29 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
30 | }
31 |
32 | func applicationWillEnterForeground(_ application: UIApplication) {
33 | // 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.
34 | }
35 |
36 | func applicationDidBecomeActive(_ application: UIApplication) {
37 | // 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.
38 | }
39 |
40 | func applicationWillTerminate(_ application: UIApplication) {
41 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
42 | }
43 |
44 |
45 | }
46 |
47 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Large.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Back.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "layers" : [
3 | {
4 | "filename" : "Front.imagestacklayer"
5 | },
6 | {
7 | "filename" : "Middle.imagestacklayer"
8 | },
9 | {
10 | "filename" : "Back.imagestacklayer"
11 | }
12 | ],
13 | "info" : {
14 | "version" : 1,
15 | "author" : "xcode"
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Front.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Content.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/App Icon - Small.imagestack/Middle.imagestacklayer/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Contents.json:
--------------------------------------------------------------------------------
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 | }
27 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/App Icon & Top Shelf Image.brandassets/Top Shelf Image.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "tv",
5 | "scale" : "1x"
6 | }
7 | ],
8 | "info" : {
9 | "version" : 1,
10 | "author" : "xcode"
11 | }
12 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Assets.xcassets/LaunchImage.launchimage/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "orientation" : "landscape",
5 | "idiom" : "tv",
6 | "extent" : "full-screen",
7 | "minimum-system-version" : "9.0",
8 | "scale" : "1x"
9 | }
10 | ],
11 | "info" : {
12 | "version" : 1,
13 | "author" : "xcode"
14 | }
15 | }
--------------------------------------------------------------------------------
/Examples/tvOS Example/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Resources/Acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | text
7 | The MIT License (MIT)
8 |
9 | Copyright (c) 2015 Mathias Nagler
10 |
11 | Permission is hereby granted, free of charge, to any person obtaining a copy
12 | of this software and associated documentation files (the "Software"), to deal
13 | in the Software without restriction, including without limitation the rights
14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is
16 | furnished to do so, subject to the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | THE SOFTWARE.
28 |
29 | title
30 | Library 1
31 |
32 |
33 | text
34 | The MIT License (MIT)
35 |
36 | Copyright (c) 2015 Mathias Nagler
37 |
38 | Permission is hereby granted, free of charge, to any person obtaining a copy
39 | of this software and associated documentation files (the "Software"), to deal
40 | in the Software without restriction, including without limitation the rights
41 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42 | copies of the Software, and to permit persons to whom the Software is
43 | furnished to do so, subject to the following conditions:
44 |
45 | The above copyright notice and this permission notice shall be included in
46 | all copies or substantial portions of the Software.
47 |
48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54 | THE SOFTWARE.
55 |
56 | title
57 | Library 2
58 |
59 |
60 | text
61 | The MIT License (MIT)
62 |
63 | Copyright (c) 2015 Mathias Nagler
64 |
65 | Permission is hereby granted, free of charge, to any person obtaining a copy
66 | of this software and associated documentation files (the "Software"), to deal
67 | in the Software without restriction, including without limitation the rights
68 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69 | copies of the Software, and to permit persons to whom the Software is
70 | furnished to do so, subject to the following conditions:
71 |
72 | The above copyright notice and this permission notice shall be included in
73 | all copies or substantial portions of the Software.
74 |
75 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81 | THE SOFTWARE.
82 |
83 | title
84 | Library 3
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/Supporting Files/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UIMainStoryboardFile
26 | Main
27 | UIRequiredDeviceCapabilities
28 |
29 | arm64
30 |
31 |
32 |
33 |
--------------------------------------------------------------------------------
/Examples/tvOS Example/ViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.swift
3 | // tvOS Example
4 | //
5 | // Created by Mathias Nagler on 27.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SwiftyAcknowledgements
11 |
12 | class ViewController: UIViewController {
13 |
14 | @IBAction func showAcknowledgements() {
15 | let vc = AcknowledgementsTableViewController()
16 | vc.headerText = "SwiftyAcknowledgements makes use of the following third party libraries:"
17 | vc.footerText = "Third party libraries integrated using Carthage:\nhttp://github.com/carthage"
18 |
19 | vc.acknowledgements.append(Acknowledgement(title: "Custom Acknowledgement", text: "This is a custom acknowledgement added via code."))
20 |
21 | navigationController?.pushViewController(vc, animated: true)
22 | }
23 |
24 | }
25 |
26 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mathias Nagler
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Libraries/Library 1/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mathias Nagler
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Libraries/Library 2/LICENSE.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mathias Nagler
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Libraries/Library 3/Subfolder/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 Mathias Nagler
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftyAcknowledgements
2 | [](https://travis-ci.org/mathiasnagler/SwiftyAcknowledgements)
3 | [](https://github.com/Carthage/Carthage)
4 | 
5 |
6 | SwiftyAcknowledgements makes it easy to integrate acknowledgements for third party libraries into your iOS Apps.
7 |
8 | ## Requirements
9 |
10 | - iOS 8.0 or higher
11 | - tvOS 9.0 or higher
12 | - Xcode 8.2 or higher
13 |
14 | ## Components
15 |
16 | SwiftyAcknowledgements consists of two components.
17 |
18 | ### Script
19 |
20 | `GenerateLicenseFile.swift` is a Swift script that scans a directory for files named `LICENSE` or `LICENSE.txt` and generates a property list containing the content of every license along with a name. The name will be set to the name of the folder that the corresponding license file is contained in.
21 |
22 | ### Framework
23 |
24 | **SwiftyAcknowledgements** comes with a framework `SwiftyAcknowledgements.framework` that can be used to visualize the generated license file within an iOS App. The framework contains a **TableViewController** and a **DetailViewController** and can be integrated programatically or using a **Storyboard**.
25 |
26 | ## Installation
27 |
28 | ### Carthage
29 |
30 | [Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.
31 |
32 | To integrate **SwiftyAcknowledgements** into your Xcode projekct using **Carthage**, specify it in your `Cartfile`:
33 |
34 | ```
35 | github "mathiasnagler/SwiftyAcknowledgements"
36 | ```
37 |
38 | Follow the instructions in the [Carthage Documentation](https://github.com/Carthage/Carthage) to install the built framework into your Xcode project.
39 |
40 | ### Script
41 |
42 | To integrate the script into your Xcode project create a subfolder `Scripts` in the folder that contains your Xcode project. Then, copy `GenerateLicenseFile.swift` to that subfolder. In your target, create a new `Run Script Build Phase` like this:
43 |
44 | ```
45 | ${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/iOS\ Example/Acknowledgements.plist
46 | ```
47 |
48 | **Note:** The first parameter for the script is the input directory that should be scanned for license files. The second parameter is the output file that should be generated by the script.
49 |
50 | After that, build your project and add the generated license file to your Xcode project.
51 |
52 | ## Usage
53 |
54 | The framework contains `AcknowledgementsTableViewController.swift` that can be pushed onto a `UINavigationController` or presented modally. The `AcknowledgementsTableViewController` will automatically look for a file `Acknowledgements.plist` and display its contents. If your license file is named differently, you can specify your custom name using the property `acknowledgementsPlistName: String`.
55 |
56 | ## Customization
57 |
58 | There are several ways you can customize the appearance of SwiftyAcknowledgements ViewControllers. The easiest possibility is to integrate using a storyboard and setting the provided IBInspectables on AcknowledgementsTableViewController. Using this method you can customize *font sizes* and the text for the *table header* and *footer*.
59 |
60 | If you need additional customization options, you can always build a custom subclasses for the provided ViewControllers and override the desired methods.
61 |
62 | ## Credits
63 |
64 | **SwiftyAcknowledgements** was inspired by Vincent Tourraine's [VTAcknowledgementsViewController](https://github.com/vtourraine/VTAcknowledgementsViewController).
65 |
66 | ## License
67 |
68 | **SwiftyAcknowledgements** is available under the MIT license. See the LICENSE file for more info.
69 |
--------------------------------------------------------------------------------
/Scripts/GenerateLicenseFile.swift:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env xcrun --sdk macosx swift
2 |
3 | import Foundation
4 |
5 | // MARK: String Extensions
6 |
7 | extension String {
8 | func ends(with str: String) -> Bool {
9 | if let range = self.range(of: str, options: .backwards) {
10 | return range.upperBound == self.endIndex
11 | }
12 | return false
13 | }
14 | }
15 |
16 | // MARK: Internal functions
17 |
18 | func locateLicense(inFolder folder: String) -> String? {
19 | let filemanager = FileManager.default
20 |
21 | guard let subpaths = try? filemanager.subpathsOfDirectory(atPath: folder) else {
22 | return nil
23 | }
24 |
25 | var filteredPaths = subpaths.filter { $0.ends(with: "LICENSE") || $0.ends(with: "LICENSE.txt") }
26 | filteredPaths = filteredPaths.map { folder + "/" + $0 }
27 | return filteredPaths.first
28 | }
29 |
30 | // MARK: Main
31 |
32 | // Grab command line arguments
33 | let arguments = CommandLine.arguments
34 |
35 | // Get the filename of the swift script for logging purposes
36 | let scriptFileName = arguments[0].components(separatedBy: "/").last!
37 |
38 | // Check argument count
39 | if arguments.count != 3 {
40 | print("Invalid parameters. Usage: ./\(scriptFileName) ")
41 | exit(1)
42 | }
43 |
44 | var inDict = arguments[1]
45 | let outFile = arguments[2]
46 |
47 | let outURL = URL(fileURLWithPath: outFile)
48 |
49 | // Add '/' to inDict if it is missing, otherwise the script will not find any subpaths
50 | if !inDict.ends(with: "/") {
51 | inDict += "/"
52 | }
53 |
54 | // Initialize default NSFileManager
55 | let filemanager = FileManager.default
56 |
57 | // Get subpaths (libraries at path)
58 | guard let libraries = try? filemanager.contentsOfDirectory(atPath: inDict), libraries.count > 0 else {
59 | print("Could not access directory at path \(inDict).")
60 | exit(1)
61 | }
62 |
63 | // Result array
64 | var licenses = Array>()
65 |
66 | // Load license for each library and add it to the result array
67 | libraries.forEach({ (library: String) in
68 | guard
69 | let licensePath = locateLicense(inFolder: inDict + library),
70 | let licence = try? String(contentsOfFile: licensePath, encoding: .utf8)
71 | else {
72 | return
73 | }
74 |
75 | licenses.append(["title" : library, "text" : licence])
76 | })
77 |
78 | // Generate plist from result array
79 | let plist = try! PropertyListSerialization.data(fromPropertyList: licenses, format: .xml, options: 0) as NSData
80 |
81 | // Write plist to disk
82 | do {
83 | try plist.write(to: outURL)
84 | } catch {
85 | print("Error saving plist to disk: \(error)")
86 | exit(1)
87 | }
88 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 524F34CE1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524F34CD1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift */; };
11 | 524F34CF1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524F34CD1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift */; };
12 | 524F34D11BE2491800784625 /* BaseTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524F34D01BE2491800784625 /* BaseTestCase.swift */; };
13 | 524F34D21BE2491800784625 /* BaseTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 524F34D01BE2491800784625 /* BaseTestCase.swift */; };
14 | 527046721BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527046711BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift */; };
15 | 527046731BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 527046711BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift */; };
16 | 5270467E1BE203CB004CD4FC /* AcknowledgementTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5270467D1BE203CB004CD4FC /* AcknowledgementTests.swift */; };
17 | 527046801BE203CB004CD4FC /* SwiftyAcknowledgements.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */; };
18 | 5270468F1BE204A1004CD4FC /* SwiftyAcknowledgements.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */; };
19 | 527046951BE204C4004CD4FC /* AcknowledgementTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5270467D1BE203CB004CD4FC /* AcknowledgementTests.swift */; };
20 | 527046991BE2064B004CD4FC /* Acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527046981BE2064B004CD4FC /* Acknowledgements.plist */; };
21 | 5270469A1BE2064B004CD4FC /* Acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 527046981BE2064B004CD4FC /* Acknowledgements.plist */; };
22 | 5275A9AA1B9F6F99007AD576 /* Acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 5275A9A91B9F6F99007AD576 /* Acknowledgements.plist */; };
23 | 52AAE62B1BDF87F5007EB44A /* Acknowledgement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37831B9F6A94005EFE87 /* Acknowledgement.swift */; };
24 | 52AAE62C1BDF87F5007EB44A /* AcknowledgementsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37841B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift */; };
25 | 52AAE62D1BDF87F5007EB44A /* AcknowledgementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37851B9F6A94005EFE87 /* AcknowledgementViewController.swift */; };
26 | 52AAE62E1BDF87F5007EB44A /* SwiftyAcknowledgements.h in Headers */ = {isa = PBXBuildFile; fileRef = 52FC377A1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h */; settings = {ATTRIBUTES = (Public, ); }; };
27 | 52AAE6371BDF9A51007EB44A /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AAE6361BDF9A51007EB44A /* AppDelegate.swift */; };
28 | 52AAE6391BDF9A51007EB44A /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52AAE6381BDF9A51007EB44A /* ViewController.swift */; };
29 | 52AAE63C1BDF9A51007EB44A /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52AAE63A1BDF9A51007EB44A /* Main.storyboard */; };
30 | 52AAE63E1BDF9A51007EB44A /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52AAE63D1BDF9A51007EB44A /* Assets.xcassets */; };
31 | 52AAE6431BDF9AB0007EB44A /* SwiftyAcknowledgements.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */; };
32 | 52AAE6441BDF9AB0007EB44A /* SwiftyAcknowledgements.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
33 | 52AAE64A1BDFAB27007EB44A /* Acknowledgements.plist in Resources */ = {isa = PBXBuildFile; fileRef = 52AAE6491BDFAB27007EB44A /* Acknowledgements.plist */; };
34 | 52E10E141BDE37C200C6176A /* SwiftyAcknowledgements.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */; };
35 | 52E10E151BDE37C200C6176A /* SwiftyAcknowledgements.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
36 | 52FC377B1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h in Headers */ = {isa = PBXBuildFile; fileRef = 52FC377A1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h */; settings = {ATTRIBUTES = (Public, ); }; };
37 | 52FC37861B9F6A94005EFE87 /* Acknowledgement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37831B9F6A94005EFE87 /* Acknowledgement.swift */; };
38 | 52FC37871B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37841B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift */; };
39 | 52FC37881B9F6A94005EFE87 /* AcknowledgementViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37851B9F6A94005EFE87 /* AcknowledgementViewController.swift */; };
40 | 52FC37901B9F6BEF005EFE87 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC378F1B9F6BEF005EFE87 /* AppDelegate.swift */; };
41 | 52FC37921B9F6BEF005EFE87 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52FC37911B9F6BEF005EFE87 /* ViewController.swift */; };
42 | 52FC37951B9F6BEF005EFE87 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FC37931B9F6BEF005EFE87 /* Main.storyboard */; };
43 | 52FC37971B9F6BEF005EFE87 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 52FC37961B9F6BEF005EFE87 /* Assets.xcassets */; };
44 | 52FC379A1B9F6BEF005EFE87 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 52FC37981B9F6BEF005EFE87 /* LaunchScreen.storyboard */; };
45 | /* End PBXBuildFile section */
46 |
47 | /* Begin PBXContainerItemProxy section */
48 | 527046811BE203CB004CD4FC /* PBXContainerItemProxy */ = {
49 | isa = PBXContainerItemProxy;
50 | containerPortal = 52FC376E1B9F6A0A005EFE87 /* Project object */;
51 | proxyType = 1;
52 | remoteGlobalIDString = 52FC37761B9F6A0A005EFE87;
53 | remoteInfo = "SwiftyAcknowledgements iOS";
54 | };
55 | 527046901BE204A1004CD4FC /* PBXContainerItemProxy */ = {
56 | isa = PBXContainerItemProxy;
57 | containerPortal = 52FC376E1B9F6A0A005EFE87 /* Project object */;
58 | proxyType = 1;
59 | remoteGlobalIDString = 52AAE6221BDF87B9007EB44A;
60 | remoteInfo = "SwiftyAcknowledgements tvOS";
61 | };
62 | 5275A9AB1B9F6FA9007AD576 /* PBXContainerItemProxy */ = {
63 | isa = PBXContainerItemProxy;
64 | containerPortal = 52FC376E1B9F6A0A005EFE87 /* Project object */;
65 | proxyType = 1;
66 | remoteGlobalIDString = 52FC37761B9F6A0A005EFE87;
67 | remoteInfo = SwiftyAcknowledgements;
68 | };
69 | 52AAE6451BDF9AB0007EB44A /* PBXContainerItemProxy */ = {
70 | isa = PBXContainerItemProxy;
71 | containerPortal = 52FC376E1B9F6A0A005EFE87 /* Project object */;
72 | proxyType = 1;
73 | remoteGlobalIDString = 52AAE6221BDF87B9007EB44A;
74 | remoteInfo = "SwiftyAcknowledgements tvOS";
75 | };
76 | /* End PBXContainerItemProxy section */
77 |
78 | /* Begin PBXCopyFilesBuildPhase section */
79 | 52AAE6471BDF9AB0007EB44A /* Embed Frameworks */ = {
80 | isa = PBXCopyFilesBuildPhase;
81 | buildActionMask = 2147483647;
82 | dstPath = "";
83 | dstSubfolderSpec = 10;
84 | files = (
85 | 52AAE6441BDF9AB0007EB44A /* SwiftyAcknowledgements.framework in Embed Frameworks */,
86 | );
87 | name = "Embed Frameworks";
88 | runOnlyForDeploymentPostprocessing = 0;
89 | };
90 | 52E10E161BDE37C200C6176A /* Embed Frameworks */ = {
91 | isa = PBXCopyFilesBuildPhase;
92 | buildActionMask = 2147483647;
93 | dstPath = "";
94 | dstSubfolderSpec = 10;
95 | files = (
96 | 52E10E151BDE37C200C6176A /* SwiftyAcknowledgements.framework in Embed Frameworks */,
97 | );
98 | name = "Embed Frameworks";
99 | runOnlyForDeploymentPostprocessing = 0;
100 | };
101 | /* End PBXCopyFilesBuildPhase section */
102 |
103 | /* Begin PBXFileReference section */
104 | 524F34CD1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowledgementsTableViewControllerTests.swift; sourceTree = ""; };
105 | 524F34D01BE2491800784625 /* BaseTestCase.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseTestCase.swift; sourceTree = ""; };
106 | 527046711BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UIFontDescriptorExtensions.swift; sourceTree = ""; };
107 | 5270467B1BE203CB004CD4FC /* SwiftyAcknowledgements iOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SwiftyAcknowledgements iOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
108 | 5270467D1BE203CB004CD4FC /* AcknowledgementTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AcknowledgementTests.swift; sourceTree = ""; };
109 | 5270467F1BE203CB004CD4FC /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
110 | 5270468A1BE204A1004CD4FC /* SwiftyAcknowledgements tvOS Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "SwiftyAcknowledgements tvOS Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; };
111 | 527046981BE2064B004CD4FC /* Acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Acknowledgements.plist; sourceTree = ""; };
112 | 5275A9A91B9F6F99007AD576 /* Acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Acknowledgements.plist; sourceTree = ""; };
113 | 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyAcknowledgements.framework; sourceTree = BUILT_PRODUCTS_DIR; };
114 | 52AAE6341BDF9A51007EB44A /* tvOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "tvOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
115 | 52AAE6361BDF9A51007EB44A /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
116 | 52AAE6381BDF9A51007EB44A /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
117 | 52AAE63B1BDF9A51007EB44A /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
118 | 52AAE63D1BDF9A51007EB44A /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
119 | 52AAE63F1BDF9A51007EB44A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
120 | 52AAE6491BDFAB27007EB44A /* Acknowledgements.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Acknowledgements.plist; sourceTree = ""; };
121 | 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SwiftyAcknowledgements.framework; sourceTree = BUILT_PRODUCTS_DIR; };
122 | 52FC377A1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SwiftyAcknowledgements.h; sourceTree = ""; };
123 | 52FC377C1B9F6A0A005EFE87 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
124 | 52FC37831B9F6A94005EFE87 /* Acknowledgement.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Acknowledgement.swift; sourceTree = ""; };
125 | 52FC37841B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowledgementsTableViewController.swift; sourceTree = ""; };
126 | 52FC37851B9F6A94005EFE87 /* AcknowledgementViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AcknowledgementViewController.swift; sourceTree = ""; };
127 | 52FC378D1B9F6BEF005EFE87 /* iOS Example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "iOS Example.app"; sourceTree = BUILT_PRODUCTS_DIR; };
128 | 52FC378F1B9F6BEF005EFE87 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
129 | 52FC37911B9F6BEF005EFE87 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; };
130 | 52FC37941B9F6BEF005EFE87 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
131 | 52FC37961B9F6BEF005EFE87 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
132 | 52FC37991B9F6BEF005EFE87 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
133 | 52FC379B1B9F6BEF005EFE87 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
134 | /* End PBXFileReference section */
135 |
136 | /* Begin PBXFrameworksBuildPhase section */
137 | 527046781BE203CB004CD4FC /* Frameworks */ = {
138 | isa = PBXFrameworksBuildPhase;
139 | buildActionMask = 2147483647;
140 | files = (
141 | 527046801BE203CB004CD4FC /* SwiftyAcknowledgements.framework in Frameworks */,
142 | );
143 | runOnlyForDeploymentPostprocessing = 0;
144 | };
145 | 527046871BE204A1004CD4FC /* Frameworks */ = {
146 | isa = PBXFrameworksBuildPhase;
147 | buildActionMask = 2147483647;
148 | files = (
149 | 5270468F1BE204A1004CD4FC /* SwiftyAcknowledgements.framework in Frameworks */,
150 | );
151 | runOnlyForDeploymentPostprocessing = 0;
152 | };
153 | 52AAE61F1BDF87B9007EB44A /* Frameworks */ = {
154 | isa = PBXFrameworksBuildPhase;
155 | buildActionMask = 2147483647;
156 | files = (
157 | );
158 | runOnlyForDeploymentPostprocessing = 0;
159 | };
160 | 52AAE6311BDF9A51007EB44A /* Frameworks */ = {
161 | isa = PBXFrameworksBuildPhase;
162 | buildActionMask = 2147483647;
163 | files = (
164 | 52AAE6431BDF9AB0007EB44A /* SwiftyAcknowledgements.framework in Frameworks */,
165 | );
166 | runOnlyForDeploymentPostprocessing = 0;
167 | };
168 | 52FC37731B9F6A0A005EFE87 /* Frameworks */ = {
169 | isa = PBXFrameworksBuildPhase;
170 | buildActionMask = 2147483647;
171 | files = (
172 | );
173 | runOnlyForDeploymentPostprocessing = 0;
174 | };
175 | 52FC378A1B9F6BEF005EFE87 /* Frameworks */ = {
176 | isa = PBXFrameworksBuildPhase;
177 | buildActionMask = 2147483647;
178 | files = (
179 | 52E10E141BDE37C200C6176A /* SwiftyAcknowledgements.framework in Frameworks */,
180 | );
181 | runOnlyForDeploymentPostprocessing = 0;
182 | };
183 | /* End PBXFrameworksBuildPhase section */
184 |
185 | /* Begin PBXGroup section */
186 | 5270467C1BE203CB004CD4FC /* Tests */ = {
187 | isa = PBXGroup;
188 | children = (
189 | 524F34D01BE2491800784625 /* BaseTestCase.swift */,
190 | 5270467D1BE203CB004CD4FC /* AcknowledgementTests.swift */,
191 | 524F34CD1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift */,
192 | 5270469B1BE20680004CD4FC /* Resources */,
193 | 5270469D1BE206C6004CD4FC /* Supporting Files */,
194 | );
195 | path = Tests;
196 | sourceTree = SOURCE_ROOT;
197 | };
198 | 5270469B1BE20680004CD4FC /* Resources */ = {
199 | isa = PBXGroup;
200 | children = (
201 | 527046981BE2064B004CD4FC /* Acknowledgements.plist */,
202 | );
203 | path = Resources;
204 | sourceTree = "";
205 | };
206 | 5270469D1BE206C6004CD4FC /* Supporting Files */ = {
207 | isa = PBXGroup;
208 | children = (
209 | 5270467F1BE203CB004CD4FC /* Info.plist */,
210 | );
211 | path = "Supporting Files";
212 | sourceTree = "";
213 | };
214 | 5270469E1BE206D5004CD4FC /* Supporting Files */ = {
215 | isa = PBXGroup;
216 | children = (
217 | 52FC377C1B9F6A0A005EFE87 /* Info.plist */,
218 | );
219 | path = "Supporting Files";
220 | sourceTree = "";
221 | };
222 | 5270469F1BE20701004CD4FC /* Resources */ = {
223 | isa = PBXGroup;
224 | children = (
225 | 5275A9A91B9F6F99007AD576 /* Acknowledgements.plist */,
226 | );
227 | path = Resources;
228 | sourceTree = "";
229 | };
230 | 527046A01BE20705004CD4FC /* Supporting Files */ = {
231 | isa = PBXGroup;
232 | children = (
233 | 52FC379B1B9F6BEF005EFE87 /* Info.plist */,
234 | );
235 | path = "Supporting Files";
236 | sourceTree = "";
237 | };
238 | 527046A11BE2070B004CD4FC /* Resources */ = {
239 | isa = PBXGroup;
240 | children = (
241 | 52AAE6491BDFAB27007EB44A /* Acknowledgements.plist */,
242 | );
243 | path = Resources;
244 | sourceTree = "";
245 | };
246 | 527046A21BE20710004CD4FC /* Supporting Files */ = {
247 | isa = PBXGroup;
248 | children = (
249 | 52AAE63F1BDF9A51007EB44A /* Info.plist */,
250 | );
251 | path = "Supporting Files";
252 | sourceTree = "";
253 | };
254 | 52AAE6351BDF9A51007EB44A /* tvOS Example */ = {
255 | isa = PBXGroup;
256 | children = (
257 | 52AAE6361BDF9A51007EB44A /* AppDelegate.swift */,
258 | 52AAE6381BDF9A51007EB44A /* ViewController.swift */,
259 | 52AAE63A1BDF9A51007EB44A /* Main.storyboard */,
260 | 52AAE63D1BDF9A51007EB44A /* Assets.xcassets */,
261 | 527046A11BE2070B004CD4FC /* Resources */,
262 | 527046A21BE20710004CD4FC /* Supporting Files */,
263 | );
264 | name = "tvOS Example";
265 | path = "Examples/tvOS Example";
266 | sourceTree = "";
267 | };
268 | 52FC376D1B9F6A0A005EFE87 = {
269 | isa = PBXGroup;
270 | children = (
271 | 52FC37791B9F6A0A005EFE87 /* SwiftyAcknowledgements */,
272 | 5270467C1BE203CB004CD4FC /* Tests */,
273 | 52FC378E1B9F6BEF005EFE87 /* iOS Example */,
274 | 52AAE6351BDF9A51007EB44A /* tvOS Example */,
275 | 52FC37781B9F6A0A005EFE87 /* Products */,
276 | );
277 | sourceTree = "";
278 | };
279 | 52FC37781B9F6A0A005EFE87 /* Products */ = {
280 | isa = PBXGroup;
281 | children = (
282 | 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */,
283 | 52FC378D1B9F6BEF005EFE87 /* iOS Example.app */,
284 | 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */,
285 | 52AAE6341BDF9A51007EB44A /* tvOS Example.app */,
286 | 5270467B1BE203CB004CD4FC /* SwiftyAcknowledgements iOS Tests.xctest */,
287 | 5270468A1BE204A1004CD4FC /* SwiftyAcknowledgements tvOS Tests.xctest */,
288 | );
289 | name = Products;
290 | sourceTree = "";
291 | };
292 | 52FC37791B9F6A0A005EFE87 /* SwiftyAcknowledgements */ = {
293 | isa = PBXGroup;
294 | children = (
295 | 52FC37831B9F6A94005EFE87 /* Acknowledgement.swift */,
296 | 52FC37841B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift */,
297 | 52FC37851B9F6A94005EFE87 /* AcknowledgementViewController.swift */,
298 | 527046711BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift */,
299 | 52FC377A1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h */,
300 | 5270469E1BE206D5004CD4FC /* Supporting Files */,
301 | );
302 | path = SwiftyAcknowledgements;
303 | sourceTree = "";
304 | };
305 | 52FC378E1B9F6BEF005EFE87 /* iOS Example */ = {
306 | isa = PBXGroup;
307 | children = (
308 | 52FC378F1B9F6BEF005EFE87 /* AppDelegate.swift */,
309 | 52FC37911B9F6BEF005EFE87 /* ViewController.swift */,
310 | 52FC37931B9F6BEF005EFE87 /* Main.storyboard */,
311 | 52FC37961B9F6BEF005EFE87 /* Assets.xcassets */,
312 | 52FC37981B9F6BEF005EFE87 /* LaunchScreen.storyboard */,
313 | 5270469F1BE20701004CD4FC /* Resources */,
314 | 527046A01BE20705004CD4FC /* Supporting Files */,
315 | );
316 | name = "iOS Example";
317 | path = "Examples/iOS Example";
318 | sourceTree = "";
319 | };
320 | /* End PBXGroup section */
321 |
322 | /* Begin PBXHeadersBuildPhase section */
323 | 52AAE6201BDF87B9007EB44A /* Headers */ = {
324 | isa = PBXHeadersBuildPhase;
325 | buildActionMask = 2147483647;
326 | files = (
327 | 52AAE62E1BDF87F5007EB44A /* SwiftyAcknowledgements.h in Headers */,
328 | );
329 | runOnlyForDeploymentPostprocessing = 0;
330 | };
331 | 52FC37741B9F6A0A005EFE87 /* Headers */ = {
332 | isa = PBXHeadersBuildPhase;
333 | buildActionMask = 2147483647;
334 | files = (
335 | 52FC377B1B9F6A0A005EFE87 /* SwiftyAcknowledgements.h in Headers */,
336 | );
337 | runOnlyForDeploymentPostprocessing = 0;
338 | };
339 | /* End PBXHeadersBuildPhase section */
340 |
341 | /* Begin PBXNativeTarget section */
342 | 5270467A1BE203CB004CD4FC /* SwiftyAcknowledgements iOS Tests */ = {
343 | isa = PBXNativeTarget;
344 | buildConfigurationList = 527046831BE203CB004CD4FC /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements iOS Tests" */;
345 | buildPhases = (
346 | 527046771BE203CB004CD4FC /* Sources */,
347 | 527046971BE20587004CD4FC /* Generate Acknowledgements */,
348 | 527046781BE203CB004CD4FC /* Frameworks */,
349 | 527046791BE203CB004CD4FC /* Resources */,
350 | );
351 | buildRules = (
352 | );
353 | dependencies = (
354 | 527046821BE203CB004CD4FC /* PBXTargetDependency */,
355 | );
356 | name = "SwiftyAcknowledgements iOS Tests";
357 | productName = "SwiftyAcknowledgementsTests iOS";
358 | productReference = 5270467B1BE203CB004CD4FC /* SwiftyAcknowledgements iOS Tests.xctest */;
359 | productType = "com.apple.product-type.bundle.unit-test";
360 | };
361 | 527046891BE204A1004CD4FC /* SwiftyAcknowledgements tvOS Tests */ = {
362 | isa = PBXNativeTarget;
363 | buildConfigurationList = 527046921BE204A1004CD4FC /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements tvOS Tests" */;
364 | buildPhases = (
365 | 527046861BE204A1004CD4FC /* Sources */,
366 | 527046961BE2056D004CD4FC /* Generate Acknowledgements */,
367 | 527046871BE204A1004CD4FC /* Frameworks */,
368 | 527046881BE204A1004CD4FC /* Resources */,
369 | );
370 | buildRules = (
371 | );
372 | dependencies = (
373 | 527046911BE204A1004CD4FC /* PBXTargetDependency */,
374 | );
375 | name = "SwiftyAcknowledgements tvOS Tests";
376 | productName = "SwiftyAcknowledgements tvOS Tests";
377 | productReference = 5270468A1BE204A1004CD4FC /* SwiftyAcknowledgements tvOS Tests.xctest */;
378 | productType = "com.apple.product-type.bundle.unit-test";
379 | };
380 | 52AAE6221BDF87B9007EB44A /* SwiftyAcknowledgements tvOS */ = {
381 | isa = PBXNativeTarget;
382 | buildConfigurationList = 52AAE6281BDF87B9007EB44A /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements tvOS" */;
383 | buildPhases = (
384 | 52AAE61E1BDF87B9007EB44A /* Sources */,
385 | 52AAE61F1BDF87B9007EB44A /* Frameworks */,
386 | 52AAE6201BDF87B9007EB44A /* Headers */,
387 | 52AAE6211BDF87B9007EB44A /* Resources */,
388 | );
389 | buildRules = (
390 | );
391 | dependencies = (
392 | );
393 | name = "SwiftyAcknowledgements tvOS";
394 | productName = "SwiftyAcknowledgements tvOS";
395 | productReference = 52AAE6231BDF87B9007EB44A /* SwiftyAcknowledgements.framework */;
396 | productType = "com.apple.product-type.framework";
397 | };
398 | 52AAE6331BDF9A51007EB44A /* tvOS Example */ = {
399 | isa = PBXNativeTarget;
400 | buildConfigurationList = 52AAE6401BDF9A51007EB44A /* Build configuration list for PBXNativeTarget "tvOS Example" */;
401 | buildPhases = (
402 | 52AAE6301BDF9A51007EB44A /* Sources */,
403 | 52AAE6311BDF9A51007EB44A /* Frameworks */,
404 | 52AAE6481BDFAAE1007EB44A /* Generate Acknowledgements */,
405 | 52AAE6321BDF9A51007EB44A /* Resources */,
406 | 52AAE6471BDF9AB0007EB44A /* Embed Frameworks */,
407 | );
408 | buildRules = (
409 | );
410 | dependencies = (
411 | 52AAE6461BDF9AB0007EB44A /* PBXTargetDependency */,
412 | );
413 | name = "tvOS Example";
414 | productName = "tvOS Example";
415 | productReference = 52AAE6341BDF9A51007EB44A /* tvOS Example.app */;
416 | productType = "com.apple.product-type.application";
417 | };
418 | 52FC37761B9F6A0A005EFE87 /* SwiftyAcknowledgements iOS */ = {
419 | isa = PBXNativeTarget;
420 | buildConfigurationList = 52FC377F1B9F6A0A005EFE87 /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements iOS" */;
421 | buildPhases = (
422 | 52FC37721B9F6A0A005EFE87 /* Sources */,
423 | 52FC37731B9F6A0A005EFE87 /* Frameworks */,
424 | 52FC37741B9F6A0A005EFE87 /* Headers */,
425 | 52FC37751B9F6A0A005EFE87 /* Resources */,
426 | );
427 | buildRules = (
428 | );
429 | dependencies = (
430 | );
431 | name = "SwiftyAcknowledgements iOS";
432 | productName = SwiftyAcknowledgements;
433 | productReference = 52FC37771B9F6A0A005EFE87 /* SwiftyAcknowledgements.framework */;
434 | productType = "com.apple.product-type.framework";
435 | };
436 | 52FC378C1B9F6BEF005EFE87 /* iOS Example */ = {
437 | isa = PBXNativeTarget;
438 | buildConfigurationList = 52FC379C1B9F6BEF005EFE87 /* Build configuration list for PBXNativeTarget "iOS Example" */;
439 | buildPhases = (
440 | 52FC37891B9F6BEF005EFE87 /* Sources */,
441 | 52FC378A1B9F6BEF005EFE87 /* Frameworks */,
442 | 5275A9A81B9F6D18007AD576 /* Generate Acknowledgements */,
443 | 52FC378B1B9F6BEF005EFE87 /* Resources */,
444 | 52E10E161BDE37C200C6176A /* Embed Frameworks */,
445 | );
446 | buildRules = (
447 | );
448 | dependencies = (
449 | 5275A9AC1B9F6FA9007AD576 /* PBXTargetDependency */,
450 | );
451 | name = "iOS Example";
452 | productName = "iOS Example";
453 | productReference = 52FC378D1B9F6BEF005EFE87 /* iOS Example.app */;
454 | productType = "com.apple.product-type.application";
455 | };
456 | /* End PBXNativeTarget section */
457 |
458 | /* Begin PBXProject section */
459 | 52FC376E1B9F6A0A005EFE87 /* Project object */ = {
460 | isa = PBXProject;
461 | attributes = {
462 | LastSwiftUpdateCheck = 0710;
463 | LastUpgradeCheck = 1140;
464 | ORGANIZATIONNAME = "Mathias Nagler";
465 | TargetAttributes = {
466 | 5270467A1BE203CB004CD4FC = {
467 | CreatedOnToolsVersion = 7.1;
468 | LastSwiftMigration = 0820;
469 | };
470 | 527046891BE204A1004CD4FC = {
471 | CreatedOnToolsVersion = 7.1;
472 | LastSwiftMigration = 0820;
473 | };
474 | 52AAE6221BDF87B9007EB44A = {
475 | CreatedOnToolsVersion = 7.1;
476 | LastSwiftMigration = 0820;
477 | };
478 | 52AAE6331BDF9A51007EB44A = {
479 | CreatedOnToolsVersion = 7.1;
480 | LastSwiftMigration = 0820;
481 | };
482 | 52FC37761B9F6A0A005EFE87 = {
483 | CreatedOnToolsVersion = 7.0;
484 | LastSwiftMigration = 0820;
485 | };
486 | 52FC378C1B9F6BEF005EFE87 = {
487 | CreatedOnToolsVersion = 7.0;
488 | LastSwiftMigration = 0820;
489 | };
490 | };
491 | };
492 | buildConfigurationList = 52FC37711B9F6A0A005EFE87 /* Build configuration list for PBXProject "SwiftyAcknowledgements" */;
493 | compatibilityVersion = "Xcode 3.2";
494 | developmentRegion = en;
495 | hasScannedForEncodings = 0;
496 | knownRegions = (
497 | en,
498 | Base,
499 | );
500 | mainGroup = 52FC376D1B9F6A0A005EFE87;
501 | productRefGroup = 52FC37781B9F6A0A005EFE87 /* Products */;
502 | projectDirPath = "";
503 | projectRoot = "";
504 | targets = (
505 | 52FC37761B9F6A0A005EFE87 /* SwiftyAcknowledgements iOS */,
506 | 5270467A1BE203CB004CD4FC /* SwiftyAcknowledgements iOS Tests */,
507 | 52FC378C1B9F6BEF005EFE87 /* iOS Example */,
508 | 52AAE6221BDF87B9007EB44A /* SwiftyAcknowledgements tvOS */,
509 | 527046891BE204A1004CD4FC /* SwiftyAcknowledgements tvOS Tests */,
510 | 52AAE6331BDF9A51007EB44A /* tvOS Example */,
511 | );
512 | };
513 | /* End PBXProject section */
514 |
515 | /* Begin PBXResourcesBuildPhase section */
516 | 527046791BE203CB004CD4FC /* Resources */ = {
517 | isa = PBXResourcesBuildPhase;
518 | buildActionMask = 2147483647;
519 | files = (
520 | 527046991BE2064B004CD4FC /* Acknowledgements.plist in Resources */,
521 | );
522 | runOnlyForDeploymentPostprocessing = 0;
523 | };
524 | 527046881BE204A1004CD4FC /* Resources */ = {
525 | isa = PBXResourcesBuildPhase;
526 | buildActionMask = 2147483647;
527 | files = (
528 | 5270469A1BE2064B004CD4FC /* Acknowledgements.plist in Resources */,
529 | );
530 | runOnlyForDeploymentPostprocessing = 0;
531 | };
532 | 52AAE6211BDF87B9007EB44A /* Resources */ = {
533 | isa = PBXResourcesBuildPhase;
534 | buildActionMask = 2147483647;
535 | files = (
536 | );
537 | runOnlyForDeploymentPostprocessing = 0;
538 | };
539 | 52AAE6321BDF9A51007EB44A /* Resources */ = {
540 | isa = PBXResourcesBuildPhase;
541 | buildActionMask = 2147483647;
542 | files = (
543 | 52AAE64A1BDFAB27007EB44A /* Acknowledgements.plist in Resources */,
544 | 52AAE63E1BDF9A51007EB44A /* Assets.xcassets in Resources */,
545 | 52AAE63C1BDF9A51007EB44A /* Main.storyboard in Resources */,
546 | );
547 | runOnlyForDeploymentPostprocessing = 0;
548 | };
549 | 52FC37751B9F6A0A005EFE87 /* Resources */ = {
550 | isa = PBXResourcesBuildPhase;
551 | buildActionMask = 2147483647;
552 | files = (
553 | );
554 | runOnlyForDeploymentPostprocessing = 0;
555 | };
556 | 52FC378B1B9F6BEF005EFE87 /* Resources */ = {
557 | isa = PBXResourcesBuildPhase;
558 | buildActionMask = 2147483647;
559 | files = (
560 | 52FC379A1B9F6BEF005EFE87 /* LaunchScreen.storyboard in Resources */,
561 | 52FC37971B9F6BEF005EFE87 /* Assets.xcassets in Resources */,
562 | 52FC37951B9F6BEF005EFE87 /* Main.storyboard in Resources */,
563 | 5275A9AA1B9F6F99007AD576 /* Acknowledgements.plist in Resources */,
564 | );
565 | runOnlyForDeploymentPostprocessing = 0;
566 | };
567 | /* End PBXResourcesBuildPhase section */
568 |
569 | /* Begin PBXShellScriptBuildPhase section */
570 | 527046961BE2056D004CD4FC /* Generate Acknowledgements */ = {
571 | isa = PBXShellScriptBuildPhase;
572 | buildActionMask = 2147483647;
573 | files = (
574 | );
575 | inputPaths = (
576 | );
577 | name = "Generate Acknowledgements";
578 | outputPaths = (
579 | );
580 | runOnlyForDeploymentPostprocessing = 0;
581 | shellPath = /bin/sh;
582 | shellScript = "${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/Tests/Resources/Acknowledgements.plist";
583 | };
584 | 527046971BE20587004CD4FC /* Generate Acknowledgements */ = {
585 | isa = PBXShellScriptBuildPhase;
586 | buildActionMask = 2147483647;
587 | files = (
588 | );
589 | inputPaths = (
590 | );
591 | name = "Generate Acknowledgements";
592 | outputPaths = (
593 | );
594 | runOnlyForDeploymentPostprocessing = 0;
595 | shellPath = /bin/sh;
596 | shellScript = "${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/Tests/Resources/Acknowledgements.plist";
597 | };
598 | 5275A9A81B9F6D18007AD576 /* Generate Acknowledgements */ = {
599 | isa = PBXShellScriptBuildPhase;
600 | buildActionMask = 2147483647;
601 | files = (
602 | );
603 | inputPaths = (
604 | );
605 | name = "Generate Acknowledgements";
606 | outputPaths = (
607 | );
608 | runOnlyForDeploymentPostprocessing = 0;
609 | shellPath = /bin/sh;
610 | shellScript = "${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/Examples/iOS\\ Example/Resources/Acknowledgements.plist";
611 | };
612 | 52AAE6481BDFAAE1007EB44A /* Generate Acknowledgements */ = {
613 | isa = PBXShellScriptBuildPhase;
614 | buildActionMask = 2147483647;
615 | files = (
616 | );
617 | inputPaths = (
618 | );
619 | name = "Generate Acknowledgements";
620 | outputPaths = (
621 | );
622 | runOnlyForDeploymentPostprocessing = 0;
623 | shellPath = /bin/sh;
624 | shellScript = "${SRCROOT}/Scripts/GenerateLicenseFile.swift ${SRCROOT}/Libraries/ ${PROJECT_DIR}/Examples/tvOS\\ Example/Resources/Acknowledgements.plist";
625 | };
626 | /* End PBXShellScriptBuildPhase section */
627 |
628 | /* Begin PBXSourcesBuildPhase section */
629 | 527046771BE203CB004CD4FC /* Sources */ = {
630 | isa = PBXSourcesBuildPhase;
631 | buildActionMask = 2147483647;
632 | files = (
633 | 524F34CE1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift in Sources */,
634 | 5270467E1BE203CB004CD4FC /* AcknowledgementTests.swift in Sources */,
635 | 524F34D11BE2491800784625 /* BaseTestCase.swift in Sources */,
636 | );
637 | runOnlyForDeploymentPostprocessing = 0;
638 | };
639 | 527046861BE204A1004CD4FC /* Sources */ = {
640 | isa = PBXSourcesBuildPhase;
641 | buildActionMask = 2147483647;
642 | files = (
643 | 524F34CF1BE248EE00784625 /* AcknowledgementsTableViewControllerTests.swift in Sources */,
644 | 527046951BE204C4004CD4FC /* AcknowledgementTests.swift in Sources */,
645 | 524F34D21BE2491800784625 /* BaseTestCase.swift in Sources */,
646 | );
647 | runOnlyForDeploymentPostprocessing = 0;
648 | };
649 | 52AAE61E1BDF87B9007EB44A /* Sources */ = {
650 | isa = PBXSourcesBuildPhase;
651 | buildActionMask = 2147483647;
652 | files = (
653 | 52AAE62C1BDF87F5007EB44A /* AcknowledgementsTableViewController.swift in Sources */,
654 | 52AAE62D1BDF87F5007EB44A /* AcknowledgementViewController.swift in Sources */,
655 | 527046731BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift in Sources */,
656 | 52AAE62B1BDF87F5007EB44A /* Acknowledgement.swift in Sources */,
657 | );
658 | runOnlyForDeploymentPostprocessing = 0;
659 | };
660 | 52AAE6301BDF9A51007EB44A /* Sources */ = {
661 | isa = PBXSourcesBuildPhase;
662 | buildActionMask = 2147483647;
663 | files = (
664 | 52AAE6391BDF9A51007EB44A /* ViewController.swift in Sources */,
665 | 52AAE6371BDF9A51007EB44A /* AppDelegate.swift in Sources */,
666 | );
667 | runOnlyForDeploymentPostprocessing = 0;
668 | };
669 | 52FC37721B9F6A0A005EFE87 /* Sources */ = {
670 | isa = PBXSourcesBuildPhase;
671 | buildActionMask = 2147483647;
672 | files = (
673 | 52FC37871B9F6A94005EFE87 /* AcknowledgementsTableViewController.swift in Sources */,
674 | 52FC37881B9F6A94005EFE87 /* AcknowledgementViewController.swift in Sources */,
675 | 527046721BE0EE86004CD4FC /* UIFontDescriptorExtensions.swift in Sources */,
676 | 52FC37861B9F6A94005EFE87 /* Acknowledgement.swift in Sources */,
677 | );
678 | runOnlyForDeploymentPostprocessing = 0;
679 | };
680 | 52FC37891B9F6BEF005EFE87 /* Sources */ = {
681 | isa = PBXSourcesBuildPhase;
682 | buildActionMask = 2147483647;
683 | files = (
684 | 52FC37921B9F6BEF005EFE87 /* ViewController.swift in Sources */,
685 | 52FC37901B9F6BEF005EFE87 /* AppDelegate.swift in Sources */,
686 | );
687 | runOnlyForDeploymentPostprocessing = 0;
688 | };
689 | /* End PBXSourcesBuildPhase section */
690 |
691 | /* Begin PBXTargetDependency section */
692 | 527046821BE203CB004CD4FC /* PBXTargetDependency */ = {
693 | isa = PBXTargetDependency;
694 | target = 52FC37761B9F6A0A005EFE87 /* SwiftyAcknowledgements iOS */;
695 | targetProxy = 527046811BE203CB004CD4FC /* PBXContainerItemProxy */;
696 | };
697 | 527046911BE204A1004CD4FC /* PBXTargetDependency */ = {
698 | isa = PBXTargetDependency;
699 | target = 52AAE6221BDF87B9007EB44A /* SwiftyAcknowledgements tvOS */;
700 | targetProxy = 527046901BE204A1004CD4FC /* PBXContainerItemProxy */;
701 | };
702 | 5275A9AC1B9F6FA9007AD576 /* PBXTargetDependency */ = {
703 | isa = PBXTargetDependency;
704 | target = 52FC37761B9F6A0A005EFE87 /* SwiftyAcknowledgements iOS */;
705 | targetProxy = 5275A9AB1B9F6FA9007AD576 /* PBXContainerItemProxy */;
706 | };
707 | 52AAE6461BDF9AB0007EB44A /* PBXTargetDependency */ = {
708 | isa = PBXTargetDependency;
709 | target = 52AAE6221BDF87B9007EB44A /* SwiftyAcknowledgements tvOS */;
710 | targetProxy = 52AAE6451BDF9AB0007EB44A /* PBXContainerItemProxy */;
711 | };
712 | /* End PBXTargetDependency section */
713 |
714 | /* Begin PBXVariantGroup section */
715 | 52AAE63A1BDF9A51007EB44A /* Main.storyboard */ = {
716 | isa = PBXVariantGroup;
717 | children = (
718 | 52AAE63B1BDF9A51007EB44A /* Base */,
719 | );
720 | name = Main.storyboard;
721 | sourceTree = "";
722 | };
723 | 52FC37931B9F6BEF005EFE87 /* Main.storyboard */ = {
724 | isa = PBXVariantGroup;
725 | children = (
726 | 52FC37941B9F6BEF005EFE87 /* Base */,
727 | );
728 | name = Main.storyboard;
729 | sourceTree = "";
730 | };
731 | 52FC37981B9F6BEF005EFE87 /* LaunchScreen.storyboard */ = {
732 | isa = PBXVariantGroup;
733 | children = (
734 | 52FC37991B9F6BEF005EFE87 /* Base */,
735 | );
736 | name = LaunchScreen.storyboard;
737 | sourceTree = "";
738 | };
739 | /* End PBXVariantGroup section */
740 |
741 | /* Begin XCBuildConfiguration section */
742 | 527046841BE203CB004CD4FC /* Debug */ = {
743 | isa = XCBuildConfiguration;
744 | buildSettings = {
745 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
746 | IPHONEOS_DEPLOYMENT_TARGET = 9.1;
747 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
748 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.SwiftyAcknowledgementsTests-iOS";
749 | PRODUCT_NAME = "$(TARGET_NAME)";
750 | };
751 | name = Debug;
752 | };
753 | 527046851BE203CB004CD4FC /* Release */ = {
754 | isa = XCBuildConfiguration;
755 | buildSettings = {
756 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
757 | IPHONEOS_DEPLOYMENT_TARGET = 9.1;
758 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
759 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.SwiftyAcknowledgementsTests-iOS";
760 | PRODUCT_NAME = "$(TARGET_NAME)";
761 | };
762 | name = Release;
763 | };
764 | 527046931BE204A1004CD4FC /* Debug */ = {
765 | isa = XCBuildConfiguration;
766 | buildSettings = {
767 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
768 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
769 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.SwiftyAcknowledgements-tvOS-Tests";
770 | PRODUCT_NAME = "$(TARGET_NAME)";
771 | SDKROOT = appletvos;
772 | TVOS_DEPLOYMENT_TARGET = 9.0;
773 | };
774 | name = Debug;
775 | };
776 | 527046941BE204A1004CD4FC /* Release */ = {
777 | isa = XCBuildConfiguration;
778 | buildSettings = {
779 | INFOPLIST_FILE = "Tests/Supporting Files/Info.plist";
780 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
781 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.SwiftyAcknowledgements-tvOS-Tests";
782 | PRODUCT_NAME = "$(TARGET_NAME)";
783 | SDKROOT = appletvos;
784 | TVOS_DEPLOYMENT_TARGET = 9.0;
785 | };
786 | name = Release;
787 | };
788 | 52AAE6291BDF87B9007EB44A /* Debug */ = {
789 | isa = XCBuildConfiguration;
790 | buildSettings = {
791 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
792 | DEFINES_MODULE = YES;
793 | DYLIB_COMPATIBILITY_VERSION = 1;
794 | DYLIB_CURRENT_VERSION = 1;
795 | DYLIB_INSTALL_NAME_BASE = "@rpath";
796 | INFOPLIST_FILE = "SwiftyAcknowledgements/Supporting Files/Info.plist";
797 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
798 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
799 | PRODUCT_BUNDLE_IDENTIFIER = de.mathiasnagler.SwiftyAcknowledgements;
800 | PRODUCT_NAME = SwiftyAcknowledgements;
801 | SDKROOT = appletvos;
802 | SKIP_INSTALL = YES;
803 | TARGETED_DEVICE_FAMILY = 3;
804 | TVOS_DEPLOYMENT_TARGET = 9.0;
805 | };
806 | name = Debug;
807 | };
808 | 52AAE62A1BDF87B9007EB44A /* Release */ = {
809 | isa = XCBuildConfiguration;
810 | buildSettings = {
811 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
812 | DEFINES_MODULE = YES;
813 | DYLIB_COMPATIBILITY_VERSION = 1;
814 | DYLIB_CURRENT_VERSION = 1;
815 | DYLIB_INSTALL_NAME_BASE = "@rpath";
816 | INFOPLIST_FILE = "SwiftyAcknowledgements/Supporting Files/Info.plist";
817 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
818 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
819 | PRODUCT_BUNDLE_IDENTIFIER = de.mathiasnagler.SwiftyAcknowledgements;
820 | PRODUCT_NAME = SwiftyAcknowledgements;
821 | SDKROOT = appletvos;
822 | SKIP_INSTALL = YES;
823 | TARGETED_DEVICE_FAMILY = 3;
824 | TVOS_DEPLOYMENT_TARGET = 9.0;
825 | };
826 | name = Release;
827 | };
828 | 52AAE6411BDF9A51007EB44A /* Debug */ = {
829 | isa = XCBuildConfiguration;
830 | buildSettings = {
831 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
832 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
833 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
834 | INFOPLIST_FILE = "Examples/tvOS Example/Supporting Files/Info.plist";
835 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
836 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.tvOS-Example";
837 | PRODUCT_NAME = "$(TARGET_NAME)";
838 | SDKROOT = appletvos;
839 | TARGETED_DEVICE_FAMILY = 3;
840 | TVOS_DEPLOYMENT_TARGET = 9.0;
841 | };
842 | name = Debug;
843 | };
844 | 52AAE6421BDF9A51007EB44A /* Release */ = {
845 | isa = XCBuildConfiguration;
846 | buildSettings = {
847 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
848 | ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
849 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
850 | INFOPLIST_FILE = "Examples/tvOS Example/Supporting Files/Info.plist";
851 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
852 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.tvOS-Example";
853 | PRODUCT_NAME = "$(TARGET_NAME)";
854 | SDKROOT = appletvos;
855 | TARGETED_DEVICE_FAMILY = 3;
856 | TVOS_DEPLOYMENT_TARGET = 9.0;
857 | };
858 | name = Release;
859 | };
860 | 52FC377D1B9F6A0A005EFE87 /* Debug */ = {
861 | isa = XCBuildConfiguration;
862 | buildSettings = {
863 | ALWAYS_SEARCH_USER_PATHS = NO;
864 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
865 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
866 | CLANG_CXX_LIBRARY = "libc++";
867 | CLANG_ENABLE_MODULES = YES;
868 | CLANG_ENABLE_OBJC_ARC = YES;
869 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
870 | CLANG_WARN_BOOL_CONVERSION = YES;
871 | CLANG_WARN_COMMA = YES;
872 | CLANG_WARN_CONSTANT_CONVERSION = YES;
873 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
874 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
875 | CLANG_WARN_EMPTY_BODY = YES;
876 | CLANG_WARN_ENUM_CONVERSION = YES;
877 | CLANG_WARN_INFINITE_RECURSION = YES;
878 | CLANG_WARN_INT_CONVERSION = YES;
879 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
880 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
881 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
882 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
883 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
884 | CLANG_WARN_STRICT_PROTOTYPES = YES;
885 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
886 | CLANG_WARN_UNREACHABLE_CODE = YES;
887 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
888 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
889 | COPY_PHASE_STRIP = NO;
890 | CURRENT_PROJECT_VERSION = 1;
891 | DEBUG_INFORMATION_FORMAT = dwarf;
892 | ENABLE_STRICT_OBJC_MSGSEND = YES;
893 | ENABLE_TESTABILITY = YES;
894 | GCC_C_LANGUAGE_STANDARD = gnu99;
895 | GCC_DYNAMIC_NO_PIC = NO;
896 | GCC_NO_COMMON_BLOCKS = YES;
897 | GCC_OPTIMIZATION_LEVEL = 0;
898 | GCC_PREPROCESSOR_DEFINITIONS = (
899 | "DEBUG=1",
900 | "$(inherited)",
901 | );
902 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
903 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
904 | GCC_WARN_UNDECLARED_SELECTOR = YES;
905 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
906 | GCC_WARN_UNUSED_FUNCTION = YES;
907 | GCC_WARN_UNUSED_VARIABLE = YES;
908 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
909 | MTL_ENABLE_DEBUG_INFO = YES;
910 | ONLY_ACTIVE_ARCH = YES;
911 | SDKROOT = iphoneos;
912 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
913 | SWIFT_VERSION = 5.0;
914 | TARGETED_DEVICE_FAMILY = "1,2";
915 | VERSIONING_SYSTEM = "apple-generic";
916 | VERSION_INFO_PREFIX = "";
917 | };
918 | name = Debug;
919 | };
920 | 52FC377E1B9F6A0A005EFE87 /* Release */ = {
921 | isa = XCBuildConfiguration;
922 | buildSettings = {
923 | ALWAYS_SEARCH_USER_PATHS = NO;
924 | CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
925 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
926 | CLANG_CXX_LIBRARY = "libc++";
927 | CLANG_ENABLE_MODULES = YES;
928 | CLANG_ENABLE_OBJC_ARC = YES;
929 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
930 | CLANG_WARN_BOOL_CONVERSION = YES;
931 | CLANG_WARN_COMMA = YES;
932 | CLANG_WARN_CONSTANT_CONVERSION = YES;
933 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
934 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
935 | CLANG_WARN_EMPTY_BODY = YES;
936 | CLANG_WARN_ENUM_CONVERSION = YES;
937 | CLANG_WARN_INFINITE_RECURSION = YES;
938 | CLANG_WARN_INT_CONVERSION = YES;
939 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
940 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
941 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
942 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
943 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
944 | CLANG_WARN_STRICT_PROTOTYPES = YES;
945 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
946 | CLANG_WARN_UNREACHABLE_CODE = YES;
947 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
948 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
949 | COPY_PHASE_STRIP = NO;
950 | CURRENT_PROJECT_VERSION = 1;
951 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
952 | ENABLE_NS_ASSERTIONS = NO;
953 | ENABLE_STRICT_OBJC_MSGSEND = YES;
954 | GCC_C_LANGUAGE_STANDARD = gnu99;
955 | GCC_NO_COMMON_BLOCKS = YES;
956 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
957 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
958 | GCC_WARN_UNDECLARED_SELECTOR = YES;
959 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
960 | GCC_WARN_UNUSED_FUNCTION = YES;
961 | GCC_WARN_UNUSED_VARIABLE = YES;
962 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
963 | MTL_ENABLE_DEBUG_INFO = NO;
964 | SDKROOT = iphoneos;
965 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
966 | SWIFT_VERSION = 5.0;
967 | TARGETED_DEVICE_FAMILY = "1,2";
968 | VALIDATE_PRODUCT = YES;
969 | VERSIONING_SYSTEM = "apple-generic";
970 | VERSION_INFO_PREFIX = "";
971 | };
972 | name = Release;
973 | };
974 | 52FC37801B9F6A0A005EFE87 /* Debug */ = {
975 | isa = XCBuildConfiguration;
976 | buildSettings = {
977 | CLANG_ENABLE_MODULES = YES;
978 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
979 | DEFINES_MODULE = YES;
980 | DYLIB_COMPATIBILITY_VERSION = 1;
981 | DYLIB_CURRENT_VERSION = 1;
982 | DYLIB_INSTALL_NAME_BASE = "@rpath";
983 | INFOPLIST_FILE = "SwiftyAcknowledgements/Supporting Files/Info.plist";
984 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
985 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
986 | PRODUCT_BUNDLE_IDENTIFIER = de.mathiasnagler.SwiftyAcknowledgements;
987 | PRODUCT_NAME = SwiftyAcknowledgements;
988 | SKIP_INSTALL = YES;
989 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
990 | };
991 | name = Debug;
992 | };
993 | 52FC37811B9F6A0A005EFE87 /* Release */ = {
994 | isa = XCBuildConfiguration;
995 | buildSettings = {
996 | CLANG_ENABLE_MODULES = YES;
997 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
998 | DEFINES_MODULE = YES;
999 | DYLIB_COMPATIBILITY_VERSION = 1;
1000 | DYLIB_CURRENT_VERSION = 1;
1001 | DYLIB_INSTALL_NAME_BASE = "@rpath";
1002 | INFOPLIST_FILE = "SwiftyAcknowledgements/Supporting Files/Info.plist";
1003 | INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
1004 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
1005 | PRODUCT_BUNDLE_IDENTIFIER = de.mathiasnagler.SwiftyAcknowledgements;
1006 | PRODUCT_NAME = SwiftyAcknowledgements;
1007 | SKIP_INSTALL = YES;
1008 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1009 | };
1010 | name = Release;
1011 | };
1012 | 52FC379D1B9F6BEF005EFE87 /* Debug */ = {
1013 | isa = XCBuildConfiguration;
1014 | buildSettings = {
1015 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
1016 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1017 | INFOPLIST_FILE = "Examples/iOS Example/Supporting Files/Info.plist";
1018 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1019 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.iOS-Example";
1020 | PRODUCT_NAME = "$(TARGET_NAME)";
1021 | };
1022 | name = Debug;
1023 | };
1024 | 52FC379E1B9F6BEF005EFE87 /* Release */ = {
1025 | isa = XCBuildConfiguration;
1026 | buildSettings = {
1027 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
1028 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
1029 | INFOPLIST_FILE = "Examples/iOS Example/Supporting Files/Info.plist";
1030 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
1031 | PRODUCT_BUNDLE_IDENTIFIER = "de.mathiasnagler.iOS-Example";
1032 | PRODUCT_NAME = "$(TARGET_NAME)";
1033 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1034 | };
1035 | name = Release;
1036 | };
1037 | /* End XCBuildConfiguration section */
1038 |
1039 | /* Begin XCConfigurationList section */
1040 | 527046831BE203CB004CD4FC /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements iOS Tests" */ = {
1041 | isa = XCConfigurationList;
1042 | buildConfigurations = (
1043 | 527046841BE203CB004CD4FC /* Debug */,
1044 | 527046851BE203CB004CD4FC /* Release */,
1045 | );
1046 | defaultConfigurationIsVisible = 0;
1047 | defaultConfigurationName = Release;
1048 | };
1049 | 527046921BE204A1004CD4FC /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements tvOS Tests" */ = {
1050 | isa = XCConfigurationList;
1051 | buildConfigurations = (
1052 | 527046931BE204A1004CD4FC /* Debug */,
1053 | 527046941BE204A1004CD4FC /* Release */,
1054 | );
1055 | defaultConfigurationIsVisible = 0;
1056 | defaultConfigurationName = Release;
1057 | };
1058 | 52AAE6281BDF87B9007EB44A /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements tvOS" */ = {
1059 | isa = XCConfigurationList;
1060 | buildConfigurations = (
1061 | 52AAE6291BDF87B9007EB44A /* Debug */,
1062 | 52AAE62A1BDF87B9007EB44A /* Release */,
1063 | );
1064 | defaultConfigurationIsVisible = 0;
1065 | defaultConfigurationName = Release;
1066 | };
1067 | 52AAE6401BDF9A51007EB44A /* Build configuration list for PBXNativeTarget "tvOS Example" */ = {
1068 | isa = XCConfigurationList;
1069 | buildConfigurations = (
1070 | 52AAE6411BDF9A51007EB44A /* Debug */,
1071 | 52AAE6421BDF9A51007EB44A /* Release */,
1072 | );
1073 | defaultConfigurationIsVisible = 0;
1074 | defaultConfigurationName = Release;
1075 | };
1076 | 52FC37711B9F6A0A005EFE87 /* Build configuration list for PBXProject "SwiftyAcknowledgements" */ = {
1077 | isa = XCConfigurationList;
1078 | buildConfigurations = (
1079 | 52FC377D1B9F6A0A005EFE87 /* Debug */,
1080 | 52FC377E1B9F6A0A005EFE87 /* Release */,
1081 | );
1082 | defaultConfigurationIsVisible = 0;
1083 | defaultConfigurationName = Release;
1084 | };
1085 | 52FC377F1B9F6A0A005EFE87 /* Build configuration list for PBXNativeTarget "SwiftyAcknowledgements iOS" */ = {
1086 | isa = XCConfigurationList;
1087 | buildConfigurations = (
1088 | 52FC37801B9F6A0A005EFE87 /* Debug */,
1089 | 52FC37811B9F6A0A005EFE87 /* Release */,
1090 | );
1091 | defaultConfigurationIsVisible = 0;
1092 | defaultConfigurationName = Release;
1093 | };
1094 | 52FC379C1B9F6BEF005EFE87 /* Build configuration list for PBXNativeTarget "iOS Example" */ = {
1095 | isa = XCConfigurationList;
1096 | buildConfigurations = (
1097 | 52FC379D1B9F6BEF005EFE87 /* Debug */,
1098 | 52FC379E1B9F6BEF005EFE87 /* Release */,
1099 | );
1100 | defaultConfigurationIsVisible = 0;
1101 | defaultConfigurationName = Release;
1102 | };
1103 | /* End XCConfigurationList section */
1104 | };
1105 | rootObject = 52FC376E1B9F6A0A005EFE87 /* Project object */;
1106 | }
1107 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/SwiftyAcknowledgements iOS Tests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
16 |
18 |
24 |
25 |
26 |
27 |
28 |
38 |
39 |
45 |
46 |
48 |
49 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/SwiftyAcknowledgements iOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
38 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
64 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/SwiftyAcknowledgements tvOS Tests.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
16 |
18 |
24 |
25 |
26 |
27 |
28 |
38 |
39 |
45 |
46 |
48 |
49 |
52 |
53 |
54 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/SwiftyAcknowledgements tvOS.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
31 |
32 |
38 |
39 |
40 |
41 |
43 |
49 |
50 |
51 |
52 |
53 |
63 |
64 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/iOS Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements.xcodeproj/xcshareddata/xcschemes/tvOS Example.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
37 |
38 |
39 |
40 |
41 |
42 |
52 |
54 |
60 |
61 |
62 |
63 |
69 |
71 |
77 |
78 |
79 |
80 |
82 |
83 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/Acknowledgement.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Acknowledgement.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | public struct Acknowledgement: Equatable {
12 |
13 | // MARK: Properties
14 |
15 | public let title: String
16 | public let text: String
17 |
18 | // MARK: Initialization
19 |
20 | /// Initializes a new Acknowledgement instance with the given title and text
21 | public init(title: String, text: String) {
22 | self.title = title
23 | self.text = text
24 | }
25 |
26 | // MARK: Loading Acknowledgement from Plist
27 |
28 | /**
29 | Loads a plist at a given path and initializes an Acknowledgement instance for every
30 | element of the plist. The plist's top level element has to be an array and every
31 | element in the array should be a dictionary with the two keys **title** and **text**.
32 | If the plist is not in the correct format an empty array will be returned.
33 | - Returns: An array of Acknowledgements.
34 | */
35 | public static func acknowledgements(fromPlistAt path: String) -> [Acknowledgement] {
36 | var acknowledgements = [Acknowledgement]()
37 |
38 | if let plist = NSArray(contentsOfFile: path) as? Array> {
39 | for dict in plist {
40 | if let
41 | title = dict["title"],
42 | let text = dict["text"]
43 | {
44 | acknowledgements.append(Acknowledgement(title: title, text: text))
45 | }
46 | }
47 | }
48 |
49 | return acknowledgements
50 | }
51 |
52 | }
53 |
54 | // MARK: - Equatable
55 |
56 | public func ==(lhs: Acknowledgement, rhs: Acknowledgement) -> Bool {
57 | return ((lhs.title == rhs.title) && (lhs.text == rhs.text))
58 | }
59 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/AcknowledgementViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AcknowledgementViewController.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright (c) 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | internal class AcknowledgementViewController: UIViewController {
12 |
13 | // MARK: Properties
14 |
15 | /// The font size used for displaying the acknowledgement's text
16 | internal var fontSize: CGFloat = UIFontDescriptor.preferredFontSize(withTextStyle: UIFont.TextStyle.body.rawValue) {
17 | didSet {
18 | textView.font = UIFont.systemFont(ofSize: fontSize)
19 | }
20 | }
21 |
22 | /// The Acknowledgement instance that is displayed by the ViewController.
23 | internal let acknowledgement: Acknowledgement
24 |
25 | /// The textView used for displaying the acknowledgement's text
26 | internal private(set) lazy var textView: UITextView = {
27 | let textView = UITextView(frame: CGRect.zero)
28 | textView.translatesAutoresizingMaskIntoConstraints = false
29 | textView.alwaysBounceVertical = true
30 | textView.font = UIFont.systemFont(ofSize: self.fontSize)
31 | textView.textContainerInset = UIEdgeInsets(top: 12, left: 10, bottom: 12, right: 10)
32 | textView.isUserInteractionEnabled = true
33 |
34 | #if os(iOS)
35 | textView.isEditable = false
36 | textView.dataDetectorTypes = .link
37 | #endif
38 |
39 | #if os(tvOS)
40 | textView.isSelectable = true
41 | textView.panGestureRecognizer.allowedTouchTypes = [NSNumber(value: UITouchType.indirect.rawValue)]
42 | #endif
43 |
44 | return textView
45 | }()
46 |
47 | #if os(tvOS)
48 | private var gradientLayer: CAGradientLayer = {
49 | let gradientLayer = CAGradientLayer()
50 | gradientLayer.colors = [UIColor.clear.cgColor, UIColor.black.cgColor,
51 | UIColor.black.cgColor, UIColor.clear.cgColor]
52 | gradientLayer.locations = [0, 0.06, 1, 1]
53 | return gradientLayer
54 | }()
55 | #endif
56 |
57 | override internal var preferredFocusedView: UIView? {
58 | return textView
59 | }
60 |
61 | // MARK: Initialization
62 |
63 | /// Initializes a new AcknowledgementViewController instance and configures it using the given acknowledgement.
64 | /// - Parameter acknowledgement: The acknowledgement that the viewController should display
65 | /// - Returns: A newly initialized AcknowledgementViewController instance configured with the acknowledgements title and text.
66 | public required init(acknowledgement: Acknowledgement) {
67 | self.acknowledgement = acknowledgement
68 | super.init(nibName: nil, bundle: nil)
69 | }
70 |
71 | public required init?(coder aDecoder: NSCoder) {
72 | fatalError("init(coder:) has not been implemented, use init(acknowledgement:) instead.")
73 | }
74 |
75 | // MARK: UIViewController Overrides
76 |
77 | override func viewDidLoad() {
78 | view.addSubview(textView)
79 |
80 | #if os(tvOS)
81 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .top, relatedBy: .equal, toItem: topLayoutGuide, attribute: .bottom, multiplier: 1, constant: 0))
82 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1, constant: 0))
83 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .centerX, relatedBy: .equal, toItem: view, attribute: .centerX, multiplier: 1, constant: 0))
84 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .width, relatedBy: .equal, toItem: view, attribute: .width, multiplier: 0.7, constant: 0))
85 | #else
86 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .top, relatedBy: .equal, toItem: view, attribute: .top, multiplier: 1, constant: 0))
87 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .leading, relatedBy: .equal, toItem: view, attribute: .leading, multiplier: 1, constant: 0))
88 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .bottom, relatedBy: .equal, toItem: view, attribute: .bottom, multiplier: 1, constant: 0))
89 | view.addConstraint(NSLayoutConstraint(item: textView, attribute: .trailing, relatedBy: .equal, toItem: view, attribute: .trailing, multiplier: 1, constant: 0))
90 | #endif
91 |
92 | textView.text = acknowledgement.text
93 | title = acknowledgement.title
94 | textView.contentOffset = CGPoint.zero
95 |
96 | #if os(tvOS)
97 | textView.superview?.layer.mask = gradientLayer
98 | #endif
99 |
100 | super.viewDidLoad()
101 | }
102 |
103 | override func viewDidLayoutSubviews() {
104 | #if os(tvOS)
105 | gradientLayer.frame = textView.frame
106 | #endif
107 |
108 | super.viewDidLayoutSubviews()
109 | }
110 |
111 | }
112 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/AcknowledgementsTableViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AcknowledgementsTableViewController.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright (c) 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | // MARK: - AcknowledgementsTableViewController
12 |
13 | public class AcknowledgementsTableViewController: UITableViewController {
14 |
15 | // MARK: Properties
16 |
17 | /// The text to be displayed in the **UITableView**'s **tableHeader**, if any.
18 | @IBInspectable public var headerText: String? {
19 | didSet {
20 | headerView.text = headerText
21 | updateHeaderFooterViews()
22 | }
23 | }
24 |
25 | /// The text to be displayed in the **UITableView**'s **tableFooter**, if any.
26 | @IBInspectable public var footerText: String? {
27 | didSet {
28 | footerView.text = footerText
29 | updateHeaderFooterViews()
30 | }
31 | }
32 |
33 | /// The font size to be used for the **UITableView**'s **tableHeader**. Defaults to the size of **UIFontTextStyleSubheadline**
34 | @IBInspectable public var headerFontSize: CGFloat = UIFontDescriptor.preferredFontSize(withTextStyle: UIFont.TextStyle.subheadline.rawValue) {
35 | didSet {
36 | headerView.fontSize = headerFontSize
37 | updateHeaderFooterViews()
38 | }
39 | }
40 |
41 | /// The font size to be used for the **UITableView**'s **tableFooter**. Defaults to the size of **UIFontTextStyleSubheadline**
42 | @IBInspectable public var footerFontSize: CGFloat = UIFontDescriptor.preferredFontSize(withTextStyle: UIFont.TextStyle.subheadline.rawValue) {
43 | didSet {
44 | footerView.fontSize = footerFontSize
45 | updateHeaderFooterViews()
46 | }
47 | }
48 |
49 | /// The font size to be used for the **UITableView**'s cells. Defaults to the size of **UIFontTextStyleBody**
50 | @IBInspectable public var detailFontSize: CGFloat = UIFontDescriptor.preferredFontSize(withTextStyle: UIFont.TextStyle.body.rawValue)
51 |
52 | /// The name of the plist containing the acknowledgements, defaults to **Acknowledgements**.
53 | @IBInspectable public var acknowledgementsPlistName = "Acknowledgements"
54 |
55 | private lazy var _acknowledgements: [Acknowledgement] = {
56 | guard let
57 | acknowledgementsPlistPath = Bundle.main.path(
58 | forResource: self.acknowledgementsPlistName, ofType: "plist")
59 | else {
60 | return [Acknowledgement]()
61 | }
62 |
63 | return Acknowledgement.acknowledgements(fromPlistAt: acknowledgementsPlistPath)
64 | }()
65 |
66 | /// The acknowledgements that are displayed by the TableViewController. The array is initialized with the contents of the
67 | /// plist with *acknowledgementPlistName*. To display custom acknowledements add them to the array. The tableView will
68 | /// reload its contents after any modification to the array.
69 | public var acknowledgements: [Acknowledgement] {
70 | set {
71 | _acknowledgements = sortingClosure != nil ? newValue.sorted(by: sortingClosure!) : newValue
72 | tableView.reloadData()
73 | }
74 | get {
75 | return _acknowledgements
76 | }
77 | }
78 |
79 | /// Closure type used for sorting acknowledgements.
80 | /// - Parameter lhs: acknowledgement *lhs*
81 | /// - Parameter rhs: acknowledgement *rhs*
82 | /// - Returns: A boolean indicating wether *lhs* is ordered before *rhs*
83 | public typealias SortingClosure = ((Acknowledgement, Acknowledgement) -> Bool)
84 |
85 | /// A closure used to sort the *acknowledgements* array, defaults to a closure
86 | /// that sorts alphabetically. The sorting closure can be changed any time and the
87 | /// *acknowledgements* array will then be re-sorted and afterwards the tableView
88 | /// will reload its contents.
89 | public var sortingClosure: SortingClosure? = { (left, right) in
90 | var comparsion = left.title.compare(right.title)
91 | return comparsion == .orderedAscending
92 | } {
93 | didSet {
94 | if let sortingClosure = sortingClosure {
95 | _acknowledgements = _acknowledgements.sorted(by: sortingClosure)
96 | }
97 | }
98 | }
99 |
100 | private lazy var headerView: HeaderFooterView = {
101 | let headerView = HeaderFooterView()
102 | headerView.fontSize = self.headerFontSize
103 | return headerView
104 | }()
105 |
106 | private lazy var footerView: HeaderFooterView = {
107 | let footerView = HeaderFooterView()
108 | footerView.fontSize = self.footerFontSize
109 | return footerView
110 | }()
111 |
112 | // MARK: Initialization
113 |
114 | public init(acknowledgementsPlistPath: String? = nil) {
115 | super.init(style: .grouped)
116 | }
117 |
118 | override internal init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
119 | super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
120 | }
121 |
122 | required public init?(coder aDecoder: NSCoder) {
123 | super.init(style: .grouped)
124 | }
125 |
126 | // MARK: UIViewController overrides
127 |
128 | override public func viewDidLoad() {
129 | super.viewDidLoad()
130 |
131 | tableView.register(UITableViewCell.self, forCellReuseIdentifier: UITableViewCell.reuseId)
132 |
133 | headerView.bounds = CGRect(x: 0, y: 0, width: view.bounds.width, height: 50)
134 | tableView.tableHeaderView = headerView
135 | footerView.bounds = CGRect(x: 0, y: 0, width: view.bounds.width, height: 50)
136 | tableView.tableFooterView = footerView
137 | }
138 |
139 | override public func viewWillAppear(_ animated: Bool) {
140 | if title == nil {
141 | title = "Acknowledgements"
142 | }
143 |
144 | super.viewWillAppear(animated)
145 | }
146 |
147 | override public func viewWillTransition(to size: CGSize, with coordinator: UIViewControllerTransitionCoordinator) {
148 | super.viewWillTransition(to: size, with: coordinator)
149 | updateHeaderFooterViews(forWidth: size.width)
150 | }
151 |
152 | // MARK: UITableViewDataSource
153 |
154 | override public func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
155 | let cell = tableView.dequeueReusableCell(withIdentifier: UITableViewCell.reuseId, for: indexPath)
156 | cell.textLabel?.text = acknowledgements[indexPath.row].title
157 | cell.accessoryType = .disclosureIndicator
158 | return cell
159 | }
160 |
161 | override public func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
162 | return acknowledgements.count
163 | }
164 |
165 | // MARK: UITableViewDelegate
166 |
167 | override public func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
168 | let detailViewController = AcknowledgementViewController(acknowledgement: acknowledgements[indexPath.row])
169 | detailViewController.fontSize = detailFontSize
170 | show(detailViewController, sender: self)
171 | }
172 |
173 | // MARK: Private methods
174 |
175 | private func updateHeaderFooterViews() {
176 | updateHeaderFooterViews(forWidth: view.bounds.width)
177 | }
178 |
179 | private func updateHeaderFooterViews(forWidth width: CGFloat) {
180 | let headerWidthConstraint = NSLayoutConstraint(item: headerView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: width)
181 | headerWidthConstraint.priority = UILayoutPriority.required - 1
182 | headerWidthConstraint.isActive = true
183 | let headerHeight = headerView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height
184 | headerWidthConstraint.isActive = false
185 | headerView.frame = CGRect(x: 0, y: 0, width: width, height: headerHeight)
186 | tableView.tableHeaderView = headerView
187 |
188 | let footerWidthConstraint = NSLayoutConstraint(item: footerView, attribute: .width, relatedBy: .equal, toItem: nil, attribute: .notAnAttribute, multiplier: 1, constant: width)
189 | footerWidthConstraint.priority = UILayoutPriority.required - 1
190 | footerWidthConstraint.isActive = true
191 | let footerHeight = footerView.systemLayoutSizeFitting(UIView.layoutFittingCompressedSize).height
192 | footerWidthConstraint.isActive = false
193 | footerView.frame = CGRect(x: 0, y: 0, width: width, height: footerHeight)
194 | tableView.tableFooterView = footerView
195 | }
196 |
197 | }
198 |
199 | private extension UITableViewCell {
200 | static var reuseId: String {
201 | return String(describing: self)
202 | }
203 | }
204 |
205 | // MARK: - HeaderFooterView
206 |
207 | private class HeaderFooterView: UIView {
208 |
209 | // MARK: Properties
210 |
211 | var fontSize: CGFloat {
212 | get {
213 | return label.font.pointSize
214 | }
215 | set {
216 | label.font = UIFont.systemFont(ofSize: newValue)
217 | }
218 | }
219 |
220 | var text: String? {
221 | get {
222 | return label.text
223 | }
224 | set {
225 | label.text = newValue
226 | }
227 | }
228 |
229 | private lazy var label: UILabel = {
230 | let label = UILabel()
231 | label.translatesAutoresizingMaskIntoConstraints = false
232 | label.textAlignment = .center
233 | label.numberOfLines = 0
234 | label.textColor = .gray
235 | label.font = UIFont.systemFont(ofSize: 12)
236 | return label
237 | }()
238 |
239 | // MARK: Initialization
240 |
241 | override init(frame: CGRect) {
242 | super.init(frame: frame)
243 | commonInit()
244 | }
245 |
246 | required init?(coder aDecoder: NSCoder) {
247 | super.init(coder: aDecoder)
248 | commonInit()
249 | }
250 |
251 | private func commonInit() {
252 | addSubview(label)
253 | self.addConstraint(NSLayoutConstraint(item: self, attribute: .leading, relatedBy: .equal, toItem: label, attribute: .leading, multiplier: 1, constant: -16))
254 | self.addConstraint(NSLayoutConstraint(item: self, attribute: .trailing, relatedBy: .equal, toItem: label, attribute: .trailing, multiplier: 1, constant: 16))
255 | self.addConstraint(NSLayoutConstraint(item: self, attribute: .top, relatedBy: .equal, toItem: label, attribute: .top, multiplier: 1, constant: -16))
256 | self.addConstraint(NSLayoutConstraint(item: self, attribute: .bottom, relatedBy: .equal, toItem: label, attribute: .bottom, multiplier: 1, constant: 16))
257 | }
258 |
259 | }
260 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/Supporting Files/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 0.2.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(CURRENT_PROJECT_VERSION)
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/SwiftyAcknowledgements.h:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyAcknowledgements.h
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 08.09.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | //! Project version number for SwiftyAcknowledgements.
12 | FOUNDATION_EXPORT double SwiftyAcknowledgementsVersionNumber;
13 |
14 | //! Project version string for SwiftyAcknowledgements.
15 | FOUNDATION_EXPORT const unsigned char SwiftyAcknowledgementsVersionString[];
16 |
17 | // In this header, you should import all the public headers of your framework using statements like #import
18 |
19 |
20 |
--------------------------------------------------------------------------------
/SwiftyAcknowledgements/UIFontDescriptorExtensions.swift:
--------------------------------------------------------------------------------
1 | //
2 | // UIFontDescriptorExtensions.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 28.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import Foundation
10 |
11 | internal extension UIFontDescriptor {
12 |
13 | /// Returns the point-size of the preffered font for a text style
14 | /// The user can influence this value by changing the font-size setting
15 | class func preferredFontSize(withTextStyle style: String) -> CGFloat {
16 | let style = self.preferredFontDescriptor(withTextStyle: UIFont.TextStyle(rawValue: style))
17 | return style.pointSize
18 | }
19 |
20 | }
21 |
--------------------------------------------------------------------------------
/Tests/AcknowledgementTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AcknowledgementsTests.swift
3 | // SwiftyAcknowledgementsTests
4 | //
5 | // Created by Mathias Nagler on 29.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import SwiftyAcknowledgements
11 |
12 | class AcknowledgementsTests: BaseTestCase {
13 |
14 | func testAcknowledgementInitialization() {
15 | let title = "Title"
16 | let text = "text"
17 | let acknowledgement = Acknowledgement(title: title, text: text)
18 | XCTAssertEqual(acknowledgement.title, title, "The acknowledgements title was incorrect.")
19 | XCTAssertEqual(acknowledgement.text, text, "The acknowledgements text was incorrect.")
20 | }
21 |
22 | func testLoadAcknowledgementsFromPlist() {
23 | let plist = StringForResource("Acknowledgements", ofType: "plist")
24 | let acknowledgements = Acknowledgement.acknowledgements(fromPlistAt: plist)
25 | XCTAssert(acknowledgements.count > 0, "No acknowledgements loaded. Is the plist empty?")
26 | }
27 |
28 | }
29 |
--------------------------------------------------------------------------------
/Tests/AcknowledgementsTableViewControllerTests.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AcknowledgementsTableViewControllerTests.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 29.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import SwiftyAcknowledgements
11 |
12 | class AcknowledgementsTableViewControllerTests: BaseTestCase {
13 |
14 | var viewController: AcknowledgementsTableViewController!
15 | let a = Acknowledgement(title: "a", text: "a")
16 | let b = Acknowledgement(title: "b", text: "b")
17 | let c = Acknowledgement(title: "c", text: "c")
18 | let d = Acknowledgement(title: "d", text: "d")
19 |
20 | override func setUp() {
21 | super.setUp()
22 |
23 | viewController = AcknowledgementsTableViewController()
24 | viewController.acknowledgements = [a, d, c, b]
25 | }
26 |
27 | override func tearDown() {
28 | viewController = nil
29 |
30 | super.tearDown()
31 | }
32 |
33 | func testAddingCustomAcknowledgement() {
34 | let countBefore = viewController.acknowledgements.count
35 | let customAcknowledgement = Acknowledgement(title: "title", text: "text")
36 | viewController.acknowledgements.append(customAcknowledgement)
37 | let countAfter = viewController.acknowledgements.count
38 | XCTAssertNotEqual(countBefore, countAfter, "The count of acknowledgements was invalid after adding a custom acknowledgement.")
39 | XCTAssert(viewController.acknowledgements.contains(customAcknowledgement), "The added acknowledgement was not contained in the array of acknowledgements.")
40 | }
41 |
42 | func testDefaultSorting() {
43 | XCTAssert(viewController.acknowledgements == [a, b, c, d], "Default sort did not produce an alphabetically sorted list.")
44 | }
45 |
46 | func testCustomStorting() {
47 | viewController.sortingClosure = { (left: Acknowledgement, right: Acknowledgement) in
48 | let comparsion = left.title.compare(right.title)
49 | return comparsion == .orderedDescending
50 | }
51 |
52 | XCTAssert(viewController.acknowledgements == [d, c, b, a], "Custom sort did not produce an alphabetically descending sorted list.")
53 | }
54 |
55 | func testTableDataSourceNumberOfRows() {
56 | let count = viewController.tableView(viewController.tableView, numberOfRowsInSection: 0)
57 | XCTAssertEqual(count, viewController.acknowledgements.count, "The number of rows returned by the UITableViewDataSource is invalid.")
58 | }
59 |
60 | func testTableDataSourceCellForRowAtIndexPath() {
61 | let cell = viewController.tableView(viewController.tableView, cellForRowAt: IndexPath(item: 0, section: 0))
62 | XCTAssertEqual(cell.textLabel!.text, viewController.acknowledgements[0].title)
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/Tests/BaseTestCase.swift:
--------------------------------------------------------------------------------
1 | //
2 | // BaseTestClass.swift
3 | // SwiftyAcknowledgements
4 | //
5 | // Created by Mathias Nagler on 29.10.15.
6 | // Copyright © 2015 Mathias Nagler. All rights reserved.
7 | //
8 |
9 | import XCTest
10 | import UIKit
11 | import SwiftyAcknowledgements
12 |
13 | class BaseTestCase: XCTestCase {
14 |
15 | func URLForResource(_ fileName: String, withExtension: String) -> URL {
16 | let bundle = Bundle(for: BaseTestCase.self)
17 | return bundle.url(forResource: fileName, withExtension: withExtension)!
18 | }
19 |
20 | func StringForResource(_ fileName: String, ofType: String) -> String {
21 | let bundle = Bundle(for: BaseTestCase.self)
22 | return bundle.path(forResource: fileName, ofType: ofType)!
23 | }
24 |
25 | }
26 |
--------------------------------------------------------------------------------
/Tests/Resources/Acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | text
7 | The MIT License (MIT)
8 |
9 | Copyright (c) 2015 Mathias Nagler
10 |
11 | Permission is hereby granted, free of charge, to any person obtaining a copy
12 | of this software and associated documentation files (the "Software"), to deal
13 | in the Software without restriction, including without limitation the rights
14 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15 | copies of the Software, and to permit persons to whom the Software is
16 | furnished to do so, subject to the following conditions:
17 |
18 | The above copyright notice and this permission notice shall be included in
19 | all copies or substantial portions of the Software.
20 |
21 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27 | THE SOFTWARE.
28 |
29 | title
30 | Library 1
31 |
32 |
33 | text
34 | The MIT License (MIT)
35 |
36 | Copyright (c) 2015 Mathias Nagler
37 |
38 | Permission is hereby granted, free of charge, to any person obtaining a copy
39 | of this software and associated documentation files (the "Software"), to deal
40 | in the Software without restriction, including without limitation the rights
41 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
42 | copies of the Software, and to permit persons to whom the Software is
43 | furnished to do so, subject to the following conditions:
44 |
45 | The above copyright notice and this permission notice shall be included in
46 | all copies or substantial portions of the Software.
47 |
48 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
49 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
50 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
51 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
52 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
53 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
54 | THE SOFTWARE.
55 |
56 | title
57 | Library 2
58 |
59 |
60 | text
61 | The MIT License (MIT)
62 |
63 | Copyright (c) 2015 Mathias Nagler
64 |
65 | Permission is hereby granted, free of charge, to any person obtaining a copy
66 | of this software and associated documentation files (the "Software"), to deal
67 | in the Software without restriction, including without limitation the rights
68 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
69 | copies of the Software, and to permit persons to whom the Software is
70 | furnished to do so, subject to the following conditions:
71 |
72 | The above copyright notice and this permission notice shall be included in
73 | all copies or substantial portions of the Software.
74 |
75 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
76 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
77 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
79 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
80 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
81 | THE SOFTWARE.
82 |
83 | title
84 | Library 3
85 |
86 |
87 |
88 |
--------------------------------------------------------------------------------
/Tests/Supporting Files/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | BNDL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 |
24 |
25 |
--------------------------------------------------------------------------------