It's not clear what either of these workarounds means. I don't understand how either of these workarounds is different than my normal process, or different than what's shown in the video.
What does “Debug with your extension’s scheme directly to Simulator” mean? How is that different than what Izzy does in the video? Where in Xcode do we click to make it happen?
What does “build the Widget's scheme directly”? How is that different than what he does in the video? Where in Xcode do we click to make it happen?
Also, it sounds like the second “Frameworks Engineer” response doesn't understand the problem. The response talks about “automatically add the widget to the simulator's home screen”, but that is not the problem, for me at least. Following along with the video up to 6m12s works and automatically puts the small-family widget on the simulator's home screen, just as in the video. The problem is at 6m25s in the video, where Izzy opens the add sheet. In my simulator, the add sheet doesn't contain Emoji Rangers as a list item. Is there a workaround to get Emoji Rangers to show up in the add sheet?
Here are some things which did not help:
Launch the Emoji Rangers app (which gets added to the second page of the simulator's home screen).
Remove the app and reinstalling it.
Restart the simulator.
Change the EmojiRangerWidgetExtension scheme's Executable from “Ask on Launch” to “EmojiRangerWidgetExtension.appex”.
Simulator > Device > Restart
Simulator > Device > Erase All Content and Settings…
Quit and relaunch simulator.
Post
Replies
Boosts
Views
Activity
The widgetURL modifier is broken on the simulator in beta 1. It doesn't show its content. Comment it out, or run on a device.
actor ImageDownloader {
private enum CacheEntry {
case inProgress(Task.Handle<Image, Error>)
case ready(Image)
}
private var cache: [URL: CacheEntry] = [:]
func image(from url: URL) async throws -> Image? {
if let cached = cache[url] {
switch cached {
case .ready(let image):
return image
case .inProgress(let handle):
return try await handle.get()
}
}
let handle = async {
try await downloadImage(from: url)
}
cache[url] = .inProgress(handle)
do {
let image = try await handle.get()
cache[url] = .ready(image)
return image
} catch {
cache[url] = nil
throw error
}
}
}
This appears to be fixed in Xcode 14.0 beta 2. I had to clean my build folder for it to start working though.
Using Reality Composer Pro, you can make a custom material that feeds the left and right images into a GeometrySwitchCameraIndexNode.
Use Group, with no more than 10 direct children in each Group.
https://developer.apple.com/forums/thread/740677
This appears to be a bug in NSObject.KeyValueObservingPublisher. It's triggered because the values property only sends an initial Demand of .max(1) when it subscribes to the KVO publisher.
Forcing a larger Demand works around the problem. We can use the handleEvents operator to send unlimited demand to the KVO publisher:
Task {
for await value in obj
.publisher(for: \.count)
.handleEvents(receiveSubscription: { $0.request(.unlimited) })
.values
{
print("async: \(value)")
}
}