Skip to content

Commit 63b6070

Browse files
committed
Merge branch 'origin/swift-playgrounds-v3.3'
2 parents 11027ce + 393d647 commit 63b6070

File tree

74 files changed

+1016
-523
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+1016
-523
lines changed

.swiftlint.yml

Lines changed: 41 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,41 @@
1-
disabled_rules:
2-
- identifier_name
3-
- force_cast
4-
- function_body_length
5-
- function_parameter_count
6-
- file_length
7-
8-
line_length: 150
9-
nesting:
10-
type_level:
11-
warning: 2
1+
# https://github.com/airbnb/swift
2+
3+
whitelist_rules:
4+
- closure_spacing
5+
- colon
6+
- empty_enum_arguments
7+
- fatal_error_message
8+
# - force_cast
9+
- force_try
10+
- force_unwrapping
11+
# - implicitly_unwrapped_optional
12+
- legacy_cggeometry_functions
13+
- legacy_constant
14+
- legacy_constructor
15+
- legacy_nsgeometry_functions
16+
- operator_usage_whitespace
17+
- redundant_string_enum_value
18+
- redundant_void_return
19+
- return_arrow_whitespace
20+
- trailing_newline
21+
- type_name
22+
- unused_closure_parameter
23+
- unused_optional_binding
24+
- vertical_whitespace
25+
- void_return
26+
- custom_rules
27+
28+
excluded:
29+
- Pods
30+
31+
colon:
32+
apply_to_dictionaries: false
33+
34+
indentation: 2
35+
36+
custom_rules:
37+
no_objcMembers:
38+
name: "@objcMembers"
39+
regex: "@objcMembers"
40+
message: "Explicitly use @objc on each member you want to expose to Objective-C"
41+
severity: error

ArtOfAscii.xcodeproj/project.pbxproj

Lines changed: 471 additions & 380 deletions
Large diffs are not rendered by default.

ArtOfAscii.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1110"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "5EF2F9AA2054BBF300191409"
18+
BuildableName = "libBookCore.a"
19+
BlueprintName = "BookCore"
20+
ReferencedContainer = "container:ArtOfAscii.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
</LaunchAction>
44+
<ProfileAction
45+
buildConfiguration = "Release"
46+
shouldUseLaunchSchemeArgsEnv = "YES"
47+
savedToolIdentifier = ""
48+
useCustomWorkingDirectory = "NO"
49+
debugDocumentVersioning = "YES">
50+
<MacroExpansion>
51+
<BuildableReference
52+
BuildableIdentifier = "primary"
53+
BlueprintIdentifier = "5EF2F9AA2054BBF300191409"
54+
BuildableName = "libBookCore.a"
55+
BlueprintName = "BookCore"
56+
ReferencedContainer = "container:ArtOfAscii.xcodeproj">
57+
</BuildableReference>
58+
</MacroExpansion>
59+
</ProfileAction>
60+
<AnalyzeAction
61+
buildConfiguration = "Debug">
62+
</AnalyzeAction>
63+
<ArchiveAction
64+
buildConfiguration = "Release"
65+
revealArchiveInOrganizer = "YES">
66+
</ArchiveAction>
67+
</Scheme>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<Scheme
3+
LastUpgradeVersion = "1110"
4+
version = "1.3">
5+
<BuildAction
6+
parallelizeBuildables = "YES"
7+
buildImplicitDependencies = "YES">
8+
<BuildActionEntries>
9+
<BuildActionEntry
10+
buildForTesting = "YES"
11+
buildForRunning = "YES"
12+
buildForProfiling = "YES"
13+
buildForArchiving = "YES"
14+
buildForAnalyzing = "YES">
15+
<BuildableReference
16+
BuildableIdentifier = "primary"
17+
BlueprintIdentifier = "5EA2E3BC2056F35A00416A35"
18+
BuildableName = "LiveViewTestApp.app"
19+
BlueprintName = "LiveViewTestApp"
20+
ReferencedContainer = "container:ArtOfAscii.xcodeproj">
21+
</BuildableReference>
22+
</BuildActionEntry>
23+
</BuildActionEntries>
24+
</BuildAction>
25+
<TestAction
26+
buildConfiguration = "Debug"
27+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
28+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29+
shouldUseLaunchSchemeArgsEnv = "YES">
30+
<Testables>
31+
</Testables>
32+
</TestAction>
33+
<LaunchAction
34+
buildConfiguration = "Debug"
35+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
36+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
37+
launchStyle = "0"
38+
useCustomWorkingDirectory = "NO"
39+
ignoresPersistentStateOnLaunch = "NO"
40+
debugDocumentVersioning = "YES"
41+
debugServiceExtension = "internal"
42+
allowLocationSimulation = "YES">
43+
<BuildableProductRunnable
44+
runnableDebuggingMode = "0">
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "5EA2E3BC2056F35A00416A35"
48+
BuildableName = "LiveViewTestApp.app"
49+
BlueprintName = "LiveViewTestApp"
50+
ReferencedContainer = "container:ArtOfAscii.xcodeproj">
51+
</BuildableReference>
52+
</BuildableProductRunnable>
53+
</LaunchAction>
54+
<ProfileAction
55+
buildConfiguration = "Release"
56+
shouldUseLaunchSchemeArgsEnv = "YES"
57+
savedToolIdentifier = ""
58+
useCustomWorkingDirectory = "NO"
59+
debugDocumentVersioning = "YES">
60+
<BuildableProductRunnable
61+
runnableDebuggingMode = "0">
62+
<BuildableReference
63+
BuildableIdentifier = "primary"
64+
BlueprintIdentifier = "5EA2E3BC2056F35A00416A35"
65+
BuildableName = "LiveViewTestApp.app"
66+
BlueprintName = "LiveViewTestApp"
67+
ReferencedContainer = "container:ArtOfAscii.xcodeproj">
68+
</BuildableReference>
69+
</BuildableProductRunnable>
70+
</ProfileAction>
71+
<AnalyzeAction
72+
buildConfiguration = "Debug">
73+
</AnalyzeAction>
74+
<ArchiveAction
75+
buildConfiguration = "Release"
76+
revealArchiveInOrganizer = "YES">
77+
</ArchiveAction>
78+
</Scheme>

