I have been following articles over here - https://developers.google.com/identity/sign-in/ios/sign-in
I have a storyboard on which I am using a ViewController and have a view put inside of it with the class - GIDSignInButton.
The View looks right, has all the constraints to keep it in the position and works fine when I detach the GIDSignInButton class from the view.
I have exact same constraints as Google's sample signin app has. Their app also throws the same errors. In fact the error log I pasted below is from Google samples (pod try Google)
As soon as I make the view GIDSignInButton, it starts to displace. It never stays in the position where the View was.
On Xcode debug console it shows following errors -
2015-06-04 07:14:53.190 SignInExample[33750:2085778] Attempted to configure [Identity, Analytics, AdMob, SignIn, AppInvite, CloudMessaging].
2015-06-04 07:14:53.193 SignInExample[33750:2085778] Successfully configured [SignIn].
2015-06-04 07:14:53.193 SignInExample[33750:2085778] Failed to configure [].
2015-06-04 07:14:53.194 SignInExample[33750:2085778] Subspecs not present, so not configured [Identity, Analytics, AdMob, AppInvite, CloudMessaging].
2015-06-04 07:14:53.258 SignInExample[33750:2085778] Unable to simultaneously satisfy constraints.
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:0x7fe1234495b0 V:[UIView:0x7fe123495a10(198)]>",
"<NSLayoutConstraint:0x7fe123495c90 UIView:0x7fe123495a10.centerY == GIDSignInButton.centerY (Names: GIDSignInButton:0x7fe1237a95f0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7fe12369cd60 h=--& v=--& GIDSignInButton.midY == + 97 (Names: GIDSignInButton:0x7fe1237a95f0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fe123495c90 UIView:0x7fe123495a10.centerY == GIDSignInButton.centerY (Names: GIDSignInButton:0x7fe1237a95f0 )>
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.
2015-06-04 07:14:53.259 SignInExample[33750:2085778] Unable to simultaneously satisfy constraints.
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:0x7fe1236848b0 GIDSignInButton.width == 3.26531*GIDSignInButton.height (Names: GIDSignInButton:0x7fe1237a95f0 )>",
"<NSLayoutConstraint:0x7fe123684b00 H:[GIDSignInButton(160)] (Names: GIDSignInButton:0x7fe1237a95f0 )>",
"<NSAutoresizingMaskLayoutConstraint:0x7fe12369cdb0 h=--& v=--& V:[GIDSignInButton(44)] (Names: GIDSignInButton:0x7fe1237a95f0 )>"
)
Will attempt to recover by breaking constraint
<NSLayoutConstraint:0x7fe1236848b0 GIDSignInButton.width == 3.26531*GIDSignInButton.height (Names: GIDSignInButton:0x7fe1237a95f0 )>
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.