From 0e36299542b86b885fa85df18ad279d75ade74f7 Mon Sep 17 00:00:00 2001 From: Andrew Clunis Date: Tue, 5 Jan 2021 12:09:36 -0500 Subject: [PATCH 1/3] * Prevent Core Data Model load failures from crashing customers' apps; * Resolve incorrect Podfile dependency on a minor release of Rover; * Remove Xcode 10 tests in release script. --- Example/Podfile.lock | 8 ++++---- RoverCampaigns.podspec | 2 +- .../SyncCoordinator/PagingSyncParticipant.swift | 5 +++++ Sources/Foundation/Attributes.swift | 2 +- Sources/Location/LocationAssembler.swift | 7 ++++--- make-release.sh | 16 ++-------------- 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/Example/Podfile.lock b/Example/Podfile.lock index a827f62..58fb41c 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -13,7 +13,7 @@ PODS: - RoverCampaigns/Debug (3.7.6): - RoverCampaigns/UI - RoverCampaigns/Experiences (3.7.6): - - Rover (~> 3.7.1) + - Rover (~> 3.7) - RoverCampaigns/UI - RoverCampaigns/Foundation (3.7.6) - RoverCampaigns/Location (3.7.6): @@ -46,9 +46,9 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: Rover: fdc06ea6cc6afe26f0eca0e495ed0fada7adefe8 - RoverAppExtensions: 6021cc5f0f70fb7c43a3bd5aa25f67240a173404 - RoverCampaigns: a821d8cc35983ebb3fb26a94057ec8643dd67daa + RoverAppExtensions: 02cf7bf1f313c0b512244cb4690cabb560d649d8 + RoverCampaigns: 02116e1ba585769c702a80a40d96d7d63023e0b8 PODFILE CHECKSUM: 9d356855be9da26a7642e120d5ec51da4bb10995 -COCOAPODS: 1.9.3 +COCOAPODS: 1.10.0 diff --git a/RoverCampaigns.podspec b/RoverCampaigns.podspec index 6f55252..00fc5ff 100644 --- a/RoverCampaigns.podspec +++ b/RoverCampaigns.podspec @@ -38,7 +38,7 @@ Pod::Spec.new do |s| s.subspec "Experiences" do |ss| ss.source_files = "Sources/Experiences/**/*.swift" ss.dependency "RoverCampaigns/UI" - ss.dependency "Rover", "~> 3.7.1" + ss.dependency "Rover", "~> 3.7" ss.frameworks = "WebKit" end diff --git a/Sources/Data/SyncCoordinator/PagingSyncParticipant.swift b/Sources/Data/SyncCoordinator/PagingSyncParticipant.swift index 77481ad..57a81b1 100644 --- a/Sources/Data/SyncCoordinator/PagingSyncParticipant.swift +++ b/Sources/Data/SyncCoordinator/PagingSyncParticipant.swift @@ -76,6 +76,11 @@ extension PagingSyncParticipant { os_signpost(.begin, log: .sync, name: "insertObjects", "count=%d", nodes.count) } + if (context.persistentStoreCoordinator?.persistentStores.count).map({ $0 == 0 }) ?? true { + os_log("Rover's Core Data persistent store not configured, unable to insert objects.", type: .error) + return false + } + var saveError: Error? context.performAndWait { [context] in for node in nodes { diff --git a/Sources/Foundation/Attributes.swift b/Sources/Foundation/Attributes.swift index 076b5c6..1b404ee 100644 --- a/Sources/Foundation/Attributes.swift +++ b/Sources/Foundation/Attributes.swift @@ -9,7 +9,7 @@ import Foundation import os -// We have a strong guarantee that this will complete. Very determnistic, done in static context at startup, so silence the force try warning. +// We have a strong guarantee that this will complete. Very deterministic, done in static context at startup, so silence the force try warning. // swiftlint:disable:next force_try private let roverKeyRegex = try! NSRegularExpression(pattern: "^[a-zA-Z_][a-zA-Z_0-9]*$") diff --git a/Sources/Location/LocationAssembler.swift b/Sources/Location/LocationAssembler.swift index 3e18dd8..7901670 100644 --- a/Sources/Location/LocationAssembler.swift +++ b/Sources/Location/LocationAssembler.swift @@ -44,13 +44,14 @@ public class LocationAssembler: Assembler { container.register(NSPersistentContainer.self, name: "location") { _ in let bundles = [Bundle(for: LocationAssembler.self)] guard let model = NSManagedObjectModel.mergedModel(from: bundles) else { - fatalError("Model not found") + fatalError("Core Data model not found for Rover Location module.") } let container = NSPersistentContainer(name: "RoverLocation", managedObjectModel: model) container.loadPersistentStores { _, error in - guard error == nil else { - fatalError("Failed to load store: \(error!)") + if let error = error { + os_log("Core Data store for Rover Location module failed to load, reason: %s", error.logDescription) + assertionFailure("Core Data store for Rover Location module failed to load, reason: \(error.logDescription)") } } diff --git a/make-release.sh b/make-release.sh index 13e7e10..fc84ecf 100755 --- a/make-release.sh +++ b/make-release.sh @@ -19,8 +19,6 @@ then exit -1 fi -# Swift 4.2 uses the old ABI, so we want to confirm that our stuff actually *builds* with the old compiler. -SWIFT42_LOCATION=/Applications/Xcode\ 10.1.app/Contents/Developer/ # Going forward, the globally installed Swift 5.x or later is sufficient for testing for the myriad of versions that will come after 4.2. SWIFT5_OR_LATER_LOCATION=/Applications/Xcode.app/Contents/Developer/ @@ -52,22 +50,12 @@ if [ $RELEASE_OR_HOTFIX == "hotfix" ] then echo "Assuming hotfix branch already exists." git checkout hotfix/$VERSION - echo "Verifying SDK." - echo "Verifying SDK with Xcode 10.1 / Swift 4.2" - DEVELOPER_DIR=$SWIFT42_LOCATION pod lib lint RoverCampaigns.podspec --swift-version=4.2 - DEVELOPER_DIR=$SWIFT42_LOCATION pod lib lint RoverAppExtensions.podspec --swift-version=4.2 - - echo "Verifying SDK with Xcode 10.2 (or later) / Swift 5 (or later)." + echo "Verifying SDK with Xcode." DEVELOPER_DIR=$SWIFT5_OR_LATER_LOCATION pod lib lint RoverCampaigns.podspec --swift-version=5.0 DEVELOPER_DIR=$SWIFT5_OR_LATER_LOCATION pod lib lint RoverAppExtensions.podspec --swift-version=5.0 else git checkout develop - echo "Verifying SDK." - echo "Verifying SDK with Xcode 10.1 / Swift 4.2" - DEVELOPER_DIR=$SWIFT42_LOCATION pod lib lint RoverCampaigns.podspec --swift-version=4.2 - DEVELOPER_DIR=$SWIFT42_LOCATION pod lib lint RoverAppExtensions.podspec --swift-version=4.2 - - echo "Verifying SDK with Xcode 10.2 (or later) / Swift 5 (or later)." + echo "Verifying SDK with Xcode." DEVELOPER_DIR=$SWIFT5_OR_LATER_LOCATION pod lib lint RoverCampaigns.podspec --swift-version=5.0 DEVELOPER_DIR=$SWIFT5_OR_LATER_LOCATION pod lib lint RoverAppExtensions.podspec --swift-version=5.0 From 5dc738151abe32f4cddb8b3128e6982450480903 Mon Sep 17 00:00:00 2001 From: Andrew Clunis Date: Tue, 5 Jan 2021 12:17:04 -0500 Subject: [PATCH 2/3] Releasing 3.7.7. --- .../xcshareddata/xcschemes/Example.xcscheme | 78 +++++++++++++++ .../xcschemes/NotificationService.xcscheme | 96 +++++++++++++++++++ Example/Example/Info.plist | 2 +- Example/Podfile.lock | 24 ++--- README.md | 14 +-- RoverAppExtensions.podspec | 2 +- RoverCampaigns.podspec | 2 +- Sources/AdSupport/Info.plist | 2 +- Sources/AppExtensions/Info.plist | 2 +- Sources/Bluetooth/Info.plist | 2 +- Sources/Data/Info.plist | 2 +- Sources/Debug/Info.plist | 2 +- Sources/Experiences/Info.plist | 2 +- Sources/Foundation/Info.plist | 2 +- Sources/Location/Info.plist | 2 +- Sources/Notifications/Info.plist | 2 +- Sources/Telephony/Info.plist | 2 +- Sources/Ticketmaster/Info.plist | 2 +- Sources/UI/Info.plist | 2 +- 19 files changed, 208 insertions(+), 34 deletions(-) create mode 100644 Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme create mode 100644 Example/Example.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme diff --git a/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme new file mode 100644 index 0000000..576a918 --- /dev/null +++ b/Example/Example.xcodeproj/xcshareddata/xcschemes/Example.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Example.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme b/Example/Example.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme new file mode 100644 index 0000000..13615e2 --- /dev/null +++ b/Example/Example.xcodeproj/xcshareddata/xcschemes/NotificationService.xcscheme @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Example/Example/Info.plist b/Example/Example/Info.plist index ade3388..54aac83 100644 --- a/Example/Example/Info.plist +++ b/Example/Example/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleURLTypes diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 58fb41c..b85f233 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,30 +1,30 @@ PODS: - Rover (3.7.1) - - RoverAppExtensions (3.7.6) - - RoverCampaigns/AdSupport (3.7.6): + - RoverAppExtensions (3.7.7) + - RoverCampaigns/AdSupport (3.7.7): - RoverCampaigns/Data - - RoverCampaigns/Core (3.7.6): + - RoverCampaigns/Core (3.7.7): - RoverCampaigns/Debug - RoverCampaigns/Experiences - RoverCampaigns/Location - RoverCampaigns/Notifications - - RoverCampaigns/Data (3.7.6): + - RoverCampaigns/Data (3.7.7): - RoverCampaigns/Foundation - - RoverCampaigns/Debug (3.7.6): + - RoverCampaigns/Debug (3.7.7): - RoverCampaigns/UI - - RoverCampaigns/Experiences (3.7.6): + - RoverCampaigns/Experiences (3.7.7): - Rover (~> 3.7) - RoverCampaigns/UI - - RoverCampaigns/Foundation (3.7.6) - - RoverCampaigns/Location (3.7.6): + - RoverCampaigns/Foundation (3.7.7) + - RoverCampaigns/Location (3.7.7): - RoverCampaigns/Data - - RoverCampaigns/Notifications (3.7.6): + - RoverCampaigns/Notifications (3.7.7): - RoverCampaigns/UI - - RoverCampaigns/Telephony (3.7.6): + - RoverCampaigns/Telephony (3.7.7): - RoverCampaigns/Data - - RoverCampaigns/Ticketmaster (3.7.6): + - RoverCampaigns/Ticketmaster (3.7.7): - RoverCampaigns/Data - - RoverCampaigns/UI (3.7.6): + - RoverCampaigns/UI (3.7.7): - RoverCampaigns/Data DEPENDENCIES: diff --git a/README.md b/README.md index aa00a3d..905f9e2 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ The simplest approach is to specify `Rover` as a dependency of your app's target ```ruby target 'MyAppTarget' do - pod 'RoverCampaigns', '~> 3.7.6' + pod 'RoverCampaigns', '~> 3.7.7' end ``` @@ -28,12 +28,12 @@ Alternatively you can specify the exact set of subspecs you want to include. ```ruby target 'MyAppTarget' do - pod 'RoverCampaigns/Foundation', '~> 3.7.6' - pod 'RoverCampaigns/Data', '~> 3.7.6' - pod 'RoverCampaigns/UI', '~> 3.7.6' - pod 'RoverCampaigns/Notifications', '~> 3.7.6' - pod 'RoverCampaigns/Location', '~> 3.7.6' - pod 'RoverCampaigns/Debug', '~> 3.7.6' + pod 'RoverCampaigns/Foundation', '~> 3.7.7' + pod 'RoverCampaigns/Data', '~> 3.7.7' + pod 'RoverCampaigns/UI', '~> 3.7.7' + pod 'RoverCampaigns/Notifications', '~> 3.7.7' + pod 'RoverCampaigns/Location', '~> 3.7.7' + pod 'RoverCampaigns/Debug', '~> 3.7.7' end ``` diff --git a/RoverAppExtensions.podspec b/RoverAppExtensions.podspec index 4729a9e..ef39405 100644 --- a/RoverAppExtensions.podspec +++ b/RoverAppExtensions.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RoverAppExtensions" - s.version = "3.7.6" + s.version = "3.7.7" s.summary = "Rover Campaigns iOS App Extensions" s.homepage = "https://www.rover.io" s.license = "Apache License, Version 2.0" diff --git a/RoverCampaigns.podspec b/RoverCampaigns.podspec index 00fc5ff..555f9d5 100644 --- a/RoverCampaigns.podspec +++ b/RoverCampaigns.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "RoverCampaigns" - s.version = "3.7.6" + s.version = "3.7.7" s.summary = "iOS framework for the Rover Campaigns app" s.homepage = "https://www.rover.io" s.license = "Apache License, Version 2.0" diff --git a/Sources/AdSupport/Info.plist b/Sources/AdSupport/Info.plist index b5d586e..deaa753 100644 --- a/Sources/AdSupport/Info.plist +++ b/Sources/AdSupport/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/Sources/AppExtensions/Info.plist b/Sources/AppExtensions/Info.plist index 269637e..4afef99 100644 --- a/Sources/AppExtensions/Info.plist +++ b/Sources/AppExtensions/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Bluetooth/Info.plist b/Sources/Bluetooth/Info.plist index 269637e..4afef99 100644 --- a/Sources/Bluetooth/Info.plist +++ b/Sources/Bluetooth/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Data/Info.plist b/Sources/Data/Info.plist index 269637e..4afef99 100644 --- a/Sources/Data/Info.plist +++ b/Sources/Data/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Debug/Info.plist b/Sources/Debug/Info.plist index 269637e..4afef99 100644 --- a/Sources/Debug/Info.plist +++ b/Sources/Debug/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Experiences/Info.plist b/Sources/Experiences/Info.plist index b5d586e..deaa753 100644 --- a/Sources/Experiences/Info.plist +++ b/Sources/Experiences/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/Sources/Foundation/Info.plist b/Sources/Foundation/Info.plist index 269637e..4afef99 100644 --- a/Sources/Foundation/Info.plist +++ b/Sources/Foundation/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Location/Info.plist b/Sources/Location/Info.plist index 269637e..4afef99 100644 --- a/Sources/Location/Info.plist +++ b/Sources/Location/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Notifications/Info.plist b/Sources/Notifications/Info.plist index 269637e..4afef99 100644 --- a/Sources/Notifications/Info.plist +++ b/Sources/Notifications/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/Telephony/Info.plist b/Sources/Telephony/Info.plist index b5d586e..deaa753 100644 --- a/Sources/Telephony/Info.plist +++ b/Sources/Telephony/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) diff --git a/Sources/Ticketmaster/Info.plist b/Sources/Ticketmaster/Info.plist index 269637e..4afef99 100644 --- a/Sources/Ticketmaster/Info.plist +++ b/Sources/Ticketmaster/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass diff --git a/Sources/UI/Info.plist b/Sources/UI/Info.plist index 269637e..4afef99 100644 --- a/Sources/UI/Info.plist +++ b/Sources/UI/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.7.6 + 3.7.7 CFBundleVersion $(CURRENT_PROJECT_VERSION) NSPrincipalClass From ef651980661ee28b814ca8bf9aa35f74c9707567 Mon Sep 17 00:00:00 2001 From: Andrew Clunis Date: Tue, 5 Jan 2021 12:24:11 -0500 Subject: [PATCH 3/3] Releasing 3.7.7.