diff --git a/ios/SAPTracker/src/xcode/SAPTracker.xcodeproj/project.pbxproj b/ios/SAPTracker/src/xcode/SAPTracker.xcodeproj/project.pbxproj index 2004a0c1b41..a7138f1a7f0 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker.xcodeproj/project.pbxproj +++ b/ios/SAPTracker/src/xcode/SAPTracker.xcodeproj/project.pbxproj @@ -282,14 +282,12 @@ 7F4D2F541A1C8EE50038E7D1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 7F4D2F531A1C8EE50038E7D1 /* Images.xcassets */; }; 7F83F15619F154F000C53328 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F83F15519F154F000C53328 /* AppDelegate.swift */; }; 7F83F15819F154F000C53328 /* HomeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F83F15719F154F000C53328 /* HomeViewController.swift */; }; - 7F83F15B19F154F000C53328 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 7F83F15919F154F000C53328 /* Main.storyboard */; }; 7F83F16C19F154F000C53328 /* SAPTrackerAPITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F83F16B19F154F000C53328 /* SAPTrackerAPITests.swift */; }; 7F83F17619F1574700C53328 /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7F83F17519F1574700C53328 /* CoreLocation.framework */; }; 7F87CAA11A2CCE8B0076C617 /* OpenSans-Bold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F87CA9D1A2CCE8B0076C617 /* OpenSans-Bold.ttf */; }; 7F87CAA21A2CCE8B0076C617 /* OpenSans-Light.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F87CA9E1A2CCE8B0076C617 /* OpenSans-Light.ttf */; }; 7F87CAA31A2CCE8B0076C617 /* OpenSans-Regular.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F87CA9F1A2CCE8B0076C617 /* OpenSans-Regular.ttf */; }; 7F87CAA41A2CCE8B0076C617 /* OpenSans-Semibold.ttf in Resources */ = {isa = PBXBuildFile; fileRef = 7F87CAA01A2CCE8B0076C617 /* OpenSans-Semibold.ttf */; }; - 7F87DDDB1A97339300704AC4 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7F87DDDD1A97339300704AC4 /* Localizable.strings */; }; 7F87DDE01A973C7400704AC4 /* eula-ios.html in Resources */ = {isa = PBXBuildFile; fileRef = 7F87DDE21A973C7400704AC4 /* eula-ios.html */; }; 7F8B8D3F1A37356C00C34B88 /* TrackingPageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8D3E1A37356C00C34B88 /* TrackingPageViewController.swift */; }; 7F8B8D411A373B0200C34B88 /* SpeedViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8B8D401A373B0200C34B88 /* SpeedViewController.swift */; }; @@ -310,6 +308,7 @@ 9ECBDDAE1C9C4F0300F76AEB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 9ECBDDAD1C9C4F0300F76AEB /* LaunchScreen.storyboard */; }; C84936181D40D295000F30E8 /* GPSFixController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C84936171D40D295000F30E8 /* GPSFixController.swift */; }; C84936291D47645F000F30E8 /* HomeViewRegattaTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C84936281D47645F000F30E8 /* HomeViewRegattaTableViewCell.swift */; }; + C852914F1D48FB91009E9A9D /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = C85291511D48FB91009E9A9D /* Localizable.strings */; }; C852BAA21CF5E1EA0093B0C5 /* RequestManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = C852BAA11CF5E1EA0093B0C5 /* RequestManager.swift */; }; C852BAAB1CF736680093B0C5 /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = C852BAAA1CF736680093B0C5 /* Preferences.swift */; }; C8603D511C52892A002B2F28 /* Acknowledgements.markdown in Resources */ = {isa = PBXBuildFile; fileRef = C8603D491C528832002B2F28 /* Acknowledgements.markdown */; }; @@ -330,12 +329,14 @@ C8739E181D2BF2DC00A89F3C /* BaseData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8739E171D2BF2DC00A89F3C /* BaseData.swift */; }; C8739E1C1D2D5F1700A89F3C /* LocationData.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8739E1B1D2D5F1700A89F3C /* LocationData.swift */; }; C89C5FC51D06A289002AAAD2 /* GradientView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FC41D06A289002AAAD2 /* GradientView.swift */; }; - C89C5FCA1D06CECD002AAAD2 /* StatusTrackingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FC91D06CECD002AAAD2 /* StatusTrackingTableViewCell.swift */; }; - C89C5FCC1D06CF0C002AAAD2 /* GPSAccuracyTrackingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCB1D06CF0C002AAAD2 /* GPSAccuracyTrackingTableViewCell.swift */; }; - C89C5FCE1D06CF26002AAAD2 /* CachedFixesTrackingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCD1D06CF26002AAAD2 /* CachedFixesTrackingTableViewCell.swift */; }; - C89C5FD01D06CF46002AAAD2 /* ModeTrackingTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCF1D06CF46002AAAD2 /* ModeTrackingTableViewCell.swift */; }; + C89C5FCA1D06CECD002AAAD2 /* TrackingViewStatusCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FC91D06CECD002AAAD2 /* TrackingViewStatusCell.swift */; }; + C89C5FCC1D06CF0C002AAAD2 /* TrackingViewGPSAccuracyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCB1D06CF0C002AAAD2 /* TrackingViewGPSAccuracyCell.swift */; }; + C89C5FCE1D06CF26002AAAD2 /* TrackingViewGPSFixesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCD1D06CF26002AAAD2 /* TrackingViewGPSFixesCell.swift */; }; + C89C5FD01D06CF46002AAAD2 /* TrackingViewModeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89C5FCF1D06CF46002AAAD2 /* TrackingViewModeCell.swift */; }; C8A4400B1C18153600DF70A0 /* Settings.bundle in Resources */ = {isa = PBXBuildFile; fileRef = C8A4400A1C18153600DF70A0 /* Settings.bundle */; }; C8BBAC791C52649E004CA551 /* LicenseViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8BBAC781C52649E004CA551 /* LicenseViewController.swift */; }; + C8D5E81D1D479FA800DA0D61 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = C8D5E81C1D479FA800DA0D61 /* Main.storyboard */; }; + C8F1B1E11D488B6D004C3379 /* Translation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F1B1E01D488B6D004C3379 /* Translation.swift */; }; EEB2FC8E79793611ABC022B9 /* libPods-SAPTrackerTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = CDE153BDE8C83E9A084A24F1 /* libPods-SAPTrackerTests.a */; }; /* End PBXBuildFile section */ @@ -673,7 +674,6 @@ 7F83F15419F154F000C53328 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7F83F15519F154F000C53328 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7F83F15719F154F000C53328 /* HomeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HomeViewController.swift; sourceTree = ""; }; - 7F83F15A19F154F000C53328 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 7F83F16519F154F000C53328 /* SAPTrackerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SAPTrackerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 7F83F16A19F154F000C53328 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 7F83F16B19F154F000C53328 /* SAPTrackerAPITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SAPTrackerAPITests.swift; sourceTree = ""; }; @@ -682,8 +682,6 @@ 7F87CA9E1A2CCE8B0076C617 /* OpenSans-Light.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-Light.ttf"; sourceTree = ""; }; 7F87CA9F1A2CCE8B0076C617 /* OpenSans-Regular.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-Regular.ttf"; sourceTree = ""; }; 7F87CAA01A2CCE8B0076C617 /* OpenSans-Semibold.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; path = "OpenSans-Semibold.ttf"; sourceTree = ""; }; - 7F87DDDC1A97339300704AC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; - 7F87DDDF1A9733B200704AC4 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = ""; }; 7F87DDE11A973C7400704AC4 /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = Base; path = "Base.lproj/eula-ios.html"; sourceTree = ""; }; 7F87DDE31A973C7900704AC4 /* de */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = de; path = "de.lproj/eula-ios.html"; sourceTree = ""; }; 7F8B8D3E1A37356C00C34B88 /* TrackingPageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingPageViewController.swift; sourceTree = ""; }; @@ -705,10 +703,10 @@ B1229BB88872CD20C0AE25DE /* libPods-SAPTracker.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SAPTracker.a"; sourceTree = BUILT_PRODUCTS_DIR; }; C84936171D40D295000F30E8 /* GPSFixController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GPSFixController.swift; sourceTree = ""; }; C84936281D47645F000F30E8 /* HomeViewRegattaTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeViewRegattaTableViewCell.swift; sourceTree = ""; }; + C85291501D48FB91009E9A9D /* Base */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = Base; path = Base.lproj/Localizable.strings; sourceTree = ""; }; C852BAA11CF5E1EA0093B0C5 /* RequestManager.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RequestManager.swift; sourceTree = ""; }; C852BAAA1CF736680093B0C5 /* Preferences.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = ""; }; C8603D491C528832002B2F28 /* Acknowledgements.markdown */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = net.daringfireball.markdown; path = Acknowledgements.markdown; sourceTree = ""; }; - C8739D891D21276B00A89F3C /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Main.strings; sourceTree = ""; }; C8739D9A1D25317100A89F3C /* CoreData 2.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "CoreData 2.xcdatamodel"; sourceTree = ""; }; C8739DFA1D2AA2A500A89F3C /* Regatta+CoreDataProperties.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Regatta+CoreDataProperties.swift"; sourceTree = ""; }; C8739DFB1D2AA2A500A89F3C /* Regatta.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Regatta.swift; sourceTree = ""; }; @@ -727,13 +725,15 @@ C8739E171D2BF2DC00A89F3C /* BaseData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BaseData.swift; sourceTree = ""; }; C8739E1B1D2D5F1700A89F3C /* LocationData.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LocationData.swift; sourceTree = ""; }; C89C5FC41D06A289002AAAD2 /* GradientView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GradientView.swift; sourceTree = ""; }; - C89C5FC91D06CECD002AAAD2 /* StatusTrackingTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StatusTrackingTableViewCell.swift; sourceTree = ""; }; - C89C5FCB1D06CF0C002AAAD2 /* GPSAccuracyTrackingTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GPSAccuracyTrackingTableViewCell.swift; sourceTree = ""; }; - C89C5FCD1D06CF26002AAAD2 /* CachedFixesTrackingTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CachedFixesTrackingTableViewCell.swift; sourceTree = ""; }; - C89C5FCF1D06CF46002AAAD2 /* ModeTrackingTableViewCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ModeTrackingTableViewCell.swift; sourceTree = ""; }; + C89C5FC91D06CECD002AAAD2 /* TrackingViewStatusCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingViewStatusCell.swift; sourceTree = ""; }; + C89C5FCB1D06CF0C002AAAD2 /* TrackingViewGPSAccuracyCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingViewGPSAccuracyCell.swift; sourceTree = ""; }; + C89C5FCD1D06CF26002AAAD2 /* TrackingViewGPSFixesCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingViewGPSFixesCell.swift; sourceTree = ""; }; + C89C5FCF1D06CF46002AAAD2 /* TrackingViewModeCell.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TrackingViewModeCell.swift; sourceTree = ""; }; C8A4400A1C18153600DF70A0 /* Settings.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = Settings.bundle; sourceTree = ""; }; C8B31F771B68DAD400C8A809 /* Pods.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Pods.xcodeproj; path = Pods/Pods.xcodeproj; sourceTree = ""; }; C8BBAC781C52649E004CA551 /* LicenseViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = LicenseViewController.swift; sourceTree = ""; }; + C8D5E81C1D479FA800DA0D61 /* Main.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = Main.storyboard; sourceTree = ""; }; + C8F1B1E01D488B6D004C3379 /* Translation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Translation.swift; sourceTree = ""; }; CDE153BDE8C83E9A084A24F1 /* libPods-SAPTrackerTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SAPTrackerTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -1122,16 +1122,17 @@ 7F83F15319F154F000C53328 /* Supporting Files */ = { isa = PBXGroup; children = ( + C85291511D48FB91009E9A9D /* Localizable.strings */, + C8D5E81C1D479FA800DA0D61 /* Main.storyboard */, 9ECBDDAD1C9C4F0300F76AEB /* LaunchScreen.storyboard */, - 7F83F15919F154F000C53328 /* Main.storyboard */, 7F4D2F531A1C8EE50038E7D1 /* Images.xcassets */, - 7F87DDDD1A97339300704AC4 /* Localizable.strings */, 7FD9D3021A1236080058FEAD /* Extensions.swift */, 9E95C3D51C723AB30016632B /* Constants.swift */, C8603D491C528832002B2F28 /* Acknowledgements.markdown */, 7F83F15419F154F000C53328 /* Info.plist */, 7F03FD3F19FA4D7400FA1327 /* bridge.h */, C8A4400A1C18153600DF70A0 /* Settings.bundle */, + C8F1B1E01D488B6D004C3379 /* Translation.swift */, ); name = "Supporting Files"; sourceTree = ""; @@ -1260,10 +1261,10 @@ C89C5FC81D06CEA0002AAAD2 /* Cells */ = { isa = PBXGroup; children = ( - C89C5FC91D06CECD002AAAD2 /* StatusTrackingTableViewCell.swift */, - C89C5FCB1D06CF0C002AAAD2 /* GPSAccuracyTrackingTableViewCell.swift */, - C89C5FCD1D06CF26002AAAD2 /* CachedFixesTrackingTableViewCell.swift */, - C89C5FCF1D06CF46002AAAD2 /* ModeTrackingTableViewCell.swift */, + C89C5FC91D06CECD002AAAD2 /* TrackingViewStatusCell.swift */, + C89C5FCB1D06CF0C002AAAD2 /* TrackingViewGPSAccuracyCell.swift */, + C89C5FCD1D06CF26002AAAD2 /* TrackingViewGPSFixesCell.swift */, + C89C5FCF1D06CF46002AAAD2 /* TrackingViewModeCell.swift */, ); name = Cells; sourceTree = ""; @@ -1368,6 +1369,7 @@ TargetAttributes = { 7F83F14F19F154F000C53328 = { CreatedOnToolsVersion = 6.0.1; + DevelopmentTeam = RRE8EFVCE3; }; 7F83F16419F154F000C53328 = { CreatedOnToolsVersion = 6.0.1; @@ -1529,7 +1531,6 @@ 7F14A15E1A13B9A6001C1ECB /* ER.png in Resources */, 7F14A12F1A13B9A6001C1ECB /* BB.png in Resources */, 7F14A13B1A13B9A6001C1ECB /* BR.png in Resources */, - 7F83F15B19F154F000C53328 /* Main.storyboard in Resources */, 7F14A1E01A13B9A6001C1ECB /* SH.png in Resources */, 7F14A1261A13B9A6001C1ECB /* AQ.png in Resources */, 7F14A1A41A13B9A6001C1ECB /* MA.png in Resources */, @@ -1538,7 +1539,6 @@ 7F14A1351A13B9A6001C1ECB /* BI.png in Resources */, 7F14A1BB1A13B9A6001C1ECB /* NA.png in Resources */, 7F14A1B71A13B9A6001C1ECB /* MW.png in Resources */, - 7F87DDDB1A97339300704AC4 /* Localizable.strings in Resources */, 7F14A1711A13B9A6001C1ECB /* GN.png in Resources */, 7F14A19C1A13B9A6001C1ECB /* LICENSE.txt in Resources */, 7F14A18C1A13B9A6001C1ECB /* JP.png in Resources */, @@ -1603,6 +1603,7 @@ 7F14A1561A13B9A6001C1ECB /* DK.png in Resources */, 7F14A18B1A13B9A6001C1ECB /* JO.png in Resources */, 7F14A1441A13B9A6001C1ECB /* CF.png in Resources */, + C852914F1D48FB91009E9A9D /* Localizable.strings in Resources */, 7F14A1BC1A13B9A6001C1ECB /* NC.png in Resources */, 7F14A1FA1A13B9A6001C1ECB /* TV.png in Resources */, 7F14A1EA1A13B9A6001C1ECB /* SV.png in Resources */, @@ -1641,6 +1642,7 @@ 7F14A1FC1A13B9A6001C1ECB /* TZ.png in Resources */, 7F14A1A91A13B9A6001C1ECB /* MG.png in Resources */, 7F4D2F541A1C8EE50038E7D1 /* Images.xcassets in Resources */, + C8D5E81D1D479FA800DA0D61 /* Main.storyboard in Resources */, 7F14A1D51A13B9A6001C1ECB /* QA.png in Resources */, 7F14A10A1A13B9A6001C1ECB /* _abkhazia.png in Resources */, 7F14A1851A13B9A6001C1ECB /* IQ.png in Resources */, @@ -1863,7 +1865,7 @@ C8739E0C1D2AA2A500A89F3C /* Event+CoreDataProperties.swift in Sources */, C8739E071D2AA2A500A89F3C /* GPSFix.swift in Sources */, 7F44095B19F65B5B0021BF22 /* CoreData.xcdatamodeld in Sources */, - C89C5FD01D06CF46002AAAD2 /* ModeTrackingTableViewCell.swift in Sources */, + C89C5FD01D06CF46002AAAD2 /* TrackingViewModeCell.swift in Sources */, 7F1B66F91A0CDCF600904A41 /* BatteryManager.swift in Sources */, 7FA6551A19F6661900A1B92D /* CoreDataManager.swift in Sources */, C852BAA21CF5E1EA0093B0C5 /* RequestManager.swift in Sources */, @@ -1871,9 +1873,9 @@ 7F23F0881A1A3DEF00F03F1C /* CheckInController.swift in Sources */, C84936291D47645F000F30E8 /* HomeViewRegattaTableViewCell.swift in Sources */, 7F2C605A19F160E400C32D93 /* LocationManager.swift in Sources */, - C89C5FCC1D06CF0C002AAAD2 /* GPSAccuracyTrackingTableViewCell.swift in Sources */, + C89C5FCC1D06CF0C002AAAD2 /* TrackingViewGPSAccuracyCell.swift in Sources */, C8739E041D2AA2A500A89F3C /* Regatta+CoreDataProperties.swift in Sources */, - C89C5FCA1D06CECD002AAAD2 /* StatusTrackingTableViewCell.swift in Sources */, + C89C5FCA1D06CECD002AAAD2 /* TrackingViewStatusCell.swift in Sources */, C8739E051D2AA2A500A89F3C /* Regatta.swift in Sources */, 7F8B8D3F1A37356C00C34B88 /* TrackingPageViewController.swift in Sources */, C84936181D40D295000F30E8 /* GPSFixController.swift in Sources */, @@ -1888,12 +1890,13 @@ C89C5FC51D06A289002AAAD2 /* GradientView.swift in Sources */, C852BAAB1CF736680093B0C5 /* Preferences.swift in Sources */, 7F0658FD19F7D6700077FF95 /* ScanViewController.swift in Sources */, + C8F1B1E11D488B6D004C3379 /* Translation.swift in Sources */, C8739E061D2AA2A500A89F3C /* GPSFix+CoreDataProperties.swift in Sources */, 7F193A8F1A39ACF500D71773 /* TimerViewController.swift in Sources */, C8739E181D2BF2DC00A89F3C /* BaseData.swift in Sources */, 7F83F15619F154F000C53328 /* AppDelegate.swift in Sources */, 7F950A911A35E967003C8C5C /* LeaderboardViewController.swift in Sources */, - C89C5FCE1D06CF26002AAAD2 /* CachedFixesTrackingTableViewCell.swift in Sources */, + C89C5FCE1D06CF26002AAAD2 /* TrackingViewGPSFixesCell.swift in Sources */, C8739E0B1D2AA2A500A89F3C /* Competitor.swift in Sources */, 7F0658FF19F7EE910077FF95 /* RegattaData.swift in Sources */, 7F193A911A39E54600D71773 /* GPSAccuracyView.swift in Sources */, @@ -1919,24 +1922,6 @@ /* End PBXTargetDependency section */ /* Begin PBXVariantGroup section */ - 7F83F15919F154F000C53328 /* Main.storyboard */ = { - isa = PBXVariantGroup; - children = ( - 7F83F15A19F154F000C53328 /* Base */, - C8739D891D21276B00A89F3C /* de */, - ); - name = Main.storyboard; - sourceTree = ""; - }; - 7F87DDDD1A97339300704AC4 /* Localizable.strings */ = { - isa = PBXVariantGroup; - children = ( - 7F87DDDC1A97339300704AC4 /* Base */, - 7F87DDDF1A9733B200704AC4 /* de */, - ); - name = Localizable.strings; - sourceTree = ""; - }; 7F87DDE21A973C7400704AC4 /* eula-ios.html */ = { isa = PBXVariantGroup; children = ( @@ -1946,6 +1931,14 @@ name = "eula-ios.html"; sourceTree = ""; }; + C85291511D48FB91009E9A9D /* Localizable.strings */ = { + isa = PBXVariantGroup; + children = ( + C85291501D48FB91009E9A9D /* Base */, + ); + name = Localizable.strings; + sourceTree = ""; + }; /* End PBXVariantGroup section */ /* Begin XCBuildConfiguration section */ diff --git a/ios/SAPTracker/src/xcode/SAPTracker/AboutViewController.swift b/ios/SAPTracker/src/xcode/SAPTracker/AboutViewController.swift index db29b75d7fa..8df63f0533c 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/AboutViewController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/AboutViewController.swift @@ -10,28 +10,42 @@ import Foundation class AboutViewController: UIViewController { - @IBOutlet weak var textView: UITextView! - @IBOutlet weak var versionDescriptionLabel: UILabel! + @IBOutlet weak var partnershipTextView: UITextView! + @IBOutlet weak var licenseInformationButton: UIButton! + @IBOutlet weak var termsButton: UIButton! + @IBOutlet weak var versionTitleLabel: UILabel! @IBOutlet weak var versionLabel: UILabel! override func viewDidLoad() { - super.viewDidLoad(); + super.viewDidLoad() + setup() + } + + override func viewDidLayoutSubviews() { + partnershipTextView.scrollRectToVisible(CGRect(x: 0, y: 0, width: 1, height: 1), animated: false) + } + + // MARK: - Setup + + private func setup() { + setupLocalization() setupNavigationBar() setupVersion() } - - override func viewDidLayoutSubviews() { - textView.scrollRectToVisible(CGRect(x: 0, y: 0, width: 1, height: 1), animated: false) - } - // MARK: - Setups + private func setupLocalization() { + navigationItem.title = Translation.AboutView.Title.String + partnershipTextView.text = Translation.AboutView.PartnershipTextView.Text.String + licenseInformationButton.setTitle(Translation.LicenseView.Title.String, forState: .Normal) + termsButton.setTitle(Translation.AboutView.TermsButton.Title.String, forState: .Normal) + versionTitleLabel.text = Translation.AboutView.VersionTitleLabel.Text.String + } private func setupNavigationBar() { navigationItem.leftBarButtonItem = UIBarButtonItem(customView: UIImageView(image: UIImage(named: "sap_logo"))) } private func setupVersion() { - versionDescriptionLabel.text = NSLocalizedString("Version", comment: "") versionLabel.text = NSBundle.mainBundle().infoDictionary?["CFBundleVersion"] as? String ?? "-" } diff --git a/ios/SAPTracker/src/xcode/SAPTracker/AppDelegate.swift b/ios/SAPTracker/src/xcode/SAPTracker/AppDelegate.swift index 78c4b72aef0..af5266ec1f3 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/AppDelegate.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/AppDelegate.swift @@ -18,11 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Initialize core data, migrate database if needed, or delete if migration needed but not possible CoreDataManager.sharedManager - - // Setup - setupAFNetworking() - setupNavigationBarApperance() - setupPageControlApperance() + setup() return true } @@ -55,7 +51,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate { CoreDataManager.sharedManager.saveContext() } - // MARK: - Setups + // MARK: - Setup + + private func setup() { + setupAFNetworking() + setupNavigationBarApperance() + setupPageControlApperance() + } private func setupAFNetworking() { AFNetworkActivityIndicatorManager.sharedManager().enabled = true diff --git a/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Localizable.strings b/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Localizable.strings index 9b465fc998b..ad541711103 100644 Binary files a/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Localizable.strings and b/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Localizable.strings differ diff --git a/ios/SAPTracker/src/xcode/SAPTracker/BatteryManager.swift b/ios/SAPTracker/src/xcode/SAPTracker/BatteryManager.swift index 4e60e2689c1..308ea7fb239 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/BatteryManager.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/BatteryManager.swift @@ -9,11 +9,16 @@ import Foundation class BatteryManager: NSObject { - + struct BatteryLevel { static let Min: Float = 0.2 } + struct SendingInterval { + static let Normal: NSTimeInterval = 3 + static let BatterySaving: NSTimeInterval = 30 + } + private let device: UIDevice! class var sharedManager: BatteryManager { @@ -26,11 +31,15 @@ class BatteryManager: NSObject { override init() { device = UIDevice.currentDevice() super.init() - setupDevice() + setup() } // MARK: - Setup + private func setup() { + setupDevice() + } + private func setupDevice() { device.batteryMonitoringEnabled = true } @@ -38,6 +47,8 @@ class BatteryManager: NSObject { // MARK: - Properties var batterySaving: Bool { get { return Preferences.batterySaving || forceBatterySaving() } } + + var sendingPeriod: NSTimeInterval { get { return batterySaving ? SendingInterval.BatterySaving : SendingInterval.Normal } } // MARK: - Helper diff --git a/ios/SAPTracker/src/xcode/SAPTracker/CheckInController.swift b/ios/SAPTracker/src/xcode/SAPTracker/CheckInController.swift index d687d38f9b2..005a7cfe368 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/CheckInController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/CheckInController.swift @@ -40,13 +40,14 @@ class CheckInController : NSObject { } private func checkInSuccess(regattaData: RegattaData, completion: (withSuccess: Bool) -> Void) { - let alertController = UIAlertController(title: regattaData.welcomeString, message: nil, preferredStyle: .Alert) - let okTitle = NSLocalizedString("OK", comment: "") - let okAction = UIAlertAction(title: okTitle, style: .Default) { (action) in + let alertController = UIAlertController(title: String(format: Translation.CheckInController.WelcomeAlert.Title.String, regattaData.competitorData.name), + message: String(format: Translation.CheckInController.WelcomeAlert.Message.String, regattaData.competitorData.sailID), + preferredStyle: .Alert + ) + let okAction = UIAlertAction(title: Translation.Common.OK.String, style: .Default) { (action) in self.postCheckIn(regattaData, completion: completion) } - let cancelTitle = NSLocalizedString("Cancel", comment: "") - let cancelAction = UIAlertAction(title: cancelTitle, style: .Cancel) { (action) in + let cancelAction = UIAlertAction(title: Translation.CheckInController.WelcomeAlert.CancelAction.Title.String, style: .Cancel) { (action) in self.checkInDidFinish(withSuccess: false, completion: completion) } alertController.addAction(okAction) @@ -56,8 +57,7 @@ class CheckInController : NSObject { private func checkInFailure(title: String, error: NSError, completion: (withSuccess: Bool) -> Void) { let alertController = UIAlertController(title: title, message: error.localizedDescription, preferredStyle: .Alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "") - let cancelAction = UIAlertAction(title: cancelTitle, style: .Cancel) { (action) in + let cancelAction = UIAlertAction(title: Translation.Common.Cancel.String, style: .Cancel) { (action) in self.checkInDidFinish(withSuccess: false, completion: completion) } alertController.addAction(cancelAction) @@ -95,10 +95,11 @@ class CheckInController : NSObject { } private func postCheckInFailure(regattaData: RegattaData, error: AnyObject, completion: (withSuccess: Bool) -> Void) { - let alertTitle = String(format:NSLocalizedString("Couldn't check-in to %@", comment: ""), regattaData.leaderboardName) - let alertController = UIAlertController(title: alertTitle, message: error.localizedDescription, preferredStyle: .Alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "") - let cancelAction = UIAlertAction(title: cancelTitle, style: .Cancel) { (action) in + let alertController = UIAlertController(title: Translation.Common.Error.String, + message: Translation.CheckInController.PostCheckInFailureAlert.Message.String, + preferredStyle: .Alert + ) + let cancelAction = UIAlertAction(title: Translation.Common.Cancel.String, style: .Cancel) { (action) in self.checkInDidFinish(withSuccess: false, completion: completion) } alertController.addAction(cancelAction) @@ -114,5 +115,5 @@ class CheckInController : NSObject { private func showCheckInAlert(alertController: UIAlertController) { self.delegate?.showCheckInAlert(self, alertController: alertController) } - + } \ No newline at end of file diff --git a/ios/SAPTracker/src/xcode/SAPTracker/Constants.swift b/ios/SAPTracker/src/xcode/SAPTracker/Constants.swift index d227106f3b5..a6a345cdf1f 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/Constants.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/Constants.swift @@ -8,6 +8,10 @@ import Foundation +struct Application { + static let Title = "SAP Sail InSight" +} + struct URLs { static let EULA = NSURL(string: "http://www.sapsailing.com/EULA_iOS_SailingBoatTracker.html")! } @@ -32,4 +36,4 @@ struct Images { static let GreenHighlighted = UIImage(color: Colors.GreenHighlighted) static let Red = UIImage(color: Colors.Red) static let RedHighlighted = UIImage(color: Colors.RedHighlighted) -} \ No newline at end of file +} diff --git a/ios/SAPTracker/src/xcode/SAPTracker/CourseViewController.swift b/ios/SAPTracker/src/xcode/SAPTracker/CourseViewController.swift index fe5a12c0d70..b418df01871 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/CourseViewController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/CourseViewController.swift @@ -12,22 +12,32 @@ class CourseViewController: UIViewController { private let defaultCourseText = "- °" + @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var courseLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() - self.setupCourseLabel(-1.0) - self.subscribeForNotifications() - } - - deinit { - self.unsubscribeFromNotifications() + setup() + subscribeForNotifications() } - // MARK: - Setups + deinit { + unsubscribeFromNotifications() + } + + // MARK: - Setup + + private func setup() { + setupCourseLabel(-1.0) + setupLocalization() + } private func setupCourseLabel(course: Double) { - self.courseLabel.text = course < 0 ? defaultCourseText : String(format: "%.0f °", course) + courseLabel.text = course < 0 ? defaultCourseText : String(format: "%.0f °", course) + } + + private func setupLocalization() { + titleLabel.text = Translation.CourseView.TitleLabel.Text.String } // MARK: - Notifications @@ -47,14 +57,14 @@ class CourseViewController: UIViewController { NSNotificationCenter.defaultCenter().removeObserver(self) } - func locationManagerUpdated(notification: NSNotification) { + @objc private func locationManagerUpdated(notification: NSNotification) { dispatch_async(dispatch_get_main_queue(), { guard let locationData = notification.userInfo?[LocationManager.UserInfo.LocationData] as? LocationData else { return } self.setupCourseLabel(locationData.location.course) }) } - func locationManagerFailed(notification: NSNotification) { + @objc private func locationManagerFailed(notification: NSNotification) { dispatch_async(dispatch_get_main_queue(), { self.setupCourseLabel(-1.0) }) diff --git a/ios/SAPTracker/src/xcode/SAPTracker/GPSAccuracyView.swift b/ios/SAPTracker/src/xcode/SAPTracker/GPSAccuracyView.swift index b493243e93e..87cb35544d5 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/GPSAccuracyView.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/GPSAccuracyView.swift @@ -29,7 +29,7 @@ class GPSAccuracyView : UIView { } private func initialize() { - setups() + setup() subscribeForNotifications() } @@ -37,9 +37,9 @@ class GPSAccuracyView : UIView { unsubscribeFromNotifications() } - // MARK: - Setups + // MARK: - Setup - private func setups() { + private func setup() { setupBarView() setupBackroundColor() } @@ -72,14 +72,14 @@ class GPSAccuracyView : UIView { NSNotificationCenter.defaultCenter().removeObserver(self) } - func locationManagerUpdated(notification: NSNotification) { + @objc private func locationManagerUpdated(notification: NSNotification) { dispatch_async(dispatch_get_main_queue(), { guard let locationData = notification.userInfo?[LocationManager.UserInfo.LocationData] as? LocationData else { return } self.drawBar(locationData.location.horizontalAccuracy) }) } - func locationManagerFailed(notification: NSNotification) { + @objc private func locationManagerFailed(notification: NSNotification) { dispatch_async(dispatch_get_main_queue(), { self.drawBar(-1.0) }) diff --git a/ios/SAPTracker/src/xcode/SAPTracker/GPSFixController.swift b/ios/SAPTracker/src/xcode/SAPTracker/GPSFixController.swift index 5e6f2e67305..2ca13c2a13c 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/GPSFixController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/GPSFixController.swift @@ -19,21 +19,20 @@ class GPSFixController: NSObject { } struct GPSFixSending { - // FIXME: - Change me back to 1000 - static let SliceSize = 10 + static let SliceSize = 1000 } enum Mode: String { case BatterySaving case Error - case Online case Offline + case Online var description: String { switch self { - case .BatterySaving: return NSLocalizedString("Battery Saving", comment: "") - case .Error: return NSLocalizedString("Error", comment: "") - case .Offline: return NSLocalizedString("Offline", comment: "") - case .Online: return NSLocalizedString("Online", comment: "") + case .BatterySaving: return Translation.GPSFixController.Mode.BatterySaving.String + case .Error: return Translation.GPSFixController.Mode.Error.String + case .Offline: return Translation.GPSFixController.Mode.Offline.String + case .Online: return Translation.GPSFixController.Mode.Online.String } } } diff --git a/ios/SAPTracker/src/xcode/SAPTracker/HomeViewController.swift b/ios/SAPTracker/src/xcode/SAPTracker/HomeViewController.swift index 1c6f994a96c..c0eae3ca775 100755 --- a/ios/SAPTracker/src/xcode/SAPTracker/HomeViewController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/HomeViewController.swift @@ -11,6 +11,12 @@ import CoreData class HomeViewController: UIViewController { + private struct Segue { + static let About = "About" + static let Scan = "Scan" + static let Settings = "Settings" + } + @IBOutlet weak var titleLabel: UILabel! @IBOutlet weak var tableView: UITableView! @IBOutlet weak var scanCodeButton: UIButton! @@ -19,7 +25,7 @@ class HomeViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() - setups() + setup() } override func viewDidAppear(animated: Bool) { @@ -33,11 +39,11 @@ class HomeViewController: UIViewController { unsubscribeFromNewCheckInURLNotifications() } - // MARK: - Setups + // MARK: - Setup - private func setups() { + private func setup() { setupButtons() - setupLanguage() + setupLocalization() setupNavigationBar() setupTableView() setupTableViewDataSource() @@ -48,12 +54,12 @@ class HomeViewController: UIViewController { noCodeButton.setBackgroundImage(Images.GrayHighlighted, forState: .Highlighted) } - private func setupLanguage() { - navigationItem.title = NSLocalizedString("Header", comment: "") - titleLabel.text = NSLocalizedString("Your Regattas", comment: "") - scanCodeButton.setTitle(NSLocalizedString("Scan Code", comment: ""), forState: .Normal) - noCodeButton.setTitle(NSLocalizedString("No Code", comment: ""), forState: .Normal) - infoCodeLabel.text = NSLocalizedString("QR found", comment: "") + private func setupLocalization() { + navigationItem.title = Application.Title + titleLabel.text = Translation.HomeView.TableView.Title.String + scanCodeButton.setTitle(Translation.ScanView.Title.String, forState: .Normal) + noCodeButton.setTitle(Translation.HomeView.NoCodeAlert.Title.String, forState: .Normal) + infoCodeLabel.text = Translation.HomeView.InfoCodeLabel.Text.String } private func setupNavigationBar() { @@ -91,21 +97,20 @@ class HomeViewController: UIViewController { private func reviewTerms(completion: () -> Void) { guard Preferences.termsAccepted == false else { completion(); return } - let alertTitle = NSLocalizedString("EULA_title", comment: "") - let alertMessage = NSLocalizedString("EULA_content", comment: "") - let alertController = UIAlertController(title: alertTitle, message: alertMessage, preferredStyle: .Alert) - let viewTitle = NSLocalizedString("EULA_view", comment: "") - let viewAction = UIAlertAction(title: viewTitle, style: .Cancel, handler: { action in + let alertController = UIAlertController(title: Translation.HomeView.TermsAlert.Title.String, + message: Translation.HomeView.TermsAlert.Message.String, + preferredStyle: .Alert + ) + let showTermsAction = UIAlertAction(title: Translation.HomeView.TermsAlert.ShowTermsAction.Title.String, style: .Cancel) { action in UIApplication.sharedApplication().openURL(URLs.EULA) self.reviewTerms(completion) // Review terms until user accepted terms - }) - let confirmTitle = NSLocalizedString("EULA_confirm", comment: "") - let confirmAction = UIAlertAction(title: confirmTitle, style: .Default, handler: { action in + } + let acceptTermsAction = UIAlertAction(title: Translation.HomeView.TermsAlert.AcceptTermsAction.Title.String, style: .Default) { action in Preferences.termsAccepted = true completion() // Terms accepted - }) - alertController.addAction(viewAction) - alertController.addAction(confirmAction) + } + alertController.addAction(showTermsAction) + alertController.addAction(acceptTermsAction) presentViewController(alertController, animated: true, completion: nil) } @@ -161,7 +166,7 @@ class HomeViewController: UIViewController { @objc private func newCheckInURLNotification(notification: NSNotification) { dispatch_async(dispatch_get_main_queue(), { - self.reviewNewCheckIn({ + self.reviewNewCheckIn({ print("Review new check-in done.") }) }) @@ -169,42 +174,54 @@ class HomeViewController: UIViewController { // MARK: - Actions - @IBAction func optionButtonTap(sender: AnyObject) { + @IBAction func optionButtonTapped(sender: AnyObject) { let alertController = UIAlertController(title: nil, message: nil, preferredStyle: .ActionSheet) if let popoverController = alertController.popoverPresentationController { popoverController.barButtonItem = sender as? UIBarButtonItem } - let settingsAction = UIAlertAction(title: NSLocalizedString("Settings", comment: ""), style: .Default) { (action) -> Void in - self.performSegueWithIdentifier("SettingsFromHome", sender: alertController) + let settingsAction = UIAlertAction(title: Translation.SettingsView.Title.String, style: .Default) { (action) -> Void in + self.performSegueWithIdentifier(Segue.Settings, sender: alertController) } - let aboutAction = UIAlertAction(title: NSLocalizedString("About", comment: ""), style: .Default) { (action) -> Void in - self.performSegueWithIdentifier("AboutFromHome", sender: alertController) + let aboutAction = UIAlertAction(title: Translation.AboutView.Title.String, style: .Default) { (action) -> Void in + self.performSegueWithIdentifier(Segue.About, sender: alertController) } - let cancelAction = UIAlertAction(title: NSLocalizedString("Cancel", comment: ""), style: .Cancel, handler: nil) + let cancelAction = UIAlertAction(title: Translation.Common.Cancel.String, style: .Cancel, handler: nil) alertController.addAction(settingsAction) alertController.addAction(aboutAction) alertController.addAction(cancelAction) presentViewController(alertController, animated: true, completion: nil) } - @IBAction func scanButtonTap(sender: AnyObject) { + @IBAction func scanButtonTapped(sender: AnyObject) { if UIImagePickerController.isSourceTypeAvailable(UIImagePickerControllerSourceType.Camera) { - performSegueWithIdentifier("Scan", sender: sender) + performSegueWithIdentifier(Segue.Scan, sender: sender) } else { - let alertTitle = NSLocalizedString("No camera available.", comment: "") - let alertController = UIAlertController(title: alertTitle, message: nil, preferredStyle: .Alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "") - let cancelAction = UIAlertAction(title: cancelTitle, style: .Cancel, handler: nil) - alertController.addAction(cancelAction) - presentViewController(alertController, animated: true, completion: nil) + showNoCameraAlert() } } - @IBAction func noCodeButtonTap(sender: AnyObject) { - let alertTitle = NSLocalizedString("In order to use this app you need to check-in via QR code or email link. Please contact the racing committee if you need either.", comment: "") - let alertController = UIAlertController(title: alertTitle, message: nil, preferredStyle: .Alert) - let cancelTitle = NSLocalizedString("Cancel", comment: "") - let cancelAction = UIAlertAction(title: cancelTitle, style: .Cancel, handler: nil) + @IBAction func noCodeButtonTapped(sender: AnyObject) { + showNoCodeAlert() + } + + // MARK: - Alerts + + private func showNoCameraAlert() { + let alertController = UIAlertController(title: Translation.Common.Error.String, + message: Translation.HomeView.NoCameraAlert.Message.String, + preferredStyle: .Alert + ) + let cancelAction = UIAlertAction(title: Translation.Common.Cancel.String, style: .Cancel, handler: nil) + alertController.addAction(cancelAction) + presentViewController(alertController, animated: true, completion: nil) + } + + private func showNoCodeAlert() { + let alertController = UIAlertController(title: Translation.HomeView.NoCodeAlert.Title.String, + message: Translation.HomeView.NoCodeAlert.Message.String, + preferredStyle: .Alert + ) + let cancelAction = UIAlertAction(title: Translation.Common.OK.String, style: .Cancel, handler: nil) alertController.addAction(cancelAction) presentViewController(alertController, animated: true, completion: nil) } diff --git a/ios/SAPTracker/src/xcode/SAPTracker/Info.plist b/ios/SAPTracker/src/xcode/SAPTracker/Info.plist index fefd3cdd8f6..0b8deaa4e76 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/Info.plist +++ b/ios/SAPTracker/src/xcode/SAPTracker/Info.plist @@ -30,7 +30,7 @@ CFBundleVersion - 37 + 2.0.0-rc0 LSRequiresIPhoneOS NSAppTransportSecurity diff --git a/ios/SAPTracker/src/xcode/SAPTracker/LeaderboardViewController.swift b/ios/SAPTracker/src/xcode/SAPTracker/LeaderboardViewController.swift index ecc268faa84..782eed22281 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/LeaderboardViewController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/LeaderboardViewController.swift @@ -17,10 +17,19 @@ class LeaderboardViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() + setup() + } + + // MARK: - Setup + + private func setup() { + setupLocalization() setupWebView() } - // MARK: - Setups + private func setupLocalization() { + navigationItem.title = Translation.LeaderboardView.Title.String + } private func setupWebView() { guard let url = regatta.leaderboardURL() else { return } @@ -45,11 +54,8 @@ extension LeaderboardViewController: UIWebViewDelegate { func webView(webView: UIWebView, didFailLoadWithError error: NSError?) { activityIndicator.stopAnimating() - // FIXME: - Translation - let alertTitle = NSLocalizedString("Couldn't load leaderboard view", comment: "") - let alertController = UIAlertController(title: alertTitle, message: nil, preferredStyle: .Alert) - let okTitle = NSLocalizedString("OK", comment: "") - let okAction = UIAlertAction(title: okTitle, style: .Default) { (action) in + let alertController = UIAlertController(title: error?.localizedDescription, message: nil, preferredStyle: .Alert) + let okAction = UIAlertAction(title: Translation.Common.OK.String, style: .Default) { (action) in self.presentingViewController!.dismissViewControllerAnimated(true, completion: nil) } alertController.addAction(okAction) diff --git a/ios/SAPTracker/src/xcode/SAPTracker/LicenseViewController.swift b/ios/SAPTracker/src/xcode/SAPTracker/LicenseViewController.swift index a8ab987aa11..e697c3d9c85 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/LicenseViewController.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/LicenseViewController.swift @@ -14,6 +14,7 @@ class LicenseViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() + navigationItem.title = Translation.LicenseView.Title.String if let file = NSBundle.mainBundle().pathForResource("Acknowledgements", ofType: "markdown") { let license = try? NSString(contentsOfFile: file, encoding: NSUTF8StringEncoding) if (license != nil) { diff --git a/ios/SAPTracker/src/xcode/SAPTracker/LocationManager.swift b/ios/SAPTracker/src/xcode/SAPTracker/LocationManager.swift index 81c449732e9..ffc8f4f0674 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/LocationManager.swift +++ b/ios/SAPTracker/src/xcode/SAPTracker/LocationManager.swift @@ -21,15 +21,27 @@ class LocationManager: NSObject { struct UserInfo { static let Error = "NSError" static let LocationData = "LocationData" + static let Status = "Status" + } + + enum Status: String { + case Tracking + case NotTracking + var description: String { + switch self { + case .Tracking: return Translation.LocationManager.Status.Tracking.String + case .NotTracking: return Translation.LocationManager.Status.NotTracking.String + } + } } enum LocationManagerError: ErrorType { - case LocationServicesDisabled case LocationServicesDenied + case LocationServicesDisabled var description: String { switch self { - case .LocationServicesDenied: return NSLocalizedString("Please enable location services for this app.", comment: "") - case .LocationServicesDisabled: return NSLocalizedString("Please enable location services.", comment: "") + case .LocationServicesDenied: return Translation.LocationManager.LocationServicesDeniedError.String + case .LocationServicesDisabled: return Translation.LocationManager.LocationServicesDisabledError.String } } } @@ -47,10 +59,14 @@ class LocationManager: NSObject { override init() { locationManager = CLLocationManager() super.init() - setupLocationManager() + setup() } - // MARK: - Setups + // MARK: - Setup + + private func setup() { + setupLocationManager() + } private func setupLocationManager() { locationManager.pausesLocationUpdatesAutomatically = false; diff --git a/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Main.storyboard b/ios/SAPTracker/src/xcode/SAPTracker/Main.storyboard similarity index 86% rename from ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Main.storyboard rename to ios/SAPTracker/src/xcode/SAPTracker/Main.storyboard index 032dea69253..88a8875dd86 100644 --- a/ios/SAPTracker/src/xcode/SAPTracker/Base.lproj/Main.storyboard +++ b/ios/SAPTracker/src/xcode/SAPTracker/Main.storyboard @@ -12,6 +12,7 @@ OpenSans-Bold OpenSans-Bold OpenSans-Bold + OpenSans-Bold OpenSans-Light @@ -51,7 +52,6 @@ OpenSans OpenSans OpenSans - OpenSans OpenSans-Semibold @@ -82,7 +82,7 @@ - @@ -148,7 +154,7 @@ - + @@ -163,12 +169,11 @@ - - + @@ -389,7 +393,7 @@ - + @@ -411,29 +415,29 @@ - -