Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 17 additions & 7 deletions C4.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
13470594239224A300B4BA4C /* Package.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Package.swift; sourceTree = "<group>"; };
1F40C6FA1C82ADF0004AE1E7 /* Camera.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Camera.swift; sourceTree = "<group>"; };
1F754DCA1C48EE600036D39F /* ImageLayer.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImageLayer.swift; sourceTree = "<group>"; };
1F75FDE81C5B1FE700EB62C2 /* C4Loop.aif */ = {isa = PBXFileReference; lastKnownFileType = file; path = C4Loop.aif; sourceTree = "<group>"; };
Expand Down Expand Up @@ -358,6 +359,7 @@
614F823919DB5ED3001DF1D4 = {
isa = PBXGroup;
children = (
13470594239224A300B4BA4C /* Package.swift */,
A9D4F66E1B534F9F00F937AB /* C4 */,
A9596D271A054A960023323D /* Tests */,
A96F505B1B5385A5002B3A46 /* C4App */,
Expand Down Expand Up @@ -649,7 +651,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 0900;
LastUpgradeCheck = 1000;
LastUpgradeCheck = 1120;
ORGANIZATIONNAME = C4;
TargetAttributes = {
610A6A4D1F928E1B003B841A = {
Expand All @@ -662,23 +664,23 @@
};
614F824219DB5ED3001DF1D4 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0900;
LastSwiftMigration = 1120;
};
614F824D19DB5ED4001DF1D4 = {
CreatedOnToolsVersion = 6.0;
LastSwiftMigration = 0900;
LastSwiftMigration = 1120;
TestTargetID = A96F50591B5385A5002B3A46;
};
A96F50591B5385A5002B3A46 = {
CreatedOnToolsVersion = 6.4;
DevelopmentTeam = 75C7KVJZ99;
LastSwiftMigration = 0900;
LastSwiftMigration = 1120;
};
};
};
buildConfigurationList = 614F823D19DB5ED3001DF1D4 /* Build configuration list for PBXProject "C4" */;
compatibilityVersion = "Xcode 8.0";
developmentRegion = English;
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Expand Down Expand Up @@ -1106,6 +1108,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1155,7 +1158,7 @@
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand All @@ -1166,6 +1169,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
Expand Down Expand Up @@ -1206,7 +1210,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand All @@ -1229,6 +1233,7 @@
PRODUCT_NAME = C4;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1247,6 +1252,7 @@
PRODUCT_NAME = C4;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand All @@ -1262,6 +1268,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.c4ios.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/C4App.app/C4App";
};
name = Debug;
Expand All @@ -1275,6 +1282,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.c4ios.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/C4App.app/C4App";
};
name = Release;
Expand All @@ -1293,6 +1301,7 @@
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = "com.c4ios.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -1308,6 +1317,7 @@
PRODUCT_BUNDLE_IDENTIFIER = "com.c4ios.$(PRODUCT_NAME:rfc1034identifier)";
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 5.0;
};
name = Release;
};
Expand Down
24 changes: 10 additions & 14 deletions C4.xcodeproj/xcshareddata/xcschemes/C4-iOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "614F824219DB5ED3001DF1D4"
BuildableName = "C4.framework"
BlueprintName = "C4-iOS"
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "614F824219DB5ED3001DF1D4"
BuildableName = "C4.framework"
BlueprintName = "C4-iOS"
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
24 changes: 10 additions & 14 deletions C4.xcodeproj/xcshareddata/xcschemes/C4-tvOS.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1000"
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -27,6 +27,15 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "610A6A4D1F928E1B003B841A"
BuildableName = "C4.framework"
BlueprintName = "C4-tvOS"
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -39,17 +48,6 @@
</BuildableReference>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "610A6A4D1F928E1B003B841A"
BuildableName = "C4.framework"
BlueprintName = "C4-tvOS"
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -70,8 +68,6 @@
ReferencedContainer = "container:C4.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
4 changes: 2 additions & 2 deletions C4/Core/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,15 @@ public class Color {
public extension UIColor {
/// Initializes a UIColor object from a Color object.
/// - parameter color: The C4 color object.
public convenience init?(_ color: Color) {
convenience init?(_ color: Color) {
self.init(cgColor: color.cgColor)
}
}

public extension CIColor {
/// Initializes a CIColor object from a Color object.
/// - parameter color: The C4 color object.
public convenience init(_ color: Color) {
convenience init(_ color: Color) {
self.init(cgColor: color.cgColor)
}
}
2 changes: 1 addition & 1 deletion C4/Core/Point.swift
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ public func lerp(_ a: Point, _ b: Point, at: Double) -> Point {

public extension CGPoint {
///Initializes a CGPoint from a Point
public init(_ point: Point) {
init(_ point: Point) {
self.init(x: CGFloat(point.x), y: CGFloat(point.y))
}
}
2 changes: 1 addition & 1 deletion C4/Core/Rect.swift
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ public func inset(_ r: Rect, dx: Double, dy: Double) -> Rect {
// MARK: - Casting to CGRect
public extension CGRect {
/// Initializes a CGRect from a Rect
public init(_ rect: Rect) {
init(_ rect: Rect) {
self.init(origin: CGPoint(rect.origin), size: CGSize(rect.size))
}
}
2 changes: 1 addition & 1 deletion C4/Core/Size.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public func <= (lhs: Size, rhs: Size) -> Bool {
// MARK: - Casting to CGSize
public extension CGSize {
/// Initializes a new CGSize from a Size
public init(_ size: Size) {
init(_ size: Size) {
self.init(width: CGFloat(size.width), height: CGFloat(size.height))
}
}
2 changes: 1 addition & 1 deletion C4/UI/AudioPlayer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class AudioPlayer: NSObject, AVAudioPlayerDelegate {
/// ````
public init?(_ name: String) {
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
try AVAudioSession.sharedInstance().setCategory(.playback)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print("Couldn't set up AVAudioSession")
Expand Down
4 changes: 2 additions & 2 deletions C4/UI/Camera.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class Camera: View {
previewLayer.backgroundColor = clear.cgColor
previewLayer.videoGravity = AVLayerVideoGravity.resizeAspectFill

orientationObserver = on(event: NSNotification.Name.UIDeviceOrientationDidChange) { [unowned self] in
orientationObserver = on(event: UIDevice.orientationDidChangeNotification) { [unowned self] in
self.updateOrientation()
}
}
Expand Down Expand Up @@ -191,7 +191,7 @@ public class Camera: View {
return image
}

var orientation: UIImageOrientation
var orientation: UIImage.Orientation
let shouldFlip = position == .front

switch videoOrientation {
Expand Down
2 changes: 1 addition & 1 deletion C4/UI/Image+ColorAt.swift
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public extension Image {
/// let color = img.color(at: Point())
/// ````
/// - parameter at: a Point.
public func color(at point: Point) -> Color {
func color(at point: Point) -> Color {

guard bounds.contains(point) else {
print("Point is outside the image bounds")
Expand Down
4 changes: 2 additions & 2 deletions C4/UI/Movie.swift
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public class Movie: View {
/// - parameter filename: The name of the movie file included in your project.
public convenience init?(_ filename: String) {
do {
try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayback)
try AVAudioSession.sharedInstance().setCategory(.playback)
try AVAudioSession.sharedInstance().setActive(true)
} catch {
print("Couldn't set up AVAudioSession")
Expand Down Expand Up @@ -225,7 +225,7 @@ public class Movie: View {
print("The current movie's player is not properly initialized")
return
}
p.seek(to: CMTimeMake(0, 1))
p.seek(to: CMTimeMake(value: 0, timescale: 1))
p.pause()
}

Expand Down
Loading