Post

Replies

Boosts

Views

Activity

Configuring custom NWProtocolFramer.Options
Is it possible to pass in custom configuration options to an instance of NWProtocolFramerImplementation that it can use while it is handshaking (i.e. before calling .markReady())? I can’t see any way to do it, currently. For example, I have written a framer to handle a STARTTLS handshake for SMTP. Before calling prependApplicationProtocol to start TLS, I set up some custom NWProtocolTLS.Options. It works, but only if I hard-code those custom TLS options. If, for example, I wanted to be able to allow the user to select a minimum TLS version, I don’t see a clean way currently to pass in that custom configuration to my instance of NWProtocolFramerImplementation. Any thoughts? Or should I file an enhancement request? Similar problem as found here: https://developer.apple.com/forums/thread/130498 Thank you! Jonathan
2
0
536
Jun ’20
UI state restoration dead in iOS 13?
I am implementing multi-window scene support in iOS 13 and, the best I can gather from WWDC and documentation, it looks like the system-provided UI state restoration machinery that we enjoyed in iOS 12 no longer works (for multi-window apps). We are supposed to use NSUserActivity to save/restore state on our own. Am I understanding that correctly? I am confused on a couple points and looking for some guidance:1. The documentation for UISceneDelegate says that "User activity objects are meant for recording what the user was doing, so you don't need to save the state of your scene's UI." Doesn't this provide a worse user experience that the old state-restoration machinery? Why would we not want to save fine-grained UI state like scroll position, view controller hierarchies, etc. to provide a better experience for users when they come back to our app? Asking each dev to implement their own state save/restore mechanism seems like a step backwards.2. Is there some way to invoke the system-provided UI state restoration mechanism on a given scene that would give us an NSData archive that we could save in the NSUserActivity's userInfo dictionary? Likewise for restoring UI state from an NSUserActivity's userInfo dictionary.Hoping for some additional insight. Just seems like a move backward to jettison all of the UI state restoration work in favor of a roll-your-own solution using NSUserActivity.Thanks,Jonathan
5
0
2.4k
Jun ’19