50ButtonsEach/flic2lib-ios

Nickname doesnt change

Closed this issue · 3 comments

Hi,

When changing the nickname of the button nothing changes. The nickname stays the same.

Other question if i change the nickname of the button on android which works, that name should be visible on ios or any other device or only for that specific android device?

Hmm, I just tested this now and it seems to work for me.

Do you mean that if you for example do:

button.nickname = @"Hello World"; and then later call NSLog(@"Nickname: %@", button.nickname);

the old nickname is still present?

Assuming that you do actually manage to set the nickname, then yes it should appear on the other devices as well. However this is not necessarily synced immediately. The name is synced from the button the next time the button connects to that device, but it might take a few seconds so don't expect it to available immediately after the isReady callback. When you write a nickname (regardless if a button is connected or not) it will also store a timestamp when the nickname was written so that the latest written nickname actually is synced to the button. This is so that if two apps write the name while the button is disconnected you still get the latest name synced.

klaas commented

@AntonMeier setting the nickname through the API works for me in Swift as well:

button.nickname = "NiceButton"

It even appears in the Flic iOS app as well.

However this does not work when using an emoji within the name. This is my usual test for seeing what character encodings are supported. Haven't tested umlauts and other non-ASCII characters yet.

This should be fixed with release 1.0.2. Please re-open if you have further issues.