This guide covers common issues and their solutions when integrating the Permutive iOS SDK.Documentation Index
Fetch the complete documentation index at: https://docs.permutive.com/llms.txt
Use this file to discover all available pages before exploring further.
Installation
Initialization
Tracking
Installation Issues
CocoaPods: Pod not found
CocoaPods: Pod not found
Unable to find a specification for 'Permutive_iOS'Solutions:- Update your CocoaPods repo:
- Ensure CocoaPods is version 1.9.1 or later:
- Clear the cache:
SPM: Package resolution failed
SPM: Package resolution failed
- Check your network connection
- Reset package caches: File → Packages → Reset Package Caches
- Verify the URL is correct:
https://github.com/permutive-engineering/permutive-ios-spm - Try removing and re-adding the package
Module not found after installation
Module not found after installation
No such module 'Permutive_iOS'Solutions:- Clean build folder: Product → Clean Build Folder (⇧⌘K)
- For CocoaPods: Ensure you opened the
.xcworkspacefile, not.xcodeproj - Restart Xcode
- For SPM: Reset package caches
Bitcode errors
Bitcode errors
- Set Enable Bitcode to No
Duplicate symbols
Duplicate symbols
- Ensure you’re not mixing CocoaPods and SPM for Permutive
- Check for conflicting library versions
- Clean derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData
Initialization Issues
Options returns nil
Options returns nil
Options(apiKey:organisationId:workspaceId:) returns nil.Causes:- Empty or whitespace-only credentials
- Invalid credential format
Initialization fails silently
Initialization fails silently
Network error during initialization
Network error during initialization
- Check device network connectivity
- Verify no firewall is blocking Permutive domains
- Check if running on simulator with network issues
- Retry initialization:
SDK not ready when tracking
SDK not ready when tracking
Tracking Issues
Events rejected with schema error
Events rejected with schema error
- Property names don’t match schema
- Property types don’t match schema
- Extra properties not in schema
- Check your Permutive dashboard for the correct schema
- Verify property names exactly (case-sensitive)
- Remove any extra properties
- Verify property types match (string, int, bool, etc.)
EventProperties init throws
EventProperties init throws
EventProperties constructor throws an exception.Causes:- Unsupported value types
- Invalid nested objects
Pageview event not firing
Pageview event not firing
- Ensure
resume()is called: - Check PageTracker was created successfully
- Verify SDK is initialized before creating PageTracker
- Enable debug logging
PageTracker stops unexpectedly
PageTracker stops unexpectedly
No log output
No log output
- Confirm
logModesis set beforestart(): - Check Xcode console filter isn’t hiding messages
- Verify SDK is actually being initialized
Cohort and Activation Issues
Empty cohorts
Empty cohorts
Permutive.shared.cohorts returns an empty set.Causes:- SDK just initialized (cohorts not yet synced)
- No events tracked yet
- User doesn’t qualify for any cohorts
- Wait a few seconds after initialization
- Track some events to generate data
- Use TriggerProvider for reactive updates
- Check your dashboard for cohort definitions
Activations different from cohorts
Activations different from cohorts
Contextual cohorts not appearing
Contextual cohorts not appearing
dfp_contextual or appnexus_adserver_contextual is empty.Solutions:- Verify contextual features are enabled (contact your CSM)
- Update to SDK 2.0.0+
- Ensure PageTracker has a valid, publicly accessible URL
- Allow time for content analysis (1-2 seconds)
- Check debug logs for classification errors
Identity Issues
setIdentityForIDFA fails
setIdentityForIDFA fails
setIdentityForIDFA throws an error.Cause: IDFA is all zeros (tracking denied/restricted).Solution:Reserved tag error
Reserved tag error
appnexus, amp, gigya, sailthru, aaidSolution: Use custom tag names:Identity not merging across devices
Identity not merging across devices
Ad Integration Issues
No targeting data in ad request
No targeting data in ad request
googleCustomTargeting returns empty or minimal data.Solutions:- Verify SDK is initialized before calling
- Check that cohorts exist for the user
- Wait for cohort data to sync after initialization
- Enable debug logging to see activations
View ID missing from targeting
View ID missing from targeting
prmtvvid key not in targeting dictionary.Solution: Pass the active PageTracker:TriggerProvider Issues
Trigger callbacks not firing
Trigger callbacks not firing
- Store a strong reference to TriggerAction:
- Verify cohort IDs match your dashboard exactly
- Enable debug logging to see cohort updates
Trigger stops working
Trigger stops working
Debug Logging
Enable comprehensive logging for troubleshooting:Log Messages to Look For
| Message | Meaning |
|---|---|
SDK ready | Initialization successful |
Accepted: X / X | Events sent successfully |
event rejection | Schema validation failed |
Schema validation failed | Property mismatch |
Getting Help
If you can’t resolve an issue:- Enable debug logging and capture relevant logs
- Check SDK version - ensure you’re on the latest
- Contact support:
- SDK version
- iOS/tvOS version
- Xcode version
- Relevant logs
- Steps to reproduce