GithubHelp home page GithubHelp logo

Comments (5)

mustafa avatar mustafa commented on September 10, 2024

It is actually not just based on locale. Based on the country, the user is allowed to switch between the two accounts. The bootstrap server identifies these rules based on a combination of locale and country (determined by IP address). More info here .

from evernote-sdk-ios.

an0 avatar an0 commented on September 10, 2024

I read that too. It still makes too much assumption that is not totally right. Many people in China use Evernote instead of YinXiangBiJi. And there are English speaking Chinese people traveling or living outside China who use YinXiangBiJi instead of Evernote. The assumptions you are making make things difficult or event impossible, e.g., after update to the latest SDK I can no along sign in my YinXiangBiJi account because I'm using English in US.

from evernote-sdk-ios.

mustafa avatar mustafa commented on September 10, 2024

Sorry for the inconvenience. This is not related to the iOS SDK, bootstrapping protocol is part of the Evernote service. Please contact [email protected] and we might be able to provide workarounds.

from evernote-sdk-ios.

an0 avatar an0 commented on September 10, 2024

You learned the issue but you can't feedback it to your peers? In fact, it is really easy to fix it in iOS SDK, just use the code below to replace over-smart code in SDK — why bootstrap if you already let us set service host:

+ (void)setSharedSessionHost:(NSString *)host
                 consumerKey:(NSString *)consumerKey
              consumerSecret:(NSString *)consumerSecret {
    EvernoteSession *session = [self sharedSession];
    session.host = host;
    session.consumerKey = consumerKey;
    session.consumerSecret = consumerSecret;
}

- (void)authenticateWithViewController:(UIViewController *)viewController
                     completionHandler:(EvernoteAuthCompletionHandler)completionHandler
{
    self.viewController = viewController;
    self.completionHandler = completionHandler;

    // authenticate is idempotent; check if we're already authenticated
    if (self.isAuthenticated) {
        [self completeAuthenticationWithError:nil];
        return;
    }

    // Do app setup sanity checks before beginning OAuth process.
    // This verification raises an NSException if problems are found.
    [self verifyConsumerKeyAndSecret];

    if (!viewController) {
        // no point continuing without a valid view controller,
        [self completeAuthenticationWithError:[NSError errorWithDomain:EvernoteSDKErrorDomain 
                                                                  code:EvernoteSDKErrorCode_NO_VIEWCONTROLLER 
                                                              userInfo:nil]];
        return;
    }

    // remove all cookies from the Evernote service so that the user can log in with
    // different credentials after declining to authorize access
    [self emptyCookieJar];

    [self startOauthAuthentication];
}

from evernote-sdk-ios.

AndreClaassen1 avatar AndreClaassen1 commented on September 10, 2024

Thank you. the (pseudo) intelligent code from Evernote bugged me today. I will fix it like you suggested.

from evernote-sdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.