Initialization
✅ DO:- Initialize in
AppDelegate.application(_:didFinishLaunchingWithOptions:)or in your@mainApp’sinit() - Enable debug mode when needed for troubleshooting (publisher’s choice)
- Handle initialization callbacks
- Initialize inside a view controller or view
- Initialize multiple times unnecessarily
Ad Loading
✅ DO:- Provide meaningful context (prompt, ai response, conversation history)
- Handle errors gracefully (e.g. hide ad view or show fallback)
- Track impressions and clicks for analytics
- Use dimensions in points that match your ad container
- Use empty or placeholder context when you have real content
- Block the main thread
- Ignore error callbacks
- Use incorrect or zero dimensions
Memory Management
✅ DO:- Clear or release ad-related views when they are no longer visible
- Use weak references where appropriate (e.g. in callbacks)
- Clean up in
deinitor when the view controller is dismissed
- Keep strong references to ad views after the screen is dismissed
Error Handling
✅ DO:- Ignore errors or crash the app on ad failure

