-
Notifications
You must be signed in to change notification settings - Fork 69
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
Conversion of swift 2.3 code to swift 3 #44
Comments
@shrivastavaharsh I've got a swift-3 branch on the go if you're interested. |
@shrivastavaharsh I'd be happy to look at this for possible merging once it's ready, although there appears to be a fair amount of stuff on that branch that isn't swift-3 specific.. Also are there a lot of changes required? I haven't looked at it yet. Does the Travis CI env support Swift 3? |
I looks like to me that there is some syntax changes required, such as some response http code, plus xib file look different also, I am new to swift. I am getting error of usual found nil while unwrapping optional value, which I am unable to debug. Lot of changes is been made by xcode also which could be reason of error. |
@samscam I am getting this runtime exception I have already checked all the outlets everything is fine, is it something related to swift 3? Thanks! |
@shrivastavaharsh that sounds like a standard unwrapped optional bug. Very sorry but I can't glean much without knowing which actual line of code it failed on and if it was coming from GPA (in which case we can help) or your own code (in which case we can't). There are plenty of guides on how optionals work in swift out there which might help you. |
@samscam Thanks for your reply! the actual line code which is producing that bug is topConstraint.constant = topLayoutGuide.length This line is present in GPA code in the viewWillLayoutSubviews func. |
Ok well that does sound like you've lost an outlet. In GooglePlacesAutocomplete.xib there should be a constraint between the top of the search bar and the view. That should be connected to the |
@watsonbox Yes it's got all my other changes in it too :)
Travis does XCode 8 and after some head scratching (blinking cursors and api changes to FBSnapshotTestCase) as well as the inevitable re-do of the images because the OS looks different, the tests pass. |
@samscam I changed the top constraint force unwrap ! to optional ? then its working. I hope it wont effect functionality. btw thanks for your work! |
@watsonbox Any update here, with regards to supporting Swift 3? |
I updated the code for swift 3 http://github.com/varun-naharia/ios_google_places_autocomplete and created a pull request |
Hi @varun-naharia |
@ErAshu are you using http://github.com/varun-naharia/ios_google_places_autocomplete this ? |
Yes, I am using this. Simple download and run demo. |
I am having issues related to conversion, whenever I am trying to open xib with button action I am getting this error found nil while unwrapping optional, another issue is related to response http code. If you can provide converted syntax of the code that will be great!
Thanks
The text was updated successfully, but these errors were encountered: