Radio Streams from all over the world. Free and Open. RadioBrowserKit is a Swift package which lets you use the free and Open Source Radio Browser API.
Installation
RadioBrowserKit.git works with Swift 5.3 and above for iOS and macOS.
The first thing you have to do is create an instance of the RadioBrowser class. This can be done at the beginning of your app launch. For SwiftUI you can provide it as an environment object via view modifier.
@main
struct MyApp: App {
@StateObject var radioBrowserApi = RadioBrowser()
var body: some Scene {
WindowGroup {
MainView()
.environmentObject(radioBrowserApi)
}
}
}
Actually RadioBrowser publishes four observed properties which you can use in your SwiftUI view automatic refreshing (a RadioBrowserDelegate to use it in a UIKit app will follow later):
@Published public internal(set) var stations: [Station] = []
@Published public internal(set) var favorites: [Station] = []
@Published public internal(set) var isLoading: Bool = false
Developer Notes
RadioBrowserKit uses GitFlow. There are two branches, main and develop. The develop branch is the default branch. To provide (changes|fixes|additions) you just have to fork this repository and create your working branch with develop as base. If you’re done, just open a pull request.
RadioBrowserKit - The Swift SDK for Radio Browser
Radio Streams from all over the world. Free and Open.
RadioBrowserKit is a Swift package which lets you use the free and Open Source Radio Browser API.
Installation
RadioBrowserKit.git
works with Swift 5.3 and above for iOS and macOS.Swift Package Manager
Carthage
Put this in your
Cartfile
:How to use it?
The first thing you have to do is create an instance of the
RadioBrowser
class. This can be done at the beginning of your app launch. For SwiftUI you can provide it as an environment object via view modifier.Actually
RadioBrowser
publishes four observed properties which you can use in your SwiftUI view automatic refreshing (aRadioBrowserDelegate
to use it in a UIKit app will follow later):Developer Notes
RadioBrowserKit
uses GitFlow. There are two branches,main
anddevelop
. Thedevelop
branch is the default branch. To provide (changes|fixes|additions) you just have to fork this repository and create your working branch withdevelop
as base. If you’re done, just open a pull request.Contact
License
RadioBrowserKit by Frank Gregor is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.