systers / malaria-app-ios

A mobile app that will aid the Volunteer in sustaining life-saving malaria prevention tactics over their 2+ years of service.
4 stars 16 forks source link

Location auto complete #37

Closed manas15 closed 8 years ago

manas15 commented 8 years ago

I have implemented Location AutoComplete functionality using Google Place Autocomplete. When the user is connected to internet she can use this by clicking the "search over web button " and a new screen will come where she will get suggestions as she types. And once she makes a selection the selected data will come on the Destination Field.

bphenriques commented 8 years ago

I updated cocoapods (dummy me) and now I am having problems with the podfile. I'll review the remaining parts after I fix the current Podfile

bphenriques commented 8 years ago

Using iphone 4s 8.4 the constraints are breaking.

    Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. (Note: If you're seeing NSAutoresizingMaskLayoutConstraints that you don't understand, refer to the documentation for the UIView property translatesAutoresizingMaskIntoConstraints) 
(
    "<NSLayoutConstraint:0x7874d5f0 V:[UILabel:0x7874d350'Destination'(30)]>",
    "<NSLayoutConstraint:0x7865d3a0 V:[UIButton:0x786db050'Button'(27)]>",
    "<NSLayoutConstraint:0x7874ecd0 UITextField:0x7861d7d0.top == UILabel:0x7874d350'Destination'.top>",
    "<NSLayoutConstraint:0x7874ed60 UITextField:0x7861d7d0.bottom == UILabel:0x7874d350'Destination'.bottom>",
    "<NSLayoutConstraint:0x7874f0c0 UIButton:0x786e57c0.top == UIView:0x7874d290.topMargin>",
    "<NSLayoutConstraint:0x7874f0f0 UIButton:0x786e57c0.top == UITextField:0x7861d7d0.top>",
    "<NSLayoutConstraint:0x7874f180 V:|-(8)-[UIButton:0x786db050'Button']   (Names: '|':UIView:0x7874d290 )>",
    "<NSLayoutConstraint:0x7874f1b0 UIButton:0x786db050'Button'.bottom == UITextField:0x7861d7d0.bottom>"
)

Will attempt to recover by breaking constraint 
<NSLayoutConstraint:0x7874d5f0 V:[UILabel:0x7874d350'Destination'(30)]>

Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.

Edit: the keyboard is freezing as well on that iphone on that version

manas15 commented 8 years ago

I have fixed the comments , logger and pod issues .

manas15 commented 8 years ago

I'm not too sure about why the constraints are breaking on iOS 8.4 I did test the application on iphone 4s but that was running on iOS 9.2 Will have to download the iphone4s 8.4 simulator to see where and why it breaks

manas15 commented 8 years ago

Removed the conflicting constraints. @bphenriques you can review my PR now :)

bphenriques commented 8 years ago

The constraints aren't breaking anymore but I can't test because it is freezing on my simulator on iOS 8.4 iPhone 4S after the view controller shows up. The memory is collapsing (see log below). Somehow you are allocating memory sequentially (malloc) making the app freeze.

malaria-ios(6578,0x5166000) malloc: *** mach_vm_map(size=8388608) failed (error code=3)
*** error: can't allocate region securely
*** set a breakpoint in malloc_error_break to debug
(lldb) 

Edit: freezes on iOS 8.4 but it doesn't on iOS 9. Edit2: The remaining stuff seems ok for me :) Good work.

manas15 commented 8 years ago

Glad to see you keep track of all these minute details along with the functionality of the app. I'll make sure that I do the same from now onwards. :) The corrections have been made. Have a look Cheers!

bphenriques commented 8 years ago

:) Accepted