Cannot set named user identifier (always returns nil)

Hi All,

Could someone please help to figure out, why I could not set the named user identifier.

What happened:

- I could not set the named user identifier according to the documentation: UAirship.namedUser().identifier = "namedUserID".
The identifier always returns `nil` when trying to retrieve it at a later time (or even right after setting it). I did a test by setting
UAirship.namedUser().identifier = "123456"
and immediately after that print it out
print("Named user identifier:", UAirship.namedUser().identifier)
It always returns nil.

What have already been done:

- `Allow named users to be set from devices` is enabled from the Console in the `APIs & Integration settings`
- UAConfig.default().isDataCollectionOptInEnabled = true
UAirship.shared().isDataCollectionEnabled = true

Any suggestion will be highly appreciated.

Thanks.

Didn't find what you were looking for?

New post

Comments

3 comments

  • Kim,

    I created a ticket in our support portal for this issue. Can you please check your email to see if you got the request?

    Thank you,

    Eric L.
    Technical Support Engineer
    Airship Group | Apptimize | Portland

    Comment actions Permalink
    0
  • The issue the customer run into is the fine grained control over data collection.

    Version 14.5.0 June 4, 2021

    Minor release changing how the SDK handles data collection by introducing the privacy manager. Privacy manager allows fine-grained control over what data is allowed to be collected or accessed by the Airship SDK.

    Changes

    • Added privacy manager
    • Deprecated existing data collection flags

    See the Migration Guide and the Data Collection docs for further details.

    Thank you,

    Eric L.
    Technical Support Engineer
    Airship Group | Apptimize | Portland

    Comment actions Permalink
    0
  • Consider implementing error handling mechanisms provided by the language or library. Check if the function returns an error code or object that could provide more insight into the reason for the "nil" result. It's also essential to verify whether you're using the most up-to-date version of the library or service. Sometimes, issues like these are resolved in newer releases.

    Utilize debugging tools available in your development environment to inspect the variables, values, and the execution flow of your code. This can help you identify precisely where the problem is occurring and why the named user identifier isn't being set as expected. 

    Comment actions Permalink
    0

Please sign in to leave a comment.