diff --git a/LocationSimulation/LocationSimulation.xcodeproj/project.pbxproj b/LocationSimulation/LocationSimulation.xcodeproj/project.pbxproj index 5be3841..a21ff69 100644 --- a/LocationSimulation/LocationSimulation.xcodeproj/project.pbxproj +++ b/LocationSimulation/LocationSimulation.xcodeproj/project.pbxproj @@ -35,7 +35,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - C71FC5B71E22854500BE39F9 /* MapWalker.gpx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = MapWalker.gpx; path = "../../../Library/Developer/Xcode/DerivedData/MapWalker-caqqdihnumnnjbesioouqqyueiny/Build/Products/Debug/MapWalker.gpx"; sourceTree = ""; }; + C71FC5B71E22854500BE39F9 /* MapWalker.gpx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = MapWalker.gpx; path = "MapWalker.gpx"; sourceTree = ""; }; E1E0187B1D577842009EFBDF /* LocationSimulation.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LocationSimulation.app; sourceTree = BUILT_PRODUCTS_DIR; }; E1E0187E1D577842009EFBDF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E1E018801D577842009EFBDF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -216,6 +216,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -359,11 +360,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; }; name = Debug; @@ -401,10 +403,11 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.3; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; }; @@ -416,11 +419,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 9R4N7NTTLA; INFOPLIST_FILE = LocationSimulation/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapwalker.LocationSimulation; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -430,11 +433,11 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; DEVELOPMENT_TEAM = 9R4N7NTTLA; INFOPLIST_FILE = LocationSimulation/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 8.2; + IPHONEOS_DEPLOYMENT_TARGET = 18.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapwalker.LocationSimulation; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/LocationSimulation/LocationSimulation/AppDelegate.swift b/LocationSimulation/LocationSimulation/AppDelegate.swift index 0db36b8..4a4c7b4 100644 --- a/LocationSimulation/LocationSimulation/AppDelegate.swift +++ b/LocationSimulation/LocationSimulation/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/LocationSimulation/LocationSimulation/Assets.xcassets/AppIcon.appiconset/Contents.json b/LocationSimulation/LocationSimulation/Assets.xcassets/AppIcon.appiconset/Contents.json index 36d2c80..99174b9 100644 --- a/LocationSimulation/LocationSimulation/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/LocationSimulation/LocationSimulation/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -2,67 +2,92 @@ "images" : [ { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" + }, + { + "idiom" : "iphone", + "scale" : "2x", + "size" : "60x60" + }, + { + "idiom" : "iphone", + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "1x" + "scale" : "1x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "1x" + "scale" : "1x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "1x" + "scale" : "1x", + "size" : "76x76" }, { "idiom" : "ipad", - "size" : "76x76", - "scale" : "2x" + "scale" : "2x", + "size" : "76x76" + }, + { + "idiom" : "ipad", + "scale" : "2x", + "size" : "83.5x83.5" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/LocationSimulation/LocationSimulation/Base.lproj/Main.storyboard b/LocationSimulation/LocationSimulation/Base.lproj/Main.storyboard index b60491b..ba33d32 100644 --- a/LocationSimulation/LocationSimulation/Base.lproj/Main.storyboard +++ b/LocationSimulation/LocationSimulation/Base.lproj/Main.storyboard @@ -1,8 +1,10 @@ - - + + + - + + @@ -14,17 +16,17 @@ - + - - + @@ -33,6 +35,7 @@ + diff --git a/LocationSimulation/MapWalker.gpx b/LocationSimulation/MapWalker.gpx new file mode 100644 index 0000000..ca70685 --- /dev/null +++ b/LocationSimulation/MapWalker.gpx @@ -0,0 +1 @@ +Location of Taipei 101 gpxWP \ No newline at end of file diff --git a/MapWalker/MapWalker.xcodeproj/project.pbxproj b/MapWalker/MapWalker.xcodeproj/project.pbxproj index 2ae328c..c772ff9 100644 --- a/MapWalker/MapWalker.xcodeproj/project.pbxproj +++ b/MapWalker/MapWalker.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + B226C4712D3E813A00470988 /* MapWalker.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = MapWalker.entitlements; sourceTree = ""; }; E182A4851D571E55002C9180 /* MapWalker.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MapWalker.app; sourceTree = BUILT_PRODUCTS_DIR; }; E182A4881D571E55002C9180 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; E182A48A1D571E55002C9180 /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; @@ -107,6 +108,7 @@ E182A4871D571E55002C9180 /* MapWalker */ = { isa = PBXGroup; children = ( + B226C4712D3E813A00470988 /* MapWalker.entitlements */, E182A4881D571E55002C9180 /* AppDelegate.swift */, E182A48A1D571E55002C9180 /* ViewController.swift */, E182A4B81D57289B002C9180 /* WindowController.swift */, @@ -237,6 +239,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -427,12 +430,13 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MapWalker/MapWalker.entitlements; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = MapWalker/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapwalker.MapWalker; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -440,12 +444,13 @@ isa = XCBuildConfiguration; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CODE_SIGN_ENTITLEMENTS = MapWalker/MapWalker.entitlements; COMBINE_HIDPI_IMAGES = YES; INFOPLIST_FILE = MapWalker/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = com.mapwalker.MapWalker; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/MapWalker/MapWalker/MapWalker.entitlements b/MapWalker/MapWalker/MapWalker.entitlements new file mode 100644 index 0000000..19afff1 --- /dev/null +++ b/MapWalker/MapWalker/MapWalker.entitlements @@ -0,0 +1,10 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.files.user-selected.read-write + + + diff --git a/MapWalker/MapWalker/ViewController.swift b/MapWalker/MapWalker/ViewController.swift index a0ed0c1..04dc7ab 100644 --- a/MapWalker/MapWalker/ViewController.swift +++ b/MapWalker/MapWalker/ViewController.swift @@ -66,7 +66,7 @@ class ViewController: NSViewController, MKMapViewDelegate, CLLocationManagerDele makeGpxFile() let url = NSURL(fileURLWithPath: "MapWalker.gpx") let folderUrl = url.deletingLastPathComponent - NSWorkspace.shared().open(folderUrl!) + NSWorkspace.shared.open(folderUrl!) } func updateCamera(mapInitialized:Bool = true) { @@ -146,7 +146,7 @@ class ViewController: NSViewController, MKMapViewDelegate, CLLocationManagerDele self.postApplyGpxScriptTask() } catch { // do nothing - print("error writing file") + print("error writing file: \(error)") } makeGpxFileQueued = false }