Hello Lucas,
Thank you for the snippets. Since you're able to load test ads, it is safe to assume that your implementation is good. Could you share us your Ad Unit ID along with the complete device logs, so I can take a look at the error you're receiving? Could you also confirm if your application is published to the App Store? You can reply back via Reply privately to author option.
Regards,
Bharani Cherukuri
Mobile Ads SDK Team