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
  • 2627 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

arjun_bhadra
Adobe Employee
arjun_bhadraAdobe EmployeeAccepted solution
Adobe Employee
July 29, 2022
Level 2
July 29, 2022

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.