ArtOfAscii/Chapters/01-ArtOfAscii.playgroundchapter/Manifest.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<plist version="1.0">
44
<dict>
55
<key>Name</key>
6-
<string>ChapterOneName</string>
6+
<string>Art of ASCII</string>
77
<key>Pages</key>
88
<array>
99
<string>00-Welcome.cutscenepage</string>

ArtOfAscii/Chapters/02-Acknowledgements.playgroundchapter/Pages/01-Acknwoledgements.playgroundpage/main.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2121

2222
# Acknowledgements
2323

24-
## Swift Playgrounds Author Template for Xcode 11.1
24+
## Swift Playgrounds Author Template for Xcode 11.1, Swift Playgrounds 3.3
2525

26-
Copyright © 2019 Apple Inc.
26+
Copyright © 2020 Apple Inc.
2727

2828
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
2929

@@ -71,7 +71,7 @@ Background vector created by [freepik - www.freepik.com](https://www.freepik.com
7171

7272
## Icons
7373

74-
A handful of icons in this Playground Book are created by [Icons8](https://icons8.com/).
74+
Some icons in this Playground Book are created by [Icons8](https://icons8.com/).
7575

7676
## Fonts
7777

@@ -166,5 +166,4 @@ This license becomes null and void if any of the above conditions are not met.
166166

167167
DISCLAIMER
168168
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
169-
170169
*/

ArtOfAscii/Manifest.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>SwiftVersion</key>
1616
<string>$(SWIFT_VERSION)</string>
1717
<key>Name</key>
18-
<string>PlaygroundBookName</string>
18+
<string>Art of ASCII</string>
1919
<key>Chapters</key>
2020
<array>
2121
<string>01-ArtOfAscii.playgroundchapter</string>
@@ -26,7 +26,7 @@
2626
<string>BookAPI</string>
2727
</array>
2828
<key>UserModuleMode</key>
29-
<string>Disabled</string>
29+
<string>Full</string>
3030
<key>ImageReference</key>
3131
<string>cover.png</string>
3232
<key>SupportsDarkMode</key>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// See LICENSE folder for this template’s licensing information.
3+
//
4+
// Abstract:
5+
// Contains classes/structs/enums/functions which are part of a module that is
6+
// automatically imported into user-editable code.
7+
//
8+
9+
import BookCore
10+
11+
// Implement any classes/structs/enums/functions in the BookAPI module which you
12+
// want to be automatically imported and visible for users on playground pages
13+
// and in user modules.
14+
//
15+
// This is controlled via the book-level `UserAutoImportedAuxiliaryModules`
16+
// Manifest.plist key.

ArtOfAscii/Modules/BookCore.playgroundmodule/Sources/Core/FontResourceProvider.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public class FontResourceProvider {
7373
public enum Unscii16: String, Font {
7474

7575
public static var resourceNames: [FontResourceName] {
76-
return [FontResourceName(name: "unscii-16", extensionName: "ttf")s]
76+
return [FontResourceName(name: "unscii-16", extensionName: "ttf")]
7777
}
7878

7979
case regular = "unscii-16"
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
//
2+
// See LICENSE folder for this template’s licensing information.
3+
//
4+
// Abstract:
5+
// A source file which is part of the auxiliary module named "BookCore".
6+
// Provides the implementation of the "always-on" live view.
7+
//
8+
9+
import UIKit
10+
import PlaygroundSupport
11+
12+
@objc(BookCore_LiveViewController)
13+
public class LiveViewController: UIViewController, PlaygroundLiveViewMessageHandler, PlaygroundLiveViewSafeAreaContainer {
14+
/*
15+
public func liveViewMessageConnectionOpened() {
16+
// Implement this method to be notified when the live view message connection is opened.
17+
// The connection will be opened when the process running Contents.swift starts running and listening for messages.
18+
}
19+
*/
20+
21+
/*
22+
public func liveViewMessageConnectionClosed() {
23+
// Implement this method to be notified when the live view message connection is closed.
24+
// The connection will be closed when the process running Contents.swift exits and is no longer listening for messages.
25+
// This happens when the user's code naturally finishes running, if the user presses Stop, or if there is a crash.
26+
}
27+
*/
28+
29+
public func receive(_ message: PlaygroundValue) {
30+
// Implement this method to receive messages sent from the process running Contents.swift.
31+
// This method is *required* by the PlaygroundLiveViewMessageHandler protocol.
32+
// Use this method to decode any messages sent as PlaygroundValue values and respond accordingly.
33+
}
34+
}

ArtOfAscii/PrivateResources/LiveView.storyboard

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="15400" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
33
<device id="ipad10_2" orientation="portrait" layout="fullscreen" appearance="light"/>
44
<dependencies>
5-
<deployment identifier="iOS"/>
65
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="15404"/>
76
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
87
<capability name="collection view cell content view" minToolsVersion="11.0"/>
@@ -456,7 +455,7 @@
456455
</viewController>
457456
<placeholder placeholderIdentifier="IBFirstResponder" id="MSN-rQ-yzx" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
458457
</objects>
459-
<point key="canvasLocation" x="-219.25925925925924" y="786.66666666666663"/>
458+
<point key="canvasLocation" x="-219" y="788"/>
460459
</scene>
461460
<!--imagePickerViewController-->
462461
<scene sceneID="GmK-cm-SKM">
@@ -753,7 +752,7 @@
753752
<placeholder placeholderIdentifier="IBFirstResponder" id="ax5-QY-UtN" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
754753
<exit id="C74-rF-v6n" userLabel="Exit" sceneMemberID="exit"/>
755754
</objects>
756-
<point key="canvasLocation" x="587.40740740740739" y="111.66666666666666"/>
755+
<point key="canvasLocation" x="588" y="112"/>
757756
</scene>
758757
<!--Grayscale Histogram Equalization-->
759758
<scene sceneID="rf0-JQ-tzt">
@@ -975,7 +974,7 @@
975974
</viewController>
976975
<placeholder placeholderIdentifier="IBFirstResponder" id="0dv-3h-hTj" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
977976
</objects>
978-
<point key="canvasLocation" x="1427" y="112"/>
977+
<point key="canvasLocation" x="1427" y="113"/>
979978
</scene>
980979
<!--imagePickerViewController-->
981980
<scene sceneID="9TX-jm-oqt">
@@ -1077,15 +1076,15 @@
10771076
</viewController>
10781077
<placeholder placeholderIdentifier="IBFirstResponder" id="qNX-4H-9SN" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
10791078
</objects>
1080-
<point key="canvasLocation" x="1427" y="508"/>
1079+
<point key="canvasLocation" x="587" y="508"/>
10811080
</scene>
10821081
</scenes>
10831082
<resources>
10841083
<image name="float-button/expand" width="48" height="48"/>
1085-
<image name="toolbar/button-aperture" width="48" height="48"/>
1086-
<image name="toolbar/button-asciification" width="48" height="48"/>
1084+
<image name="toolbar/button-aperture" width="96" height="96"/>
1085+
<image name="toolbar/button-asciification" width="96" height="96"/>
10871086
<image name="toolbar/button-blue" width="48" height="48"/>
1088-
<image name="toolbar/button-camera-switch" width="48" height="48"/>
1087+
<image name="toolbar/button-camera-switch" width="96" height="96"/>
10891088
<image name="toolbar/button-contrast" width="48" height="48"/>
10901089
<image name="toolbar/button-grayscale" width="48" height="48"/>
10911090
<image name="toolbar/button-green" width="48" height="48"/>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//
2+
// See LICENSE folder for this template’s licensing information.
3+
//
4+
// Abstract:
5+
// An empty, user-editable source file. Part of the "UserModule" user module.
6+
//

ConfigFiles/BuildSettings.xcconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ PLAYGROUND_BOOK_FILE_NAME = Art of ASCII
1818
PLAYGROUND_BOOK_CONTENT_IDENTIFIER = $(BUNDLE_IDENTIFIER_PREFIX).$(PLAYGROUND_BOOK_FILE_NAME:rfc1034identifier)
1919

2020
// This is the ContentVersion of the playground book.
21-
PLAYGROUND_BOOK_CONTENT_VERSION = 0.0.1
21+
PLAYGROUND_BOOK_CONTENT_VERSION = 0.0.2
2222

2323
// Additionally, include some base build settings which this project requires but which shouldn't generally be edited.
2424
// Do *not* remove this #include; if you do, the project will fail to build.

0 commit comments

Comments
 (0)