Skip to content

Commit

Permalink
Update to Xcode 10.2 & Swift 5 plus some fixes and improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Paweł Kania committed Apr 5, 2019
1 parent e16c582 commit 790b7da
Show file tree
Hide file tree
Showing 24 changed files with 286 additions and 189 deletions.
2 changes: 2 additions & 0 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ disabled_rules:
- type_name
- file_length
- fallthrough
- identifier_name
- cyclomatic_complexity

function_body_length:
- 100 # warning
Expand Down
Binary file modified PuzzleMaker.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion PuzzleMaker.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'PuzzleMaker'
s.version = '1.0.6'
s.version = '1.2.0'
s.license = 'MIT'
s.summary = 'Swift framework responsible for generating puzzles from the image'
s.homepage = 'https://github.com/PGSSoft/PuzzleMaker'
Expand Down
42 changes: 27 additions & 15 deletions PuzzleMaker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
objects = {

/* Begin PBXBuildFile section */
487E92E4225635BF00AAC84D /* Array+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 487E92E3225635BF00AAC84D /* Array+Extensions.swift */; };
48BAFF471D5CA4FC00AE346A /* PuzzleMakerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48BAFF461D5CA4FC00AE346A /* PuzzleMakerTests.swift */; };
48BAFF491D5CA4FC00AE346A /* PuzzleMaker.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 48DC7DCC1D59E3260024C008 /* PuzzleMaker.framework */; };
48BAFF511D5CA5C300AE346A /* image.png in Resources */ = {isa = PBXBuildFile; fileRef = 48BAFF501D5CA5C300AE346A /* image.png */; };
Expand All @@ -17,7 +18,6 @@
48DC7DDE1D59F01A0024C008 /* PuzzleUnit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DDD1D59F01A0024C008 /* PuzzleUnit.swift */; };
48DC7DE01D59F0330024C008 /* Segment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DDF1D59F0330024C008 /* Segment.swift */; };
48DC7DE21D59F04C0024C008 /* CubicBezierCurve.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DE11D59F04C0024C008 /* CubicBezierCurve.swift */; };
48DC7DE41D59F0740024C008 /* Double+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DE31D59F0740024C008 /* Double+Extensions.swift */; };
48DC7DE61D59F0880024C008 /* Bool+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DE51D59F0880024C008 /* Bool+Extensions.swift */; };
48DC7DE81D59F09A0024C008 /* UIImage+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DE71D59F09A0024C008 /* UIImage+Extensions.swift */; };
48DC7DEA1D59F0AE0024C008 /* UIBezierPath+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 48DC7DE91D59F0AE0024C008 /* UIBezierPath+Extensions.swift */; };
Expand All @@ -37,6 +37,7 @@

