Skip to content
This repository was archived by the owner on Feb 2, 2022. It is now read-only.

Commit e7299a1

Browse files
authored
Merge pull request #60 from nodes-ios/develop
Added function for changing a query parameter in an URL
2 parents e41d930 + 714757c commit e7299a1

18 files changed

+1031
-91
lines changed

Codemine.xcodeproj/project.pbxproj

Lines changed: 49 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
42FB12162063D04900F850D1 /* URLSession+Codable.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42FB12122063D04900F850D1 /* URLSession+Codable.swift */; };
7878
838A0F971F03F57E00469143 /* String+HTML.swift in Sources */ = {isa = PBXBuildFile; fileRef = 838A0F961F03F57E00469143 /* String+HTML.swift */; };
7979
83A5BEBC1D981F3500C74312 /* UIImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEBB1D981F3500C74312 /* UIImageTests.swift */; };
80-
83A5BEBD1D98215F00C74312 /* UIImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEBB1D981F3500C74312 /* UIImageTests.swift */; };
8180
83A5BEBE1D98216000C74312 /* UIImageTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEBB1D981F3500C74312 /* UIImageTests.swift */; };
8281
83A5BEC01D98226800C74312 /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = 83A5BEBF1D98226800C74312 /* add.png */; };
8382
83A5BEC11D98226800C74312 /* add.png in Resources */ = {isa = PBXBuildFile; fileRef = 83A5BEBF1D98226800C74312 /* add.png */; };
@@ -88,6 +87,7 @@
8887
83A5BEC91D98249500C74312 /* URLImageAssetSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEC81D98249500C74312 /* URLImageAssetSizeTests.swift */; };
8988
83A5BECA1D98249500C74312 /* URLImageAssetSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEC81D98249500C74312 /* URLImageAssetSizeTests.swift */; };
9089
83A5BECB1D98249500C74312 /* URLImageAssetSizeTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83A5BEC81D98249500C74312 /* URLImageAssetSizeTests.swift */; };
90+
8C1D2FCE227C79BE00B9C72C /* NSURL+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 291272C81C75EE9A00FB1BBD /* NSURL+Utilities.swift */; };
9191
8C9AAA2F1F4ED1F000F9E7C9 /* URLParameterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C9AAA2E1F4ED1F000F9E7C9 /* URLParameterTests.swift */; };
9292
9F4A1BBE1F97AF0F00154997 /* XCTestCase+Utilities.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9F4A1BBD1F97AF0F00154997 /* XCTestCase+Utilities.swift */; };
9393
/* End PBXBuildFile section */
@@ -480,7 +480,7 @@
480480
isa = PBXProject;
481481
attributes = {
482482
LastSwiftUpdateCheck = 0730;
483-
LastUpgradeCheck = 0800;
483+
LastUpgradeCheck = 1020;
484484
ORGANIZATIONNAME = Nodes;
485485
TargetAttributes = {
486486
01CD40211D071BAE0044887E = {
@@ -500,11 +500,11 @@
500500
};
501501
275BCA9E1C57D1B500FF3647 = {
502502
CreatedOnToolsVersion = 7.2;
503-
LastSwiftMigration = 0800;
503+
LastSwiftMigration = 1010;
504504
};
505505
275BCAA81C57D1B500FF3647 = {
506506
CreatedOnToolsVersion = 7.2;
507-
LastSwiftMigration = 0800;
507+
LastSwiftMigration = 1010;
508508
};
509509
};
510510
};
@@ -513,6 +513,7 @@
513513
developmentRegion = English;
514514
hasScannedForEncodings = 0;
515515
knownRegions = (
516+
English,
516517
en,
517518
);
518519
mainGroup = 275BCA951C57D1B400FF3647;
@@ -603,6 +604,7 @@
603604
01CD408A1D071BDC0044887E /* NSError+Utilities.swift in Sources */,
604605
42FB12142063D04900F850D1 /* URLSession+Codable.swift in Sources */,
605606
01CD40651D071BCB0044887E /* Operators.swift in Sources */,
607+
8C1D2FCE227C79BE00B9C72C /* NSURL+Utilities.swift in Sources */,
606608
01CD40871D071BDC0044887E /* String+EmailValidation.swift in Sources */,
607609
01CD40621D071BCB0044887E /* Application.swift in Sources */,
608610
01CD40861D071BDC0044887E /* String+Range.swift in Sources */,
@@ -613,7 +615,6 @@
613615
isa = PBXSourcesBuildPhase;
614616
buildActionMask = 2147483647;
615617
files = (
616-
83A5BEBD1D98215F00C74312 /* UIImageTests.swift in Sources */,
617618
83A5BECA1D98249500C74312 /* URLImageAssetSizeTests.swift in Sources */,
618619
);
619620
runOnlyForDeploymentPostprocessing = 0;
@@ -749,7 +750,7 @@
749750
PRODUCT_NAME = Codemine;
750751
SDKROOT = macosx;
751752
SKIP_INSTALL = YES;
752-
SWIFT_VERSION = 3.0;
753+
SWIFT_VERSION = 4.2;
753754
};
754755
name = Debug;
755756
};
@@ -773,7 +774,7 @@
773774
SDKROOT = macosx;
774775
SKIP_INSTALL = YES;
775776
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
776-
SWIFT_VERSION = 3.0;
777+
SWIFT_VERSION = 4.2;
777778
};
778779
name = Release;
779780
};
@@ -789,6 +790,7 @@
789790
PRODUCT_BUNDLE_IDENTIFIER = "com.nodes.Codemine-MacTests";
790791
PRODUCT_NAME = "$(TARGET_NAME)";
791792
SDKROOT = macosx;
793+
SWIFT_VERSION = 4.2;
792794
};
793795
name = Debug;
794796
};
@@ -804,13 +806,15 @@
804806
PRODUCT_BUNDLE_IDENTIFIER = "com.nodes.Codemine-MacTests";
805807
PRODUCT_NAME = "$(TARGET_NAME)";
806808
SDKROOT = macosx;
809+
SWIFT_VERSION = 4.2;
807810
};
808811
name = Release;
809812
};
810813
01CD40501D071BB50044887E /* Debug */ = {
811814
isa = XCBuildConfiguration;
812815
buildSettings = {
813816
CLANG_ANALYZER_NONNULL = YES;
817+
CODE_SIGN_IDENTITY = "";
814818
DEFINES_MODULE = YES;
815819
DYLIB_COMPATIBILITY_VERSION = 1;
816820
DYLIB_CURRENT_VERSION = 1;
@@ -822,7 +826,7 @@
822826
PRODUCT_NAME = Codemine;
823827
SDKROOT = appletvos;
824828
SKIP_INSTALL = YES;
825-
SWIFT_VERSION = 3.0;
829+
SWIFT_VERSION = 4.2;
826830
TARGETED_DEVICE_FAMILY = 3;
827831
TVOS_DEPLOYMENT_TARGET = 9.0;
828832
};
@@ -832,6 +836,7 @@
832836
isa = XCBuildConfiguration;
833837
buildSettings = {
834838
CLANG_ANALYZER_NONNULL = YES;
839+
CODE_SIGN_IDENTITY = "";
835840
DEFINES_MODULE = YES;
836841
DYLIB_COMPATIBILITY_VERSION = 1;
837842
DYLIB_CURRENT_VERSION = 1;
@@ -844,7 +849,7 @@
844849
SDKROOT = appletvos;
845850
SKIP_INSTALL = YES;
846851
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
847-
SWIFT_VERSION = 3.0;
852+
SWIFT_VERSION = 4.2;
848853
TARGETED_DEVICE_FAMILY = 3;
849854
TVOS_DEPLOYMENT_TARGET = 9.0;
850855
};
@@ -859,6 +864,7 @@
859864
PRODUCT_BUNDLE_IDENTIFIER = "com.nodes.Codemine-tvOSTests";
860865
PRODUCT_NAME = "$(TARGET_NAME)";
861866
SDKROOT = appletvos;
867+
SWIFT_VERSION = 4.2;
862868
TVOS_DEPLOYMENT_TARGET = 9.2;
863869
};
864870
name = Debug;
@@ -872,6 +878,7 @@
872878
PRODUCT_BUNDLE_IDENTIFIER = "com.nodes.Codemine-tvOSTests";
873879
PRODUCT_NAME = "$(TARGET_NAME)";
874880
SDKROOT = appletvos;
881+
SWIFT_VERSION = 4.2;
875882
TVOS_DEPLOYMENT_TARGET = 9.2;
876883
};
877884
name = Release;
@@ -881,6 +888,7 @@
881888
buildSettings = {
882889
APPLICATION_EXTENSION_API_ONLY = YES;
883890
CLANG_ANALYZER_NONNULL = YES;
891+
CODE_SIGN_IDENTITY = "";
884892
DEFINES_MODULE = YES;
885893
DYLIB_COMPATIBILITY_VERSION = 1;
886894
DYLIB_CURRENT_VERSION = 1;
@@ -892,7 +900,7 @@
892900
PRODUCT_NAME = Codemine;
893901
SDKROOT = watchos;
894902
SKIP_INSTALL = YES;
895-
SWIFT_VERSION = 3.0;
903+
SWIFT_VERSION = 4.2;
896904
TARGETED_DEVICE_FAMILY = 4;
897905
WATCHOS_DEPLOYMENT_TARGET = 2.0;
898906
};
@@ -903,6 +911,7 @@
903911
buildSettings = {
904912
APPLICATION_EXTENSION_API_ONLY = YES;
905913
CLANG_ANALYZER_NONNULL = YES;
914+
CODE_SIGN_IDENTITY = "";
906915
DEFINES_MODULE = YES;
907916
DYLIB_COMPATIBILITY_VERSION = 1;
908917
DYLIB_CURRENT_VERSION = 1;
@@ -915,7 +924,7 @@
915924
SDKROOT = watchos;
916925
SKIP_INSTALL = YES;
917926
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
918-
SWIFT_VERSION = 3.0;
927+
SWIFT_VERSION = 4.2;
919928
TARGETED_DEVICE_FAMILY = 4;
920929
WATCHOS_DEPLOYMENT_TARGET = 2.0;
921930
};
@@ -925,18 +934,27 @@
925934
isa = XCBuildConfiguration;
926935
buildSettings = {
927936
ALWAYS_SEARCH_USER_PATHS = NO;
937+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
928938
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
929939
CLANG_CXX_LIBRARY = "libc++";
930940
CLANG_ENABLE_MODULES = YES;
931941
CLANG_ENABLE_OBJC_ARC = YES;
942+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
932943
CLANG_WARN_BOOL_CONVERSION = YES;
944+
CLANG_WARN_COMMA = YES;
933945
CLANG_WARN_CONSTANT_CONVERSION = YES;
946+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
934947
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
935948
CLANG_WARN_EMPTY_BODY = YES;
936949
CLANG_WARN_ENUM_CONVERSION = YES;
937950
CLANG_WARN_INFINITE_RECURSION = YES;
938951
CLANG_WARN_INT_CONVERSION = YES;
952+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
953+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
954+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
939955
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
956+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
957+
CLANG_WARN_STRICT_PROTOTYPES = YES;
940958
CLANG_WARN_SUSPICIOUS_MOVE = YES;
941959
CLANG_WARN_UNREACHABLE_CODE = YES;
942960
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -976,18 +994,27 @@
976994
isa = XCBuildConfiguration;
977995
buildSettings = {
978996
ALWAYS_SEARCH_USER_PATHS = NO;
997+
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
979998
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
980999
CLANG_CXX_LIBRARY = "libc++";
9811000
CLANG_ENABLE_MODULES = YES;
9821001
CLANG_ENABLE_OBJC_ARC = YES;
1002+
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
9831003
CLANG_WARN_BOOL_CONVERSION = YES;
1004+
CLANG_WARN_COMMA = YES;
9841005
CLANG_WARN_CONSTANT_CONVERSION = YES;
1006+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
9851007
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
9861008
CLANG_WARN_EMPTY_BODY = YES;
9871009
CLANG_WARN_ENUM_CONVERSION = YES;
9881010
CLANG_WARN_INFINITE_RECURSION = YES;
9891011
CLANG_WARN_INT_CONVERSION = YES;
1012+
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
1013+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
1014+
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
9901015
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
1016+
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
1017+
CLANG_WARN_STRICT_PROTOTYPES = YES;
9911018
CLANG_WARN_SUSPICIOUS_MOVE = YES;
9921019
CLANG_WARN_UNREACHABLE_CODE = YES;
9931020
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
@@ -1009,6 +1036,7 @@
10091036
MACOSX_DEPLOYMENT_TARGET = 10.10;
10101037
MTL_ENABLE_DEBUG_INFO = NO;
10111038
SDKROOT = iphoneos;
1039+
SWIFT_COMPILATION_MODE = wholemodule;
10121040
TARGETED_DEVICE_FAMILY = "1,2";
10131041
VALIDATE_PRODUCT = YES;
10141042
VERSIONING_SYSTEM = "apple-generic";
@@ -1021,6 +1049,7 @@
10211049
buildSettings = {
10221050
APPLICATION_EXTENSION_API_ONLY = YES;
10231051
CLANG_ENABLE_MODULES = YES;
1052+
CODE_SIGN_IDENTITY = "";
10241053
DEFINES_MODULE = YES;
10251054
DYLIB_COMPATIBILITY_VERSION = 1;
10261055
DYLIB_CURRENT_VERSION = 1;
@@ -1032,7 +1061,8 @@
10321061
PRODUCT_NAME = "$(TARGET_NAME)";
10331062
SKIP_INSTALL = YES;
10341063
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
1035-
SWIFT_VERSION = 4.0;
1064+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1065+
SWIFT_VERSION = 4.2;
10361066
};
10371067
name = Debug;
10381068
};
@@ -1041,6 +1071,7 @@
10411071
buildSettings = {
10421072
APPLICATION_EXTENSION_API_ONLY = YES;
10431073
CLANG_ENABLE_MODULES = YES;
1074+
CODE_SIGN_IDENTITY = "";
10441075
DEFINES_MODULE = YES;
10451076
DYLIB_COMPATIBILITY_VERSION = 1;
10461077
DYLIB_CURRENT_VERSION = 1;
@@ -1052,7 +1083,8 @@
10521083
PRODUCT_NAME = "$(TARGET_NAME)";
10531084
SKIP_INSTALL = YES;
10541085
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1055-
SWIFT_VERSION = 4.0;
1086+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1087+
SWIFT_VERSION = 4.2;
10561088
};
10571089
name = Release;
10581090
};
@@ -1063,7 +1095,8 @@
10631095
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
10641096
PRODUCT_BUNDLE_IDENTIFIER = com.nodes.CodemineTests;
10651097
PRODUCT_NAME = "$(TARGET_NAME)";
1066-
SWIFT_VERSION = 3.0;
1098+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1099+
SWIFT_VERSION = 4.2;
10671100
};
10681101
name = Debug;
10691102
};
@@ -1075,7 +1108,8 @@
10751108
PRODUCT_BUNDLE_IDENTIFIER = com.nodes.CodemineTests;
10761109
PRODUCT_NAME = "$(TARGET_NAME)";
10771110
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
1078-
SWIFT_VERSION = 3.0;
1111+
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
1112+
SWIFT_VERSION = 4.2;
10791113
};
10801114
name = Release;
10811115
};

