Posts

Post not yet marked as solved
10 Replies
7.3k Views
Is there an easy way to get the new adaptive UI element colors (systemBackground, secondaryLabel, etc.) in SwiftUI? I know that I could write a class to bridge to UIColor and do the getRed(green:blue:alpha:) dance, but it seems like there should be a simpler approach. I know understand that these colors are used automatically in some cases, but it seems like custom controls would benefit from having them available. Am I misunderstanding the role of the UI element colors in SwiftUI?—Chris
Posted
by claurel.
Last updated
.
Post not yet marked as solved
19 Replies
6.3k Views
I'm using an NSURLSession for background downloads, and even though the download is apparently successful, didFinishDownloadingToURL is giving a URL that the app doesn't have permission to access. An example:/var/mobile/Library/Caches/com.apple.nsurlsessiond/Downloads/com.company.appname/CFNetworkDownload_u0dx1W.tmpUsually, downloads are successful. In that case, the URL from didFinishDownloadingToURL looks like this:/private/var/mobile/Containers/Data/Application/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx/Library/Caches/com.apple.nsurlsessiond/Downloads/com.company.appname/CFNetworkDownload_u0dx1W.tmpThe big problem is that once I start getting bad URLs, nsurlsessiond seems to be stuck in that state. Failures continue even after rebooting the device or deleting and reinstalling the app. I've observed this problem with iOS 10.2 and the iOS 10.3 betas. Has anyone seen something similar and found a workaround? This really looks to me like an iOS bug.—Chris
Posted
by claurel.
Last updated
.