I use Fabric.io Answers for gathering metrics with custom events. All works fine on iOS 8 and 9 but on iOS 10 and iOS 11 events just doesn't send at app startup with next debug log:
__NSCFLocalDownloadFile: error 2 opening for ioChannel, file: /private/var/mobile/Containers/Data/Application/A41164A5-4EAF-4123-8E78-654A0FDAC9A6/tmp/CFNetworkDownload_KjHbV7.tmp
__NSCFLocalDownloadFile: error 2 opening for ioChannel, file: /private/var/mobile/Containers/Data/Application/A41164A5-4EAF-4123-8E78-654A0FDAC9A6/tmp/CFNetworkDownload_KjHbV7.tmp
[Fabric] failed to download settings Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory" UserInfo={NSErrorFailingURLKey=https://settings.crashlytics.com/spi/v2/platforms/ios/apps/...
I found a workaround with delaying of Fabric.io initialization, but that's only avoid problem, not resolving it.
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(2 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[Fabric with:@[CrashlyticsKit, [Answers class]]];
});
It is looks like some system process wipes tmp directory at startup, but I don't sure about that.
Does anyone encount similar problem and has better solution?