Skip to content

Commit

Permalink
fix(ios): remove key window
Browse files Browse the repository at this point in the history
  • Loading branch information
hiteshjain29 committed Jan 19, 2022
1 parent 1ab08c9 commit f87187c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/ReactNativeUsabilla/UsabillaBridge.swift
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class UsabillaBridge: RCTEventEmitter {
@objc(loadFeedbackFormWithCurrentViewScreenshot:)
func loadFeedbackFormWithCurrentViewScreenshot(formID: String) {
DispatchQueue.main.sync {
if let rootVC = UIApplication.shared.keyWindow?.rootViewController {
if let rootVC = UIApplication.shared.windows.first?.rootViewController {
let screenshot = self.takeScreenshot(view: rootVC.view)
Usabilla.loadFeedbackForm(formID, screenshot: screenshot)
}
Expand Down

0 comments on commit f87187c

Please sign in to comment.