What's New in Swift SDK 1.1.1
Swift SDK 1.1.1 is a patch release by its number, and its headline is a fix: Swift SDK 1.1 did not compile. But the diff between the two tags holds more than the fix, including two changes you should read before you upgrade. This post lists all of it.
The short version
- Fixed: the package builds. 1.1 added a public type named
Environment, which hid SwiftUI's@Environmentinside the package's own views. - Renamed: that type is now
FeedbackEnvironment, with a new.localcase..developmentnow means FeedbackKit's development server, notlocalhost. - New: the views are localised in eleven languages and carry VoiceOver labels and hints.
- New: an optional mailing-list opt-in on the submit form and in the vote dialog, plus a sort by comment count.
- Changed: the server addresses moved to
getfeedbackkit.com, and the package now ships a privacy manifest.
The build fix
In 1.1 the new environment enum was called Environment. Inside the package, every view that declared @Environment(\.dismiss) or @Environment(\.colorScheme) then resolved the attribute to the SDK's enum instead of SwiftUI's property wrapper, and the build stopped with "enum 'Environment' cannot be used as an attribute". 1.1.1 renames the enum and writes @SwiftUI.Environment in every view. The rename also ends the clash in your own files: a plain @Environment next to import SwiftlyFeedbackKit means SwiftUI's again. If your project resolved 1.1 and failed to build, update the package and it resolves 1.1.1.
Two related changes went in with the fix. The check that tells TestFlight from App Store builds was rewritten: it used to wait on a semaphore for a StoreKit task at launch, a pattern Swift 6's data-race checking flags, and it now awaits StoreKit's answer before configureAuto picks a server. And the package now declares Swift 5 language mode for its own sources. That does not change your app: your targets keep whatever language mode they use, Swift 6 included.
Breaking changes and how to migrate
Environment is now FeedbackEnvironment
If you wrote the type name, rename it. In a file that also imports SwiftUI, 1.1 code had to spell it SwiftlyFeedbackKit.Environment to compile. Code that passes .production straight to configure needs no change.
// Swift SDK 1.1
let environment: SwiftlyFeedbackKit.Environment = .production
// Swift SDK 1.1.1
let environment: FeedbackEnvironment = .production
.development moved off localhost
This one compiles without a warning and changes where requests go, so check for it:
| Case | Swift SDK 1.1 | Swift SDK 1.1.1 |
|---|---|---|
.local | Did not exist | localhost:8080 |
.development | localhost:8080 | FeedbackKit's development server |
.testflight | Staging server | Staging server, new address |
.production | Production server | Production server, new address |
If you run a FeedbackKit server on your own Mac, switch to .local:
// Swift SDK 1.1: a server on your own Mac
SwiftlyFeedback.configure(environment: .development, key: "sf_local_key")
// Swift SDK 1.1.1
SwiftlyFeedback.configure(environment: .local, key: "sf_local_key")
configureAuto(keys:) follows the same move: DEBUG builds now go to the development server with the debug key, or the testflight key when debug is nil. Neither is your production key, so if your project lives on production, as projects made in the dashboard do, configure DEBUG builds with configure(environment: .production, key:) instead.
Eleven languages and VoiceOver
Every string in the views is now translated into Arabic, Brazilian Portuguese, Chinese (Simplified), French, German, Italian, Japanese, Korean, Russian and Spanish, as well as English. The views follow the device language, with no setting to change.
VoiceOver now reads each card's title, description, status, category, vote count and comment count in one label, with a hint that a double tap opens it. Vote buttons say whether you have voted, and a closed request says that voting is closed. The form fields say which are required, and the loading and submitting spinners have labels.
Mailing-list opt-in
Once someone types an email in the submit form or the vote dialog, a "Subscribe to mailing list" toggle appears below it. On the submit form and the detail screen's vote dialog it opens two more toggles, for operational and for marketing emails. The opt-in feeds an email-list integration, such as Mailchimp or MailerLite on Pro and up, and the server ignores it when none is set up. Two new settings control it:
// Hide the toggle if you do not use an email-list integration.
SwiftlyFeedback.config.showMailingListOptIn = false
// Leave this false unless you already have the person's consent.
SwiftlyFeedback.config.mailingListDefaultOptIn = false
showMailingListOptIn defaults to true, so the toggle appears after you upgrade. submitFeedback and vote(for:) gained matching subscribeToMailingList and mailingListEmailTypes parameters, both defaulting to nil, for your own screens.
Smaller changes
- The list's sort menu adds Comments, which puts the most-discussed requests on top.
- The submit form's email field starts filled in with
config.userEmailwhen you have set it. - The server addresses moved from
swiftly-developed.comtogetfeedbackkit.com. If you pass a URL toconfigure(with:baseURL:)yourself, the production address is nowhttps://api.prod.getfeedbackkit.com/api/v1. - A privacy manifest ships with the package. It declares the data the SDK collects (a user id, an email address, the text people write, and product interaction) and states that none of it is used for tracking.
- The user id is now stored with the data protection keychain on every platform. On the Mac that is a different store from the one 1.0 and 1.1 used, so an anonymous id saved by those versions is not read back, and a Mac user may start with a new id after the update.
Feedbackcompares and hashes byidalone. Two values with the same id are now equal even when their vote counts differ.Feedbackhas a new optionalisHiddenOverLimitproperty.
How FeedbackKit fits in
Localised views matter more now that FeedbackKit has SDKs beyond Swift. The same board can sit in your Android, Flutter and React Native apps, and every request lands in one list for your team. Here is how that looks, with sample data from a fictional hiking app:
One board on every screen
Upgrading
- Set the package rule to Up to Next Minor Version from 1.1.1 and update. Up to Next Major now resolves 1.3.0, which has source-breaking changes despite its minor number.
- Rename any use of the
Environmenttype toFeedbackEnvironment. - Replace
.developmentwith.localif you meant your own Mac. - Decide whether you want the mailing-list toggle, and set
showMailingListOptIn.
The Swift SDK 1.1 tutorial walks through a full integration on this version, and the reference is in the Swift SDK docs. The next release is Swift SDK 1.2. If you are starting today, use the current SwiftUI tutorial.
Every plan includes the Swift SDK. Start free and ship the board in eleven languages.