Releases: jevonmao/PermissionsSwiftUI
v1.5.1
v1.5.0
What' New?
NOTE: All changes in 1.5.0, including new submodules, are backward compatible and contains no breaking changes
- Break up each permission type into its submodule (avoid App Store Review rejection)
- Dropped minimum package deployment version to iOS 11. PermissionsSwiftUI can now be used in older projects transitioning to SwiftUI.
v1.4.3
v1.4.2
v1.4.1
What's New?
- Added CocoaPods support! You can now enjoy PermissionsSwiftUI's full functionalities in even more ways 🙌.
platform :ios, '14.0'
target 'test abstract' do
use_frameworks!
pod 'PermissionsSwiftUI'
end
What's Fixed?
- Removed unnecessary Swift compiler warnings
- Resolved package resource warnings
- Fixed a potential issue with deprecated configuration APIs
v1.4.0
What's New?
PermissionsSwiftUI 1.4.0 Evolution
- 1.4.0 is yet another major version of PermissionsSwiftUI. To learn more, read the migration guide.
Completion Result Handler
- Need to access the results of the request? The completion result handler is an incredibly powerful feature. The closure returns the result of succssful and erroneous permissions as 2 parameters. You can even get the specific status of each permission.
.JMModal(showModal: $showPermissions,
for: [.camera, .bluetooth, .photo],
onAppear: {},
onDisappearHandler: {(successful: [JMResult]?, erroneous: [JMResult]?) in
print(successful!)
print(erroneous!)
})
Apple Music Permission
- New permissions! PermissionsSwiftUI now supports Apple Music, also known as the medai library or playback permission.
Deprecated Properties
All the configuration and customization properties in PermissionStore
are deprecated and have been relocated to configStore
or permissionsComponentsStore
which are all new properties of PermissionStore
.
For help with migrating your codebase, checkout the migration guide
Redesigned Code Base
After a long and arduous journey, PermissionsSwiftUI underwent a massive redesign and refactor the past month. No backward-incompatible API changes are added. However, the new dependency injection design pattern should make the codebase a ton more readable and maintainable for our open source contributors 🎉🎉🎉.
Miscellaneous
In the exciting, all-new, PermissionsSwiftUI 1.4.0, several new public classes, structs, and protocols have been added.
CustomizableView
All the PermissionSwiftUI library's custom view modifiers, that is JMModal
, JMAlert
, as well as customizing methods such as .changeHeaderTo()
now returns type some CustomizableView
intead of some View
.
Although this is not technically considered a new "public API" or "feature", this is still an important change for v1.4.0. Returning type some CustomizableView
means that the configuration modifiers such as .changeHeaderTo
or .changeBottomDescriptionTo()
can only be used in the correct context.
This will compile because it makes sense to the library's built-in modifiers on a library's built in view:
var body: some View {
VStack {
Text("PermissionsSwiftUI is the best Swift library!")
}
.JMModal(showModal: .constant(true), for: [.camera, .location])
.changeHeaderTo("Jevon's Header")
.setAccentColor(to: .red)
}
PermissionSchemaStore
The schema storage class that coordinates PermissionsSwiftUI’s internal functions
ConfigStore
JMResult
PermissionComponentsStore
But this will not compile because it simply does not make sense:
var body: some View {
VStack {
Text("PermissionsSwiftUI is the best Swift library!")
}
.changeHeaderTo("Jevon's Header")
.setAccentColor(to: .red)
}
Magical, isn't it?
What's Fixed?
- Fixed malfunctioning customizing modifiers for JMAlert
- Fixed
tracking
permission version requirement - Fixed typos and ambiguous texts in the official documentation
- Various minor bug fixes
To finish it off, this is a release we are all excited about. PermissionsSwiftUI has been and will continue to evolve with better, newer features. I would like to thank everyone in this open source community, because you gave me the motivation and support to keep building this project.
v1.3.0
What's New?
- Prevent users from dismissing the view before all permissions have interacted! Learn more in README.md 🙌 🙌 🙌
- Completely RE-DESIGNED beautiful animation for JMAlert that is much smoother and Apple 🍎 style
What's Fixed?
- Fixed a bug where when trying to use configuration model for JMAlert, an incorrect JMModal will show
v1.2.5
v1.2.4
What's New?
- The all-new, most powerful configuration for health permissions
- The previously redundant
read
andwrite
associated value parameters are now replaced by theHKAccess
structure initializers
- The previously redundant
- Configuration via model object is now supported for
JMAlert
style 🙌
What's Fixed?
- PermissionSwiftUI's official documentation 📖 is greatly enhanced!
- Documented previously undocumented public APIs
- Documentation is now divided with section headers to improve the reading experience
- Certain description words and examples in the documentation are improved