From 0e5e99b6544869b0f68ef62d55b417e8cdb5ae13 Mon Sep 17 00:00:00 2001 From: Robbie Murray Date: Thu, 8 Feb 2024 19:54:40 +0000 Subject: [PATCH] iOS: Re-enable activities and update URLs --- apps/ios/GuideDogs.xcodeproj/project.pbxproj | 19 ++++++++----------- .../GuideDogs/Assets/PropertyLists/Info.plist | 2 +- .../AuthoredActivityMetadata.swift | 14 ++++++-------- .../Main Menu/MenuViewController.swift | 6 +++++- .../Home/HomeViewController.swift | 1 + 5 files changed, 21 insertions(+), 21 deletions(-) diff --git a/apps/ios/GuideDogs.xcodeproj/project.pbxproj b/apps/ios/GuideDogs.xcodeproj/project.pbxproj index 182f0ea8..bddb29a6 100644 --- a/apps/ios/GuideDogs.xcodeproj/project.pbxproj +++ b/apps/ios/GuideDogs.xcodeproj/project.pbxproj @@ -6472,7 +6472,7 @@ CODE_SIGN_ENTITLEMENTS = GuideDogs/Assets/PropertyLists/SoundscapeDF.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 15; DEVELOPMENT_TEAM = ""; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; ENABLE_BITCODE = NO; @@ -6503,7 +6503,7 @@ "$(inherited)", "$(PROJECT_DIR)/GuideDogs", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.0.2; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) -DADHOC"; PRODUCT_BUNDLE_IDENTIFIER = "services.soundscape-adhoc"; @@ -6758,7 +6758,7 @@ CODE_SIGN_ENTITLEMENTS = GuideDogs/Assets/PropertyLists/Soundscape.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 7; + CURRENT_PROJECT_VERSION = 15; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = X4H33NKGKY; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; @@ -6790,7 +6790,7 @@ "$(inherited)", "$(PROJECT_DIR)/GuideDogs", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.0.2; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) -DDEBUG"; PRODUCT_BUNDLE_IDENTIFIER = "services.soundscape-debug"; @@ -6817,11 +6817,9 @@ CLANG_STATIC_ANALYZER_MODE = deep; CODE_SIGN_ENTITLEMENTS = GuideDogs/Assets/PropertyLists/Soundscape.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 7; - DEVELOPMENT_TEAM = ""; - "DEVELOPMENT_TEAM[sdk=iphoneos*]" = X4H33NKGKY; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 15; + DEVELOPMENT_TEAM = X4H33NKGKY; EMBED_ASSET_PACKS_IN_PRODUCT_BUNDLE = YES; ENABLE_BITCODE = NO; FILE_SHARING_ENABLED = NO; @@ -6850,13 +6848,12 @@ "$(inherited)", "$(PROJECT_DIR)/GuideDogs", ); - MARKETING_VERSION = 1.0.0; + MARKETING_VERSION = 1.0.2; OTHER_LDFLAGS = "$(inherited)"; OTHER_SWIFT_FLAGS = "$(inherited) -DRELEASE"; PRODUCT_BUNDLE_IDENTIFIER = services.soundscape; PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = ""; - "PROVISIONING_PROFILE_SPECIFIER[sdk=iphoneos*]" = "match AppStore services.soundscape 1691940011"; RUN_CLANG_STATIC_ANALYZER = YES; SDKROOT = iphoneos; SWIFT_OBJC_BRIDGING_HEADER = "GuideDogs/Code/App/Soundscape-Bridging-Header.h"; diff --git a/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist b/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist index 51e2cc03..d6b176e9 100644 --- a/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist +++ b/apps/ios/GuideDogs/Assets/PropertyLists/Info.plist @@ -80,7 +80,7 @@ CFBundleSpokenName ${BUNDLE_SPOKEN_NAME} CFBundleVersion - 7 + ${CURRENT_PROJECT_VERSION} ITSAppUsesNonExemptEncryption LSApplicationCategoryType diff --git a/apps/ios/GuideDogs/Code/Data/Authored Activities/AuthoredActivityMetadata.swift b/apps/ios/GuideDogs/Code/Data/Authored Activities/AuthoredActivityMetadata.swift index bea9aae3..e7650de1 100644 --- a/apps/ios/GuideDogs/Code/Data/Authored Activities/AuthoredActivityMetadata.swift +++ b/apps/ios/GuideDogs/Code/Data/Authored Activities/AuthoredActivityMetadata.swift @@ -45,20 +45,18 @@ struct AuthoredActivityMetadata: Codable, CustomStringConvertible { } /// Builds the remote server path that the content can be downloaded from - /// E.G. https://share.openscape.io/experiences/some-activity.gpx + /// E.G. https://share.soundscape.services/experiences//activity.gpx var downloadPath: URL? { - var components = URLComponents() + var components = URLComponents() switch linkVersion { - case .v1: - components.scheme = "https" - components.host = "share.openscape.io" - components.path = "/experiences/\(id).gpx" case .v2, .v3: - // Version 2 and 3 links also look the same (perk of forking) components.scheme = "https" components.host = "share.soundscape.services" - components.path = "experiences/\(id).gpx" + components.path = "activities/\(id)/activity.gpx" + default: + // no other versions currently supported + break } return components.url diff --git a/apps/ios/GuideDogs/Code/Visual UI/Controls/Main Menu/MenuViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/Controls/Main Menu/MenuViewController.swift index 368b6585..436512e5 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/Controls/Main Menu/MenuViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/Controls/Main Menu/MenuViewController.swift @@ -10,11 +10,12 @@ import UIKit import SafariServices enum MenuItem { - case home, devices, help, settings, status, feedback, rate, share + case home, recreation, devices, help, settings, status, feedback, rate, share var localizedString: String { switch self { case .home: return GDLocalizedString("ui.menu.close") + case .recreation: return GDLocalizedString("menu.events") case .devices: return GDLocalizedString("menu.devices") case .help: return GDLocalizedString("menu.help_and_tutorials") case .settings: return GDLocalizedString("settings.screen_title") @@ -28,6 +29,7 @@ enum MenuItem { var accessibilityString: String { switch self { case .home: return GDLocalizedString("ui.menu.close") + case .recreation: return GDLocalizedString("menu.events") case .devices: return GDLocalizedString("menu.devices") case .help: return GDLocalizedString("menu.help_and_tutorials") case .settings: return GDLocalizedString("settings.screen_title") @@ -41,6 +43,7 @@ enum MenuItem { var icon: UIImage? { switch self { case .home: return UIImage(named: "ic_chevron_left_28px") + case .recreation: return UIImage(named: "nordic_walking_white_28dp") case .devices: return UIImage(named: "baseline-headset-28px") case .help: return UIImage(named: "ic_help_outline_28px") case .settings: return UIImage(named: "ic_settings_28px") @@ -61,6 +64,7 @@ class MenuViewController: UIViewController { override func loadView() { // Build views for menu items menuView.addMenuItem(.devices) + menuView.addMenuItem(.recreation) menuView.addMenuItem(.settings) menuView.addMenuItem(.help) menuView.addMenuItem(.feedback) diff --git a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/HomeViewController.swift b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/HomeViewController.swift index ef9a222d..a750177b 100644 --- a/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/HomeViewController.swift +++ b/apps/ios/GuideDogs/Code/Visual UI/View Controllers/Home/HomeViewController.swift @@ -38,6 +38,7 @@ class HomeViewController: UIViewController { /// - Returns: The segue associated with this menu item static func segue(for menuItem: MenuItem) -> String? { switch menuItem { + case .recreation: return Segue.showRecreationActivities case .devices: return Segue.showManageDevices case .help: return Segue.showHelp case .settings: return Segue.showSettings