Skip to content
This repository has been archived by the owner before Nov 9, 2022. It is now read-only.

HockeySDK 4.0 for Mac and iOS excludes the entire Application Support folder from backups #66

robotspacer opened this issue May 4, 2016 · 2 comments


Copy link

robotspacer commented May 4, 2016

I discovered today that my entire ~/Library/Application Support/ folder was being excluded from Time Machine backups, due to the extended attribute being set. I eventually tracked down the cause to the HockeyApp for Mac app, I assume starting with version 2.0.15 released on 2016-03-16. If I delete the folder ~/Library/Application Support/ and launch the app, the extended attribute is set again.

I believe the cause of the problem is HockeySDK 4.0, since HockeyApp for Mac includes version 4.0.0-alpha.2. Digging through the HockeySDK source code, I found the method createDirectoryStructureIfNeeded in Classes/Telemetry/BITPersistence.m. This method sets NSURLIsExcludedFromBackupKey to YES on appSupportURL, which is the parent app's entire Application Support folder.

I'm not sure what the intention was with this code. Comments discuss excluding the folder from iCloud backup, so I assume it came over from the iOS version of the SDK. I've confirmed the same file and code is present there. Even so it should not be setting this flag on the entire Application Support folder. Even in a sandboxed app that folder can contain user data for the app. I'm guessing the intention was to exclude the "" folder, which is the parent folder of kTelemetryDirectoryPath and kMetaDataDirectoryPath.

It looks like this bug has been present since this file was first added. Hopefully that means the bug was not present on any platform until version 4.0 of the SDK. Whatever the case, it would be appropriate to warn users of both the app and SDK so they can unset the flag if needed. I imagine most developers do not want to exclude their app's entire Application Support folder from iCloud backups on iOS or Time Machine backups on OS X.

Copy link

ghost commented May 4, 2016

Hi @robotspacer,

thank you for reporting this bug. The initial idea was to exclude ONLY telemetry data from backups and not the entire Application Support folder. We apologize for this mistake and will fix this issue immediately.

I'll get back to you once the bugfix has been released.

Copy link

lumaxis commented May 6, 2016

Thanks for the thorough and detailed investigation and analysis, @robotspacer! Over the last two days we've investigated this problem and released fixes for the affected versions of both the iOS and Mac SDKs. More details about the fix can be found on our blog here:

@lumaxis lumaxis closed this as completed May 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet
None yet

No branches or pull requests

2 participants