Skip to content
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

SwiftUI + License for JSON? #16

Open
Meorge opened this issue Jul 25, 2020 · 6 comments
Open

SwiftUI + License for JSON? #16

Meorge opened this issue Jul 25, 2020 · 6 comments

Comments

@Meorge
Copy link

Meorge commented Jul 25, 2020

Hi,

For a project I'm working on, I need a SwiftUI timezone picker and was considering adapting your code/JSON database file to SwiftUI. I haven't seen anything that states the JSON came from another source, so I'm assuming that the answer to this is 'yes', but just in case I wanted to confirm that the CitiesAndTimeZones.json file is licensed under Apache 2.0 with the rest of the code?

Thanks,
Malcolm

@gligorkot
Copy link
Owner

Hey man, sure thing! If you like you could do it over the top of this library and raise a PR, then I can update the version to 2.0 and mark iOS support up to 13.0 for that version and up.

Would be good to have this in SwiftUI, I wasn't very good at coding the UI when I did this lib so would be great to improve it.

The json file is an extract from iOS or MacOS. I remember finding a way to extract that and getting the file that way, so I believe if it's public like that you should be free to use it.

@Meorge
Copy link
Author

Meorge commented Jul 25, 2020

Ok great, thanks! It may take a few days but I'll try to work on a SwiftUI implementation and see if I can do it as a fork/PR!

@Meorge
Copy link
Author

Meorge commented Jul 26, 2020

I was able to spend some time today working on it. So far, I've got a view with a label meant to display the currently selected time zone, and a button you can click to open a "search for city" view. Here, you can search for the city you want, and a list of matches shows up below. I haven't yet figured out how to get selection to work, but hopefully that'll come soon.

Here's a GIF of what I've got so far running in my macOS app. (The TimeZonePicker top-level view is where it says "None" with the "Select..." button next to it.) Before I do the PR, I'm hoping to confirm that it works on iOS as well.

@tomsun3
Copy link

tomsun3 commented Dec 13, 2021

@gligorkot
Hi! Thanks for the project! Are you sure we can use the JSON file in our app?

@gligorkot
Copy link
Owner

Hey @thomasmo3, I can't say for sure, but I've released an app with this in it and it has been accepted on the App Store, so I can't see why it would be an issue for others.

@tomsun3
Copy link

tomsun3 commented Dec 13, 2021

Thank you! The JSON file is very useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants