New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Crash on Apple TV device #177
Comments
is there a timeline for a bug fix for this? thanks in advance! |
@dannyhuggins Thank you for your report! Is it possible to reproduce on a simulator device or only on a real one? |
@serhii-londar unfortunately it's only possible to reproduce on a real device. The documents directory isn't accessible on real devices, so I'm not sure why Apple lets you access it on a tvOS simulator. |
I experimented the I think it makes sense for iOS to continue using the documents directory to avoid file purges, but tvOS will likely need some additional caching functionality since that's the only directory available for file storage on AppleTV. |
Hi there! Checking everything from our side |
@dannyhuggins Hi, can you please test whether changes from #180 request fixed that crash? |
hey @serhii-londar I will take a look, thanks! |
@dannyhuggins Did you have a chance to try the changes? |
@serhii-londar We are no longer seeing a crash with this fix! However, our team noticed that if the tvOS cache is cleared, we are not seeing Crowdin re-retrieve OTA translations and instead falls back to the bundled translations. Our guess is it has something to do with |
@dannyhuggins Thank you for checking it! Can you please send what path is used? Caches or Application Support? |
it's using the Application Support folder, at least on the simulator. Having an issue with my AppleTV at the moment |
Thank you, I will continue work on support. |
@dannyhuggins Hi. Can you try to use changes #177 branch? The issue with downloading localization after the cache is cleared should be fixed. |
Fix issue with crash on Apple TV devices.
Describe the bug
I am getting an app crash when using the SDK on a physical Apple TV device. I get the following error when the SDK is attempting to create the CrowdinFolder for the translation files:
Note that this does not happen on the Apple TV simulator in Xcode, only a physical device.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
My understanding is that storing data on an Apple TV is not available outside of the cache directory, and when the SDK attempts to create a folder in the documents directory, the FileManager throws an exception.
Screenshots
Smartphone (please complete the following information):
Additional context
I was able to avoid the crash by changing DocumentsFolder.documentsPath from:
static let documentsPath = NSSearchPathForDirectoriesInDomains(.documentDirectory, .userDomainMask, true)[0]
to:
static let documentsPath = NSSearchPathForDirectoriesInDomains(.cachesDirectory, .userDomainMask, true)[0]
but I am not aware if this will have any performance implications.
The text was updated successfully, but these errors were encountered: