Search results for

[tags:wwdc20-10185]

8 results found

Post

Replies

Boosts

Views

Activity

Unable to get Xcode Previews to work for an on-device preview
Every time I try to launch Xcode Previews on device, I get this error: RemoteHumanReadableError: The operation couldn’t be completed. (BSServiceConnectionErrorDomain error 3.) BSServiceConnectionErrorDomain (3): ==BSErrorCodeDescription: OperationFailed Does anyone know what could be causing this error? I yet to use on-device Xcode Previews because it keeps crashing.
7
0
2.6k
Feb ’21
Could Apple Release Mosaic as Demo Code?
Could Apple release the Mosaic project used in WWDC20 session 10149 - https://developer.apple.com/videos/play/wwdc2020/10149/? The project uses CloudKit and/or Core Data with the new SwiftUI, and can help answer questions the community has regarding how these frameworks work together: https://developer.apple.com/forums/thread/650309 https://developer.apple.com/forums/thread/650173 https://developer.apple.com/forums/thread/649860
8
0
1.6k
Dec ’20
How to abstract FetchRequest on previews
I would like to keep using FetchRequest for my data since I am using CoreData, however I am not sure how to apply this since in the example an object is used fore the translation of the model while FetchRequest requires a view. My first thought is to use a protocol for a view that would have the FetchRequest and do the translation then pass it up some how, but I am not sure about it. Could you provide an example on how to accomplish this, I would really appreciated it Thanks 😊
1
0
677
Jul ’20
Initialising a formatter object in a View body
I noticed something in the Structure your app for SwiftUI previews video, at 15:56 he says: And now we can tell SwiftUI to format the text for this name at exactly the right time. This is as easy as defining a formatter... https://developer.apple.com/videos/play/wwdc2020/10149/?time=950 var body: some View { ttlet formatter = PersonNameComponentsFormatter() ttformatter.style = .long ttText((name, formatter: formatter)) } It seems to me that this is not that easy for 2 reasons. I was under the impression we are not supposed to create reference types like a formatter object in the view body, or anywhere in the View that is not property wrapped. Supposedly it causes a heap allocation and slows down SwiftUI's updates. Maybe Swift has been improved to now allocate reference types on the stack instead of the heap and this is now OK? Given that PersonNameFormatter is dependent on the locale, surely if the locale is changed then the View body will not be recomputed because the View is not detecting a change. Is the T
0
0
1.1k
Oct ’20