/* Begin PBXFileReference section */
481D07501D5A077E0099CEDF /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; name = README.md; path = ../README.md; sourceTree = "<group>"; };
487E92E3225635BF00AAC84D /* Array+Extensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Array+Extensions.swift"; sourceTree = "<group>"; };
48BAFF441D5CA4FC00AE346A /* PuzzleMakerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PuzzleMakerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
48BAFF461D5CA4FC00AE346A /* PuzzleMakerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PuzzleMakerTests.swift; sourceTree = "<group>"; };
48BAFF481D5CA4FC00AE346A /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
Expand All @@ -50,7 +51,6 @@
48DC7DDD1D59F01A0024C008 /* PuzzleUnit.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PuzzleUnit.swift; sourceTree = "<group>"; };
48DC7DDF1D59F0330024C008 /* Segment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Segment.swift; sourceTree = "<group>"; };
48DC7DE11D59F04C0024C008 /* CubicBezierCurve.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CubicBezierCurve.swift; sourceTree = "<group>"; };
48DC7DE31D59F0740024C008 /* Double+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Double+Extensions.swift"; sourceTree = "<group>"; };
48DC7DE51D59F0880024C008 /* Bool+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Bool+Extensions.swift"; sourceTree = "<group>"; };
48DC7DE71D59F09A0024C008 /* UIImage+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIImage+Extensions.swift"; sourceTree = "<group>"; };
48DC7DE91D59F0AE0024C008 /* UIBezierPath+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UIBezierPath+Extensions.swift"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -92,8 +92,8 @@
481D074B1D5A06D60099CEDF /* Foundation Extensions */ = {
isa = PBXGroup;
children = (
487E92E3225635BF00AAC84D /* Array+Extensions.swift */,
48DC7DE51D59F0880024C008 /* Bool+Extensions.swift */,
48DC7DE31D59F0740024C008 /* Double+Extensions.swift */,
48DC7DE91D59F0AE0024C008 /* UIBezierPath+Extensions.swift */,
48DC7DE71D59F09A0024C008 /* UIImage+Extensions.swift */,
);
Expand Down Expand Up @@ -225,15 +225,16 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 0910;
LastUpgradeCheck = 1020;
TargetAttributes = {
48BAFF431D5CA4FC00AE346A = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0910;
LastSwiftMigration = 1020;
ProvisioningStyle = Automatic;
};
48DC7DCB1D59E3260024C008 = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0910;
LastSwiftMigration = 1020;
};
};
};
Expand All @@ -242,6 +243,7 @@
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
English,
en,
);
mainGroup = 48DC7DBD1D59E1B80024C008;
Expand Down Expand Up @@ -308,7 +310,7 @@
48DC7DDA1D59EFB70024C008 /* PuzzleUnitFactory.swift in Sources */,
48DC7DEA1D59F0AE0024C008 /* UIBezierPath+Extensions.swift in Sources */,
48DC7DE01D59F0330024C008 /* Segment.swift in Sources */,
48DC7DE41D59F0740024C008 /* Double+Extensions.swift in Sources */,
487E92E4225635BF00AAC84D /* Array+Extensions.swift in Sources */,
48DC7DDE1D59F01A0024C008 /* PuzzleUnit.swift in Sources */,
48DC7DE21D59F04C0024C008 /* CubicBezierCurve.swift in Sources */,
48DC7DDC1D59EFF50024C008 /* PuzzleElement.swift in Sources */,
Expand Down Expand Up @@ -347,9 +349,12 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = "";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -373,10 +378,10 @@
ONLY_ACTIVE_ARCH = YES;
PRODUCT_BUNDLE_IDENTIFIER = com.PuzzleMakerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
};
name = Debug;
};
Expand All @@ -398,9 +403,12 @@
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Automatic;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
Expand All @@ -417,25 +425,28 @@
MTL_ENABLE_DEBUG_INFO = NO;
PRODUCT_BUNDLE_IDENTIFIER = com.PuzzleMakerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SDKROOT = iphoneos;
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
48DC7DC21D59E1B80024C008 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand All @@ -459,15 +470,18 @@
48DC7DC31D59E1B80024C008 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
Expand Down Expand Up @@ -541,8 +555,7 @@
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
Expand Down Expand Up @@ -595,8 +608,7 @@
PRODUCT_NAME = PuzzleMaker;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
SWIFT_VERSION = 4.0;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
VERSIONING_SYSTEM = "apple-generic";
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -26,8 +26,18 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
codeCoverageEnabled = "YES"
onlyGenerateCoverageForSpecifiedTargets = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<CodeCoverageTargets>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "48DC7DCB1D59E3260024C008"
BuildableName = "PuzzleMaker.framework"
BlueprintName = "PuzzleMaker iOS"
ReferencedContainer = "container:PuzzleMaker.xcodeproj">
</BuildableReference>
</CodeCoverageTargets>
<Testables>
<TestableReference
skipped = "NO">
Expand Down Expand Up @@ -56,7 +66,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0910"
LastUpgradeVersion = "1020"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -10,9 +10,8 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES"
codeCoverageEnabled = "YES">
codeCoverageEnabled = "YES"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
Expand All @@ -32,7 +31,6 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand Down
8 changes: 8 additions & 0 deletions PuzzleMaker.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Loading

0 comments on commit 790b7da

Please sign in to comment.