Skip to main content

iOS Troubleshooting

This page covers common issues encountered during iOS SDK integration. [PLACEHOLDER] Enable verbose logging by passing logLevel: .debug to VLPlaySDK.initialize() and inspect Xcode's console output for messages prefixed with [VLPlaySDK]. For persistent issues, contact your VLPlay representative.

[PLACEHOLDER] Authentication issues on iOS are often related to URL scheme misconfiguration or missing Info.plist entries. Review the Installation guide and ensure your URL scheme matches the format vlplay-YOUR_APP_ID.

Common Issues

SDK Not Initialized Error

Cause: A VLPlay API was called before VLPlaySDK.initialize() completed.

Fix: Move the initialize() call to the top of AppDelegate.application(_:didFinishLaunchingWithOptions:) or to the App.init() body.


OAuth Callback Not Received

Cause: URL scheme is missing or incorrect in Info.plist.

Fix: Add CFBundleURLSchemes with value vlplay-YOUR_APP_ID exactly as shown in the Installation guide. Ensure AppDelegate.application(_:open:options:) calls VLPlaySDK.handleOpenURL(url).


Build Error: Missing Module 'VLPlaySDK'

Cause: Package not fully resolved by Xcode.

Fix: In Xcode, go to File → Packages → Reset Package Caches, then rebuild.


Simulator Crashes on Launch

Cause: Architecture mismatch if an older version of the XCFramework is cached.

Fix: Clean the build folder (Product → Clean Build Folder) and re-run. Make sure you are using SDK version 1.0.0 or later which includes arm64 simulator slices.


In-App Purchase Not Working in TestFlight

Cause: StoreKit configuration file is only used in simulator/debug.

Fix: Use a real sandbox Apple ID for TestFlight IAP testing. See Apple's StoreKit Testing documentation.