-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1038 from 0x1-company/facebook-ios-sdk
feat: facebook ios sdk
- Loading branch information
Showing
12 changed files
with
139 additions
and
15 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
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
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
21 changes: 21 additions & 0 deletions
21
Packages/DependencyPackage/Sources/FacebookClient/Client.swift
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,21 @@ | ||
import Dependencies | ||
import DependenciesMacros | ||
import FacebookCore | ||
|
||
@DependencyClient | ||
public struct FacebookClient: Sendable { | ||
public var didFinishLaunchingWithOptions: @Sendable (UIApplication, [UIApplication.LaunchOptionsKey: Any]?) -> Void | ||
public var open: @Sendable (UIApplication, URL, String?, Any?) -> Void | ||
} | ||
|
||
extension FacebookClient: TestDependencyKey { | ||
public static let testValue = Self() | ||
public static let previewValue = Self() | ||
} | ||
|
||
public extension DependencyValues { | ||
var facebook: FacebookClient { | ||
get { self[FacebookClient.self] } | ||
set { self[FacebookClient.self] = newValue } | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
Packages/DependencyPackage/Sources/FacebookClient/LiveKey.swift
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,13 @@ | ||
import Dependencies | ||
import FacebookCore | ||
|
||
extension FacebookClient: DependencyKey { | ||
public static let liveValue = Self( | ||
didFinishLaunchingWithOptions: { application, didFinishLaunchingWithOptions in | ||
ApplicationDelegate.shared.application(application, didFinishLaunchingWithOptions: didFinishLaunchingWithOptions) | ||
}, | ||
open: { application, open, sourceApplication, annotation in | ||
ApplicationDelegate.shared.application(application, open: open, sourceApplication: sourceApplication, annotation: annotation) | ||
} | ||
) | ||
} |
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