StargazersKit is a library for fetching the list of stargazers of a given GitHub repository if the device's security standards are met.
First you need to configure the framework. To do so you need to call StargazersApp.configure()
in the app delegate.
import StargazersKit
@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
StargazersApp.configure()
return true
}
}
then you simply call
StargazersApp.shared.stargazers(
for: REPO HERE,
owner: REPO OWNER HERE,
) { result in
switch result {
case .success(let stargazers):
print("Here are the stargazers: ", stargazers)
break
case .failure(let error):
print("ERROR: ", error)
break
}
}
You can add StargazersKit to an Xcode project by adding it manually.
-
Download a copy of StargazersKit.
-
Drag the downloaded
StargazersKit.xcframework
in your own project and make sure is set to be embedded in the Embedded Binaries section of the General tab of your application target.
💡 Tip: see the [Example Application] for examples of such integration.
This library is released under the MIT license. See LICENSE for details.