Codemine.xcodeproj/xcshareddata/xcschemes/Codemine-Mac.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Codemine.xcodeproj/xcshareddata/xcschemes/Codemine-tvOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Codemine.xcodeproj/xcshareddata/xcschemes/Codemine-watchOS.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"

Codemine.xcodeproj/xcshareddata/xcschemes/Codemine.xcscheme

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0800"
3+
LastUpgradeVersion = "1020"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -26,8 +26,7 @@
2626
buildConfiguration = "Debug"
2727
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
2828
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
29-
shouldUseLaunchSchemeArgsEnv = "YES"
30-
codeCoverageEnabled = "NO">
29+
shouldUseLaunchSchemeArgsEnv = "YES">
3130
<Testables>
3231
<TestableReference
3332
skipped = "NO">

Codemine/Extensions/CGRect+Utilities.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import CoreGraphics
1111

1212
public extension CGRect {
1313
/// Getter & Setter for a `CGRect`'s `origin.y`
14-
public var y: CGFloat {
14+
var y: CGFloat {
1515
set {
1616
self = CGRect(origin: CGPoint(x: origin.x, y: newValue), size: size)
1717
}
@@ -21,7 +21,7 @@ public extension CGRect {
2121
}
2222

2323
/// Getter & Setter for a `CGRect`s `origin.x`
24-
public var x: CGFloat {
24+
var x: CGFloat {
2525
set {
2626
self = CGRect(origin: CGPoint(x: newValue, y: origin.y), size: size)
2727
}
@@ -35,7 +35,7 @@ public extension CGRect {
3535

3636
- returns: a new CGRect with the width and height reversed to those of the current one
3737
*/
38-
public var reversingSize: CGRect {
38+
var reversingSize: CGRect {
3939
return CGRect(origin: origin, size: CGSize(width: height, height: width))
4040
}
4141
}

0 commit comments

Comments
 (0)