diff --git a/frontend/src/component/onboarding/sdkSnippets.ts b/frontend/src/component/onboarding/sdkSnippets.ts
index 90984720f9..f573c76a8e 100644
--- a/frontend/src/component/onboarding/sdkSnippets.ts
+++ b/frontend/src/component/onboarding/sdkSnippets.ts
@@ -19,7 +19,7 @@ dotnet add package Newtonsoft.Json`,
React: 'npm install @unleash/proxy-client-react unleash-proxy-client',
Vue: 'npm install @unleash/proxy-client-vue',
Svelte: 'npm install @unleash/proxy-client-svelte',
- Swift: 'https://github.com/Unleash/unleash-proxy-client-swift',
+ Swift: 'https://github.com/Unleash/unleash-proxy-client-swift.git',
Android: `implementation("io.getunleash:unleash-android:\${unleash.sdk.version}")
// enabled required permissions
@@ -164,7 +164,7 @@ app.mount('#app')`,
`,
- Swift: `import SwiftUI
+ Swift: `import Foundation
import UnleashProxyClientSwift
var unleash = UnleashProxyClientSwift.UnleashClient(
@@ -185,11 +185,14 @@ unleash.start()`,
.build()
)`,
Flutter: `import 'package:unleash_proxy_client_flutter/unleash_proxy_client_flutter.dart';
+import 'dart:async';
final unleash = UnleashClient(
url: Uri.parse(''),
clientKey: '',
- appName: 'unleash-onboarding-flutter');`,
+ appName: 'unleash-onboarding-flutter');
+
+unleash.start();`,
};
// TODO: add idiomatic way of checking flag status that will populate metrics
@@ -219,7 +222,14 @@ export const checkFlagCodeSnippets: Record = {
React: ``,
Vue: ``,
Svelte: ``,
- Swift: ``,
+ Swift: `Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
+ print("Is enabled", unleashClient.isEnabled(name: ""))
+}
+
+RunLoop.main.run()`,
Android: ``,
- Flutter: ``,
+ Flutter: `Timer.periodic(Duration(seconds: 1), (Timer timer) {
+ final flagStatus = unleash.isEnabled('counter');
+ print('Flag is \${unleash.isEnabled("") ? "enabled" : "disabled"}');
+});`,
};