Important: Starting
May 1, 2024, Apple
requires Privacy Manifests and signatures for iOS applications that use commonly-used SDKs, including GoogleSignIn-iOS. Upgrade to GoogleSignIn-iOS v7.1.0+ before May 1, 2024. Follow
our upgrade guide.
GoogleSignIn Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GIDProfileData
@interface GIDProfileData : NSObject <NSCopying, NSSecureCoding>
This class represents the basic profile information of a GIDGoogleUser
.
-
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.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-19 UTC.
[null,null,["Last updated 2025-05-19 UTC."],[[["\u003cp\u003e\u003ccode\u003eGIDProfileData\u003c/code\u003e represents the basic profile information of a Google user, such as their email, name, and profile picture.\u003c/p\u003e\n"],["\u003cp\u003eThis class provides read-only access to user properties like email, full name, given name, and family name.\u003c/p\u003e\n"],["\u003cp\u003eIt indicates whether a user has a profile image and allows retrieval of the image URL with a specified dimension.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use this class to access and display basic user profile details within their applications.\u003c/p\u003e\n"]]],[],null,["# GoogleSignIn Framework Reference\n\nGIDProfileData\n==============\n\n @interface GIDProfileData : NSObject \u003cNSCopying, NSSecureCoding\u003e\n\nThis class represents the basic profile information of a [GIDGoogleUser](../Classes/GIDGoogleUser.html).\n- `\n ``\n ``\n `\n\n ### [email](#/c:objc(cs)GIDProfileData(py)email)\n\n `\n ` \n The Google user's email. \n\n #### Declaration\n\n Swift \n\n var email: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSString *_Nonnull email;\n\n- `\n ``\n ``\n `\n\n ### [name](#/c:objc(cs)GIDProfileData(py)name)\n\n `\n ` \n The Google user's full name. \n\n #### Declaration\n\n Swift \n\n var name: String { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSString *_Nonnull name;\n\n- `\n ``\n ``\n `\n\n ### [givenName](#/c:objc(cs)GIDProfileData(py)givenName)\n\n `\n ` \n The Google user's given name. \n\n #### Declaration\n\n Swift \n\n var givenName: String? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSString *givenName;\n\n- `\n ``\n ``\n `\n\n ### [familyName](#/c:objc(cs)GIDProfileData(py)familyName)\n\n `\n ` \n The Google user's family name. \n\n #### Declaration\n\n Swift \n\n var familyName: String? { get }\n\n Objective-C \n\n @property (nonatomic, readonly, nullable) NSString *familyName;\n\n- `\n ``\n ``\n `\n\n ### [hasImage](#/c:objc(cs)GIDProfileData(py)hasImage)\n\n `\n ` \n Whether or not the user has profile image. \n\n #### Declaration\n\n Swift \n\n var hasImage: Bool { get }\n\n Objective-C \n\n @property (nonatomic, readonly) BOOL hasImage;\n\n- `\n ``\n ``\n `\n\n ### [-imageURLWithDimension:](#/c:objc(cs)GIDProfileData(im)imageURLWithDimension:)\n\n `\n ` \n Gets the user's profile image URL for the given dimension in pixels for each side of the square. \n\n #### Declaration\n\n Swift \n\n func imageURL(withDimension dimension: UInt) -\u003e URL?\n\n Objective-C \n\n - (nullable NSURL *)imageURLWithDimension:(NSUInteger)dimension;\n\n #### Parameters\n\n |-------------------|------------------------------------------------------|\n | ` `*dimension*` ` | The desired height (and width) of the profile image. |\n\n #### Return Value\n\n The URL of the user's profile image."]]