Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertion failure when running iOS #12

Open
leelandclay opened this issue Mar 20, 2020 · 0 comments
Open

Assertion failure when running iOS #12

leelandclay opened this issue Mar 20, 2020 · 0 comments

Comments

@leelandclay
Copy link

leelandclay commented Mar 20, 2020

I installed the SDK according to the instructions and had to perform a change to get the component to build.
Within the Pods>Development Pods> react-native-mopub-sdk>RNNativeAdView.h file I had to change the imports for RCTView.h and RCTTextView.h to:

#import "React/RCTView.h"
#import "React/RCTTextView.h"

Now, when I run the app (simulator or real device), I get the following exception when attempting to run it under ios.

2020-03-19 20:09:26.817747-0500 PolyAmDate[20900:2813371] *** Assertion failure in -[MPConsentManager synchronizeConsentWithCompletion:], /Users/lclay/Repositories/kaolin/PolyAmMobile/ios/Pods/mopub-ios-sdk/MoPubSDK/Internal/MPConsentManager.m:549
2020-03-19 20:09:26.820109-0500 PolyAmDate[20900:2813525] 
	[MoPub][MPConsentManager] Attempting to synchronize consent state
2020-03-19 20:09:26.820190-0500 PolyAmDate[20900:2813525] 
	[MoPub][MPConsentManager] Warning: no ad unit available for GDPR sync. Please make sure that the SDK is initialized correctly via `initializeSdkWithConfiguration:completion:` as soon as possible after app startup.
2020-03-19 20:09:26.839867-0500 PolyAmDate[20900:2813371] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Warning: no ad unit available for GDPR sync. Please make sure that the SDK is initialized correctly via `initializeSdkWithConfiguration:completion:` as soon as possible after app startup.'
*** First throw call stack:
(0x1882f2a48 0x188019fa4 0x1881f4e88 0x18862a654 0x10143f038 0x1013f4c54 0x1013f47b8 0x103702bd8 0x1037044c8 0x1013f451c 0x1014fbb1c 0x1014fbcc4 0x1014fc620 0x1010a91b4 0x1011b652c 0x1011c0e28 0x1037017fc 0x103702bd8 0x103710c34 0x1882705e4 0x18826b5d8 0x18826aadc 0x19220b328 0x18c37863c 0x100c88c9c 0x1880f4360)
libc++abi.dylib: terminating with uncaught exception of type NSException
(lldb) 

I couldn't find any instructions on how to setup for GDPR sync.

Here's the code I'm using....

import { MoPubBanner } from 'react-native-mopub-sdk';
...
private unitId: string = Platform.OS === 'ios' ? Config.REACT_APP_UNIT_ID_BANNER_IOS : Config.REACT_APP_UNIT_ID_BANNER_ANDROID;
...
<MoPubBanner
  adUnitId={this.unitId}
  autoRefresh={true}
  onLoaded={() => { console.log('Banner Loaded') }}
  onFailed={() => { console.log('Banner failed') }}
  onClicked={() => { console.log('banner clicked') }} />

*** Edit ****
react version: 16.8.6
react-native version: 0.61.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant