gdelataillade / alarm

A Flutter plugin to easily manage alarms on iOS and Android
https://pub.dev/packages/alarm
MIT License
132 stars 86 forks source link

Make iOS work with absolute file paths. #75

Closed henry-lang closed 11 months ago

henry-lang commented 1 year ago

My tech team encountered an error in our app where we use flutter_cache_manager in conjunction with this library, because your swift code currently doesn't work with absolute file paths which is what a File.path returns for us. I have currently modified the code to always just do that, but a feature toggling the type of path used through an argument could be nice. Please consider this feature as it drastically expanded the library's abilities since it can work with dynamic data not stored in the bundle.

Sincerely, Henry Langmack

gdelataillade commented 1 year ago

Hey @henry-lang,

Thanks for the PR on the plugin! I'll check it out soon. In the meantime, you should use it directly in your project. Just wondering, have you tested it thoroughly? How's it on Android?

Best,

henry-lang commented 1 year ago

I haven't modified any of the code on the android side of things, and it seems to work great on our build. This was really just a tweak local to iOS. More testing would need to be done with other file paths, but since we are using the URL Swift type for the file path, it should work with other directories. I'm sorry for not being super on top of things with testing, I don't really use Swift at all and this was just a spur of the moment change that could possibly be turned into a feature in your library!

henry-lang commented 1 year ago

I can do some testing if you would like, as I would love to see this feature get merged into the library

gdelataillade commented 1 year ago

Hi @henry-lang

Sorry I've been very busy lately, working on another PR. I'd love to see this feature merged too !

I you could do some testing and send me what you tested and the results, it would really help. Keep in mind that the plugin has to keep the exact same behavior on iOS and Android.

Thank you in advance !

henry-lang commented 1 year ago

For sure, I’ll get back to you later this week

gdelataillade commented 1 year ago

Hey @henry-lang any update ?

henry-lang commented 1 year ago

Sorry, been busy, testing shouldn't be too bad, we're running a production app with it and it's fine