moodstocks sdk:您已经打开了不同对的扫描仪,API 密钥/秘密对问题

moodstocks sdk : You already opened scanner with different pair , API key / Secret pair issue

虽然前几天一切正常,但现在我没有对我的代码进行任何更改,但我在打开扫描路径时遇到此错误。

控制台日志在这里:

-(void) initializeMoodStock {
NSString *path = [MSScanner cachesPathFor:@"scanner.db"];
_scanner = [[MSScanner alloc] init];
[_scanner openWithPath:path key:MS_API_KEY secret:MS_API_SECRET error:nil];
// Create the progression and completion blocks:
void (^completionBlock)(MSSync *, NSError *) = ^(MSSync *op, NSError *error) {
//        if (error)
//            NSLog(@"Sync failed with error: %@", [error ms_message]);
//        else
//            NSLog(@"Sync succeeded (%li images(s))", (long)[_scanner count:nil]);
};
void (^progressionBlock)(NSInteger) = ^(NSInteger percent) {
//        NSLog(@"Sync progressing: %li%%", (long)percent);
};
// Launch the synchronization
[_scanner syncInBackgroundWithBlock:completionBlock progressBlock:progressionBlock];
}

& initializeMoodStockdidFinishLaunchingWithOptions:

调用

这里有三个案例,

  1. Sometime you need to reset content and settings of your simulator.

& if not works that mean,

  1. Might be someone has deleted your project from moodstocks developer account

  2. Or sometime admin reseted your project API KEY & Moodstocks secret key.

现在检查第 2 和第 3 种情况,转到开发者帐户检查您的密钥并在您的 appDelegate 中更新它。