-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/Introduce PersonNameComponents for Google, Facebook, LinkedIn…
… sign in (#33) Co-authored-by: Yll Fejziu <[email protected]>
- Loading branch information
1 parent
f4e932d
commit bb984d3
Showing
9 changed files
with
78 additions
and
26 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ on: | |
|
||
jobs: | ||
Tests: | ||
runs-on: macos-14-xlarge | ||
runs-on: macos-15-xlarge | ||
steps: | ||
- name: Cancel previous jobs | ||
uses: styfle/[email protected] | ||
|
@@ -21,8 +21,8 @@ jobs: | |
xcode-version: latest-stable | ||
|
||
- name: Build project | ||
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 14 Pro' -scheme 'PovioKitAuth-Package' | xcpretty | ||
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild build-for-testing -destination 'name=iPhone 16 Pro,OS=18.0' -scheme 'PovioKitAuth-Package' | xcpretty | ||
|
||
- name: Run tests | ||
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 14 Pro' -scheme 'PovioKitAuth-Package' | xcpretty | ||
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild test-without-building -destination 'name=iPhone 16 Pro,OS=18.0' -scheme 'PovioKitAuth-Package' | xcpretty | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// PersonNameComponents+Extension.swift | ||
// PovioKitAuth | ||
// | ||
// Created by Egzon Arifi on 09/11/2024. | ||
// | ||
|
||
import AuthenticationServices | ||
import Foundation | ||
|
||
public extension PersonNameComponents { | ||
var name: String? { | ||
guard let givenName else { | ||
return familyName | ||
} | ||
guard let familyName else { | ||
return givenName | ||
} | ||
return "\(givenName) \(familyName)" | ||
} | ||
} | ||
|
||
public extension PersonNameComponents { | ||
init( | ||
namePrefix: String? = .none, | ||
middleName: String? = .none, | ||
givenName: String? = .none, | ||
familyName: String? = .none, | ||
nameSuffix: String? = .none, | ||
nickname: String? = .none, | ||
phoneticRepresentation: PersonNameComponents? = .none | ||
) { | ||
self.init() | ||
self.namePrefix = namePrefix | ||
self.familyName = familyName | ||
self.middleName = middleName | ||
self.givenName = givenName | ||
self.nameSuffix = nameSuffix | ||
self.nickname = nickname | ||
self.phoneticRepresentation = phoneticRepresentation | ||
} | ||
} |
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
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