GitHub repository
Here, you will find the GitHub iOS Appstack SDK documentation. Please use the latest available version of the SDK.Requirements
- iOS 13.0+
- Xcode 14.0+
- Swift 5.0+
Swift Package Manager
You can install the SDK via Swift Package Manager (SPM) by adding the following dependency to yourPackage.swift file:
- Go to File > Add Packages
- Enter the repository URL:
https://github.com/appstack-tech/ios-appstack-sdk.git - Select the desired version and click Add Package
Initial setup
Configuring the SKAdNetwork attribution endpoint (optional)
Option 1: Through Info.plist add the following entry to your Option 2: Through Xcode
Info.plist file:- Open your
Info.plistfile - Add a new entry with the key: Advertising attribution report endpoint URL
- Set the value to:
https://ios-appstack.com/
Configuration parameters
The AppstackAttributionSdk.shared.configure() method supports the following parameters:
apiKey(String, required): Your Appstack API keyisDebug(Bool, default: false): If true, uses the development URL automaticallyendpointBaseUrl(String?, default: nil): Custom endpoint URL (optional)logLevel(LogLevel, default: .info): Logging level for debugging
Sending events
Important notes
- Always initialize the SDK before sending events
- Event names must match those defined in the Appstack platform
- Parameters are passed as a dictionary [String: Any] and can include any key-value pairs (e.g., revenue, currency, quantity)
- Revenue parameters support automatic type conversion (Double, Int, Float, String)
- Revenue ranges are configured in the Appstack platform and automatically synchronized
revenueorprice(number)currency(string, e.g.EUR,USD)
emailname(first + last name in the same field)phone_numberdate_of_birth(recommended format:YYYY-MM-DD)
Superwall
To start using the Superwall integration, click here to see the correct SDK documentation.Apple Ads
Advanced configuration
SDK behavior
The SDK automatically:- Fetches configuration from Appstack servers
- Manages conversion value updates based on event tracking
- Handles revenue range matching for conversion optimization
- Processes events in time-based windows (0-2 days, 3-7 days, 8-35 days)
- Queues events when the configuration is not ready
Event processing
- Events are processed asynchronously to avoid blocking the main thread
- The SDK queues events if the configuration is not yet loaded
- Revenue parameters are automatically validated and converted to numeric values
- Events are matched against configured revenue ranges in real-time
Support
For questions or issues:- Check the GitHub Repository
- Contact our support team at support@appstack.tech
- Open an issue in the repository