Closed DKMaverick closed 6 years ago
Thanks for this fix; exactly what I needed. I've made a fork so that people can instantly apply or test this patch if necessary:
pod 'PersonalizedAdConsent', :git => 'https://github.com/shirakaba/googleads-consent-sdk-ios.git', :branch => 'fix-cocoapods-bundle-url'
I have also made a pull request for DKMaverick's suggestion.
EDIT: seems I've only made a pull request within my own repo. I haven't signed the Google Contributor agreement in any case, and won't have time to before GDPR, so this is as much as I can offer!
This issue should be resolved on the latest version of this SDK (v1.0.1).
@rampara it seems that 1.0.1 has yet to be pushed to Cocoapods.org? Thanks!
Edit: Was incorrect. Indeed it has. I needed to run pod repo update
. This issue can be closed
Closing issue as it has been resolved on the latest version of this SDK (v1.0.1).
In PACView.m, loadWebView method tries to obtain bundle url via:
NSURL *bundleURL = [[NSBundle mainBundle] URLForResource:@"PersonalizedAdConsent" withExtension:@"bundle"];
If host app is generated via CocoaPods, this is nil and results a crash. One possible fix is to replace the above with:[[NSBundle bundleForClass:[self class]] URLForResource:@"PersonalizedAdConsent" withExtension:@"bundle"]
which would result$SAMPLE_APP_PATH/Frameworks/PersonalizedAdConsent.framework/PersonalizedAdConsent.bundle/
instead of non-existent$SAMPLE_APP_PATH/PersonalizedAdConsent.bundle/
A workaround solution is to change the documentation, so that even with CocoaPods setup, SDK consumers need to addPersonalizedAdConsent.bundle
to Copy bundle resources manually.