Hi everyone,
Noticed that if you're passing more than 1 context with the same object through reloadRootPageControllers - https://developer.apple.com/documentation/watchkit/wkinterfacecontroller/2868441-reloadrootpagecontrollers function in WKInterfaceController - https://developer.apple.com/documentation/watchkit/wkinterfacecontroller the passed context will never be deallocated from memory.
For example:
let context = Context(name: "context")
WKInterfaceController.reloadRootPageControllers(withNames: ["first", "second"], contexts: [context, context], orientation: .horizontal, pageIndex: 0)
context will never be deallocated.
Source Code - https://www.icloud.com/iclouddrive/0I35FYCDE8qa3nlh0QjB9o2eA#WatchKitMemoryLeak of the project which reproduces this issue.
Screenshot - https://www.icloud.com/iclouddrive/0bBDFLyocImgC4w6TXJxdfhOA#Screen_Shot_2020-09-09_at_18.20.34_(1 which shows zombie objects from the memory graph.
How to resolve it? Thanks in advance.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Could you take a look please why INInteraction.donate always returns the following error on watchOS 7?
Interaction donation failed: The operation couldn’t be completed. (IntentsErrorDomain error 1901.
The error reproduces on the official example Soup Chef: Accelerating App Interactions with Shortcuts - https://developer.apple.com/documentation/sirikit/soup_chef_accelerating_app_interactions_with_shortcuts. It works properly on iOS but doesn't on watchOS. (Simulator and real devices)
I'm trying to make a gradient for Widgets and using 2 blue colors (#0091f1 and #0054f3) but the Widget background looks green.
I've set up colors via Assets.xcassets and then using the following code:
LinearGradient(gradient: Gradient(colors: [Color("color1"), Color("color2")]), startPoint: .top, endPoint: .bottom)
For the common iOS target the gradient looks right (blue) and for the Widgets extension it's green.
Could you help me to figure out why this is happening?
The link - https://github.com/maximbilan/SwiftUI-WidgetKit-Gradient-Issue to the example with screenshots.