TuyaInc / tuyasmart_home_ios_sdk

Tuya Smart iOS Home SDK
https://tuyainc.github.io/tuyasmart_home_ios_sdk_doc
50 stars 19 forks source link

Login not works with New SDK #30

Closed amacymind closed 5 years ago

amacymind commented 5 years ago

Hello, I create user from your old ios sdk version. Now its not works with this new sdk version. If i create new user from latest version then login works fine for that user.

Thanks,

TuyaRonbin commented 5 years ago

The data upgrading is needed to upgrade TuyaSDK to TuyaHomeSDK. The upgrade Version interface shall be invoked for upgrade.

if ([TuyaSmartSDK sharedInstance].checkVersionUpgrade) { [[TuyaSmartSDK sharedInstance] upgradeVersion:^{

} failure:^(NSError *error) {

}];

}

amacymind commented 5 years ago

How/Where to use this method? I create user in you TuyaHomeSDK version 0.2.2

TuyaRonbin commented 5 years ago

link : https://github.com/TuyaInc/tuyasmart_home_ios_sdk doc : https://tuyainc.github.io/tuyasmart_home_ios_sdk_doc/

Tuya Smart APP SDK provides the interface package for the communication with hardware and Tuya Cloud to accelerate the application development process, including the following features:

Hardware functions (network configuration, control, status reporting, regular tasks, groups, firmware upgrades, sharing) Account system (phone number, email registration, login, password reset and other general account functions) Tuya Cloud HTTP API interface package

amacymind commented 5 years ago

Just tell me where to use this upgradeVersion method in new sdk?

amacymind commented 5 years ago

Also i already previously used TuyaHomeSDK then why i required upgrade method?

TuyaRonbin commented 5 years ago

Sorry, I misunderstood your meaning.

SDK version > 0.2.2, SDK updates the new signature method. You need to get Appkey, AppSecret, iOS security images, bundleId for application on Tuya Developer Platform.

amacymind commented 5 years ago

Yes i do that. But new sdk version 2.12.46 is not worked for my old email password. Every time says 'Incorrect account or password'

TuyaRonbin commented 5 years ago

Can you provide an account that failed to log in? And which API did you call?

amacymind commented 5 years ago

my email: ankur@macymind.com API is like, [[TuyaSmartUser sharedInstance] loginByEmail:@"your_country_code" email:@"your_email" password:@"your_password" success:^{ NSLog(@"login success"); } failure:^(NSError *error) { NSLog(@"login failure: %@", error); }];

TuyaRonbin commented 5 years ago

AppKey: hnufanwpnp3u88jgpsq is a new application. What is your old AppKey? Two different AppKey user data are not interoperable.

amacymind commented 5 years ago

You mean user is also link with AppKey. Right?

TuyaRonbin commented 5 years ago

Right

amacymind commented 5 years ago

ok thank you

amacymind commented 5 years ago

Its works now