Manos Chorianopoulos

WarplySDK args rename

......@@ -89,7 +89,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// 🔧 Configure the SDK
WarplySDK.shared.configure(
webId: "YOUR_WEB_ID", // Replace with your Web ID
appUuid: "YOUR_APP_UUID", // Replace with your Web ID
merchantId: "YOUR_MERCHANT_ID", // Replace with your Merchant ID
environment: .production // Use .development for testing
)
......@@ -133,7 +133,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
// 🔧 Configure the SDK
WarplySDK.shared.configure(
webId: "YOUR_WEB_ID",
appUuid: "YOUR_APP_UUID",
merchantId: "YOUR_MERCHANT_ID",
environment: .production
)
......@@ -637,14 +637,14 @@ class MainViewController: UIViewController, WarplyNavigationDelegate {
```swift
// Production environment (default)
WarplySDK.shared.configure(
webId: "your-production-web-id",
appUuid: "your-production-app-uuid",
merchantId: "your-production-merchant-id",
environment: .production
)
// Development environment
WarplySDK.shared.configure(
webId: "your-development-web-id",
appUuid: "your-development-app-uuid",
merchantId: "your-development-merchant-id",
environment: .development
)
......@@ -1239,7 +1239,7 @@ Task {
```swift
// ✅ Good: Initialize in AppDelegate
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
WarplySDK.shared.configure(webId: "...", merchantId: "...")
WarplySDK.shared.configure(appUuid: "...", merchantId: "...")
WarplySDK.shared.initialize { success in
// SDK ready
}
......@@ -1366,7 +1366,7 @@ WarplySDK.shared.initialize { success in
**Solutions:**
- Check network connectivity
- Verify webId and merchantId are correct
- Verify appUuid and merchantId are correct
- Ensure proper environment configuration
#### 2. No Data Returned
......
......@@ -134,14 +134,14 @@ public final class WarplySDK {
// MARK: - Configuration
/// Configure the SDK with web ID and merchant ID
public func configure(webId: String, merchantId: String, environment: Configuration.Environment = .production) {
/// Configure the SDK with app uuid and merchant ID
public func configure(appUuid: String, merchantId: String, environment: Configuration.Environment = .production) {
Configuration.baseURL = environment.baseURL
Configuration.host = environment.host
Configuration.errorDomain = environment.host
Configuration.merchantId = merchantId
storage.appUuid = webId
storage.appUuid = appUuid
storage.merchantId = merchantId
}
......