Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove iOS 11 support. #118

Merged
merged 8 commits into from
Sep 15, 2022
Merged
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
14 changes: 7 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
command: xcodebuild -sdk iphonesimulator -project MapboxStatic.xcodeproj -scheme 'MapboxStatic iOS' -destination 'platform=iOS Simulator,OS=<< parameters.iOS >>,name=<< parameters.device >>' clean build <<# parameters.test >>test<</ parameters.test >>
- run:
name: tvOS
command: xcodebuild -project MapboxStatic.xcodeproj -scheme 'MapboxStatic tvOS' -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p),OS=<< parameters.tvOS >>' clean build <<# parameters.test >>test <</ parameters.test >>
command: xcodebuild -project MapboxStatic.xcodeproj -scheme 'MapboxStatic tvOS' -destination 'platform=tvOS Simulator,name=Apple TV 4K (at 1080p) (2nd generation),OS=<< parameters.tvOS >>' clean build <<# parameters.test >>test <</ parameters.test >>
- run:
name: macOS
command: xcodebuild -project MapboxStatic.xcodeproj -scheme 'MapboxStatic Mac' clean build<<# parameters.test >> test <</ parameters.test >>
Expand All @@ -97,11 +97,11 @@ workflows:
workflow:
jobs:
- build-job:
name: "Xcode_12.0"
xcode: "12.0.0"
iOS: "14.0"
tvOS: "14.0"
watchOS: "7.0"
name: "Xcode_12.5.1"
xcode: "12.5.1"
iOS: "14.5"
tvOS: "14.5"
watchOS: "7.4"
- SPM-job:
name: "SPM"
xcode: "12.2.0"
xcode: "12.5.1"
2 changes: 1 addition & 1 deletion Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
github "AliSoftware/OHHTTPStubs" "9.1.0"
github "raphaelmor/Polyline" "v5.0.3"
github "raphaelmor/Polyline" "v5.1.0"
8 changes: 4 additions & 4 deletions MapboxStatic.swift.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ Pod::Spec.new do |s|
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

# When using multiple platforms
s.ios.deployment_target = "10.0"
s.osx.deployment_target = "10.12"
s.watchos.deployment_target = "3.0"
s.tvos.deployment_target = "10.0"
s.ios.deployment_target = "12.0"
s.osx.deployment_target = "10.14"
s.watchos.deployment_target = "5.0"
s.tvos.deployment_target = "12.0"

# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #

Expand Down
22 changes: 13 additions & 9 deletions MapboxStatic.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -674,7 +674,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0730;
LastUpgradeCheck = 1340;
LastUpgradeCheck = 1400;
ORGANIZATIONNAME = Mapbox;
TargetAttributes = {
DA20FB9A1CE3DEBB00B07762 = {
Expand Down Expand Up @@ -1069,6 +1069,7 @@
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
Expand Down Expand Up @@ -1099,6 +1100,7 @@
CODE_SIGN_IDENTITY = "";
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 10;
Expand Down Expand Up @@ -1127,6 +1129,7 @@
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "-";
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
INFOPLIST_FILE = Tests/MapboxStaticTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand All @@ -1145,6 +1148,7 @@
CLANG_ANALYZER_NONNULL = YES;
CODE_SIGN_IDENTITY = "-";
CURRENT_PROJECT_VERSION = 10;
DEAD_CODE_STRIPPING = YES;
INFOPLIST_FILE = Tests/MapboxStaticTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
Expand Down Expand Up @@ -1384,16 +1388,16 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.12;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 10.0;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
WATCHOS_DEPLOYMENT_TARGET = 5.0;
};
name = Debug;
};
Expand Down Expand Up @@ -1440,17 +1444,17 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MACOSX_DEPLOYMENT_TARGET = 10.12;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MACOSX_DEPLOYMENT_TARGET = 10.14;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_COMPILATION_MODE = wholemodule;
SWIFT_OPTIMIZATION_LEVEL = "-O";
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
TVOS_DEPLOYMENT_TARGET = 10.0;
TVOS_DEPLOYMENT_TARGET = 12.0;
VALIDATE_PRODUCT = YES;
WATCHOS_DEPLOYMENT_TARGET = 3.0;
WATCHOS_DEPLOYMENT_TARGET = 5.0;
};
name = Release;
};
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 = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1340"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
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 = "1340"
LastUpgradeVersion = "1400"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#117 would consolidate the schemes and targets, making future upgrades cleaner.

version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/raphaelmor/Polyline.git",
"state": {
"branch": null,
"revision": "554a15b15ff33cf6757f4cb693c5c285fe58694e",
"version": "5.0.3"
"revision": "353f80378dcd8f17eefe8550090c6b1ae3c9da23",
"version": "5.1.0"
}
}
]
Expand Down
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import PackageDescription
let package = Package(
name: "MapboxStatic",
platforms: [
.macOS(.v10_12), .iOS(.v10), .watchOS(.v3), .tvOS(.v12)
.macOS(.v10_14), .iOS(.v12), .watchOS(.v5), .tvOS(.v12)
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ v0.12.0 was the last version of MapboxStatic to support the [Legacy Static Image
## System requirements

* One of the following package managers:
* CocoaPods (CocoaPods 1.10 or above if using Xcode 12)
* CocoaPods 1.10 or above
* Carthage 0.19 or above (run [this script](https://github.com/mapbox/MapboxStatic.swift/blob/main/scripts/wcarthage.sh) instead of `carthage` if using Xcode 12)
* Swift Package Manager 5.3 or above
* Xcode 11 or above (Xcode 12 or above if using Swift Package Manager)
* Xcode 12.0 or above
* One of the following operating systems:
* iOS 10.0 or above
* macOS 10.12.0 or above
* tvOS 10.0 or above
* watchOS 3.0 or above
* iOS 12.0 or above
* macOS 10.14 or above
* tvOS 12.0 or above
* watchOS 5.0 or above

## Installation

Expand Down
2 changes: 1 addition & 1 deletion Sources/MapboxStatic/Color.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ extension Color {

let color: Color
#if os(OSX)
color = usingColorSpaceName(NSColorSpaceName.calibratedRGB)!
color = usingColorSpace(.deviceRGB)!
#else
color = self
#endif
Expand Down
23 changes: 3 additions & 20 deletions Sources/MapboxStatic/Overlay.swift
Original file line number Diff line number Diff line change
Expand Up @@ -393,27 +393,10 @@ open class Path: NSObject, Overlay {
extension JSONSerialization.WritingOptions {

static var sortedIfAvailable: JSONSerialization.WritingOptions {

#if DEBUG
#if os(OSX)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With minimum deployment targets increase these checks are no longer needed.

if #available(OSX 10.13, *) {
return [.sortedKeys]
}
#elseif os(iOS)
if #available(iOS 11.0, *) {
return [.sortedKeys]
}
#elseif os(tvOS)
if #available(tvOS 11.0, *) {
return [.sortedKeys]
}
#elseif os(watchOS)
if #available(watchOS 4.0, *) {
return [.sortedKeys]
}
#endif
#endif

return [.sortedKeys]
#else
return []
#endif
}
}