How to workaround URLSession issue in watchOS 6.1.1
Issue #577
objc[45250]: Class AVAssetDownloadTask is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/ …
Issue #577
objc[45250]: Class AVAssetDownloadTask is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/ …
Issue #511
struct CountriesView: View {
let groups: [Group]
init(countries: [Country]) {
self.groups = CountryManager.shared.groups(countries: countries)
}
var body: some View {
List {
ForEach(groups) { …
Issue #504
https://twitter.com/NeoNacho/status/1181245484867801088?s=20
There’s no way to have platform specific sources or targets today, so you’ll have to take a different approach. I would recommend wrapping all OS specific files in #if os and …
Issue #482
lineLimit
does not seem to work, use fixedSize instead
Fixes this view at its ideal size.
A view that fixes this view at its ideal size in the dimensions given in fixedDimensions.
extension Text {
func styleText() -> some View { …
Issue #474
Go to Project -> Swift Packages, add package. For example https://github.com/onmyway133/EasyStash
Select your WatchKit Extension
target, under Frameworks, Libraries and Embedded Content
add the library
If we use CocoaPods, …
Issue #468
From onAppeear
Adds an action to perform when the view appears.
In theory, this should be triggered every time this view appears. But in practice, it is only called when it is pushed on navigation stack, not when we return to it.
So if …
Issue #467
Declare top dependencies in ExtensionDelegate
class ExtensionDelegate: NSObject, WKExtensionDelegate {
let storeContainer = StoreContainer()
func applicationDidEnterBackground() {
storeContainer.save()
}
}
Reference …
Issue #457
From Creating Independent watchOS Apps
The root target is a stub, and acts as a wrapper for your project, so that you can submit it to the App Store. The other two are identical to the targets found in a traditional watchOS project. They …
Issue #449
WatchKit
does not have Web component, despite the fact that we can view web content
A workaround is to show url as QR code
import SwiftUI
struct QRCodeView: View {
let …
Issue #448
Use ObservableObject
and onReceive
to receive event. URLSession.dataTask
reports in background queue, so need to .receive(on: RunLoop.main)
to receive events on main queue.
For better dependency injection, need to use ImageLoader
from …
Issue #447
NavigationView is not available on WatchKit
, but we can just use NavigationLink
List(services.map({ AnyService($0) })) { anyService in
NavigationLink(destination:
ItemsView(service: anyService.service)
. …