苹果拒绝-无法重现崩溃

红色的

苹果拒绝了我的应用,并提供了崩溃日志,表明他们已在装有iOS 8.0.2的iPhone 6上对其进行了测试。我使用相同的iPhone 6和8.0.2测试了我的应用程序,它运行完美。我通过iTunesConnect在testflight上进行了尝试,假设这与Apple进行的测试完全相同-显然不是!

是否有人有想法,我如何解决该问题(已经与审核小组联系,但是他们无济于事,因为他们说他们不是技术支持,只是测试应用程序。

我遇到的问题是(从我的角度来看还是很奇怪):添加持久性存储时崩溃:

       NSError *error = nil;
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc] initWithManagedObjectModel:[self managedObjectModel]];
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error]) {
    /*
     Replace this implementation with code to handle the error appropriately. abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.

     Typical reasons for an error here include:
     * The persistent store is not accessible;
     * The schema for the persistent store is incompatible with current managed object model.
     Check the error message to determine what the actual problem was.


     If the persistent store is not accessible, there is typically something wrong with the file path. Often, a file URL is pointing into the application's resources directory instead of a writeable directory.

     If you encounter schema incompatibility errors during development, you can reduce their frequency by:
     * Simply deleting the existing store:
     [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil]

     * Performing automatic lightweight migration by passing the following dictionary as the options parameter:
     @{NSMigratePersistentStoresAutomaticallyOption:@YES, NSInferMappingModelAutomaticallyOption:@YES}

     Lightweight migration will only work for a limited set of schema changes; consult "Core Data Model Versioning and Data Migration Programming Guide" for details.

     */
    NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
    abort();
}

它显然崩溃是因为我abort()仍然有该语句,但是我不确定该怎么做(即要解决该问题-只是删除并尝试再次添加存储?)

因为它在我的iPhone上可以正常使用,所以我认为这不是源代码中列出的问题之一(例如目录,模型等。对吗?)我正在努力工作几天,有任何帮助或想法非常感谢!!

杂交猫

发生这种情况的常见原因是storeURL上已经有一个文件,并且该文件不符合您指定的模型。

为此,您可以执行以下操作:1)启用轻量级迁移2)删除现有文件,然后重试

NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption: @YES,
                          NSInferMappingModelAutomaticallyOption: @YES
                          };
BOOL successOfAdding = [_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType
                                                                    configuration:nil
                                                                              URL:storeURL
                                                                          options:options
                                                                            error:&error] != nil;
if (successOfAdding == NO)
{
    // Check if the database is there.
    // If it is there, it most likely means that model has changed significantly.
    if ([[NSFileManager defaultManager] fileExistsAtPath:storeURL.path])
    { 
        // Delete the database
        [[NSFileManager defaultManager] removeItemAtURL:storeURL error:nil];
        // Trying to add a database to the coordinator again
        successOfAdding = [_persistentStoreCoordinator addPersistentStoreWithType: NSSQLiteStoreType configuration:nil URL:storeURL options:nil error:&error] != nil;
        if (successOfAdding == NO)
        {
            NSLog(@"Unresolved error %@, %@", error, [error userInfo]);
            abort();
        }
    }

关于拒绝-您是否有以前版本的应用程序?另外,您要在哪里存储数据库?可能无法访问该路径?

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

无法重现android崩溃

来自分类Dev

苹果由于加载崩溃而拒绝了我的应用,因此我无法复制它。我应该怎么办?

来自分类Dev

苹果拒绝新版应用

来自分类Dev

无法重现WebKitLegacy-[_ WebSafeForwarder forwardInvocation:]崩溃

来自分类Dev

分析苹果崩溃报告

来自分类Dev

iOS8 +苹果的KeychainItemWrapper导致崩溃

来自分类Dev

下载第三方应用程序苹果商店。拒绝苹果提交?

来自分类Dev

苹果因使用Google Maps SDK而拒绝了该应用

来自分类Dev

苹果第二次拒绝了我的应用

来自分类Dev

Bluetherm SDK iOS-苹果拒绝了该应用

来自分类Dev

苹果拒绝了应用10.6,因为Facebook打开Safari登录

来自分类Dev

苹果mfi iap2识别被拒绝

来自分类Dev

苹果可以拒绝力改变方向吗?

来自分类Dev

苹果因未展示广告而拒绝了该应用

来自分类Dev

苹果因使用Google Maps SDK而拒绝了该应用

来自分类Dev

苹果商店因应用程序图标而被拒绝

来自分类Dev

苹果酒无法正常工作

来自分类Dev

无法安装Vue CLI?(苹果系统)

来自分类Dev

Ubuntu 15.04无法配对苹果蓝牙键盘

来自分类Dev

苹果的ZoomingPDFViewer库无法获得缩放效果

来自分类Dev

如何象征从苹果评论者发送的崩溃日志?

来自分类Dev

世博会反应本地苹果标志在TestFlight中崩溃

来自分类Dev

苹果拒绝了该应用,称该应用使用后台模式

来自分类Dev

苹果拒绝外部测试请求,因为在应用启动时会打开safari吗?

来自分类Dev

如何在iOS应用中使用支付网关而不被苹果拒绝?

来自分类Dev

苹果是否拒绝使用Xcode 5构建的应用程序?(13.10.2014)

来自分类Dev

通过推送通知进行OTP-苹果将根据审查指南拒绝

来自分类Dev

无法登录-权限被拒绝

来自分类Dev

无法解释的苹果Mach o链接器错误

Related 相关文章

  1. 1

    无法重现android崩溃

  2. 2

    苹果由于加载崩溃而拒绝了我的应用,因此我无法复制它。我应该怎么办?

  3. 3

    苹果拒绝新版应用

  4. 4

    无法重现WebKitLegacy-[_ WebSafeForwarder forwardInvocation:]崩溃

  5. 5

    分析苹果崩溃报告

  6. 6

    iOS8 +苹果的KeychainItemWrapper导致崩溃

  7. 7

    下载第三方应用程序苹果商店。拒绝苹果提交?

  8. 8

    苹果因使用Google Maps SDK而拒绝了该应用

  9. 9

    苹果第二次拒绝了我的应用

  10. 10

    Bluetherm SDK iOS-苹果拒绝了该应用

  11. 11

    苹果拒绝了应用10.6,因为Facebook打开Safari登录

  12. 12

    苹果mfi iap2识别被拒绝

  13. 13

    苹果可以拒绝力改变方向吗?

  14. 14

    苹果因未展示广告而拒绝了该应用

  15. 15

    苹果因使用Google Maps SDK而拒绝了该应用

  16. 16

    苹果商店因应用程序图标而被拒绝

  17. 17

    苹果酒无法正常工作

  18. 18

    无法安装Vue CLI?(苹果系统)

  19. 19

    Ubuntu 15.04无法配对苹果蓝牙键盘

  20. 20

    苹果的ZoomingPDFViewer库无法获得缩放效果

  21. 21

    如何象征从苹果评论者发送的崩溃日志?

  22. 22

    世博会反应本地苹果标志在TestFlight中崩溃

  23. 23

    苹果拒绝了该应用,称该应用使用后台模式

  24. 24

    苹果拒绝外部测试请求,因为在应用启动时会打开safari吗?

  25. 25

    如何在iOS应用中使用支付网关而不被苹果拒绝?

  26. 26

    苹果是否拒绝使用Xcode 5构建的应用程序?(13.10.2014)

  27. 27

    通过推送通知进行OTP-苹果将根据审查指南拒绝

  28. 28

    无法登录-权限被拒绝

  29. 29

    无法解释的苹果Mach o链接器错误

热门标签

归档