ios - momostocks sdk : You already opened scanner with different pair , API key / secret 对问题

标签 ios objective-c barcode-scanner

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

控制台日志在这里:

enter image description here

-(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.

现在检查第二个和第三个案例,转到开发者帐户检查您的 key 并在您的 appDelegate 中更新它。

关于ios - momostocks sdk : You already opened scanner with different pair , API key / secret 对问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42269298/

相关文章:

android - fragment 中的条码扫描器

ios - 发出通知时有选项

ios - 启用解析本地数据存储和 PFQueryTableViewController 问题

iphone - 如何将我的应用链接到 App Store 开发者页面?

android - 需要帮助将 Scandit 条形码扫描仪集成到 React Native 项目中

java - 从一开始就设置 JTextfield 焦点

ios - 保持 uisearchbar 在 uitableview 中始终可见

objective-c - iPhone 应用程序崩溃并出现错误 : Terminating app due to uncaught exception 'NSInternalInconsistencyException' , 原因:“无法在 bundle 中加载 NIB:

ios - UITableViewCell 不会为 RTL objective-c 翻转 subview

objective-c - 使用 Cocoa Scripting Bridge 在事先不知道收件人的情况下发送电子邮件