ttlock / iOS_SDK_Demo

TTLock is a global provider of solutions for smart locks. We provide PCBA and softwares for lock manufactures and end users. We provide open API/SDK for developers. With these APIs/SDKs, you can develop your own applications to manage smart locks. The SDK here is for mobile app to communicate with locks via bluetooth.
MIT License
12 stars 12 forks source link

In iOS , TTLock getOperationLog returns operation record with uid 0 #14

Closed ghost closed 8 months ago

ghost commented 1 year ago

I am currently trying to fetch operation log using your SDK , but when I uploaded to the log to server , the username came as null. On further inspection , I found that when operation record is fetched before uploading the corresponding uid is 0 . How can I solve this problem.

JuannyiOS commented 1 year ago

"uid" is included in “lockData”. The lockData returned from SDK does not have uid, you need to get lockData from the server.

ghost commented 1 year ago

But I could unlock the door with the same lockData , but only in log fetch issue came. Btw how can we set new lockData using SDK?

JuannyiOS commented 1 year ago

Lockdata with or without uid can be successfully used to unlock. You need to get lockData from the server interface: https://euopen.sciener.com/document/doc?urlName=cloud%2Flock%2Flist.html

ghost commented 1 year ago

is there any method to manually update lockData?

JuannyiOS commented 1 year ago

NO. Maybe this server interface can help you : https://euopen.sciener.com/document/doc?urlName=cloud%2Fekey%2Fget.html

ghost commented 1 year ago

Ok Thanks . Also , is this api invalid now : https://euopen.sciener.com/document/doc?urlName=cloud%2Flock%2FupdateLockData.html . Should we still call it after modifying the feature value of the lock. If this is not invalid couldn't we just use this for the above case? Also does lockData frequently update or is it static?

JuannyiOS commented 1 year ago

Valid ! You need to call it after modifying the feature value of the lock. We can use this for the above case. sorry, I didn't understand you before.

ghost commented 1 year ago

username in unlock records api came as null. how can we solve it?

JuannyiOS commented 1 year ago

getOperationLog returns operation record has uid ? if has uid ,please send the uid to me, we check it