How to read data from NEAppProxyTCPFlow?

hi ,everyone


Why the completionHandler block was not called after calling '-(void)readDataWithCompletionHandler:' of NEAppProxyTCPFlow?


The Managed APP has sent data, and I have got an instance of NEAppProxyTCPFlow from '-(void)handleNewFlow:'

and call '-(void)openWithLocalEndpoint: completionHandler:' also succeeded.


Thanks,

SKtt

Replies

On an app proxy flow the open is async. Are you sure that the completion handler passed to

-openWithLocalEndpoint:completionHandler:
has been called before you call
-readDataWithCompletionHandler:
.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you,eskimo


Yes,I'm sure that the completion handler has been called,and error is nil.


I called '-(void)readDataWithCompletionHandler:' in the open completion handler.


Is it because of this reason that I use the development provisioning profile to codesign, not the enterprise provisioning profile?


Thanks,

SKtt

Is it because of this reason that I use the development provisioning profile to codesign … ?

That seems unlikely. The app proxy suitability checking occurs before you get the flow via

-handleNewFlow:
. Once you have the flow I can’t think of anything that would prevent you from reading it.

I don’t have any other simple suggestions for debugging this. My recommendation is that you open a DTS tech support incident so that I can spend the time necessary to take a proper look.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"

Thank you,eskimo


I find my AppProxyExtension output a log that is 'flow_director_create_io_handle:3170 (0): control: Recevied a data message for flow 3218250285, but the flow cannot be found' in console.app, so ,the completionHandler block was not called after calling '-(void)readDataWithCompletionHandler:' of NEAppProxyTCPFlow.


What does this log mean and how can I solve this problem?


Thanks,

Tt