A Swift package which creates a SwiftUI View with Acknowledgements from 3rd party packages used in your project.
- iOS 15.0+ / macOS 12.0+ / watchOS 8.0+ / tvOS 15.0+ / visionOS 1.0+
- Swift 5.9+
- Xcode 14.0+
To integrate SwiftAcknowledgements
into your Xcode project using Swift Package Manager, follow these steps:
- Open your project in Xcode.
- Select
File
>Swift Packages
>Add Package Dependency...
. - Enter the package repository URL:
https://github.com/flexlixrup/SwiftAcknowledgements
. - Choose the latest release or specify a version range.
- Add the package to your target.
Alternatively, you can add the following dependency to your Package.swift
file:
dependencies: [
.package(url: "https://github.com/flexlixrup/SwiftAcknowledgements", from: "1.0.0")
]
Then, include SwiftAcknowledgements
as a dependency in your target:
.target(
name: "YourTargetName",
dependencies: [
"SwiftAcknowledgements"
]),
import SwiftAcknowledgements
import SwiftUI
struct ContributionView: View {
let acktitle: SwAckTitle
let ackBody: SwAckBody
let ack: SwAcknowledgement?
init() {
self.acktitle = SwAckTitle("SwiftAcknowledgements", url: "https://github.com/flexlixrup/SwiftAcknowledgements")
self.ackBody = SwAckBody(maintainers: ["2024, Felix Ruppert"], licence: .MIT)
self.ack = try? SwAcknowledgement(swAckTitle: acktitle, swAckBody: ackBody, platforms: [.all])
}
var body: some View {
if let ack {
AcknowledgementsView(acknowledgements: [ack])
}
}
}
If you would like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
If you have any questions, feel free to open an issue.