Migrating from 5.x
6.0 is a breaking release.
Native setup
- Android: remove
ZaloSDK.Instance.onActivityResult(...)fromMainActivityandZaloSDKApplication.wrap(this)fromMainApplication. Leftover calls are tolerated but no longer needed. The SDK's ProGuard rules are included, so you can drop them fromproguard-rules.pro. - iOS: add
ZaloAppIDtoInfo.plist(or keep callinginitializeWithAppId:). Keep theopenURLforwarding. - Expo: add the config plugin with
{ "appId": "..." }and drop the native edits you made afterexpo prebuild.
API changes
login()resolves withexpiresInandexpiresAtin addition to the tokens, and rejects with the codes in Error handling instead of hanging when the Zalo app is missing or broken.authTypeis typed asLoginMethodinstead ofstring.isAuthenticated()resolvesfalsewhen there is no session; 5.x rejected with code401. It still rejects on network errors.- The
401(no session) and422(unreadable profile) codes are replaced byNOT_AUTHENTICATEDandINVALID_RESPONSE. logout()rejects alogin()that is still in progress withLOGIN_SUPERSEDED.getUserProfile()no longer requestsphoneNumber,genderorbirthday.
New
getAccessToken()andrefreshAccessToken().ErrorCodes.login(type, { fallbackToWeb }).- Encrypted token storage; tokens saved by 5.x are migrated automatically.