Hello,
We are running into the following crash every once in a while upon launching the app:
Fatal Exception: NSInternalInconsistencyException
`SQUARE DATA ERROR: Could not add persistent store for SQRTransactionLedgerDataStoreController due to Error Domain=NSCocoaErrorDomain Code=512 "The file couldn’t be saved." UserInfo={reason=Failed to create file; code = 1}.`
This is happening on ‘app did finish launching’ and this is what our setup function looks like:
private func setupSquareReaderSDK(launchOptions: [UIApplication.LaunchOptionsKey: Any]?) {
let skipInitSquareSDK = ProcessInfo.processInfo.environment["SKIP_INIT_SQUARE_SDK"]
if skipInitSquareSDK == nil || skipInitSquareSDK != "YES" {
SQRDReaderSDK.initialize(applicationLaunchOptions: launchOptions)
}
}
What is causing this? Could that be a bug with the SDK? It’s only happening to some of our users.
Any help would be appreciated.
Thanks.