Overbuilt Cloud Config

무료
분류별 Jonathan Danek | 업데이트됨 2ヶ月前 | Tools
인기

0.2 / 10

지연 시간

14ms

서비스 수준

0%

Health Check

N/A

모든 자습서로 돌아가기 (1)

Cloud Config Swift Integration

cloud-config-swift

Github Link

A basic but powerful swift package for enabling cloud configs in your app.
Setup takes 30 seconds!

Integration:

1. SPM

  .package(url: "https://github.com/OverBuilt-io/cloud-config-swift.git", from: "1.0.0")

2. Setup RapidAPI

Navigate to RapidAPI and subscribe to my API, grab your access key and use it below! Takes 30 seconds and has free credit usage!

3. App Startup / Package Configuration

  do {
    try CloudConfig.shared.setup(id: "1", version: Bundle.main.infoDictionary?["CFBundleVersion"] as! String, key: "", default: nil)
  } catch {
    print(error.localizedDescription)
  }

4. Use it in views

struct MyView: View {

  @ObservedObject var cloudconfig = CloudConfig.shared

  var body: some View {
    VStack {
      Text("Config")
      Text(cloudconfig.config.value?.rawString ?? "")
    }
  }
}