Releases: MontanaFlossCo/Flint
Xcode 11 Compatibility fixes
Since WWDC 2019 and Xcode 11 there have been a few issues building apps with Flint. Users of master have been able to work around these but it's time we have a public release so FlintDemo can build with Xcode 11 out of the box!
See https://bugs.swift.org/browse/SR-10831 for the root problem, which is a bit hard to grok (at least for me).
TL:DR; The type inference system should see constraints on protocols like IntentAction that fully satisfy the associated types of Action but it doesn't, so we have to also specify the associatedtype so that conforming types can compile. Thanks again to @slavapestov in the Swift labs at WWDC for troubleshooting this.
This release has minor enhancements:
- A typealias for FlintCore's UIAction to FlintUIAction. UIKit in iOS 13 introduced a UIAction type so there is a collision and ugly compiler errors unless you write your conformance as FlintCore.UIAction which is a bit uglier than FlintUIAction. You can use either, but if you import UIKit at all you cannot use the old UIAction directly. We also have counterparts FlintDimissUIAction and FlintIntentAction in case Apple decide to introduce more colliding types. Oldskool namespacing FTW.
- Some compilation fixes for UIKitForMac platform (Catalyst)
Flint 1.0 is released!
We are overjoyed to announce that Flint framework has reached its public 1.0 release — meaning that the API is now stable and the baseline features are all implemented.
New since the last ea-1.0.7 build are a small number of breaking source changes to converge on naming consistency, along with some new features and improvements:
- New system permissions support for Bluetooth, SiriKit and Media Library
- New system permissions support for camera and microphone on macOS
- New support for incoming NSUserActivity with
webpageURLset for deep linking - New support for resigning the current automatic NSUserActivity
- New support for custom
activityTypeinprepareActivity - New support for disabling Action Stack functionality if not required
- New support for disabling Analytics functionality if not required
- Action Stacks now use a limited-size LIFO array to control memory footprint
- Updated for Swift 4.2+ hashing changes
- Zero compiler warnings (typealias woes be gone!)
- Support for Action inputs that are not immutable, so the input is captured early for logging for correctness and thread safety
- The
perform()functions on action bindings now have argument nameswithInput:andwithPresenter:as necessary, replacing the previousinput:andpresenter:for more Swiftiness - The
NoInputenum case.nonehas changed to.noInput(returning optional enums that also have a case.noneis a delicious source of obscure bugs) - The
LoggerLevelenum case.nonehas changed to.off - The
addVoiceShortcut(input: ..)function now has the argumentwithInput:and throws - The
perform(intent:,completion:)function onIntentActionhas argumentwithIntent:and now throws - The
shortcut(input:)function on action bindings now has the argumentwithInput:and throws, as does thedonateToSiri(withInput:)function - The
prepareActivityfunction on actions now throws - The
associatedIntents(input:)function now haswithInput:argument and throws
Early Access 1.0.7
This is a significant release that brings support for App Store purchase tracking for Features that require purchases, a debug purchase tracker and debug UI for iOS and... support for installing Flint as a dependency using Cocoapods. Carthage remains the recommended way to install, but we think developers out there with projects using Cocoapods will be happy with this news.
- New
StoreKitPurchaseTrackerimplementation that does basic payment queue observing + storage of purchase status to establish whether features that require purchases are enabled - New
DebugPurchaseTrackerwhich provides runtime overrides of purchase status, working standalone or proxying a real instance of e.g.StoreKitPurchaseTrackerto provide development-time override of real sandbox purchase status - New
PurchaseBrowserFeatureinFlintUIfor iOS and tvOS, which will browse the list of purchases used by all features in the app, showing current status and allowing you to easily override them at runtime if you have aDebugPurchaseTrackerconfigured - New Podspecs for
FlintCoreandFlintUIand inclusion in the Cocoapods repository to support installing Flint in your projects using Cocoapods - New configuration closures in
Flint.quickSetupandFlint.setupfor safe initialisation of dependencies you pass to Flint, so that Flint logging can be used in these, and avoiding double-instantiation of default implementations - Improvements to URL Route rendering in debug UIs
- Improvements to Purchase constraint status rendering in debug UIs
- Fix compile issue on iOS 10 and Core Motion
- Fixes to imports to support CocoaPods
- Reorganisation of some platform-specific source into folders based on framework requirements e.g.
UIKit-SpecificorStoreKit-Specificto make Cocoapod include/exclude patterns simple across platforms
Early Access 1.0.6
Following hot on the heels of EA-1.0.5 which added Siri Intent support, this is a bug fix release that tackles a slew of unfortunate URL-mapping related bugs that were discovered today, as well as some other minor issues from 1.0.5.
- Multiple URL mappings on the same feature would not be recognised #229
- URL mappings always required a slash prefix in the incoming URL, but now we support
myapp:doSomethingas well asmyapp://doSomething#229 - Actions performed as a result of an incoming URL would not report their completion, typically resulting in the process locking up waiting for it to complete #229
- Intent donation would erroneously report an error to the log even when things succeeded
- Print logger was printing double carriage returns to
stdoutsince the switch to the new log event formatter #230
Thanks to Alvin Choo for finding these and submitting unit tests and a proposed fix in a pull request.
The API and guide documentation has been updated at flint.tools, as has the Flint Demo project which now supports adding voice shortcuts to open specific notes.¶
Early Access 1.0.5
This release includes comprehensive support for Siri Shortcuts and Intent extensions as well as bug fixes and API improvements as we converge to 1.0 final! Thank you to everybody who has provided feedback through this process.
You can now easily write Actions that are invoked from Intent Extensions for shortcuts that can run without launching your app, and donate shortcuts for Intent-based shortcuts.
There is one breaking source change: the activityTypes convention on Action has been renamed to activityEligibility to avoid ambiguity with activityType on NSUserActivity.
Changes of note:
- New
IntentActionfor Siri Intent actions, with a newperform(intent:, completion:)call you invoke from your Intent Extension #211 - New automatic Siri Shortcut donation for Intents associated with something the users have just done in the app
- Explicit support for
donateToSiri()on IntentActions so you can register your intents with Siri #113 - New persistent File logging support, integrated with
gatherReportZip()#219 - New
setLoggingLevelanddisableLoggingconvenience functions on allFeatures to selectively change logging levels - New support for
persistentIdentifierin the Activity builder, so you can later delete NSUserActivity registered with the system #217
The API and guide documentation has been updated at flint.tools, as has the Flint Demo project which now supports adding voice shortcuts to open specific notes.
Early Access 1.0.4
This release includes basic Siri Shortcut support as well as several bug fixes and API improvements.
Your actions that support Activities can be registered as Siri shortcuts easily.
There is one source-breaking change — you will need to update existing code that conforms to the Action protocol to instead conform to UIAction. See below for details.
- Automatic Siri Shortcut support for actions that support
NSUserActivitythrough a new convention along with a new convention for showing the Add Voice Shortcut UI for a given action and input. - The new
UIActionprotocol for most app UI actions to use for automatically dispatching them to the main queue in the main session. This paves the way forIntentActionin future too, for automatic intent dispatch from intent extensions - Extension safe APIs option is now turned on in builds
- The ZIPFoundation dependency has been removed. You can remove this from your projects.
The API and guide documentation has been updated at flint.tools, as has the Flint Demo project which now supports adding voice shortcuts to open specific notes.
Early Access 1.0.3
We've tagged a new 1.0.3 early access release that you can build apps against. This is an important release that slightly changes to way action completion is handled was well as action outcome handling. These are source-breaking changes. However the changes are well worth it and tick off some of the long-running tasks from the roadmap two 1.0 GM convergence.
- Replaced
completionhandlers onAction.performwith newCompletiontype to reduce bugs and clarify intent - Improved
ActionPerformOutcomevalues to have clearer intent - New simple API to get a context-specific loggers from a feature
- Changed the argument name of
URLMapped.urlMappings()toroutes - Several bug fixes including some permission request crashers
Early Access 1.0.2
Added
- A
ConditionalFeaturecan also now be aFeatureGroupthat has sub-features (#144) - A
FeatureGroupcan now also define actions and URL mappings (#144) - New FlintLoggable type for
InputTypeon actions, for more useful logging (#153)
Improved
- Weak linking of Contacts & EventKit to prevent App Store processing rejections for missing usage description keys (#145). A slightly hacky solution for now and some frameworks are still linked even if your app doesn't use them but this will be addressed in a future release. For full details of the horrible story, including an unexpected transitive dependency from
Intentsframework see this blog post - Improved the argument signatures of various
performfunctions to useperform(input:, presenter:)rather than the previousperform(with:, using:)which was ambiguous (#159). You'll need to rename your functions to match — the compiler will tell you! This is a slightly painful change but it's better to do it now - The
Flint.linkCreatoris now automatically created even if only one of app URL scheme or associated domain specified (#157).
(note: Some readers my wonder why the version does not follow semver norms. This is because these early access releases are not intended to be used as versioned dependencies in Carthage, and Carthage will not see these as valid versions, so you must add the dependency using the tag string. We'll go to "1.0.21" or similar for the first public release and all will be well again")