Disk icon indicating copy to clipboard operation
Disk copied to clipboard

tvOS Support

Open JaydenIrwin opened this issue 5 years ago • 7 comments

Would it be possible to add tvOS support?

JaydenIrwin avatar Sep 22 '18 18:09 JaydenIrwin

tvOS, watchOS, and macOS support is on the roadmap :^)

saoudrizwan avatar Sep 25 '18 23:09 saoudrizwan

watchOS++

hemangshah avatar Oct 19 '18 02:10 hemangshah

@saoudrizwan when do you plan to add support?

mrgrauel avatar Jan 18 '19 09:01 mrgrauel

@saoudrizwan As far as I can tell at first glance, the only things currently blocking tvOS and watchOS support are the helper functions for volumeAvailableCapacityForImportantUsage and volumeAvailableCapacityForOpportunisticUsage. Removing these allows Disk to compile successfully for watchOS and tvOS. Have I missed anything? Assuming not, I will gladly work on a PR to allow it to compile for all platforms, while retaining this important functionality for iOS.

Just wondering if you had anything else in mind that would potentially block this from working on tvOS/watchOS? Thanks, Craig.

Edit: I see UIKit is used also, which stops it working on macOS, but this is easily solved too.

craigrouse avatar Apr 29 '19 23:04 craigrouse

@craigrouse - I think, this would be great! Didn't know if that would be really easy to handle? I hope @saoudrizwan will take this forward from here with you.

hemangshah avatar Apr 30 '19 06:04 hemangshah

@hemangshah @mrgrauel @JaydenIrwin @saoudrizwan

I have added support for tvOS, macOS and watchOS on my fork: https://github.com/craigrouse/Disk/tree/platform-support

I'm in the process of updating the README to take account of some of the differences by platform (everything pretty much behaves the same, except tvOS, where I have removed the possibility to use the documents directory and application support, since these aren't really supported on tvOS). Be aware that on tvOS, the caches directory could be purged by the OS at any time when your app is closed, if the device is running low on space (see https://developer.apple.com/library/archive/documentation/General/Conceptual/AppleTV_PG/index.html#//apple_ref/doc/uid/TP40015241-CH12-SW5).

Feedback welcome! I have built support for all platforms into a single scheme, so when you complile, you can just select the device you want to build against, and the appropriate framework will be built for that platform. This works nicely with Carthage, too.

When I've finished the README, I will create a PR.

craigrouse avatar May 29 '19 14:05 craigrouse

PR now opened: https://github.com/saoudrizwan/Disk/pull/72

Has anyone tried my updates yet? I look forward to your comments :)

craigrouse avatar Jun 13 '19 17:06 craigrouse