On IOS14 observed lag with external keyboard

Originator:duszenko
Number:rdar://8688587 Date Originated:Sep 14,2020
Status:Open Resolved:Open
Product:iOS Product Version:iOS14
Classification:Incorrect/Unexpected Behavior Reproducible:Always
 
On iOS14 observed lag with an external keyboard

The lag appears significantly when typing while writing text in WKWebView.  The lag does not exist when using the onscreen keyboard in either of those situations, so it is only a problem with external keyboards.  The lag also does not appear to exist when using the Magic Keyboard in the native mail application.

When WKWebView or UITextField are added to the modal controller view.  

issue reproduccsed when call (modal style -UIModalPresentationPageSheet):

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main_iPad" bundle:[NSBundle mainBundle]];
UIViewController *editNavController = [storyboard instantiateViewControllerWithIdentifier:@"TestID"];
editNavController.modalPresentationStyle = UIModalPresentationPageSheet;
[self presentViewController:editNavController animated:YES completion:nil];


when changed to UIModalPresentationFullScreen the issue does not exist and no lag.
NOTE: This is only iPad issue and this works in iOS13 but not in iOS14.

logs from the device logs:

```
default	15:56:03.794111+0200	backboardd	destinations for Keyboard event: (<display: builtin; environment: keyboardFocus; pid: 725; bundleID: com.testapp.enterprise; token: 0x4AA65AC7>)
default	15:56:03.812751+0200	backboardd	Lcurrent=427.4086 Lr=1.4605 DR=200.0000 factor=0.0000
error	15:56:03.816317+0200	SpringBoard	Error acquiring assertion: <Error Domain=RBSAssertionErrorDomain Code=2 "Assertion's invalidation time is in the past" UserInfo={IgnoreOnReconnect=true, NSLocalizedFailureReason=Assertion's invalidation time is in the past}>
default	15:56:03.818618+0200	backboardd	Lcurrent=427.4086 Lr=1.4613 DR=200.0000 factor=0.0000
default	15:56:03.819180+0200	runningboardd	Acquiring assertion targeting [daemon<com.apple.DragUI.druid>:433] from originator [daemon<com.apple.SpringBoard>:59] with description <RBSAssertionDescriptor| "com.apple.UIKit.KeyboardManagement.message" ID:33-59-5495 target:433 attributes:[
	<RBSLegacyAttribute| requestedReason:FinishTask reason:FinishTask flags:( AllowIdleSleep PreventTaskSuspend PreventTaskThrottleDown PreventThrottleDownUI )>,
	<RBSAcquisitionCompletionAttribute| policy:AfterValidation>
	]>
default	15:56:03.819403+0200	runningboardd	Assertion 33-59-5495 (target:[daemon<com.apple.DragUI.druid>:433]) will be created as active as no start-time-defining assertions exist
error	15:56:03.819806+0200	SpringBoard	[<_UIKeyboardArbiterHandle: 0x283d0f660; PID 433: (null) <(null)>; hosting PIDs {(
)}; level 0.000000; active NO [wants NO]; suppression 0; iav 0.000000; on screen NO>] could not take process assertion
default	15:56:03.827506+0200	backboardd	Lcurrent=427.4086 Lr=1.4621 DR=200.0000 factor=0.0000
default	15:56:03.863395+0200	runningboardd	Invalidating assertion 33-59-5492 (target:[daemon<com.apple.SpringBoard>:59](UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard)) from originator [daemon<com.apple.SpringBoard>:59]
default	15:56:03.863616+0200	runningboardd	Acquiring assertion targeting [daemon<com.apple.SpringBoard>:59](UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard) from originator [daemon<com.apple.SpringBoard>:59] with description <RBSAssertionDescriptor| "injecting inherited from "UIScene:com.apple.frontboard.systemappservices::com.apple.springboard" to 59<UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard>" ID:33-59-5496 target:59<UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard> attributes:[
	<RBSHereditaryGrant| endowmentNamespace:com.apple.boardservices.endpoint-injection UIScene:com.apple.frontboard.systemappservices::com.apple.springboard>,
	<RBSHereditaryGrant| endowmentNamespace:com.apple.frontboard.visibility UIScene:com.apple.frontboard.systemappservices::com.apple.springboard>
	]>
default	15:56:03.863675+0200	runningboardd	Assertion 33-59-5496 (target:[daemon<com.apple.SpringBoard>:59](UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard)) will be created as active
default	15:56:03.866796+0200	runningboardd	Finished acquiring assertion 33-59-5496 (target:[daemon<com.apple.SpringBoard>:59](UIScene:com.apple.frontboard.systemappservices::com.apple.UIKit.remote-keyboard))
default	15:56:03.867031+0200	backboardd	Lcurrent=427.4086 Lr=1.4631 DR=200.0000 factor=0.0000
default	15:56:03.867623+0200	TestApp	-[SOAuthorization init]  on <private>
default	15:56:03.867693+0200	TestApp	-[SOAuthorizationCore init]  on <private>
default	15:56:03.867777+0200	TestApp	<SOServiceConnection: 0x283385a20>: new XPC connection
default	15:56:03.872713+0200	backboardd	Lcurrent=427.4086 Lr=1.4637 DR=200.0000 factor=0.0000
default	15:56:03.875652+0200	TestApp	-[SOAuthorization init]  on <private>
default	15:56:03.875737+0200	TestApp	-[SOAuthorizationCore init]  on <private>
default	15:56:03.875817+0200	TestApp	<SOServiceConnection: 0x28335ece0>: new XPC connection
default	15:56:03.878194+0200	backboardd	Lcurrent=427.4086 Lr=1.4646 DR=200.0000 factor=0.0000
default	15:56:03.884666+0200	TestApp	-[SOAuthorization init]  on <private>
default	15:56:03.884779+0200	TestApp	-[SOAuthorizationCore init]  on <private>
default	15:56:03.884888+0200	TestApp	<SOServiceConnection: 0x2833511c0>: new XPC connection
default	15:56:03.885370+0200	TestApp	-[SOAuthorization init]  on <privatedefault	15:56:03.885441+0200	TestApp	-[SOAuthorizationCore init]  on <private>
```

Comments

This is now resolved in iOS 14.2 Beta


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!