Skip to main content

Enable Logging

Turn on debug logging to see SpendOwl activity:
You don’t need to guard this for production — the SDK’s logging is compiled out of release builds entirely. See Where the Logs Go.

Using Build Flags

The #if DEBUG guard is redundant for the SDK’s own output, but it is still worth keeping if you want the line itself gone from release builds:

Log Levels

For more control, use logLevel:

Example Output

Each line is prefixed with the level it was logged at. Note that the SDK never logs an amount — it does not read prices; see Purchase Tracking.

Where the Logs Go

SpendOwl logs with print(), so they appear in the Xcode console while your app is running under the debugger — and nowhere else. There is no os_log integration, so Console.app will not show them.
Logging is compiled out of release builds. The logging code is wrapped in #if DEBUG, so a TestFlight or App Store build prints nothing even with enableLogging set to true. Verify your integration from Xcode against a debug build.
This also means there is nothing to turn off before you ship: a release build cannot leak SDK logs, because it does not produce any.

Common Issues

SDK Not Configured

Solution: Call configure() before using other SDK methods:

Invalid API Key

Solution: Check your API key in the dashboard. Ensure you’re using the correct key for your environment (test vs. live).

Network Errors

Solutions:
  • Check internet connectivity
  • Increase timeout: SpendOwlConfiguration(apiKey: "...", timeoutInterval: 30)
  • The SDK retries automatically, but persistent failures indicate network issues

Attribution Unavailable

Causes:
  • iOS version below 14.3
  • AdServices framework not available
  • Running in simulator (attribution may return mock data)
Solution: Attribution works on iOS 14.3+ on real devices. Simulators may return limited data.

Attribution Denied

Causes:
  • User or MDM restricted ad tracking
  • Limited Ad Tracking enabled in Settings
Solution: This is normal for some users. Handle gracefully:

Verifying Integration

Use this checklist to verify SpendOwl is working:
1

Check Configuration

2

Check SDK Version

3

Enable Logging

4

Trigger Attribution

5

Check Dashboard

Visit your SpendOwl Dashboard to see if events appear

Debug Mode in Dashboard

The SpendOwl dashboard shows debug data when using a test API key:
  • Test events are labeled separately
  • Don’t affect production ROAS
  • Useful for verifying integration

Reporting Issues

If you encounter issues not covered here:
  1. Enable .debug logging
  2. Reproduce the issue
  3. Copy the logs
  4. Open an issue on GitHub
Include:
  • iOS version
  • SDK version
  • Relevant logs
  • Steps to reproduce

Next Steps

Troubleshooting

Common issues and solutions

API Reference

Full SDK API documentation