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
| Field | Type | Required | Notes |
|---|---|---|---|
| firstName | String? | ❌ No | Member’s given name. |
| middleName | String? | ❌ No | Member’s middle name. |
| lastName | String? | ❌ No | Member’s family name. |
| address | MemberAddress? | ❌ No | Structured address object (see below). |
| dob | String? | ❌ No | Date of birth in YYYY-MM-DD (ISO-8601). |
String? | ❌ No | Member’s email. Recommended for communications. | |
| gender | String? | ❌ No | M, or F. |
| dayPhone | String? | ❌ No | Landline or daytime contact number. |
| cellPhone | String? | ❌ No | Mobile contact number. |
MemberAddress
| Field | Type | Notes |
|---|---|---|
| line1 | String? | Primary street address. |
| line2 | String? | Secondary address line (apt, suite, etc.). |
| city | String? | City or town. |
| state | String? | Two-letter state code (e.g., CA). |
| zipCode | String? | 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)