All notable changes to this project will be documented in this file.
AppwiseCore
adheres to Semantic Versioning.
- Core: deprecate our
Cancelled
error type in favour of Swift's built-inCancellationError
type. - CoreData: due to incorrectness, we're deprecating
responseInsert
(this is notresponseInsert
, see below). - This version drops support for iOS 11 or lower.
- Behaviours: add keyboard avoiding behaviour (using the system provided layout guide).
- CoreData: make
SingleObjectRepository
compatible withOptionalIdentifiable
. - CoreData: lower the requirement of repositories to
NSFetchRequestResult
where possible. - CoreData: repository
refresh
now asserts by default, to better warn about missing implementations. - Core: add
requestVoid
method to network client. - Core: default error parser now ignores
.explicitlyCancelled
(for cancelled requests). - Core: result "cancellation" now uses Swift's built-in
CancellationError
type if available. - Core: add privacy manifest file
- XcodeGen: added a template for shared frameworks.
- Fastlane: ensure translations export can handle "empty" targets.
- Scripts: fix Xcode warnings for build steps without input/output files.
- Bump dependencies (Sentry to 8).
- CoreData: ensure
requestInsert
imports objects on the context's thread. - Sourcery: fix code generation for
Self.ID
properties. - SwiftLint: fix warnings from using deprecated rules (because we use
all
).
- Bump copyright.
- Core: ensure we use localised info.plist values where possible.
- Fastlane:
sentry_auto_set_commits
better handles issues with Sentry API.
- Bump internal dependencies.
- Fixed a compilation issue with Xcode 13.
- Updated to Alamofire 5.0, causing some breaking changes for Network clients and related types.
- Switched to Swift's built-in
Result
type, which requires anError
generic parameter. - It is recommended to use the migration script when possible, it will convert most common breaking changes.
- Result.isCancelled would return false after mapping to another result type.
- XcodeGen: ensure the "iOS Extension" template can locate it's dependencies.
- Bump SentrySDK version from 6 to 7. Make sure you configure a trace sample rate! This should NOT be a breaking change, but if needed, check their migration docs.
- Lint & format code, and add commit hooks to trigger these.
- Bump SentrySDK version from 5 to 6. This should NOT be a breaking change, but if needed, check their migration docs.
- CoreData: repository refresh handlers now result in a "cancelled" error by default (until you override them).
- CoreData: operation & save callbacks are now on the main queue by default (you can provide your own queue).
- Scripts: restore "strip architectures" build step, seems it is still needed when using certain (fat) libraries.
- Removed support for CocoaPods Rome. Switch to Alexandria with the migration script:
bash <(curl -Ls "https://raw.githubusercontent.com/appwise-labs/Alexandria/convert-script/convert-to-alexandria.sh")
.
- XcodeGen: add support for xcframeworks, so you don't have to add them manually anymore.
- XcodeGen: add small "iOS Extension" template.
- Sourcery: fix warnings about unknown types (from libraries/SDKs).
- Deeplinker: don't break nav. controllers.
- Fastlane: fix importing of english changes (Xcode issue).
- Core:
Router
now supports ananyParams
property which you can use withJSONEncoding
to send (for example) anArray
instead of aDictionary
.
- Fastlane: import localization files sorted by name.
- Fastlane: fix some special cases in
export_localizations
(units with no translations, etc...). - Fastlane: do not try to merge localization xliff that does not exist (in
export_translations
).
- Fastlane: add
sync_localizations
action that imports and then exports strings in one go.
- Fastlane: The
import_localizations
action avoids needlessly changing the xliffs. - Fastlane: The
export_localizations
action now preserves weblate status flags. - Rome: fix xcodegen issue where it generated invalid projects (for fastlane & CI).
- Fastlane: The export/import translations actions now ensure the source language is
en_devel
, to better integrate with Weblate. - Core Data: Add some helper methods to object list repositories, such as getting all objects, the count of objects, or if there are any results.
- UI: Add some common classes such as
IntrinsicImageView
(maintains ratio) andHairLineView
(thinnest line depending on device). - UI: correctly embed child controllers with insets using
EmbedWithInsetsSegue
andEmbedInsetsBehaviour
(supports top & bottom insets).
- Fastlane: improve
sentry_auto_set_commits
handling of some Git URL variations.
- Fastlane: fixed Sentry set-commits step for repositories with no tags.
- Rome: revert skip project generation step on CI, it doesn't belong here.
- Rome: Skip project generation step on CI, as it has no purpose. We assume that your project is committed along with other related files.
- AppwiseCore now depends on Sentry 5.0, update your client initialisation code accordingly.
- The built-in build steps depend on filelists that you should provide. Check the example project for a generic set of input/output file lists.
- UI: fix some cases where resizable UITableView headers/footers weren't sizing correctly.
- AppDelegate: replace TTY logger by OS logger (as we only support iOS 10+).
- Sourcery: Disable SwiftLint for generated files
- Script: Renamed the podfile script (
generate_project.rb
) tococoapods_rome.rb
& add some common steps:- Use the
interface_builder_integration
function inpre_compile
to fix interface builder integration with pre-compiled frameworks (missing public headers). - Use the
force_bitcode
function inpre_compile
to ensure frameworks are pre-compiled with Bitcode.
- Use the
- Fastlane: add actions for translations steps:
export_localizations
andimport_localizations
. - Fastlane: add action for automatically linking commits to a sentry release:
sentry_auto_set_commits
.
- Script: Add more scripts for the common build steps, and improve them to check for tool availability & whether it is running on CI or during an archive.
- Script: Added script & template for project generation using XcodeGen.
- Use the
generate_project
function fromgenerate_project.rb
to trigger generate the necessary files and your project, based on your Podfile. - Include the
target-templates.yml
file, and use theiOS App
target template to add most commonly used build steps.
- Use the
- DB:
var
declarations must bedynamic
as well as@NSManaged
.
- Core: improved the network error parser, it now supports sub-errors.
- CoreData: fixed a bug for data models when used inside frameworks.
- AutoViewModel template now supports adding extra imports using the
extraImports
variable.
- AutoViewModel won't generate getters for
private
properties.
- The default
Client
error parser tries to ignore HTML errors.
- Core: rename
ViewModel.Model
toViewModel.ModelType
to avoid conflicts withModel
namespace. This shouldn't impact anyone unless you were directly referencing the associated type. - Core: fallback to CFBundleName if CFBundleDisplayName is empty.
- Dropped support for iOS 9.0.
- Removed SugarRecord as a dependency.
- DB: rewritten to use
NSPersistentContainer
. - Core: renamed
ViewModel
toViewModelType
(so we can have aViewModel
namespace). - Upgraded to Swift 5.0.
- Core: add
Identifiable
protocol for easyIdentifier
phantom types. - Core: add
PushNotificationType
protocol for parsing incoming pushes. - Deeplink: add shortcut method for opening a list of path elements.
- UIApplication: make spec compatible with app extensions.
- New SwiftGen templates for CoreData code generation:
CoreData.stencil
(similar to built-in template) andCoreData (KeyPaths).stencil
(for#keyPath
use).
- Deeplink: fix issue with VCs with child deeplink matchables (for example a segmented tabcontroller).
- Behaviours: ensure the hidden behaviour VC doesn't conflict with auto-insetting/large title hiding (scrollviews).
- AutoVM: avoid infinite recursion for unknown super types.
- AutoVM: fix bug where properties of super-types weren't generated.
- DB:
Wrapper.map(_:)
is now a throwing function, along with some of the<-
operators.
- New
AutoModel
sourcery template to generateModel
-namespaced typealiases for your model types. TheAutoViewModel
template has been updated to handle this change. - DB: Improved the propagation of errors from inside
Wrapper.map(_:)
. Accordingly, some of the<-
operators are now throwing as well, just usetry
andmap(_:)
will catch it.
- DB: fix another deadlock that could happen during some saves.
- AutoViewModel: fixed sourcery crash by checking for empty types.
- DB: fix a deadlock that could happen during some saves.
- DB: add a merge policy property, and set it to
mergeByPropertyStoreTrump
by default.
- AutoViewModel: fix bug that broke auto
vm
property generation.
- Core: fix crash on startup do to
Version
not being archivable.
- Core: the
Version
provided byConfig.handleUpdate(from:, to:)
andConfig.appVersion
is now an actual structured type, instead of a plain string.
- DeepLink: you can now see if there's a scheduled route, and cancel it if needed.
- DeepLink: fixed a bug where the internal state was wrong when switching tabs with navigation controllers (where you weren't in the first view controller).
- Update to SwiftLint 0.28.
- Core: split off the application delegate and services into a separate subspec
UIApplication
, so that theCore
subspec can be used in application extensions. - Behaviours: added a new
RefreshOnAppearBehaviour
, that by default will only trigger a refresh if the appear is not from a pop navigation.
- DeepLink: fix a crash when opening a link if the stack was empty (i.e. on app startup).
- DB: make
Wrapper
inheritManyInsertable
. This means[Wrapper]
s will beInsertable
, which matchesAlamofireCoreData
behaviour.
- DB:
Map
(used byWrapper
)context
property is now public, so you can access the context during an import. - DB: Added a
NSManagedObjectContext.removeAll(of:)
method that uses a batch delete request. Note: this delete won't automatically trigger an update of your context.
- AutoViewModel: better support for nested (and other) types.
- Network: better parsing of structured errors, and store the underlying error should you need it.
- Core: Add a new network shortcut for loading a
Decodable
object from JSON.
- DB: fix insert requests with custom serializers and/or non-default databases, using the shortcut
requestInsert
method.
- DB: Removed the
Many
wrapper structure (forArray
), as Swift no longer needs this (since 4.1). You can simply use[MyStuff].self
instead ofMany<MyStuff>.self
during insert calls.
- Core: translate the user visible errors (such as unauthorized).
- Core: added more network shortcut methods such as
requestJSON
andrequestString
.
- Core: Add a method to extract an nice error from a server's response.
- DB: Add a shortcut method for building a request, performing an insert and saving the result in one go. (see
Client.requestInsert(...)
)
- DB: The
Importable
andManyImportable
protocols are back due to limitations in Swift.
- DB: AlamofireCoreData has been replaced by a built-in solution. This means that:
TheThis change was undone in 0.9.1 due to limitations in Swift.Importable
andManyImportable
protocols have been merged into theInsertable
andManyInsertable
protocols respectively.- There's no longer a
responseInsert
call where you can provide your ownNSManagedObjectContext
.
- Network: remove the old
responseInsert
functions where the completion block accepted aNSManagedObjectContext
parameter. This has been replaced by thedidImport
functions onInsertable
types. (see version 0.8.7)
- Swift 4.2 and Xcode 10 support.
- AutoViewModel: add support for nested types.
- Core: fix build number plist key.
- Core: you can now unregister observers from typed notifications.
- Core: you can now provide a timestamp when "touching" a route.
- Script: Only set the version number of DSYM bundles if they exist.
- DB: Fix a bug where the
Importable
context object was missing.
- DB: Fix a bug in the keyPath conversion code in
first
.
- Core Data: some tweaks to the
Importable
protocol (more default implementations)
- Core Data: added new protocol
Importable
for easier post-processing of imported entities.
- Greatly improved the performance of
findOldItems(filter:)
for large data sets.
- Updated the documentation and sample project to match library changes. The sample project is now a fully featured skeleton project.
- The network
Router
type now supports multipart information.
- DB: don't block on main thread during merge from save.
- Added
TintedImageView
view for fixing broken tintColor (for template images) inUIImageView
in XCode 9.
- Version script: Only update the build number for app extensions in archive builds, this fixes an installation bug (during running) due to code signing.
- Core Data: Reverted the callback queue for insert operations.
- Update build number script to make the date counter relative to the last commit date.
- Make the library compatible with app extensions.
- Core Data: Fix some issues leading to crashes & deadlocks due to accessing MOCs on the wrong queue.
- Undo the switch to static_framework for CocoaPods for now.
- ViewModel protocol has changed a bit. Essentially, the
data
property is no longer an implicitly unwrapped optional, and the constructor has changed to accept a data argument.
- Documented all types and methods.
- Add a sourcery template to automatically generate ViewModel init and properties implementations.
- Fix the
vm(...)
shorthand method not working correctly for non-optional instances. - Fix accessibility of some typednotification methods.
- Added build number updater script (
Scripts/update_build_number.sh
).
- Added a typed notifications, with optional typed payloads.
- Use the recommended way for nav/tabbarcontroller to ask their children for the preferred status bar style/hidden.
- Switched to static_framework for CocoaPods.
- Core: Fix crash in CocoaLumberjack Crashlytics logger.
- Added application services to the app delegate.
- Added ViewModel protocol with helpers.
- AppDelegate: all UIAppDelegate implementations are now
public
instead ofopen
. To add an override please use application services. - Config: renamed
teardown()
toteardownForReset()
.
- DB: added (sync) operation variations that does not return anything.
- Added view controller lifecycle behaviours for:
- Navigation bar visibility.
- Application foreground/background listeners.
- Keyboard dismissal on disappear.
- Resizable UITableView headers/footers.
- Framework for deep linking and destroying/building up a stack of view controllers.
- Helper for requiring a value from optionals.
- Replace our own IBInspectable properties with IBAnimatble dependency.
- DB: Add initializer for custom persistent stores.
- Swift 4 support.
- DB: Convert the result of operations to the main thread.
- Remove dependency on AsyncSwift.
- DB: Renamed
save
property tonewSave()
function.