From d1f83badefd3795aa02fdf2c102f1a857de1363b Mon Sep 17 00:00:00 2001 From: John Estropia Date: Sun, 19 Jun 2022 17:56:42 +0900 Subject: [PATCH] Xcode 14, iOS 16 SDK (min iOS 13) --- CoreStore.podspec | 12 +- CoreStore.xcodeproj/project.pbxproj | 50 ++-- .../xcschemes/CoreStore OSX.xcscheme | 2 +- .../xcschemes/CoreStore iOS.xcscheme | 2 +- .../xcschemes/CoreStore tvOS.xcscheme | 2 +- .../xcschemes/CoreStore watchOS.xcscheme | 2 +- CoreStoreTests/ListPublisherTests.swift | 1 - Demo/Demo.xcodeproj/project.pbxproj | 232 +++++++++--------- .../xcshareddata/xcschemes/Demo.xcscheme | 2 +- Demo/{⭐️Sources => Sources}/AppDelegate.swift | 0 .../Demos/Advanced}/Advanced.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.CreatureType.swift | 0 .../Advanced.EvolutionDemo.CreaturesDataSource.swift | 0 .../Advanced.EvolutionDemo.GeologicalPeriod.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.ItemView.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.ListView.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.MainView.swift | 0 .../Advanced/EvolutionDemo/Advanced.EvolutionDemo.Migrator.swift} | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.ProgressView.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V1.Creature.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V1.FromV2.swift | 0 .../xcmapping.xml | 0 .../Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.swift | 0 .../Advanced.EvolutionDemo.V1.xcdatamodeld/.xccurrentversion | 0 .../Advanced.EvolutionDemo.V1.xcdatamodel/contents | 0 .../Advanced.EvolutionDemo.V2.xcdatamodel/contents | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V2.Creature.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV1.swift | 0 .../xcmapping.xml | 0 .../Advanced.EvolutionDemo.V2.FromV1MigrationPolicy.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV3.swift | 0 .../Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.swift | 0 .../Advanced.EvolutionDemo.V2.xcdatamodel/contents | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V3.Creature.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V3.FromV2.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V3.FromV4.swift | 0 .../Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V3.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V4.Creature.swift | 0 .../EvolutionDemo}/Advanced.EvolutionDemo.V4.FromV3.swift | 0 .../Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V4.swift | 0 .../Advanced/EvolutionDemo}/Advanced.EvolutionDemo.swift | 0 .../Advanced.EvolutionDemo.xcdatamodeld/.xccurrentversion | 0 .../Advanced.EvolutionDemo.V2.xcdatamodel/contents | 0 .../Advanced.EvolutionDemo.xcdatamodel/contents | 0 .../⭐️Classic => Sources/Demos/Classic}/Classic.swift | 0 .../Classic/ColorsDemo}/Classic.ColorsDemo.DetailView.swift | 0 .../ColorsDemo/Classic.ColorsDemo.DetailViewController.swift} | 0 .../Demos/Classic/ColorsDemo}/Classic.ColorsDemo.Filter.swift | 0 .../Classic/ColorsDemo}/Classic.ColorsDemo.ItemCell.swift | 0 .../Classic/ColorsDemo}/Classic.ColorsDemo.LIstView.swift | 0 .../ColorsDemo/Classic.ColorsDemo.ListViewController.swift} | 0 .../Classic/ColorsDemo}/Classic.ColorsDemo.MainView.swift | 0 .../Classic/ColorsDemo}/Classic.ColorsDemo.Palette.swift | 0 .../Demos/Classic/ColorsDemo}/Classic.ColorsDemo.swift | 0 .../ColorsDemo.xcdatamodel/contents | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.Filter.swift | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.MainView.swift | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.Palette.swift | 0 .../Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.DetailView.swift} | 0 .../Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.ItemView.swift} | 0 .../Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.ListView.swift} | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.SwiftUI.swift | 0 .../ColorsDemo}/Modern.ColorsDemo.UIKit.DetailView.swift | 0 .../Modern.ColorsDemo.UIKit.DetailViewController.swift} | 0 .../Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.ItemCell.swift | 0 .../Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.ListView.swift | 0 .../ColorsDemo/Modern.ColorsDemo.UIKit.ListViewController.swift} | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.swift | 0 .../Demos/Modern/ColorsDemo}/Modern.ColorsDemo.swift | 0 .../⭐️Modern => Sources/Demos/Modern}/Modern.swift | 0 .../PlacemarksDemo}/Modern.PlacemarksDemo.Geocoder.swift | 0 .../Modern/PlacemarksDemo/Modern.PlacemarksDemo.MainView.swift} | 0 .../PlacemarksDemo}/Modern.PlacemarksDemo.MapView.swift | 0 .../Modern/PlacemarksDemo}/Modern.PlacemarksDemo.Place.swift | 0 .../Demos/Modern/PlacemarksDemo/Modern.PlacemarksDemo.swift} | 0 .../Modern/PokedexDemo}/Modern.PokedexDemo.Details.swift | 0 .../Demos/Modern/PokedexDemo/Modern.PokedexDemo.Form.swift} | 0 .../Modern/PokedexDemo}/Modern.PokedexDemo.MainView.swift | 0 .../Modern/PokedexDemo/Modern.PokedexDemo.PokedexEntry.swift} | 0 .../Modern/PokedexDemo/Modern.PokedexDemo.PokemonType.swift} | 0 .../Demos/Modern/PokedexDemo/Modern.PokedexDemo.Service.swift} | 0 .../Demos/Modern/PokedexDemo/Modern.PokedexDemo.Species.swift} | 0 .../PokedexDemo}/Modern.PokedexDemo.UIKit.ItemCell.swift | 0 .../PokedexDemo}/Modern.PokedexDemo.UIKit.ListView.swift | 0 .../Modern.PokedexDemo.UIKit.ListViewController.swift | 0 .../Demos/Modern/PokedexDemo}/Modern.PokedexDemo.UIKit.swift | 0 .../Demos/Modern/PokedexDemo}/Modern.PokedexDemo.swift | 0 .../Modern/TimeZonesDemo}/Modern.TimeZonesDemo.ItemView.swift | 0 .../Modern/TimeZonesDemo}/Modern.TimeZonesDemo.ListView.swift | 0 .../Modern/TimeZonesDemo/Modern.TimeZonesDemo.MainView.swift} | 0 .../Modern/TimeZonesDemo}/Modern.TimeZonesDemo.TimeZone.swift | 0 .../Demos/Modern/TimeZonesDemo}/Modern.TimeZonesDemo.swift | 0 .../Helpers/ImageDownloader.swift | 0 .../Helpers/InstructionsView.swift | 0 .../Helpers/LazyView.swift | 0 .../Helpers/Menu/Menu.ItemView.swift | 0 .../Helpers/Menu/Menu.MainView.swift | 0 .../Helpers/Menu/Menu.PlaceholderView.swift | 0 .../Helpers/Menu/Menu.swift | 0 .../SceneDelegate.swift | 0 Sources/CoreStoreObject+DataSources.swift | 1 - Sources/DataStack+Migration.swift | 2 +- Sources/DataStack+Reactive.swift | 2 - Sources/DataStack.AddStoragePublisher.swift | 1 - Sources/DynamicObject.swift | 10 +- Sources/EnvironmentValues+DataSources.swift | 2 - .../FieldCoders.DefaultNSSecureCoding.swift | 9 +- Sources/ForEach+SwiftUI.swift | 1 - Sources/Internals.AnyFieldCoder.swift | 48 +--- Sources/ListMonitor.swift | 16 +- Sources/ListPublisher+Reactive.swift | 2 - Sources/ListPublisher.SnapshotPublisher.swift | 1 - Sources/ListReader.swift | 1 - Sources/ListState.swift | 1 - .../NSManagedObjectContext+CoreStore.swift | 4 +- Sources/ObjectMonitor.swift | 6 +- Sources/ObjectPublisher+Reactive.swift | 4 - .../ObjectPublisher.SnapshotPublisher.swift | 1 - Sources/ObjectReader.swift | 1 - Sources/ObjectState.swift | 1 - Sources/Where.swift | 33 ++- 121 files changed, 217 insertions(+), 235 deletions(-) rename Demo/{⭐️Sources => Sources}/AppDelegate.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced => Sources/Demos/Advanced}/Advanced.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.CreatureType.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.CreaturesDataSource.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.GeologicalPeriod.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.ItemView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.ListView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.MainView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo/⭐️Advanced.EvolutionDemo.Migrator.swift => Sources/Demos/Advanced/EvolutionDemo/Advanced.EvolutionDemo.Migrator.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.ProgressView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.Creature.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.FromV2.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.FromV2.xcmappingmodel/xcmapping.xml (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.xcdatamodeld/.xccurrentversion (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.xcdatamodeld/Advanced.EvolutionDemo.V1.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V1.xcdatamodeld/Advanced.EvolutionDemo.V2.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.Creature.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV1.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV1.xcmappingmodel/xcmapping.xml (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV1MigrationPolicy.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.FromV3.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V2.xcdatamodeld/Advanced.EvolutionDemo.V2.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V3.Creature.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V3.FromV2.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V3.FromV4.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V3.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V4.Creature.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V4.FromV3.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.V4.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.xcdatamodeld/.xccurrentversion (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.xcdatamodeld/Advanced.EvolutionDemo.V2.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Advanced/⭐️EvolutionDemo => Sources/Demos/Advanced/EvolutionDemo}/Advanced.EvolutionDemo.xcdatamodeld/Advanced.EvolutionDemo.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic => Sources/Demos/Classic}/Classic.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.DetailView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo/⭐️Classic.ColorsDemo.DetailViewController.swift => Sources/Demos/Classic/ColorsDemo/Classic.ColorsDemo.DetailViewController.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.Filter.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.ItemCell.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.LIstView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo/⭐️Classic.ColorsDemo.ListViewController.swift => Sources/Demos/Classic/ColorsDemo/Classic.ColorsDemo.ListViewController.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.MainView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.Palette.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Classic/⭐️ColorsDemo => Sources/Demos/Classic/ColorsDemo}/Classic.ColorsDemo.xcdatamodeld/ColorsDemo.xcdatamodel/contents (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.Filter.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.MainView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.Palette.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo/⭐️Modern.ColorsDemo.SwiftUI.DetailView.swift => Sources/Demos/Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.DetailView.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo/⭐️Modern.ColorsDemo.SwiftUI.ItemView.swift => Sources/Demos/Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.ItemView.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo/⭐️Modern.ColorsDemo.SwiftUI.ListView.swift => Sources/Demos/Modern/ColorsDemo/Modern.ColorsDemo.SwiftUI.ListView.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.SwiftUI.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.DetailView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo/⭐️Modern.ColorsDemo.UIKit.DetailViewController.swift => Sources/Demos/Modern/ColorsDemo/Modern.ColorsDemo.UIKit.DetailViewController.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.ItemCell.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.ListView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo/⭐️Modern.ColorsDemo.UIKit.ListViewController.swift => Sources/Demos/Modern/ColorsDemo/Modern.ColorsDemo.UIKit.ListViewController.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.UIKit.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️ColorsDemo => Sources/Demos/Modern/ColorsDemo}/Modern.ColorsDemo.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern => Sources/Demos/Modern}/Modern.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PlacemarksDemo => Sources/Demos/Modern/PlacemarksDemo}/Modern.PlacemarksDemo.Geocoder.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PlacemarksDemo/⭐️Modern.PlacemarksDemo.MainView.swift => Sources/Demos/Modern/PlacemarksDemo/Modern.PlacemarksDemo.MainView.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PlacemarksDemo => Sources/Demos/Modern/PlacemarksDemo}/Modern.PlacemarksDemo.MapView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PlacemarksDemo => Sources/Demos/Modern/PlacemarksDemo}/Modern.PlacemarksDemo.Place.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PlacemarksDemo/⭐️Modern.PlacemarksDemo.swift => Sources/Demos/Modern/PlacemarksDemo/Modern.PlacemarksDemo.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.Details.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo/⭐️Modern.PokedexDemo.Form.swift => Sources/Demos/Modern/PokedexDemo/Modern.PokedexDemo.Form.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.MainView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo/⭐️Modern.PokedexDemo.PokedexEntry.swift => Sources/Demos/Modern/PokedexDemo/Modern.PokedexDemo.PokedexEntry.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo/⭐️Modern.PokedexDemo.PokemonType.swift => Sources/Demos/Modern/PokedexDemo/Modern.PokedexDemo.PokemonType.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo/⭐️Modern.PokedexDemo.Service.swift => Sources/Demos/Modern/PokedexDemo/Modern.PokedexDemo.Service.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo/⭐️Modern.PokedexDemo.Species.swift => Sources/Demos/Modern/PokedexDemo/Modern.PokedexDemo.Species.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.UIKit.ItemCell.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.UIKit.ListView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.UIKit.ListViewController.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.UIKit.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️PokedexDemo => Sources/Demos/Modern/PokedexDemo}/Modern.PokedexDemo.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️TimeZonesDemo => Sources/Demos/Modern/TimeZonesDemo}/Modern.TimeZonesDemo.ItemView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️TimeZonesDemo => Sources/Demos/Modern/TimeZonesDemo}/Modern.TimeZonesDemo.ListView.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️TimeZonesDemo/⭐️Modern.TimeZonesDemo.MainView.swift => Sources/Demos/Modern/TimeZonesDemo/Modern.TimeZonesDemo.MainView.swift} (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️TimeZonesDemo => Sources/Demos/Modern/TimeZonesDemo}/Modern.TimeZonesDemo.TimeZone.swift (100%) rename Demo/{⭐️Sources/⭐️Demos/⭐️Modern/⭐️TimeZonesDemo => Sources/Demos/Modern/TimeZonesDemo}/Modern.TimeZonesDemo.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/ImageDownloader.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/InstructionsView.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/LazyView.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/Menu/Menu.ItemView.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/Menu/Menu.MainView.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/Menu/Menu.PlaceholderView.swift (100%) rename Demo/{⭐️Sources => Sources}/Helpers/Menu/Menu.swift (100%) rename Demo/{⭐️Sources => Sources}/SceneDelegate.swift (100%) diff --git a/CoreStore.podspec b/CoreStore.podspec index cdc1041..2e50f94 100644 --- a/CoreStore.podspec +++ b/CoreStore.podspec @@ -1,7 +1,7 @@ Pod::Spec.new do |s| s.name = "CoreStore" - s.version = "8.1.0" - s.swift_version = "5.5" + s.version = "9.0.0" + s.swift_version = "5.7" s.license = "MIT" s.homepage = "https://github.com/JohnEstropia/CoreStore" s.documentation_url = "https://JohnEstropia.github.io/CoreStore" @@ -9,10 +9,10 @@ Pod::Spec.new do |s| s.author = { "John Rommel Estropia" => "rommel.estropia@gmail.com" } s.source = { :git => "https://github.com/JohnEstropia/CoreStore.git", :tag => s.version.to_s } - s.ios.deployment_target = "11.0" - s.osx.deployment_target = "10.13" - s.watchos.deployment_target = "4.0" - s.tvos.deployment_target = "11.0" + s.ios.deployment_target = "13.0" + s.osx.deployment_target = "10.15" + s.watchos.deployment_target = "6.0" + s.tvos.deployment_target = "13.0" s.source_files = "Sources", "Sources/**/*.{swift,h,m}" s.public_header_files = "Sources/**/*.h" diff --git a/CoreStore.xcodeproj/project.pbxproj b/CoreStore.xcodeproj/project.pbxproj index f4ef7fb..b3ecc58 100644 --- a/CoreStore.xcodeproj/project.pbxproj +++ b/CoreStore.xcodeproj/project.pbxproj @@ -2188,7 +2188,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 1200; + LastUpgradeCheck = 1400; ORGANIZATIONNAME = "John Rommel Estropia"; TargetAttributes = { 2F03A52F19C5C6DA005002A5 = { @@ -3339,8 +3339,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Sources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 10.13; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; OTHER_SWIFT_FLAGS = "-D DEBUG"; @@ -3352,10 +3352,10 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Debug; }; @@ -3406,8 +3406,8 @@ GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; INFOPLIST_FILE = Sources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - MACOSX_DEPLOYMENT_TARGET = 10.13; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MACOSX_DEPLOYMENT_TARGET = 10.15; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_BUNDLE_IDENTIFIER = com.johnestropia.CoreStore; PRODUCT_NAME = CoreStore; @@ -3416,11 +3416,11 @@ SWIFT_SWIFT3_OBJC_INFERENCE = Off; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; - WATCHOS_DEPLOYMENT_TARGET = 3.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Release; }; @@ -3434,8 +3434,9 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3457,8 +3458,9 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3516,7 +3518,7 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3526,7 +3528,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Debug; }; @@ -3543,7 +3545,7 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3553,7 +3555,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; TARGETED_DEVICE_FAMILY = 3; - TVOS_DEPLOYMENT_TARGET = 11.0; + TVOS_DEPLOYMENT_TARGET = 13.0; }; name = Release; }; @@ -3597,6 +3599,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -3607,7 +3610,8 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3626,6 +3630,7 @@ CODE_SIGN_IDENTITY = ""; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; @@ -3636,7 +3641,8 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MACOSX_DEPLOYMENT_TARGET = 10.15; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3655,6 +3661,7 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = CoreStoreTests/Info.plist; @@ -3675,6 +3682,7 @@ CODE_SIGN_IDENTITY = "-"; COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = CoreStoreTests/Info.plist; @@ -3700,7 +3708,7 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3710,7 +3718,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 4.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Debug; }; @@ -3729,7 +3737,7 @@ GCC_NO_COMMON_BLOCKS = YES; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MARKETING_VERSION = 8.1.1; + MARKETING_VERSION = 9.0.0; OTHER_LDFLAGS = ( "-weak_framework", Combine, @@ -3739,7 +3747,7 @@ SWIFT_OPTIMIZATION_LEVEL = "-O"; SWIFT_SWIFT3_OBJC_INFERENCE = Off; TARGETED_DEVICE_FAMILY = 4; - WATCHOS_DEPLOYMENT_TARGET = 4.0; + WATCHOS_DEPLOYMENT_TARGET = 6.0; }; name = Release; }; diff --git a/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore OSX.xcscheme b/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore OSX.xcscheme index 37f42c2..578296d 100644 --- a/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore OSX.xcscheme +++ b/CoreStore.xcodeproj/xcshareddata/xcschemes/CoreStore OSX.xcscheme @@ -1,6 +1,6 @@ Self.Type { diff --git a/Sources/EnvironmentValues+DataSources.swift b/Sources/EnvironmentValues+DataSources.swift index fd6a415..4429284 100644 --- a/Sources/EnvironmentValues+DataSources.swift +++ b/Sources/EnvironmentValues+DataSources.swift @@ -33,7 +33,6 @@ import CoreData // MARK: - EnvironmentValues -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension EnvironmentValues { // MARK: Public @@ -60,7 +59,6 @@ extension EnvironmentValues { // MARK: - DataStackEnvironmentKey - @available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) fileprivate struct DataStackKey: EnvironmentKey { // MARK: FilePrivate diff --git a/Sources/FieldCoders.DefaultNSSecureCoding.swift b/Sources/FieldCoders.DefaultNSSecureCoding.swift index 3a38f5c..32410de 100644 --- a/Sources/FieldCoders.DefaultNSSecureCoding.swift +++ b/Sources/FieldCoders.DefaultNSSecureCoding.swift @@ -54,14 +54,7 @@ extension FieldCoders { internal static var transformerName: NSValueTransformerName { - if #available(iOS 12.0, tvOS 12.0, watchOS 5.0, macOS 10.14, *) { - - return .secureUnarchiveFromDataTransformerName - } - else { - - return .keyedUnarchiveFromDataTransformerName - } + return .secureUnarchiveFromDataTransformerName } } } diff --git a/Sources/ForEach+SwiftUI.swift b/Sources/ForEach+SwiftUI.swift index 703aef9..4a027ec 100644 --- a/Sources/ForEach+SwiftUI.swift +++ b/Sources/ForEach+SwiftUI.swift @@ -31,7 +31,6 @@ import SwiftUI // MARK: - ForEach -@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *) extension ForEach where Content: View { // MARK: Public diff --git a/Sources/Internals.AnyFieldCoder.swift b/Sources/Internals.AnyFieldCoder.swift index 19c10fc..c365514 100644 --- a/Sources/Internals.AnyFieldCoder.swift +++ b/Sources/Internals.AnyFieldCoder.swift @@ -74,45 +74,21 @@ extension Internals { internal func register() { - let transformerName = self.transformerName - if #available(iOS 12.0, tvOS 12.0, watchOS 5.0, macOS 10.14, *) { + switch self.transformerName { - switch transformerName { + case .secureUnarchiveFromDataTransformerName, + .isNotNilTransformerName, + .isNilTransformerName, + .negateBooleanTransformerName: + return - case .secureUnarchiveFromDataTransformerName, - .isNotNilTransformerName, - .isNilTransformerName, - .negateBooleanTransformerName: - return + case let transformerName: + Self.cachedCoders[transformerName] = self - case let transformerName: - Self.cachedCoders[transformerName] = self - - Foundation.ValueTransformer.setValueTransformer( - self.transformer, - forName: transformerName - ) - } - } - else { - - switch transformerName { - - case .keyedUnarchiveFromDataTransformerName, - .unarchiveFromDataTransformerName, - .isNotNilTransformerName, - .isNilTransformerName, - .negateBooleanTransformerName: - return - - case let transformerName: - Self.cachedCoders[transformerName] = self - - Foundation.ValueTransformer.setValueTransformer( - self.transformer, - forName: transformerName - ) - } + Foundation.ValueTransformer.setValueTransformer( + self.transformer, + forName: transformerName + ) } } diff --git a/Sources/ListMonitor.swift b/Sources/ListMonitor.swift index 4487704..9153cdf 100644 --- a/Sources/ListMonitor.swift +++ b/Sources/ListMonitor.swift @@ -812,7 +812,7 @@ public final class ListMonitor: Hashable { object: self, closure: { [weak self] (note) -> Void in - guard let `self` = self else { + guard let self = self else { return } @@ -841,7 +841,7 @@ public final class ListMonitor: Hashable { object: self, closure: { [weak self] (note) -> Void in - guard let `self` = self, + guard let self = self, let userInfo = note.userInfo, let rawObject = userInfo[String(describing: NSManagedObject.self)] as? NSManagedObject else { @@ -877,7 +877,7 @@ public final class ListMonitor: Hashable { object: self, closure: { [weak self] (note) -> Void in - guard let `self` = self, + guard let self = self, let userInfo = note.userInfo, let sectionInfo = userInfo[String(describing: NSFetchedResultsSectionInfo.self)] as? NSFetchedResultsSectionInfo, let sectionIndex = (userInfo[String(describing: NSNumber.self)] as? NSNumber)?.intValue else { @@ -1148,7 +1148,7 @@ public final class ListMonitor: Hashable { self.taskGroup.notify(queue: .main) { [weak self] () -> Void in - guard let `self` = self else { + guard let self = self else { return } @@ -1164,7 +1164,7 @@ public final class ListMonitor: Hashable { self.transactionQueue.async { [weak self] in - guard let `self` = self else { + guard let self = self else { return } @@ -1183,7 +1183,7 @@ public final class ListMonitor: Hashable { } newFetchedResultsControllerDelegate.taskGroup.notify(queue: .main) { [weak self] () -> Void in - guard let `self` = self else { + guard let self = self else { return } @@ -1338,7 +1338,7 @@ public final class ListMonitor: Hashable { queue: OperationQueue.main, closure: { [weak self] (note) -> Void in - guard let `self` = self else { + guard let self = self else { return } @@ -1360,7 +1360,7 @@ public final class ListMonitor: Hashable { queue: OperationQueue.main, closure: { [weak self] (note) -> Void in - guard let `self` = self else { + guard let self = self else { return } diff --git a/Sources/ListPublisher+Reactive.swift b/Sources/ListPublisher+Reactive.swift index c17db51..0dec65e 100644 --- a/Sources/ListPublisher+Reactive.swift +++ b/Sources/ListPublisher+Reactive.swift @@ -30,7 +30,6 @@ import Combine // MARK: - ListPublisher -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ListPublisher { // MARK: Public @@ -71,7 +70,6 @@ extension ListPublisher { // MARK: - ListPublisher.ReactiveNamespace -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ListPublisher.ReactiveNamespace { // MARK: Public diff --git a/Sources/ListPublisher.SnapshotPublisher.swift b/Sources/ListPublisher.SnapshotPublisher.swift index e78d43f..9793947 100644 --- a/Sources/ListPublisher.SnapshotPublisher.swift +++ b/Sources/ListPublisher.SnapshotPublisher.swift @@ -30,7 +30,6 @@ import CoreData // MARK: - ListPublisher -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ListPublisher { // MARK: - SnapshotPublisher diff --git a/Sources/ListReader.swift b/Sources/ListReader.swift index 1a8f85e..d99d9f3 100644 --- a/Sources/ListReader.swift +++ b/Sources/ListReader.swift @@ -34,7 +34,6 @@ import SwiftUI /** A container view that reads list changes in a `ListPublisher` */ -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) public struct ListReader: View { // MARK: Internal diff --git a/Sources/ListState.swift b/Sources/ListState.swift index f165947..2c82d6b 100644 --- a/Sources/ListState.swift +++ b/Sources/ListState.swift @@ -35,7 +35,6 @@ import SwiftUI A property wrapper type that can read `ListPublisher` changes. */ @propertyWrapper -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) public struct ListState: DynamicProperty { // MARK: Public diff --git a/Sources/NSManagedObjectContext+CoreStore.swift b/Sources/NSManagedObjectContext+CoreStore.swift index 3602d65..a23572b 100644 --- a/Sources/NSManagedObjectContext+CoreStore.swift +++ b/Sources/NSManagedObjectContext+CoreStore.swift @@ -108,7 +108,7 @@ extension NSManagedObjectContext { @nonobjc internal func objectsDidChangeObserver(for observer: U) -> Internals.SharedNotificationObserver<(updated: Set, deleted: Set)> { - return self.userInfo(for: .objectsChangeObserver(U.self)) { [unowned self] in + return self.userInfo(for: .objectsChangeObserver(U.self)) { return .init( notificationName: .NSManagedObjectContextObjectsDidChange, @@ -175,7 +175,7 @@ extension NSManagedObjectContext { } } - private func userInfo(for key: UserInfoKeys, initialize: @escaping () -> T) -> T { + private func userInfo(for key: UserInfoKeys, initialize: () -> T) -> T { let keyString = key.keyString if let value = self.userInfo[keyString] as? T { diff --git a/Sources/ObjectMonitor.swift b/Sources/ObjectMonitor.swift index f81b983..e1fa37b 100644 --- a/Sources/ObjectMonitor.swift +++ b/Sources/ObjectMonitor.swift @@ -299,7 +299,7 @@ public final class ObjectMonitor: Hashable, ObjectRepresentati toObserver: observer, callback: { [weak self, weak observer] (monitor, object) -> Void in - guard let `self` = self, let observer = observer else { + guard let self = self, let observer = observer else { return } @@ -370,7 +370,7 @@ public final class ObjectMonitor: Hashable, ObjectRepresentati object: self, closure: { [weak self] _ in - guard let `self` = self else { + guard let self = self else { return } @@ -395,7 +395,7 @@ public final class ObjectMonitor: Hashable, ObjectRepresentati object: self, closure: { [weak self] (note) in - guard let `self` = self, + guard let self = self, let userInfo = note.userInfo, let object = userInfo[String(describing: NSManagedObject.self)] as! NSManagedObject? else { diff --git a/Sources/ObjectPublisher+Reactive.swift b/Sources/ObjectPublisher+Reactive.swift index 4519cef..ca469b6 100644 --- a/Sources/ObjectPublisher+Reactive.swift +++ b/Sources/ObjectPublisher+Reactive.swift @@ -31,7 +31,6 @@ import CoreData // MARK: - ObjectPublisher -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ObjectPublisher { // MARK: Public @@ -73,7 +72,6 @@ extension ObjectPublisher { // MARK: - ObjectPublisher.ReactiveNamespace -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ObjectPublisher.ReactiveNamespace { // MARK: Public @@ -108,7 +106,6 @@ extension ObjectPublisher.ReactiveNamespace { // MARK: - ObjectPublisher.ReactiveNamespace where O: NSManagedObject -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ObjectPublisher.ReactiveNamespace where O: NSManagedObject { /** @@ -125,7 +122,6 @@ extension ObjectPublisher.ReactiveNamespace where O: NSManagedObject { // MARK: - ObjectPublisher.ReactiveNamespace where O: CoreStoreObject -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ObjectPublisher.ReactiveNamespace where O: CoreStoreObject { /** diff --git a/Sources/ObjectPublisher.SnapshotPublisher.swift b/Sources/ObjectPublisher.SnapshotPublisher.swift index 35052fa..2feb2cf 100644 --- a/Sources/ObjectPublisher.SnapshotPublisher.swift +++ b/Sources/ObjectPublisher.SnapshotPublisher.swift @@ -30,7 +30,6 @@ import CoreData // MARK: - ObjectPublisher -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) extension ObjectPublisher { // MARK: - SnapshotPublisher diff --git a/Sources/ObjectReader.swift b/Sources/ObjectReader.swift index a66f682..6231dec 100644 --- a/Sources/ObjectReader.swift +++ b/Sources/ObjectReader.swift @@ -34,7 +34,6 @@ import SwiftUI /** A container view that reads changes to an `ObjectPublisher` */ -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) public struct ObjectReader: View { // MARK: Internal diff --git a/Sources/ObjectState.swift b/Sources/ObjectState.swift index 5e00c56..ae79bf6 100644 --- a/Sources/ObjectState.swift +++ b/Sources/ObjectState.swift @@ -35,7 +35,6 @@ import SwiftUI A property wrapper type that can read `ObjectPublisher` changes. */ @propertyWrapper -@available(iOS 13.0, tvOS 13.0, watchOS 6.0, macOS 10.15, *) public struct ObjectState: DynamicProperty { // MARK: Public diff --git a/Sources/Where.swift b/Sources/Where.swift index 40d88d2..0267914 100644 --- a/Sources/Where.swift +++ b/Sources/Where.swift @@ -183,14 +183,37 @@ public struct Where: WhereClauseType, FetchClause, QueryClause */ public init(_ keyPath: KeyPathString, isEqualTo value: V) { + var nilPredicate: NSPredicate { + + return NSPredicate( + format: "\(keyPath) == nil" + ) + } + var valuePredicate: NSPredicate { + + return NSPredicate( + format: "\(keyPath) == %@", + argumentArray: [value.cs_toFieldStoredNativeType() as Any] + ) + } switch value { + + case let optionalValue as any FieldOptionalType: + switch optionalValue.cs_wrappedValue { + + case nil, + is NSNull: + self.init(nilPredicate) + + case _?: + self.init(valuePredicate) + } - case nil, - is NSNull: - self.init(NSPredicate(format: "\(keyPath) == nil")) + case is NSNull: + self.init(nilPredicate) - case let value: - self.init(NSPredicate(format: "\(keyPath) == %@", argumentArray: [value.cs_toFieldStoredNativeType() as Any])) + case _: + self.init(valuePredicate) } }