alpha0010 / react-native-file-access

Filesystem access for React Native
MIT License
307 stars 19 forks source link

feat(#7): macos support #23

Closed mateusz1913 closed 3 years ago

mateusz1913 commented 3 years ago

Hi @alpha0010 , I want to contribute MacOS support.

It only required to update podspec, as iOS code uses Foundation & CommonCrypto which is compatible with MacOS.

There are 2 things that I also thought about, but I need your feedback on that.

First one is renaming ios folder to sth like apple as with that PR, code located in ios folder will be working on both iOS and MacOS (react-native-svg has similar approach).

Second thing is MacOS example - unfortunately react-native-macos does not support version 0.64 and it does not look like it will start very soon (and we have RN 0.65 on the horizon). That's why I didn't include react-native-macos in existing example app. Possible solution would be to create second example app which would be specific for MacOS. Let me know, what do you think about that and I will update PR with your suggestions

alpha0010 commented 3 years ago

For the time being, leave the ios folder as the same name. Keeps closer similarity with the template generated by create-react-native-library.

I would recommend copying the example folder to example-macos. In the new folder, change dependency versions as needed for MacOS. (Android and iOS should still work in that example.)

mateusz1913 commented 3 years ago

So I created macos example under exampleMacos folder. Also I added new commands in package.json to run that macos example

alpha0010 commented 3 years ago

Thank you.

However, are you able to separate it into two commits instead? One commit for MacOS support, and one commit for creating the new example project? That would make it much easier to review.

mateusz1913 commented 3 years ago

Done

alpha0010 commented 3 years ago

Thank you.