Check out example codes for "presentviewcontroller must be set swift google login". It will help you in understanding the concepts better.
Code Example 1
// Add this line due to SDK update
GIDSignIn.sharedInstance()?.presentingViewController = self
Learn ReactJs, React Native from akashmittal.com