Skip to main content

Profile

The Profile feature provides access to the logged-in member’s data. It supports retrieving and updating the member’s own profile.


What you can build

  • Profile screen showing member details with edit option.

Permissions & threading

  • No special permissions required.
  • Android: call from coroutines; iOS: use async/await.

Profile Data Model

MemberProfile

FieldTypeRequiredNotes
firstNameString?❌ NoMember’s given name.
middleNameString?❌ NoMember’s middle name.
lastNameString?❌ NoMember’s family name.
addressMemberAddress?❌ NoStructured address object (see below).
dobString?❌ NoDate of birth in YYYY-MM-DD (ISO-8601).
emailString?❌ NoMember’s email. Recommended for communications.
genderString?❌ NoM, or F.
dayPhoneString?❌ NoLandline or daytime contact number.
cellPhoneString?❌ NoMobile contact number.

MemberAddress

FieldTypeNotes
line1String?Primary street address.
line2String?Secondary address line (apt, suite, etc.).
cityString?City or town.
stateString?Two-letter state code (e.g., CA).
zipCodeString?Postal or ZIP code.

Get profile

Android (Kotlin)

val profile = withContext(Dispatchers.IO) {
AFCore.profile().get()
}
profileView.render(profile)

iOS (Swift)

let profile = try await AFCore.shared.profile().get()
ProfileView.render(profile)

Update profile

Android (Kotlin)

val updated = withContext(Dispatchers.IO) {
AFCore.profile().update(profileData)
}

iOS (Swift)

let updated = try await AFCore.shared.profile().update(profileData)

UI patterns & tips

  • Cache the profile locally to reduce API calls.
  • Use inline validation when editing fields.

Error handling

  • Handle network errors with retries.
  • Profile update validation errors should map to UI messages.

Quick reference

AFCore.profile().get()
AFCore.profile().update(profileData)
AFCore.profile().searchColleagueProfiles(query, maxResults)