diff --git a/.travis.yml b/.travis.yml index 6e609f5fad..c582b6b5a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,5 @@ language: objective-c -osx_image: xcode12 +osx_image: xcode11 # xcode_sdk: iphonesimulator11 # xcode_project: Loop.xcodeproj # xcode_scheme: Loop diff --git a/Cartfile.resolved b/Cartfile.resolved index f2fd881119..7afc2d5f77 100644 --- a/Cartfile.resolved +++ b/Cartfile.resolved @@ -3,6 +3,6 @@ github "LoopKit/CGMBLEKit" "7b4c1022eb6b91ae3975bfc8ce93fde8e496b4f3" github "LoopKit/G4ShareSpy" "3b749bc7f6323ad8303af6c755ba9b5649eff816" github "LoopKit/LoopKit" "953b58e617379354b89ea33e0fd8f220ccc2d366" github "LoopKit/MKRingProgressView" "f548a5c64832be2d37d7c91b5800e284887a2a0a" -github "LoopKit/dexcom-share-client-swift" "146cccfe4eba5f536487777a72e0e47834fff64e" +github "LoopKit/dexcom-share-client-swift" "68ea5d08588e00bf148518b126416b8352dbef64" github "i-schuetz/SwiftCharts" "0.6.5" -github "ps2/rileylink_ios" "802cc005e3eb10cb5e407586210ceb62a57f8c22" +github "ps2/rileylink_ios" "cd9be51111c9ce40d86c0fe4f57660055995c922" diff --git a/DoseMathTests/Info.plist b/DoseMathTests/Info.plist index e6cd0ebeb5..014370f7bf 100644 --- a/DoseMathTests/Info.plist +++ b/DoseMathTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleSignature ???? CFBundleVersion diff --git a/Learn/Info.plist b/Learn/Info.plist index 95ff923ba3..ffd9ca349f 100644 --- a/Learn/Info.plist +++ b/Learn/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) LSRequiresIPhoneOS diff --git a/Loop Status Extension/Info.plist b/Loop Status Extension/Info.plist index 5a1d9a1e8c..e9c7d51659 100644 --- a/Loop Status Extension/Info.plist +++ b/Loop Status Extension/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) MainAppBundleIdentifier diff --git a/Loop.xcodeproj/project.pbxproj b/Loop.xcodeproj/project.pbxproj index f8cc9df7c9..f1f1b4297c 100644 --- a/Loop.xcodeproj/project.pbxproj +++ b/Loop.xcodeproj/project.pbxproj @@ -2417,7 +2417,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\n\nif [ -f $PROJECT_DIR/.gitmodules ]; then\n echo \"Skipping checkout due to presence of .gitmodules file\"\n if [ $ACTION = \"install\" ]; then\n echo \"You're installing: Make sure to keep all submodules up-to-date and run carthage build after changes.\"\n fi\nelse\n echo \"Bootstrapping carthage dependencies\"\n\n xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)\n trap 'rm -f \"$xcconfig\"' INT TERM HUP EXIT\n\n# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise\n# the build will fail on lipo due to duplicate architectures.\n# Xcode 12 Beta 3:\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8169g = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 4\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8179i = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 5\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189h = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 6\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189n = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 GM\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7208 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 GM 2\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig\necho 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig\necho 'ONLY_ACTIVE_ARCH=NO' >> $xcconfig\necho 'VALID_ARCHS = $(inherited) x86_64' >> $xcconfig\nexport XCODE_XCCONFIG_FILE=\"$xcconfig\"\necho $XCODE_XCCONFIG_FILE\n cat $XCODE_XCCONFIG_FILE\n unset LLVM_TARGET_TRIPLE_SUFFIX\n /usr/local/bin/carthage bootstrap --project-directory \"$SRCROOT\" --cache-builds\nfi\n"; + shellScript = "\n\nif [ -f $PROJECT_DIR/.gitmodules ]; then\n echo \"Skipping checkout due to presence of .gitmodules file\"\n if [ $ACTION = \"install\" ]; then\n echo \"You're installing: Make sure to keep all submodules up-to-date and run carthage build after changes.\"\n fi\nelse\n echo \"Bootstrapping carthage dependencies\"\n\n xcconfig=$(mktemp /tmp/static.xcconfig.XXXXXX)\n trap 'rm -f \"$xcconfig\"' INT TERM HUP EXIT\n\n# For Xcode 12 make sure EXCLUDED_ARCHS is set to arm architectures otherwise\n# the build will fail on lipo due to duplicate architectures.\n# Xcode 12 Beta 3:\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8169g = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 4\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8179i = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 5\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189h = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 beta 6\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A8189n = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 GM\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7208 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12 GM 2\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7209 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\n# Xcode 12.0.1\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_12A7300 = arm64 arm64e armv7 armv7s armv6 armv8' >> $xcconfig\necho 'EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200__BUILD_$(XCODE_PRODUCT_BUILD_VERSION))' >> $xcconfig\necho 'EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))' >> $xcconfig\necho 'ONLY_ACTIVE_ARCH=NO' >> $xcconfig\necho 'VALID_ARCHS = $(inherited) x86_64' >> $xcconfig\nexport XCODE_XCCONFIG_FILE=\"$xcconfig\"\necho $XCODE_XCCONFIG_FILE\n cat $XCODE_XCCONFIG_FILE\n unset LLVM_TARGET_TRIPLE_SUFFIX\n /usr/local/bin/carthage bootstrap --project-directory \"$SRCROOT\" --cache-builds\nfi\n"; }; 432CF88220D8BCD90066B889 /* Homebrew & Carthage Setup */ = { isa = PBXShellScriptBuildPhase; @@ -3816,7 +3816,9 @@ PRODUCT_BUNDLE_IDENTIFIER = com.loopkit.LoopCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -3848,6 +3850,8 @@ PRODUCT_BUNDLE_IDENTIFIER = com.loopkit.LoopCore; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -3985,7 +3989,9 @@ PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).LoopUI"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; @@ -4012,6 +4018,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "$(MAIN_APP_BUNDLE_IDENTIFIER).LoopUI"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; + SUPPORTS_MACCATALYST = NO; + TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/Complication - WatchApp.xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/Complication - WatchApp.xcscheme index c0bd8693bc..0e7664a95f 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/Complication - WatchApp.xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/Complication - WatchApp.xcscheme @@ -88,10 +88,8 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" launchAutomaticallySubstyle = "32"> - + - + - + - - - - - + diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/Notification - WatchApp.xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/Notification - WatchApp.xcscheme index 954d6c42f6..85323bccce 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/Notification - WatchApp.xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/Notification - WatchApp.xcscheme @@ -89,10 +89,8 @@ allowLocationSimulation = "YES" launchAutomaticallySubstyle = "8" notificationPayloadFile = "WatchApp Extension/PushNotificationPayload.apns"> - + - + - + - - - - - + diff --git a/Loop.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme b/Loop.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme index 438b434bda..6d90be659a 100644 --- a/Loop.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme +++ b/Loop.xcodeproj/xcshareddata/xcschemes/WatchApp.xcscheme @@ -88,10 +88,8 @@ debugServiceExtension = "internal" allowLocationSimulation = "YES" notificationPayloadFile = "WatchApp Extension/PushNotificationPayload.apns"> - + - + - + - - - - - + diff --git a/Loop/Info.plist b/Loop/Info.plist index 73ddc0f0ef..5b3a5f77ef 100644 --- a/Loop/Info.plist +++ b/Loop/Info.plist @@ -19,7 +19,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleSignature ???? CFBundleURLTypes diff --git a/Loop/Managers/DeviceDataManager.swift b/Loop/Managers/DeviceDataManager.swift index adcf2469f3..7f512b0d30 100644 --- a/Loop/Managers/DeviceDataManager.swift +++ b/Loop/Managers/DeviceDataManager.swift @@ -419,16 +419,31 @@ extension DeviceDataManager: PumpManagerDelegate { } lastBLEDrivenUpdate = Date() - cgmManager?.fetchNewDataIfNeeded { (result) in - if case .newData = result { - AnalyticsManager.shared.didFetchNewCGMData() - } + refreshCGM() + } + + private func refreshCGM(_ completion: (() -> Void)? = nil) { + if let cgmManager = cgmManager { + cgmManager.fetchNewDataIfNeeded { (result) in + if case .newData = result { + AnalyticsManager.shared.didFetchNewCGMData() + } - if let manager = self.cgmManager { self.queue.async { - self.processCGMResult(manager, result: result) + self.processCGMResult(cgmManager, result: result) + completion?() } } + } else { + completion?() + } + } + + func refreshDeviceData() { + refreshCGM() { + self.queue.async { + self.pumpManager?.assertCurrentPumpData() + } } } diff --git a/Loop/View Controllers/StatusTableViewController.swift b/Loop/View Controllers/StatusTableViewController.swift index 50fe1c9fb8..79d1162aa0 100644 --- a/Loop/View Controllers/StatusTableViewController.swift +++ b/Loop/View Controllers/StatusTableViewController.swift @@ -1282,7 +1282,7 @@ final class StatusTableViewController: ChartsTableViewController { if error != nil { let alertController = UIAlertController(with: error!) let manualLoopAction = UIAlertAction(title: NSLocalizedString("Retry", comment: "The button text for attempting a manual loop"), style: .default, handler: { _ in - self.deviceManager.loopManager.loop() + self.deviceManager.refreshDeviceData() }) alertController.addAction(manualLoopAction) present(alertController, animated: true) diff --git a/LoopCore/Info.plist b/LoopCore/Info.plist index e096abd505..1480589e68 100644 --- a/LoopCore/Info.plist +++ b/LoopCore/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/LoopTests/Info.plist b/LoopTests/Info.plist index e6cd0ebeb5..014370f7bf 100644 --- a/LoopTests/Info.plist +++ b/LoopTests/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType BNDL CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleSignature ???? CFBundleVersion diff --git a/LoopUI/Info.plist b/LoopUI/Info.plist index 9abd67dccc..86a8a591e9 100644 --- a/LoopUI/Info.plist +++ b/LoopUI/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/WatchApp Extension/Info.plist b/WatchApp Extension/Info.plist index 3e535856a5..a4d6d26b2c 100644 --- a/WatchApp Extension/Info.plist +++ b/WatchApp Extension/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleSignature ???? CFBundleVersion diff --git a/WatchApp/Info.plist b/WatchApp/Info.plist index 1468eff4ef..011ed2df94 100644 --- a/WatchApp/Info.plist +++ b/WatchApp/Info.plist @@ -17,7 +17,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.2.2 + 2.2.3 CFBundleSignature ???? CFBundleVersion