How to get BLOB and LocationHint with the AEP SDK? | Community
Skip to main content
Level 2
July 28, 2022
Solved

How to get BLOB and LocationHint with the AEP SDK?

  • July 28, 2022
  • 1 reply
  • 2626 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

arjun_bhadra
Adobe Employee
Adobe Employee
July 28, 2022

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

Level 2
July 29, 2022

How could I read these values from UserDefaults?

arjun_bhadra
Adobe Employee
Adobe Employee
July 29, 2022

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