GoogleSignIn Framework Reference

  • GIDProfileData represents the basic profile information of a Google user, such as their email, name, and profile picture.

  • This class provides read-only access to user properties like email, full name, given name, and family name.

  • It indicates whether a user has a profile image and allows retrieval of the image URL with a specified dimension.

  • Developers can use this class to access and display basic user profile details within their applications.

GIDProfileData

@interface GIDProfileData : NSObject <NSCopying, NSSecureCoding>

This class represents the basic profile information of a GIDGoogleUser.

  • The Google user’s email.

    Declaration

    Swift

    var email: String { get }

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull email;
  • The Google user’s full name.

    Declaration

    Swift

    var name: String { get }

    Objective-C

    @property (nonatomic, readonly) NSString *_Nonnull name;
  • The Google user’s given name.

    Declaration

    Swift

    var givenName: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *givenName;
  • The Google user’s family name.

    Declaration

    Swift

    var familyName: String? { get }

    Objective-C

    @property (nonatomic, readonly, nullable) NSString *familyName;
  • Whether or not the user has profile image.

    Declaration

    Swift

    var hasImage: Bool { get }

    Objective-C

    @property (nonatomic, readonly) BOOL hasImage;
  • Gets the user’s profile image URL for the given dimension in pixels for each side of the square.

    Declaration

    Swift

    func imageURL(withDimension dimension: UInt) -> URL?

    Objective-C

    - (nullable NSURL *)imageURLWithDimension:(NSUInteger)dimension;

    Parameters

    dimension

    The desired height (and width) of the profile image.

    Return Value

    The URL of the user’s profile image.