Post

Replies

Boosts

Views

Activity

Reply to ScrollViewReader's scrollTo may be broken on iOS 15
Has mentionned by @archy88 for me replacing inner VStack with LazyVStack did fix the issue. Expect that will help some of you.         ScrollViewReader { scrollProxy in           ScrollView(.vertical) {               VStack (spacing: 0) {                   ForEach(parents) { parent in                       Text(parent.name)             .padding()                       LazyVStack (spacing: 0) { // With VStack Scroll issue                             ForEach(parent.childs) { child in                              ChildView(child)                 .id(child.uuid)                 .padding()             }           }           .id(parent.id)         }       }               Spacer()     }     .onAppear() {       if let selectedChild = selectedChild {         scrollProxy.scrollTo(selectedChild.uuid, anchor: .center)       }     }   }   .padding() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’21
Reply to iPhone 14 Pro (and 14 Pro Max) Native Screen Size
Thanks to geoffhackworth (https://twitter.com/geoffhackworth) it seems that Xcode-14 TestFlight builds are treated as Xcode 13 builds and are scaled to the 12/13 Pro layout. So the issue will only occurs for TestFlight build. Thank you geoffhackworth (https://twitter.com/geoffhackworth) More about this here: https://twitter.com/geoffhackworth/status/1573652281848905728
Topic: UI Frameworks SubTopic: UIKit Tags:
Sep ’22
Reply to What does WIDGET_BACKGROUND_API_ADOPTION_PROMPT mean?
So same issue here. I missed a log message in the console: The widget background view is missing. Please ensure that you have called the `containerBackground(for: .widget) {…}` modifier in your widget view. Just add the new .containerBackground(for:) in your widget view and it will resolve the issue. https://developer.apple.com/videos/play/wwdc2023/10027?time=180
Jun ’23
Reply to How to prevent ios17 interactive widgets to open the app after an interaction?
Hi! I have still exactly the same behavior on iOS 17 beta 4. It is absolutely unpredictable when the tap on an interactive item (button or toggle) will pass through and will open the app. I did put a background interactive button (with an intent) doing nothing to try to catch miss click. It improve behavior but some tap still open the app with no reason. It looks like a bug but I am afraid it will persist for a while... :(
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’23
Reply to How in interactive widgets in ios 17 to prevent the opening of the application by clicking on the widget?
I have still exactly the same behavior on iOS 17 beta 4. It is absolutely unpredictable when the tap on an interactive item (button or toggle) will pass through and will open the app. I did put a full size interactive background button (with an intent) doing nothing to try to catch missed click. It improve behavior but some tap still open the app with no reason. It looks like a bug but I am afraid it will persist for a while... :(
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’23
Reply to Widgets: Detect StandBy night mode iOS 17
OK! I have found solution by myself using the showsWidgetContainerBackground Environment Value. I don't detect directly the StandBy mode but I detect that the WidgetContainerBackground has been removed. In widgetRenderingMode fullColor that means its the StandBy mode. At least it's true currently in iOS 17.0 @Environment(\.showsWidgetContainerBackground) var showsWidgetContainerBackground @Environment(\.widgetRenderingMode) var widgetRenderingMode ... ZStack { // If ContainerBackground will be removed, show the light background if (!showsWidgetContainerBackground && widgetRenderingMode == .fullColor) { Color.white.opacity(0.1).cornerRadius(cornerRadius) } WidgetContentView() .containerBackground(for: .widget) { backgroundView(viewSize: panelSize) } }
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’23
Reply to Tappable area expands with clipped Image
Did you try to use the contentShape() modifier. .clipShape(#yourShape#) will clip the view but don't the modify the shape for hit testing. .contentShape(#yourShape#) will defines the content shape for hit testing.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Aug ’21
Reply to ScrollViewReader's scrollTo may be broken on iOS 15
Has mentionned by @archy88 for me replacing inner VStack with LazyVStack did fix the issue. Expect that will help some of you.         ScrollViewReader { scrollProxy in           ScrollView(.vertical) {               VStack (spacing: 0) {                   ForEach(parents) { parent in                       Text(parent.name)             .padding()                       LazyVStack (spacing: 0) { // With VStack Scroll issue                             ForEach(parent.childs) { child in                              ChildView(child)                 .id(child.uuid)                 .padding()             }           }           .id(parent.id)         }       }               Spacer()     }     .onAppear() {       if let selectedChild = selectedChild {         scrollProxy.scrollTo(selectedChild.uuid, anchor: .center)       }     }   }   .padding() }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Dec ’21
Reply to Running app built in Xcode 14 on iOS 15 results in missing WidgetKit symbol crash
Does Xcode 14.0 beta 4 did fix the issue for you ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to Running app built in Xcode 14 on iOS 15 results in missing WidgetKit symbol crash
Since Xcode 14.0 beta 4, I have have a different error but still facing a black Widget on iOS 15.x
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’22
Reply to iPhone 14 Pro (and 14 Pro Max) Native Screen Size
Perhaps only on some specific conditions? Zoomed display seems to produce a 320 x 693 screen size. Perhaps there is another setting that can make it switch to 390x844.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to iPhone 14 Pro (and 14 Pro Max) Native Screen Size
Thanks to geoffhackworth (https://twitter.com/geoffhackworth) it seems that Xcode-14 TestFlight builds are treated as Xcode 13 builds and are scaled to the 12/13 Pro layout. So the issue will only occurs for TestFlight build. Thank you geoffhackworth (https://twitter.com/geoffhackworth) More about this here: https://twitter.com/geoffhackworth/status/1573652281848905728
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Sep ’22
Reply to What does WIDGET_BACKGROUND_API_ADOPTION_PROMPT mean?
Same issue here. I have this warning even in the Widget Library Preview when adding a new Widget. I suppose there is something (like a prompt?) is missing in the beta 1 but can't see any related issue in the release notes.
Replies
Boosts
Views
Activity
Jun ’23
Reply to What does WIDGET_BACKGROUND_API_ADOPTION_PROMPT mean?
It seems to be related to our projets. I tried the Emoji Rangers Apple sample code and there is not this warning on the widgets.
Replies
Boosts
Views
Activity
Jun ’23
Reply to What does WIDGET_BACKGROUND_API_ADOPTION_PROMPT mean?
So same issue here. I missed a log message in the console: The widget background view is missing. Please ensure that you have called the `containerBackground(for: .widget) {…}` modifier in your widget view. Just add the new .containerBackground(for:) in your widget view and it will resolve the issue. https://developer.apple.com/videos/play/wwdc2023/10027?time=180
Replies
Boosts
Views
Activity
Jun ’23
Reply to How in interactive widgets in ios 17 to prevent the opening of the application by clicking on the widget?
What about putting a big button calling a AppIntent that do nothing as background? I didn't try to put an overlay a button on another button but if it works it may be your solution. Otherwise you'll have to put some inactive buttons around your active button I think.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jun ’23
Reply to How to prevent ios17 interactive widgets to open the app after an interaction?
Hi! I have still exactly the same behavior on iOS 17 beta 4. It is absolutely unpredictable when the tap on an interactive item (button or toggle) will pass through and will open the app. I did put a background interactive button (with an intent) doing nothing to try to catch miss click. It improve behavior but some tap still open the app with no reason. It looks like a bug but I am afraid it will persist for a while... :(
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to How in interactive widgets in ios 17 to prevent the opening of the application by clicking on the widget?
I have still exactly the same behavior on iOS 17 beta 4. It is absolutely unpredictable when the tap on an interactive item (button or toggle) will pass through and will open the app. I did put a full size interactive background button (with an intent) doing nothing to try to catch missed click. It improve behavior but some tap still open the app with no reason. It looks like a bug but I am afraid it will persist for a while... :(
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to How to prevent ios17 interactive widgets to open the app after an interaction?
It seems to occurs less often with iOS 17 beta 5 but it still happens :(
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Widgets: Detect StandBy night mode iOS 17
OK! I have found solution by myself using the showsWidgetContainerBackground Environment Value. I don't detect directly the StandBy mode but I detect that the WidgetContainerBackground has been removed. In widgetRenderingMode fullColor that means its the StandBy mode. At least it's true currently in iOS 17.0 @Environment(\.showsWidgetContainerBackground) var showsWidgetContainerBackground @Environment(\.widgetRenderingMode) var widgetRenderingMode ... ZStack { // If ContainerBackground will be removed, show the light background if (!showsWidgetContainerBackground && widgetRenderingMode == .fullColor) { Color.white.opacity(0.1).cornerRadius(cornerRadius) } WidgetContentView() .containerBackground(for: .widget) { backgroundView(viewSize: panelSize) } }
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to iOS + WatchOS Build: How to automatize?
Answering myself :D I forgot to add Watch App as a Target Dependency: Project > Build Phase > Project Dependency https://stackoverflow.com/questions/37449354/error-no-such-file-or-directory-while-archiving-ios-and-watchos-app
Replies
Boosts
Views
Activity
Sep ’23