-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[google_sign_in_ios] Fix "callee requires a non-null parameter" analy…
…zer warning (#7513) The normal Cocoa pattern is to check a result, and only if it's nil then do something with the error. https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ErrorHandlingCocoa/CreateCustomizeNSError/CreateCustomizeNSError.html > Important: Success or failure is indicated by the return value of the method. Although Cocoa methods that indirectly return error objects in the Cocoa error domain are guaranteed to return such objects if the method indicates failure by directly returning nil or NO, you should always check that the return value is nil or NO before attempting to do anything with the NSError object. Use this pattern with the result and error from the sign in completion block. This means `-didSignInForUser` is only called for non-nil users (the possibility of a nullable parameter was kicking off the analyzer warning). ![Screenshot 2024-08-26 at 4 24 04â�¯PM](https://github.com/user-attachments/assets/56937344-ab54-4ac6-9f8c-7fdb84f9567a) Fixes flutter/flutter#153587
- Loading branch information
Showing
3 changed files
with
29 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters