Post

Replies

Boosts

Views

Activity

Reply to XCode 15.3 Command CompileAssetCatalog failed with a nonzero exit code
Same here. Svg files in asset folder are not building anymore. I've seen this exact same problem occur in a not so distant past, such as here : https://developer.apple.com/forums/thread/731118?answerId=760613022#760613022 So Apple, i've got an idea : maybe people developping Xcode could start adding some god damn unit tests ? Screwing up the build of professional iOS developers that have no choice but use your tool is not ok !
Mar ’24
Reply to URLSession invalidateAndCancel() doesn't release delegate as documented
If your delegate is managing a ‘heavy’ resource, like a file handle, clean that up in -URLSession:didBecomeInvalidWithError: This only solves one part of the problem. The other is the following one : My delegate object is actually a component in a component hierarchy. I'm writing a unit test making sure that the hierarchy doesn't contain any retain cycle. This code works as follow : instantiate the root object in a local scope, iterate over all the sub-objects and create weak pointers to them in the parent scope exit the local scope test that all the weak pointers have been set to nil. Without any guarantee over the time at which the URLSession will release its delegate, there's nothing i can wait upon to make sure no retain cycle exists (because the URLSession itself creates that retain cycle). Now i got your point, and i think my solution will be to use an intermediate struct as a URLSessionDelegate, containing nothing but a weak pointer to the component, and simply forwarding all the calls to it. (and actually breaking the strong retain created by the URLSession). It will look hacky, but without more commitment on that side of the URLSession api, there isn't a lot more i can do.
Oct ’22
Reply to URLSession invalidateAndCancel() doesn't release delegate as documented
After the XCTestCase class is done using the _delegateWrapper wrapper though does the strong reference get released? Or better yet, when tearDownWithError is called does the strong reference get released? I'm not following you.. The TestCase class doesn't hold a reference to anything. Only the URLSession does, and it is instantiated by an object who should be released once the function inside the test goes out of scope. But to answer your question, i've setup a breakpoint in "tearDownWithError" and had a look at the memory graph, which still shows the DelegateObject as been retained by the "_wrapperDelegate" property of a __NSCFURLSessionDelegateWrapper instance.
Oct ’22
Reply to URLSession invalidateAndCancel() doesn't release delegate as documented
For additional information, in the real application testing code the situation is as followed : the URLSession.delegate is indeed set to nil after the "invalidateAndCancel" call, yet when looking at the memory object graph at the end of the test, an instance of __NSCFURLSessionDelegateWrapper class still holds a strong reference to it via a "_delegateWrapper" property of the urlsession. This delegatewrapper however doesn't seem to have anything holding strong references to it.
Oct ’22
Reply to Symbol not found: _$s10Foundation10URLRequestV10httpMethodSSSgvg
That crash appeared on my device (the crash is exactly the same, on application start) : dyld[48209]: Symbol not found: ($s10Foundation10URLRequestV10httpMethodSSSgvg) Referenced from: '/private/var/containers/Bundle/Application/F1B20444-7852-438D-8C81-99FAC68948A0/MyApp.app/Frameworks/WidgetsExtensionEngine.framework/WidgetsExtensionEngine' Expected in: '/System/Library/Frameworks/Foundation.framework/Foundation' Symbol not found: ($s10Foundation10URLRequestV10httpMethodSSSgvg) Referenced from: '/private/var/containers/Bundle/Application/F1B20444-7852-438D-8C81-99FAC68948A0/MyApp.app/Frameworks/WidgetsExtensionEngine.framework/WidgetsExtensionEngine' Expected in: '/System/Library/Frameworks/Foundation.framework/Foundation'
Oct ’22