diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 000000000..33914a896 Binary files /dev/null and b/.DS_Store differ diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Apps/.DS_Store b/Apps/.DS_Store new file mode 100644 index 000000000..5c7424329 Binary files /dev/null and b/Apps/.DS_Store differ diff --git a/Apps/OneBusAway/.DS_Store b/Apps/OneBusAway/.DS_Store new file mode 100644 index 000000000..22033d3a6 Binary files /dev/null and b/Apps/OneBusAway/.DS_Store differ diff --git a/Apps/OneBusAway/Assets.xcassets/.DS_Store b/Apps/OneBusAway/Assets.xcassets/.DS_Store new file mode 100644 index 000000000..3d538576f Binary files /dev/null and b/Apps/OneBusAway/Assets.xcassets/.DS_Store differ diff --git a/Apps/OneBusAway/Assets.xcassets/AppIcon 1.appiconset/Contents.json b/Apps/OneBusAway/Assets.xcassets/AppIcon 1.appiconset/Contents.json new file mode 100644 index 000000000..230588010 --- /dev/null +++ b/Apps/OneBusAway/Assets.xcassets/AppIcon 1.appiconset/Contents.json @@ -0,0 +1,35 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "dark" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + }, + { + "appearances" : [ + { + "appearance" : "luminosity", + "value" : "tinted" + } + ], + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Apps/OneBusAway/Assets.xcassets/AppIcon.appiconset/.DS_Store b/Apps/OneBusAway/Assets.xcassets/AppIcon.appiconset/.DS_Store new file mode 100644 index 000000000..c21d749e1 Binary files /dev/null and b/Apps/OneBusAway/Assets.xcassets/AppIcon.appiconset/.DS_Store differ diff --git a/OBAKit/Settings/MoreViewController.swift b/OBAKit/Settings/MoreViewController.swift index c6ad1e10f..ff1a52e8a 100644 --- a/OBAKit/Settings/MoreViewController.swift +++ b/OBAKit/Settings/MoreViewController.swift @@ -190,6 +190,17 @@ public class MoreViewController: UIViewController, comment: "Header for a section that shows the user information about this app.") return OBAListViewSection(id: "about", title: header, contents: [ + OBAListRowView.DefaultViewModel( + title: OBALoc( + "more_controller.tutorial_row_title", + value: "Tutorial", + comment: "A link to how to use the App"), + onSelectAction: { _ in + guard let url = Bundle.main.TutorialURL else { return } + let safari = SFSafariViewController(url: url) + self.application.viewRouter.present(safari, from: self) + }), + OBAListRowView.DefaultViewModel( title: OBALoc( "more_controller.credits_row_title", diff --git a/OBAKit/Strings/en.lproj/Localizable.strings b/OBAKit/Strings/en.lproj/Localizable.strings index 632c7abd6..687e1df9a 100644 --- a/OBAKit/Strings/en.lproj/Localizable.strings +++ b/OBAKit/Strings/en.lproj/Localizable.strings @@ -338,6 +338,9 @@ /* A link to the app's Privacy Policy */ "more_controller.privacy_row_title" = "Privacy Policy"; +/* A link to the app's Tutorial */ +"more_controller.tutorial_row_title" = "Tutorial"; + /* Title of the More tab */ "more_controller.title" = "More"; diff --git a/OBAKitCore/.DS_Store b/OBAKitCore/.DS_Store new file mode 100644 index 000000000..5df55aaf3 Binary files /dev/null and b/OBAKitCore/.DS_Store differ diff --git a/OBAKitCore/Extensions/FoundationExtensions.swift b/OBAKitCore/Extensions/FoundationExtensions.swift index 9ca811c08..b17e3262f 100644 --- a/OBAKitCore/Extensions/FoundationExtensions.swift +++ b/OBAKitCore/Extensions/FoundationExtensions.swift @@ -150,6 +150,15 @@ public extension Bundle { return URL(string: str) } + /// A helper method for accessing the bundle's Tutorial URL + var TutorialURL: URL? { + guard + let dict = OBAKitConfig, + let str = dict["TutorialURL"] as? String + else { return nil } + + return URL(string: str) + } var appDevelopersEmailAddress: String? { guard let dict = OBAKitConfig else { return nil } diff --git a/OBAKitCore/Models/.DS_Store b/OBAKitCore/Models/.DS_Store new file mode 100644 index 000000000..b8c02b713 Binary files /dev/null and b/OBAKitCore/Models/.DS_Store differ