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

Changes for Xcode 14, iOS 16, new devices #230

Merged
merged 11 commits into from
Nov 4, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
26 changes: 15 additions & 11 deletions OpenGpxTracker.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
0175ABFF23F014C7003323C3 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 0175AC0123F014C7003323C3 /* LaunchScreen.storyboard */; };
120DE71022B274910055C4CB /* GPXSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120DE70F22B274910055C4CB /* GPXSession.swift */; };
120DE71122B274A40055C4CB /* GPXSession.swift in Sources */ = {isa = PBXBuildFile; fileRef = 120DE70F22B274910055C4CB /* GPXSession.swift */; };
12491EA328D7057D009F6BE1 /* MKMapView+ConvenientOverlayInserts.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12491EA228D7057D009F6BE1 /* MKMapView+ConvenientOverlayInserts.swift */; };
12A1A44424D561AC0057ED7A /* CoreDataHelper+FetchRequests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12A1A44324D561AC0057ED7A /* CoreDataHelper+FetchRequests.swift */; };
4588D66B230D23AA009AA75F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4588D66D230D23AA009AA75F /* InfoPlist.strings */; };
4588D66F230D2476009AA75F /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 4588D671230D2476009AA75F /* InfoPlist.strings */; };
Expand Down Expand Up @@ -61,7 +62,7 @@
BF64602F220AE9CF00957FF6 /* GPXTrackSegment+MapKit.swift in Sources */ = {isa = PBXBuildFile; fileRef = 899D676B19CD9E9E00C88A0A /* GPXTrackSegment+MapKit.swift */; };
BF68ECC62448B887005C779F /* DateFieldTypeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF68ECC52448B887005C779F /* DateFieldTypeView.swift */; };
BF692F5D2209AAFB00F8A0F1 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BF692F5C2209AAFB00F8A0F1 /* Assets.xcassets */; };
BF692F642209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = BF692F632209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
BF692F642209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = BF692F632209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
BF692F692209AAFB00F8A0F1 /* InterfaceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF692F682209AAFB00F8A0F1 /* InterfaceController.swift */; };
BF692F6B2209AAFB00F8A0F1 /* ExtensionDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF692F6A2209AAFB00F8A0F1 /* ExtensionDelegate.swift */; };
BF692F6D2209AAFB00F8A0F1 /* ComplicationController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF692F6C2209AAFB00F8A0F1 /* ComplicationController.swift */; };
Expand Down Expand Up @@ -121,15 +122,15 @@
/* End PBXContainerItemProxy section */

