我目前正在 Xcode 9.2 版和 iOS 11 上使用 Objective C 语言开发 iPad 应用程序。
在这个应用程序中,我们使用带有 Magical Record 的 Ensembles 2 框架在 2 个 iPad 和作为后端的 WebDAV 之间同步我们的数据。
当我们直接通过 Xcode 在真实 iPad 设备上安装应用程序或在模拟器 iPad 上测试时,该框架成功同步数据。但是在我们归档应用程序并通过分发将其发送给用户后,它会在启动时崩溃。通过 crashalytics 日志,我们得到以下信息:
CDEPersistentStoreEnsemble.m line 140
-[CDEPersistentStoreEnsemble initWithEnsembleIdentifier:persistentStoreURL:persistentStoreOptions:managedObjectModelURL:cloudFileSystem:localDataRootDirectoryURL:]
CDESaveMonitor.m line 33
-[CDESaveMonitor initWithStorePath:]
Fatal Exception: NSInvalidArgumentException
+[NSMapTable cde_strongToStrongObjectsMapTable]: unrecognized selector sent to class 0x1b429eb18
在应用程序中,我们确实在 Targets-Build Settings-Other Linker Flags 中设置了 -ObjC