@@ -25,28 +25,6 @@ export class FacebookError extends Error {
25
25
}
26
26
27
27
let appDelegateInitialized = false ;
28
- let appDelegate : FacebookAppDelegateImpl ;
29
- @NativeClass
30
- @ObjCClass ( UIApplicationDelegate )
31
- class FacebookAppDelegateImpl extends UIResponder implements UIApplicationDelegate {
32
- static get sharedInstance ( ) {
33
- if ( ! appDelegate ) {
34
- appDelegate = FacebookAppDelegateImpl . alloc ( ) . init ( ) as FacebookAppDelegateImpl ;
35
- }
36
- return appDelegate ;
37
- }
38
-
39
- applicationOpenURLOptions ( app : UIApplication , url : NSURL , options : NSDictionary < string , any > ) : boolean {
40
- return FBSDKApplicationDelegate . sharedInstance . applicationOpenURLOptions ( app , url , options ) ;
41
- }
42
-
43
- applicationOpenURLSourceApplicationAnnotation ( application : UIApplication , url : NSURL , sourceApplication : string , annotation : any ) : boolean {
44
- return FBSDKApplicationDelegate . sharedInstance . applicationOpenURLSourceApplicationAnnotation ( application , url , sourceApplication , annotation ) ;
45
- }
46
- applicationDidFinishLaunchingWithOptions ( application : UIApplication , launchOptions : NSDictionary < string , any > ) : boolean {
47
- return FBSDKApplicationDelegate . sharedInstance . applicationDidFinishLaunchingWithOptions ( application , launchOptions ) ;
48
- }
49
- }
50
28
51
29
export class AccessToken {
52
30
#native: FBSDKAccessToken ;
@@ -132,8 +110,8 @@ export class AccessToken {
132
110
permissions : this . permissions ,
133
111
refreshDate : this . refreshDate ,
134
112
tokenString : this . tokenString ,
135
- userID : this . userID
136
- }
113
+ userID : this . userID ,
114
+ } ;
137
115
}
138
116
139
117
get native ( ) {
@@ -198,8 +176,8 @@ export class LoginResult {
198
176
declinedPermissions : this . declinedPermissions ,
199
177
grantedPermissions : this . grantedPermissions ,
200
178
isCancelled : this . isCancelled ,
201
- token : this . token
202
- }
179
+ token : this . token ,
180
+ } ;
203
181
}
204
182
205
183
get native ( ) {
@@ -220,10 +198,11 @@ export class LoginManager implements ILoginManager {
220
198
221
199
if ( ! appDelegateInitialized ) {
222
200
if ( ! Application . ios . delegate ) {
223
- Application . ios . delegate = FacebookAppDelegateImpl ;
201
+ Application . ios . delegate = NSCFBAppDelegate ;
224
202
}
225
203
GULAppDelegateSwizzler . proxyOriginalDelegate ( ) ;
226
- GULAppDelegateSwizzler . registerAppDelegateInterceptor ( FacebookAppDelegateImpl . sharedInstance ) ;
204
+ GULAppDelegateSwizzler . registerAppDelegateInterceptor ( < any > NSCFBAppDelegate ) ;
205
+
227
206
appDelegateInitialized = true ;
228
207
}
229
208
}
0 commit comments