Closed gimwee closed 3 years ago
getting this error when running the app.
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file react_native_giphy_keyboard/RNGiphyKeyboard.swift, line 12
after some investigation, found out that 'keyWindow' was deprecated in iOS 13.0
and also found a solution , but I am not sure whether this is the best practice for swift as I am not a swift developer :)
Line 12: change to let keyWindow = UIApplication.shared.connectedScenes .filter({$0.activationState == .foregroundActive}) .map({$0 as? UIWindowScene}) .compactMap({$0}) .first?.windows .filter({$0.isKeyWindow}).first
line 67: chnage to self.keyWindow!.rootViewController!.present(giphy, animated: true, completion: { self.giphy = giphy })
hope you guys can take a look when you got the time
This package has now been deprecated in favor of the official @giphy/react-native-sdk library.
@giphy/react-native-sdk
getting this error when running the app.
Fatal error: Unexpectedly found nil while unwrapping an Optional value: file react_native_giphy_keyboard/RNGiphyKeyboard.swift, line 12
after some investigation, found out that 'keyWindow' was deprecated in iOS 13.0
and also found a solution , but I am not sure whether this is the best practice for swift as I am not a swift developer :)
Line 12: change to let keyWindow = UIApplication.shared.connectedScenes .filter({$0.activationState == .foregroundActive}) .map({$0 as? UIWindowScene}) .compactMap({$0}) .first?.windows .filter({$0.isKeyWindow}).first
line 67: chnage to self.keyWindow!.rootViewController!.present(giphy, animated: true, completion: { self.giphy = giphy })
hope you guys can take a look when you got the time