Skip to content

Commit

Permalink
fix(PSG-3369): Fixed iOS authorizeWith bridge method
Browse files Browse the repository at this point in the history
  • Loading branch information
rickycpadilla committed Feb 23, 2024
1 parent 87819ec commit a938445
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ios/PassageReactNative.swift
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class PassageReactNative: NSObject {

// MARK: - Social Methods

@objc(aurhorizeWith:withResolver:withRejecter:)
@objc(authorizeWith:withResolver:withRejecter:)
func authorizeWith(
connection: String,
resolve: @escaping RCTPromiseResolveBlock,
Expand All @@ -214,7 +214,7 @@ class PassageReactNative: NSObject {
reject("SOCIAL_AUTH_ERROR", "Invalid connection.", nil)
return
}
guard let window = UIApplication.shared.delegate?.window else {
guard let window = await UIApplication.shared.delegate?.window ?? nil else {
reject("SOCIAL_AUTH_ERROR", "Could not access app window.", nil)
return
}
Expand Down

0 comments on commit a938445

Please sign in to comment.