- Home /
Unity 5.6.5p2 Crash when iOS10 using keyboard
In Keyboard.mm file, the fountion positionInput used [UnityGetGLView() safeAreaInsets], But it only work in ios11 above!!! hope you fix it quickly.
Answer by Chenwei_Jheng · Aug 07, 2018 at 04:18 AM
Me too. I want to write this code in Keyboard.mm.
- (void)positionInput:(CGRect)kbRect x:(float)x y:(float)y {
float safeAreaInsetLeft;
float safeAreaInsetRight;
if ( [[[UIDevice currentDevice] systemVersion] floatValue] >= 11.0 ) {
safeAreaInsetLeft = [UnityGetGLView() safeAreaInsets].left;
safeAreaInsetRight = [UnityGetGLView() safeAreaInsets].right;
}
else {
safeAreaInsetLeft = [UnityGetGLView() layoutMargins].left;
safeAreaInsetRight = [UnityGetGLView() layoutMargins].right;
}
.........
}
But the code is bad. I find Unity 2018 also has the problem.
Answer by qd19218960 · Aug 08, 2018 at 03:19 AM
looks like Unity 2017.4.8 and XCode 9.4 work for me, it's not happen again.
Your answer
Follow this Question
Related Questions
iOS crash when dismissing system keyboard 1 Answer
iOS Build Crash : task_set_exception_ports(B07, 400, D03, 0, 0) Error 0 Answers
Unity iOs project gets crashed when returning from internal method UnityUpdateDisplayList() 2 Answers
IOS Crash during build on Mac for Unity 5.3.4 0 Answers
Unity 5.0.1 ios app crashes on load 4 Answers