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 View #17

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

SwiftUI View #17

wants to merge 8 commits into from

Conversation

Meorge
Copy link

@Meorge Meorge commented Jul 30, 2020

Here is the pull request for my SwiftUI version of the TimeZonePicker!

So far, it's worked correctly on macOS. I wasn't able to test it with iOS, unfortunately; for some reason Xcode refused to compile an iOS test app, and it looks like the solution may be to try and reinstall Xcode, which I'm not able to do at the moment. Looking through the code, though, I don't see anything that looks explicitly macOS-specific.

I also updated the README to include some info on using the SwiftUI view.

@gligorkot
Copy link
Owner

gligorkot commented Jul 30, 2020

Hey @Meorge, thanks for the PR. I'll have a look at it in more detail over the next little bit and let you know what I've found.

One thing I did notice though - the CI build failed as you're using Identifiable in CityCountryTimeZone which is iOS 13.0 and above, so to fix this error you might need to mark the support version up from 8.0 to 13.0+

@Meorge
Copy link
Author

Meorge commented Jul 30, 2020

Ah, thanks for noting that! I've never used a CI build system before, so I'm still learning a lot. I'll try upping the iOS version to 13.0.

@Meorge
Copy link
Author

Meorge commented Jul 31, 2020

This is strange - I tried updating the podspec file and pushing, but it seems to be stuck on an error on their end:

    - ERROR | [iOS] unknown: Encountered an unknown error (Simulator for iOS 13.0 is not available.
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/fourflusher-2.3.1/lib/fourflusher/xcodebuild.rb:9:in `destination'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:1033:in `xcodebuild'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:711:in `block in build_pod'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:145:in `message'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:692:in `build_pod'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:393:in `block in perform_extensive_analysis'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:381:in `all?'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:381:in `perform_extensive_analysis'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/validator.rb:128:in `validate'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/lib/lint.rb:87:in `block in run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/lib/lint.rb:69:in `each'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/lib/lint.rb:69:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Users/vagrant/.rbenv/versions/2.6.3/lib/ruby/gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `load'
/Users/vagrant/.rbenv/versions/2.6.3/bin/pod:23:in `<main>'
) during validation.

I'm guessing this just means I need to choose a different iOS version to target - one that they have the simulator for - but I'm not sure how to find out which ones are available.

@gligorkot
Copy link
Owner

Ahhh @Meorge this might need some update on the stack used for the build. I think it might be using XCode 10. I'll look at it soon.

@Meorge
Copy link
Author

Meorge commented Jul 31, 2020

Ah okay, thanks!

@gligorkot
Copy link
Owner

Re-running it now with XCode 11.6

@Meorge
Copy link
Author

Meorge commented Aug 5, 2020

Apologies on being absent for a few days, there were some other things I had to work on.
I checked the result of the test and saw that CocoaPods wasn't happy about the iOS version requirement, so I upped it to iOS 13 as well. The error it's hitting now is perplexing me: the example project seems to be unable to find the TimeZonePicker module, but I never modified anything with the example project itself - only added the SwiftUI classes.

@gligorkot
Copy link
Owner

No worries at all, it's same with me - and also looks like I won't be able to get to this for another little while sorry. When I do get some time to review, I'll fix the Cocoapod issue as well. Sorry about the delay and thanks for contributing!

@Meorge
Copy link
Author

Meorge commented Aug 6, 2020

Ok, no problem. Thanks again for putting up with my finding my way around the CI system 😅

@jalurgemilang
Copy link

jalurgemilang commented Feb 4, 2024

Sorry both, but is the current version working with SwiftUI and iOS?

@gligorkot
Copy link
Owner

Hi @jalurgemilang, sorry I've been busy and not really updating this library at all lately - at this stage I'm not sure I ever will really unless something changes. Feel free to fork it from the branch @Meorge has and use it from there rather than what's released.

@Meorge
Copy link
Author

Meorge commented Feb 5, 2024

Hi @jalurgemilang , from my end I don't currently have plans to continue updating or working on it unless/until I have a project that needs it. I recall my implementation being fairly basic SwiftUI, so if it doesn't still work, it might not be a lot of effort to update it?

@jalurgemilang
Copy link

Thanks, both of you for your comments!

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

Successfully merging this pull request may close these issues.

None yet

3 participants