Post not yet marked as solved
I have a UIActivityViewController. I want to be able to pass back values from the UIActivity to the CompletionWithItemsHandler using returnedItems. In the UIActivity, I'm using a UIViewController to prompt the user for parameters. How to I set values so they are returned in returnedItems?
Thanks!
Post not yet marked as solved
I'm trying to create a network request mocking infrastructure for my iOS app. I'm using a mock URLProtocol to do this. My challenge is that I want to load custom data for each URLSession. In my setupWithError() in my unit tests, I basically do:
let config = URLSessionConfiguration.ephemeral
config.protocolClasses = [URLProtocolMock.self]
let session = URLSession(configuration: config)
APIManager.shared.session = session
<session.URLProtocolMock>.loadJSMocks(filename: "AddItemUITest.js")
All of the examples I see for doing mocks this way, create static variables in the URLProtocolMock to allow configuring data. I'd like to be able to run tests in parallel, so static variables won't work.
I couldn't find an obvious way to get the protocol instance from the URLSession. Is there a non-obvious way? ;-)
Thanks!
Greg
P.S. And in the course of writing this, I realized that I have another problem with static APIManager session sharing. But that one I know how to solve :-)
Post not yet marked as solved
In Xcode 12, you could run the debugger on PreviewProviders. That was removed in Xcode 13. Is there a way to get logs for PreviewProviders? I haven't been able to find a way and it's driving me crazy. This is worse than punched cards. At least then, you could do print statements to debug...
Post not yet marked as solved
In the video, you show a 'Preview Assets.xcassets' for accessing preview assets. I only saw you reference adding the assets through "Development Assets". Are you using a different version than the current Xcode seed? Or is there another step I need to do to get preview-only assets? Thanks, Greg
Post not yet marked as solved
This was a great talk. Having the source code would make it much easier to adopt some of the ideas. I looked, but wasn't able to find it. Is there a pointer some where? Thanks, Greg