Skip to content

Commit

Permalink
iOS: Re-enable activities and update URLs
Browse files Browse the repository at this point in the history
  • Loading branch information
RDMurray committed Feb 8, 2024
1 parent 369c881 commit 0e5e99b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
19 changes: 8 additions & 11 deletions apps/ios/GuideDogs.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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";
Expand All @@ -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;
Expand Down Expand Up @@ -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";
Expand Down
2 changes: 1 addition & 1 deletion apps/ios/GuideDogs/Assets/PropertyLists/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<key>CFBundleSpokenName</key>
<string>${BUNDLE_SPOKEN_NAME}</string>
<key>CFBundleVersion</key>
<string>7</string>
<string>${CURRENT_PROJECT_VERSION}</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSApplicationCategoryType</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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/<id>/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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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")
Expand All @@ -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")
Expand All @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0e5e99b

Please sign in to comment.