3

我安装了 SDK (2.2.7) 并将所有框架包含在 xCode (4.6.2) 项目中。每当我尝试扫描代码时,它都会崩溃:

int main(int argc, char *argv[])
{
    @autoreleasepool {
        return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
    }
}

扫描视图的吸气剂

- (ScanditSDKBarcodePicker *)scanPicker
{
    if (!_scanPicker)
    {
        _scanPicker = [[ScanditSDKBarcodePicker alloc] initWithAppKey: SCANDIT_APP_KEY];
        UIBarButtonItem *guestButton = [[UIBarButtonItem alloc] initWithTitle:@"List" style:UIBarButtonItemStylePlain target:self action:@selector(choseFromList:)];
        _scanPicker.navigationItem.rightBarButtonItem = guestButton;
        UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithTitle:@"cancel" style:UIBarButtonItemStylePlain target:self action:@selector(cancelPicker:)];
        _scanPicker.navigationItem.leftBarButtonItem = cancelButton;
        _scanPicker.overlayController.delegate = self;
        [_scanPicker startScanning];
    }
    return _scanPicker;
}

呈现它的代码

- (void)presentScanditViewController
{
    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:self.scanPicker];
    [self presentViewController:navi animated:YES completion:nil];
}

我也检查了应用程序键,有人有同样的问题吗?

4

2 回答 2

0

糟糕的支持和文档 SDK,换成 ZBar

于 2013-05-07T03:53:35.997 回答
0

我也偶尔会从 Scandit 看到这个错误,但它只是每天所有扫描的一小部分。

我使用 Scandit 站点Scandit iOS SDK Implementation Documentation上的文档实现了它

我从 ZBar 开始,但 Scandit 代码比 ZBar 工作更好,尤其是在定焦相机(iPod Touch 第 4 代)上。

这是我分配和展示扫描仪的代码

- (IBAction)scanImage:(id)sender
{
picker = [[ScanditSDKBarcodePicker alloc] initWithAppKey:scanditAPIKey];
picker.overlayController.delegate = self;
[picker startScanning];
[self presentViewController:picker animated:YES completion:nil];
}
于 2013-05-11T00:12:09.710 回答