Skip to content

Commit

Permalink
Merge branch 'feature/release-prep' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcurylo committed Jul 29, 2019
2 parents a5ed788 + 79dec71 commit 99dd0fa
Show file tree
Hide file tree
Showing 218 changed files with 156,519 additions and 4,660 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ CVS

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/screenshots/*/*.png
fastlane/screenshots/screenshots.html
fastlane/test_output

# R.swift -- tool for resource reference generation
Expand Down
4 changes: 2 additions & 2 deletions .swiftlint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# references:
# https://github.com/realm/SwiftLint#configuration
#
# `swiftlint rules` last updated version 0.33.0
# `swiftlint rules` last updated version 0.34.0
#
# Disable an individual warning with [next|previous]:
# // swiftlint:disable:previous line_length
Expand Down Expand Up @@ -98,8 +98,8 @@ opt_in_rules:
- unneeded_parentheses_in_closure_argument
- unowned_variable_capture
- untyped_error_in_catch
- unused_declaration
- unused_import
- unused_private_declaration
- vertical_parameter_alignment_on_call
#- vertical_whitespace_between_cases
- vertical_whitespace_closing_braces
Expand Down
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,32 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Welcome to the MTP iOS app! I'm Alex, the lead mobile app developer for MTP.

Please delete any previous builds from your device and reinstall this version - the way place images are stored has changed so the app needs to reload all its place data for those to show up.

The best way to let us know about any problems or suggestions is in the TestFlight app you use to install the MTP app - a little down from the "Install" button you'll see a "Send Beta Feedback" button. That'll let you send us an email with information about your device attached, which will help us reproduce any problems you describe.

## [Version 1.0, Build 632] - 2019-07-29

### Added
- Double-tapping a Nearby cell will open More Info directly
- Includes place info data snapshot to deal with network problems during first launch
- Popup reminder to verify account

### Changed
- All place images now loaded from MTP
- Visited and Remaining buttons under maps are now their region colors
- Logout and Delete moved to Settings screen
- Displays message instead of rank 0 when account unverified
- Signup and Edit UI flows improved

### Fixed
- Swiping the Counts pages will not hide the Profile navigation bar
- Sharing the app on an iPad will not crash
- Loading location posts deals with missing authors
- Map marker display state refreshes when visited state toggled in callout
- Date pickers work correctly in all time zones and with Facebook dates
- Improved result handling of photo uploads

## [Version 1.0, Build 631] - 2019-07-21

### Added
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ GEM
danger
rake (> 10)
thor (~> 0.19)
danger-xcode_summary (0.5.0)
danger-xcode_summary (0.5.1)
danger-plugin-api (~> 1.0)
danger-xcov (0.4.1)
danger (>= 2.1)
Expand All @@ -97,7 +97,7 @@ GEM
dotenv (2.7.4)
emoji_regex (1.0.1)
escape (0.0.4)
excon (0.64.0)
excon (0.65.0)
faraday (0.15.4)
multipart-post (>= 1.2, < 3)
faraday-cookie_jar (0.0.6)
Expand All @@ -108,7 +108,7 @@ GEM
faraday_middleware (0.13.1)
faraday (>= 0.7.4, < 1.0)
fastimage (2.1.5)
fastlane (2.127.2)
fastlane (2.128.1)
CFPropertyList (>= 2.3, < 4.0.0)
addressable (>= 2.3, < 3.0.0)
babosa (>= 1.0.2, < 2.0.0)
Expand Down Expand Up @@ -221,7 +221,7 @@ GEM
os (1.0.1)
plist (3.5.0)
public_suffix (2.0.5)
rake (12.3.2)
rake (12.3.3)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
Expand Down
170 changes: 151 additions & 19 deletions MTP.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

93 changes: 93 additions & 0 deletions MTP.xcodeproj/xcshareddata/xcschemes/MTPScreenshots.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1030"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO"
useTestSelectionWhitelist = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA392BD720DF69F50026C828"
BuildableName = "MTPUITests.xctest"
BlueprintName = "MTPUITests"
ReferencedContainer = "container:MTP.xcodeproj">
</BuildableReference>
<SelectedTests>
<Test
Identifier = "SnapshotTests/test_Snapshots()">
</Test>
<Test
Identifier = "SnapshotTests/test_snapshot_Tabs()">
</Test>
</SelectedTests>
</TestableReference>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA392BB620DF69F30026C828"
BuildableName = "MTP.app"
BlueprintName = "MTP"
ReferencedContainer = "container:MTP.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA392BB620DF69F30026C828"
BuildableName = "MTP.app"
BlueprintName = "MTP"
ReferencedContainer = "container:MTP.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "FA392BB620DF69F30026C828"
BuildableName = "MTP.app"
BlueprintName = "MTP"
ReferencedContainer = "container:MTP.xcodeproj">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
4 changes: 2 additions & 2 deletions MTP/application/delegate/LaunchHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ extension LaunchHandler {
}
swiftyBeaver.addDestination(file)

if !UIApplication.isTesting {
if UIApplication.isProduction {
let platform = SBPlatformDestination(
appID: "YbnQz9",
appSecret: "qyictm2bUy3Kvqi0dUpgysuUayuuJ1Py",
Expand All @@ -116,7 +116,7 @@ extension LaunchHandler {
extension LaunchHandler {

func configureAppCenter() {
guard !UIApplication.isTesting else { return }
guard UIApplication.isProduction else { return }

MSAppCenter.start("20cb945f-58b9-4544-a059-424aa3b86820",
withServices: [MSAnalytics.self,
Expand Down
9 changes: 4 additions & 5 deletions MTP/application/delegate/LocationHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ private extension LocationHandler {
DispatchQueue.main.async {
self.distances = update.distances
self.distancesUpdating -= 1
self.note.checkTriggered()
self.note.checkPending()
}
}

Expand Down Expand Up @@ -273,10 +273,9 @@ final class DistancesOperation: KVNOperation {

#if INSTRUMENT_DISTANCE
let time = -start.timeIntervalSinceNow
let title = "Distances: \(references.count) in \(Int(time * 1_000)) ms"
print(title)
let body = ""
handler?.note.infoBackground(title: title, body: body)
let results = "Distances: \(references.count) in \(Int(time * 1_000)) ms"
ConsoleLoggingService().info(results)
handler?.note.postInfo(title: results, body: "")
#endif
}
}
45 changes: 32 additions & 13 deletions MTP/application/delegate/MTPDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,50 @@ final class MTPDelegate: RoutingAppDelegate {

enum Runtime {
case production
case testing
case uiTesting
case unitTesting
}

override var handlers: Handlers {
return runtimeHandlers
}

private var runtimeHandlers: Handlers = {
let runtime: Runtime = UIApplication.isUnitTesting ? .testing : .production
let runtime: Runtime
switch (UIApplication.isUITesting, UIApplication.isUnitTesting) {
case (true, _):
runtime = .uiTesting
case (_, true):
runtime = .unitTesting
default:
runtime = .production
}
return MTPDelegate.runtimeHandlers(for: runtime)
}()

static func runtimeHandlers(for runtime: Runtime) -> Handlers {
guard runtime == .production else {
return [ServiceHandlerSpy()]
switch runtime {
case .production:
return [
ServiceHandler(),
LaunchHandler(),
StateHandler(),
ActionHandler(),
NotificationsHandler(),
LocationHandler()
]
case .uiTesting:
return [
ServiceHandlerStub(),
LaunchHandler(),
StateHandler(),
ActionHandler(),
NotificationsHandler(),
LocationHandler()
]
case .unitTesting:
return [ ServiceHandlerSpy() ]
}

return [
ServiceHandler(),
LaunchHandler(),
StateHandler(),
ActionHandler(),
NotificationsHandler(),
LocationHandler()
]
}
}

Expand Down
29 changes: 29 additions & 0 deletions MTP/application/delegate/ServiceHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,35 @@ extension ServiceHandler: AppLaunchHandler {
}
}

struct ServiceHandlerStub: AppHandler { }

extension ServiceHandlerStub: AppLaunchHandler {

public func application(
_ application: UIApplication,
// swiftlint:disable:next discouraged_optional_collection
willFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {

// other services may log
ServiceProviderInstances.logServiceInstance = ConsoleLoggingService()

ServiceProviderInstances.appServiceInstance = UIApplication.shared
ServiceProviderInstances.dataServiceInstance = DataServiceStub()
ServiceProviderInstances.locServiceInstance = LocationServiceStub()
ServiceProviderInstances.netServiceInstance = NetworkServiceStub()
ServiceProviderInstances.noteServiceInstance = NotificationServiceStub()

return true
}

public func application(
_ application: UIApplication,
// swiftlint:disable:next discouraged_optional_collection
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
return true
}
}

struct ServiceHandlerSpy: AppHandler { }

// ServiceHandlerSpy+AppLaunchHandler in test target sets spy instances
19 changes: 17 additions & 2 deletions MTP/application/models/Checklist.swift
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ enum Checklist: Int, CaseIterable, ServiceProvider {
}

func milestone(visited: Int) -> String {
guard let settings = data.settings else { return "" }
return settings.milestone(list: self, count: visited)
guard let milestones = data.get(milestones: self) else { return "" }
return milestones.milestone(count: visited)
}

var isMappable: Bool {
Expand Down Expand Up @@ -528,3 +528,18 @@ extension Checklist {
return hierarchy.isSubtitled
}
}

extension ChecklistIndex {

init(list: Checklist) {
switch list {
case .locations: self = .locations
case .uncountries: self = .uncountries
case .whss: self = .whss
case .beaches: self = .beaches
case .golfcourses: self = .golfcourses
case .divesites: self = .divesites
case .restaurants: self = .restaurants
}
}
}
4 changes: 0 additions & 4 deletions MTP/application/models/Location.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ extension Location: PlaceInfo {
return self
}

var placeIsMappable: Bool {
return placeId != 0
}

var placeSubtitle: String {
return map?.subtitle ?? ""
}
Expand Down
Loading

0 comments on commit 99dd0fa

Please sign in to comment.