With ADBMobile, we were reading the BLOB and the location-hint values from the UserDefaults.
How could I get the same data when using the AEP SDK?
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @emilio-ojeda,
You need to have AEPIdentity extension registered. Refer the documentation here:
https://aep-sdks.gitbook.io/docs/foundation-extensions/mobile-core/identity
API reference: https://aep-sdks.gitbook.io/docs/foundation-extensions/mobile-core/identity/identity-api-reference#s...
Hi @emilio-ojeda,
Short answer is yes. But I want to highlight that with the AEP SDKs we have a newer event based architecture and we publish all the events and the related data into eventhub. You can get the BLOB and LocationHint values by dispatching Identity request and extracting the blob and locationHint from the response. Make sure you have Identity extension registered.
Here is the sample for that:
let sampleEvent = Event(name: "fetchBlobAndLocationHint", type: EventType.identity, source: EventSource.requestIdentity, data: nil) MobileCore.dispatch(event: sampleEvent) { identityResponseEvent in guard let state = identityResponseEvent?.data else { return } let blob = state["blob"] as? String ?? "" let locHint = state["locationhint"] as? String ?? "" print("#blob:\(blob) | locHint:\(locHint)") }
Let me know if this works, or you want to proceed on the UserDefaults route.
Thanks,
Arjun
Views
Replies
Total Likes
Thanks for the replay ...
Well, the function call MobileCore.dispatch works, but it isn't returning either the blob or locationhint info. I presume something has to be enabled
Views
Replies
Total Likes
Hi @emilio-ojeda,
You need to have AEPIdentity extension registered. Refer the documentation here:
https://aep-sdks.gitbook.io/docs/foundation-extensions/mobile-core/identity
API reference: https://aep-sdks.gitbook.io/docs/foundation-extensions/mobile-core/identity/identity-api-reference#s...
I have it. I am registering the extensions in the app launch (AEPIdentity.Identity.self) and the extension is installed - I see the message "No configuration necessary.".
But still, it isn't returning values for blob and locationhint.
Hi @emilio-ojeda,
I think you are referring to the launch extension. You need to also install the extension on the SDK side. Are you also registering the extension? Also verify if you have configured the SDK. After verifying both if you still see the issue, please open a ticket with our customer support team . Also please attach the verbose console logs for the same.
Views
Replies
Total Likes
How could I read these values from UserDefaults?
Views
Replies
Total Likes
Where do you see this message "No configuration necessary."?
It would be really helpful if you open a ticekt with customer support. It will help us to understand the usecase and how can we improve our SDK to handle that. The userdefaults route is not recommended and uses internal classes (helpers/constants). It will be great if you can provide more information so we can help you better.
Thanks,
Arjun
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Like
Replies