Evernote / evernote-cloud-sdk-ios

Evernote Cloud SDK for iOS
https://dev.evernote.com/
Other
259 stars 116 forks source link

Yinxiang Biji profile does not get set #51

Closed mpnow closed 10 years ago

mpnow commented 10 years ago

To test operation with Yinxiang Biji, I forced the locale to be "zh_cn". But in ENSession.m > authenticateWithViewController, the call to

[userStore getBootstrapInfoWithLocale:locale success:^(EDAMBootstrapInfo *info)

returns the International www.evernote.com profile in array position 0, and the Chinese Yinxiang profile in array position 1. So then this line:

    EDAMBootstrapProfile * profile = [info.profiles objectAtIndex:0];

incorrectly sets the active profile to the International one, instead of the Yinxiang one.

everic commented 10 years ago

Our bootstrap service returned the list based on your device locale and your IP address. Even if your locale is 'zh_cn', since you instantiated this call to the service in an US IP address, our service still return evernote profile on position 0. If you call this service with an Chinese IP address, our service will return the YXBJ profile on position 0. Regardless, we should use the preferred bootstrap profile on position 0.