Skip to main content
This error occurs when you try to start recording while your app is in the background. iOS doesn’t allow apps to begin audio recording in the background.Solution: Handle the appIsNotActive error by catching it specifically and showing an alert asking the user to bring the app to the foreground before attempting to start recording.Ensure your app is in the foreground before attempting to start recording.
Session initialization can fail for several reasons:Common causes:
  • Invalid partner information
  • Network connectivity issues
  • Authentication token problems
  • Missing microphone permissions
Debugging steps: Debug initialization failures by checking the completion handler result and catching initialization errors. Verify partner information, network connectivity, and required permissions.
Content generation delays can be caused by:Common causes:
  • Long session duration (more audio to process)
  • Poor audio quality requiring additional processing
  • Network issues during upload
  • High server load during peak times
  • Large session context or metadata
Solutions:
  1. Monitor session events for real-time updates
  2. Implement timeout handling
  3. Check network connectivity
  4. Ensure good audio recording conditions
Monitor content generation progress through session events. Show progress indicators during processing and handle both success and failure scenarios appropriately.
If you’re not receiving delegate events, check:Common issues:
  1. Delegate not properly set during initialization
  2. Delegate object deallocated
  3. Not implementing the protocol method correctly
Solution: Ensure your class conforms to SukiAmbientSessionDelegate protocol, pass the delegate during initialization, and implement the required delegate method to receive session events.
Poor audio quality can affect AI-generated content accuracy:Common causes:
  • Background noise interference
  • Device microphone obstruction
  • Poor recording environment
  • Low device volume settings
  • Hardware issues
Solutions:
  1. Record in quiet environments
  2. Ensure microphone isn’t blocked
  3. Test with different devices
  4. Check device audio settings
  5. Implement audio level monitoring
Improve audio quality by recording in quiet environments, ensuring the microphone isn’t blocked, and monitoring for audio-related session events that may indicate quality issues.
Token provider problems can prevent SDK functionality:Common issues:
  • Token expiration
  • Invalid token format
  • Network issues during token fetch
  • Authentication service problems
Debugging approach: Debug token provider issues by adding logging to track when tokens are requested, validating token format before returning, and handling token fetch failures appropriately.
Offline mode issues can include:Common problems:
  • Data not syncing when back online
  • Sessions lost during offline mode
  • Storage space issues
  • Incorrect offline state detection
Troubleshooting steps:
  1. Check available device storage
  2. Monitor offline/online events
  3. Verify network state detection
  4. Test offline functionality in controlled conditions
Debug offline mode issues by monitoring session events for offline transitions, upload progress, and sync completion. Check available device storage and verify network state detection.
Memory management best practices:Common causes:
  • Not properly ending sessions
  • Retaining large audio buffers
  • Memory leaks in delegate implementations
  • Multiple concurrent sessions
Solutions:
  1. Always end or cancel sessions when done
  2. Implement proper delegate cleanup
  3. Monitor memory usage during development
  4. Use Instruments to profile memory usage
Manage memory properly by cleaning up active sessions in deinit, ending sessions when done, implementing proper delegate cleanup, and monitoring memory usage during development.
I