/* Begin PBXCopyFilesBuildPhase section */
BF692F792209AAFC00F8A0F1 /* Embed App Extensions */ = {
BF692F792209AAFC00F8A0F1 /* Embed Foundation Extensions */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 13;
files = (
BF692F642209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex in Embed App Extensions */,
BF692F642209AAFB00F8A0F1 /* OpenGpxTracker-Watch Extension.appex in Embed Foundation Extensions */,
);
name = "Embed App Extensions";
name = "Embed Foundation Extensions";
runOnlyForDeploymentPostprocessing = 0;
};
BF692F7B2209AAFC00F8A0F1 /* Embed Watch Content */ = {
Expand All @@ -151,6 +152,7 @@
0175AC0523F01519003323C3 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
0175AC0723F01523003323C3 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/LaunchScreen.strings; sourceTree = "<group>"; };
120DE70F22B274910055C4CB /* GPXSession.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = GPXSession.swift; sourceTree = "<group>"; };
12491EA228D7057D009F6BE1 /* MKMapView+ConvenientOverlayInserts.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "MKMapView+ConvenientOverlayInserts.swift"; sourceTree = "<group>"; };
1262DD9624F9568F00B5C2EA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Interface.strings; sourceTree = "<group>"; };
1262DD9724F9568F00B5C2EA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/Localizable.strings; sourceTree = "<group>"; };
1262DD9824F9568F00B5C2EA /* nl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nl; path = nl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -330,6 +332,7 @@
895F04B31A7143CE004BEE8A /* GPXExtentCoordinates.swift */,
89F8749A1BBB7362004EF41A /* GPXTrack+length.swift */,
89F8749E1BBCB97F004EF41A /* GPXRoot+length.swift */,
BFE026C1244A01DB005423E6 /* UIInsetLabel.swift */,
89EA86602157A08E002E03A7 /* Date+timeAgo.swift */,
89EA86642157C444002E03A7 /* Int+asFilesize.swift */,
89EA86622157B42C002E03A7 /* GPXFileInfo.swift */,
Expand All @@ -340,9 +343,9 @@
BF15092123916FC100F51F1B /* UIColor+DarkMode.swift */,
BFB06F01244A037300AC0CDC /* UIColor+Keyboard.swift */,
BFE026BF244A0160005423E6 /* String+CountInstances.swift */,
BFE026C1244A01DB005423E6 /* UIInsetLabel.swift */,
BFE026C3244A0281005423E6 /* DateField.swift */,
BF9AE57D2410012700B103A0 /* DefaultDateFormat.swift */,
12491EA228D7057D009F6BE1 /* MKMapView+ConvenientOverlayInserts.swift */,
);
name = Models;
sourceTree = "<group>";
Expand Down Expand Up @@ -566,7 +569,7 @@
buildConfigurationList = BF692F7A2209AAFC00F8A0F1 /* Build configuration list for PBXNativeTarget "OpenGpxTracker-Watch" */;
buildPhases = (
BF692F552209AAF900F8A0F1 /* Resources */,
BF692F792209AAFC00F8A0F1 /* Embed App Extensions */,
BF692F792209AAFC00F8A0F1 /* Embed Foundation Extensions */,
DF47EB2F9EF82452477E687E /* Frameworks */,
);
buildRules = (
Expand Down Expand Up @@ -606,7 +609,7 @@
attributes = {
LastSwiftMigration = 0700;
LastSwiftUpdateCheck = 1010;
LastUpgradeCheck = 1330;
LastUpgradeCheck = 1400;
ORGANIZATIONNAME = "";
TargetAttributes = {
898EECD419C49B5800B4B207 = {
Expand Down Expand Up @@ -831,6 +834,7 @@
89F8749B1BBB7362004EF41A /* GPXTrack+length.swift in Sources */,
BF177EEA24D54F9200D5E021 /* CoreDataHelper+BatchDelete.swift in Sources */,
BFB06F02244A037300AC0CDC /* UIColor+Keyboard.swift in Sources */,
12491EA328D7057D009F6BE1 /* MKMapView+ConvenientOverlayInserts.swift in Sources */,
BFA3CE8222C23B2300A8B965 /* CoreDataAlertView.swift in Sources */,
899D678219D351DA00C88A0A /* AboutViewController.swift in Sources */,
89EA86612157A08E002E03A7 /* Date+timeAgo.swift in Sources */,
Expand Down Expand Up @@ -1059,7 +1063,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -1109,7 +1113,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -1128,7 +1132,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = OpenGpxTracker/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.8.0;
PRODUCT_BUNDLE_IDENTIFIER = org.merlos.OpenGpxTracker;
Expand All @@ -1149,7 +1153,7 @@
CODE_SIGN_IDENTITY = "iPhone Developer";
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = OpenGpxTracker/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.8.0;
PRODUCT_BUNDLE_IDENTIFIER = org.merlos.OpenGpxTracker;
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 = "1330"
LastUpgradeVersion = "1400"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -64,18 +64,16 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "32">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -84,27 +82,16 @@
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "32">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
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 = "1330"
LastUpgradeVersion = "1400"
version = "2.0">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -64,18 +64,16 @@
debugServiceExtension = "internal"
allowLocationSimulation = "YES"
launchAutomaticallySubstyle = "8">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand All @@ -84,27 +82,16 @@
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES"
launchAutomaticallySubstyle = "8">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
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 = "1330"
LastUpgradeVersion = "1400"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down Expand Up @@ -63,18 +63,16 @@
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
</BuildableProductRunnable>
<LocationScenarioReference
identifier = "Tokyo, Japan"
referenceType = "1">
Expand All @@ -86,27 +84,16 @@
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<RemoteRunnable
runnableDebuggingMode = "2"
BundleIdentifier = "com.apple.Carousel"
RemotePath = "/GPX Tracker">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</RemoteRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BF692F562209AAF900F8A0F1"
BuildableName = "OpenGpxTracker-Watch.app"
BlueprintName = "OpenGpxTracker-Watch"
ReferencedContainer = "container:OpenGpxTracker.xcodeproj">
</BuildableReference>
</MacroExpansion>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
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 = "1330"
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
7 changes: 6 additions & 1 deletion OpenGpxTracker/AboutViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ extension AboutViewController: WKNavigationDelegate {
print("AboutViewController: decidePolicyForNavigationAction")

if navigationAction.navigationType == .linkActivated {
UIApplication.shared.openURL(navigationAction.request.url!)
if #available(iOS 10, *) {
UIApplication.shared.open(navigationAction.request.url!)
}
else {
UIApplication.shared.openURL(navigationAction.request.url!)
}
print("AboutViewController: external link sent to Safari")

decisionHandler(.cancel)
Expand Down
16 changes: 11 additions & 5 deletions OpenGpxTracker/GPXMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,10 @@ class GPXMapView: MKMapView {
//First remove last overlay, then re-add the overlay updated with the new point
removeOverlay(currentSegmentOverlay)
currentSegmentOverlay = session.currentSegment.overlay
addOverlay(currentSegmentOverlay)

addOverlayOnTop(currentSegmentOverlay)

print("[OVERLAYS] \(overlays)")
extent.extendAreaToIncludeLocation(location.coordinate)
}

Expand Down Expand Up @@ -294,7 +297,7 @@ class GPXMapView: MKMapView {
//add tile server overlay
//by removing all overlays, tile server overlay is also removed. We need to add it back
if tileServer != .apple {
addOverlay(tileServerOverlay, level: .aboveLabels)
addOverlayOnBottom(tileServerOverlay)
}
}

Expand Down Expand Up @@ -340,7 +343,8 @@ class GPXMapView: MKMapView {
session.totalTrackedDistance += oneTrack.length
for segment in oneTrack.segments {
let overlay = segment.overlay
addOverlay(overlay)
//addOverlay(overlay)
addOverlayOnTop(overlay)
let segmentTrackpoints = segment.points
//add point to map extent
for waypoint in segmentTrackpoints {
Expand All @@ -361,7 +365,8 @@ class GPXMapView: MKMapView {
session.totalTrackedDistance += oneTrack.length
for segment in oneTrack.segments {
let overlay = segment.overlay
addOverlay(overlay)
//addOverlay(overlay)
addOverlayOnTop(overlay)

let segmentTrackpoints = segment.points
//add point to map extent
Expand All @@ -375,7 +380,8 @@ class GPXMapView: MKMapView {
for trackSegment in session.trackSegments {

let overlay = trackSegment.overlay
addOverlay(overlay)
//addOverlay(overlay)
addOverlayOnTop(overlay)

let segmentTrackpoints = trackSegment.points
//add point to map extent
Expand Down