2013-05-02 92 views
2

我安裝了SDK(2.2.7),並在xCode(4.6.2)項目中包含了所有框架。每當我試圖掃描代碼,它崩潰:Scandit條碼掃描器iOS崩潰

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]; 
} 

我檢查應用程序鍵也,有沒有人有同樣的問題??

+1

當你發佈一個崩潰有關的問題,有需要的兩兩件事 - 1)完整的錯誤消息,2)堆棧跟蹤的相關部分或對崩潰的實際代碼的引用。 – rmaddy 2013-05-02 02:50:26

+0

我們可能需要一個完整的堆棧跟蹤來幫助你。您可以嘗試添加異常中斷點,http://blog.manbolo.com/2012/01/23/xcode-tips-1-break-on-exceptions – Erik 2013-05-02 03:09:10

+0

是的,它已經在所有異常情況下都有bp,但它不會「 t描述崩潰 – 2013-05-02 03:17:06

回答

0

支持窮人和文檔SDK,交換到zbar和

0

我也偶爾會看到從Scandit這個錯誤,但它每天都掃描的一小部分。

我實現它使用的Scandit網站Scandit iOS SDK Implementation Documentation

我開始了zbar和文檔,但Scandit代碼工作比zbar和更好尤其是定焦相機(iPod Touch的第四代)。

這裏是我的代碼頁頭和現在的掃描儀

- (IBAction)scanImage:(id)sender 
{ 
picker = [[ScanditSDKBarcodePicker alloc] initWithAppKey:scanditAPIKey]; 
picker.overlayController.delegate = self; 
[picker startScanning]; 
[self presentViewController:picker animated:YES completion:nil]; 
}