This PR is aimed to solve the issue that app crashes if it's opened from iOS CarPlay. When invoking lockToXXX functions, lockToOrientation will try to get the first scene from the connectedScenes, if the app is opened from CarPlay, the first scene will be a CPTemplateApplicationScene instance, which causes the crash below.
NSInvalidArgumentException
-[CPTemplateApplicationScene requestGeometryUpdateWithPreferences:errorHandler:]: unrecognized selector sent to instance 0x122b1aca0
react-native-screens has a similar issue which got solved by this PR
This PR is aimed to solve the issue that app crashes if it's opened from iOS CarPlay. When invoking lockToXXX functions,
lockToOrientation
will try to get the first scene from theconnectedScenes
, if the app is opened from CarPlay, the first scene will be aCPTemplateApplicationScene
instance, which causes the crash below.react-native-screens has a similar issue which got solved by this PR