My app is a UIKit app with a lot of SwiftUI mixed in. A common scenario is that a UIViewController presents a sheet with a SwiftUI view wrapped in a UIHostingController.
When I present the exact same SwiftUI View it looks different in a SwiftUI sheet compared to when it's wrapped in a UIHostingController and presented from a view controller.
I'm using a hacky workaround in which I loop through all subviews of the hosting controller in viewWillLayoutSubviews and look for a NavigationStackHostingController<SwiftUI.AnyView> to manually set the background color, but it feels like it could brake easily.
Has anyone found a better way to fix this?
Feedback: FB22028838
SwiftUI
RSS for tagProvide views, controls, and layout structures for declaring your app's user interface using SwiftUI.
Posts under SwiftUI tag
200 Posts
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
My visionOS 26.3 app displays a diorama-like scene in a RealityView in a mixed immersive space, about 1 meter square, with view attachments floating above the scene.
Each view attachment fades out after user interaction, by animating the view's opacity.
What I'm observing is that depending on the position of a view attachment relative to the scene and the camera, an unwanted cutout effect is observed (presumably because of draw order issues), as shown in the right column in the screenshots below.
YouTube video link of these sequences: https://youtu.be/oTuo0okKCkc
(19 seconds)
My question:
How does visionOS determine the view attachment draw order relative to the RealityView scene?
If I better understood how the draw order is determined, I could modify my scene to ensure that the view attachments were always drawn after the scene, fixing the unwanted cutout effect.
I've successfully used ModelSortGroupComponent to control the draw order of entities within the RealityView scene, but my understanding is that this approach cannot be used with view attachments.
I've submitted FB22014370 about this issue.
Thank you.
When making an element with .glassEffect(.clear.interactive()) draggable, it stretches as it moves.
It seems like it's meant to stretch as you move your finger away from the element, but it doesn't make sense if the element is following your finger as you drag it.
Is this a bug, or is there a way to disable this behavior without removing the other "interactive" animations?
P.S. The shiny border around the elements seems to be a rounded rectangle or capsule, but the actual element's shape seems to be stretched. That also appears to be a bug.
A watchOS widget requires you set a container background:
.containerBackground(for: .widget) {
Color.black
}
But I see some .accessoryRectangular widgets, on the Smart Stack, using a glass background. From what I know there is no way to set this using .containerBackground. Does anyone know how to do this?
Thank you
.navigationDestination(isPresented) hangs after reboot (when called within 2 minutes of reboot) in watchOS when destination view contains @Environment(.dismiss).
Feedback: FB21077151
Second button hangs after reboot. Hangs in watchOS 26.0 and 26.4 on a physical device.
struct ContentView: View {
@State var presentView1 : Bool = false
@State var presentView2 : Bool = false
var body: some View {
NavigationStack {
VStack {
Button("Show View 1") {
presentView1.toggle()
}
Button("Show View 2") {
presentView2.toggle()
}
}
.navigationDestination(isPresented: $presentView1, destination: {TestView1()})
.navigationDestination(isPresented: $presentView2, destination: {TestView2()})
}
}
}
struct TestView1: View {
var body: some View {
Text("View 1")
}
}
struct TestView2: View {
@Environment(\.dismiss) var dismiss
var body: some View {
Text("View 2")
}
}
I’ve encountered an aspect of the Liquid Glass effect in SwiftUI that seems a bit odd: the Liquid Glass interaction appears to ignore regular hit-testing behavior.
The following sample shows a button with hit testing disabled:
@main
struct LiquidGlassHitTestDemo: App {
var body: some Scene {
WindowGroup {
Button("Liquid") {
fatalError("Never called.")
}
.buttonStyle(.glassProminent)
.allowsHitTesting(false)
}
}
}
As expected, the button’s action is never called. However, the interactive glass effect still responds to touch events:
What’s even more surprising is that the UIKit equivalent behaves differently:
final class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let button = UIButton(
configuration: .prominentGlass(),
primaryAction: UIAction(
title: "Liquid",
handler: { action in
print("Never called.")
}
)
)
view.addSubview(button)
button.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
button.centerXAnchor.constraint(equalTo: view.centerXAnchor),
button.centerYAnchor.constraint(equalTo: view.centerYAnchor)
])
button.isUserInteractionEnabled = false
}
}
In this case, the effect is not interactive at all. Similarly, if a UIViewController’s root view overrides hitTest(_:with:) to always return nil, the Liquid Glass effect does not react to touch events whatsoever.
The only way I’ve found to “properly” disable the glass interactivity in SwiftUI is to use the .disabled(true) modifier. However, this also changes the button’s appearance, which is not always desirable.
Is this expected behavior, or could this be a bug? Am I missing something about how Liquid Glass interaction is implemented in SwiftUI?
Is there a way to render stereoscopic (left/right) images in a 2d plane that resides in a swiftUI view?
I know this is possible in realityKit shaders, and in immersive metal composits, but is it possible via swiftUI shaders, CAMetalLayer, etc?
I'd like to draw a 2d window with standard UI chrome (resize, move etc) that displays stereoscopic content on the flat plane of the window.
In iOS 18, TabView with .tabViewStyle(.sidebarAdaptable) introduced a powerful adaptive pattern — tabs in compact, sidebar in regular. However, the current Tab API only supports a title and an image (icon). There is no way to provide a trailing accessory view (e.g., a secondary icon or indicator) for sidebar rows.
This is a meaningful gap in the API, because trailing accessories are a well-established pattern throughout UIKit and SwiftUI.
Precedent in Apple's own design language
Apple already supports trailing accessories in many analogous contexts:
UITableViewCell / UICollectionViewListCell — support accessories (disclosure indicators, checkmarks, custom views) via UICellAccessory.
UIListContentConfiguration — allows leading and trailing content in list rows.
SwiftUI List rows — support Label, HStack with trailing elements, .badge(), and swipeActions.
NavigationLink — automatically renders a disclosure chevron as a trailing accessory.
UITabSidebarItem (UIKit, iOS 18) — supports configurationUpdateHandler and cell accessories at the UIKit level.
The sidebar of a .sidebarAdaptable TabView is visually identical to a List — yet its rows lack the accessory support that List rows have had for years.
Real-world example: Photos app
Apple's own Photos app (iPadOS 18+) demonstrates this exact need. In its sidebar, the "Recently Deleted" row displays a trailing lock icon to indicate that authentication is required to view the album. This is a meaningful UX element — it communicates state at a glance, without requiring the user to tap into the item.
Third-party developers building with TabView(.sidebarAdaptable) have no public API to replicate this pattern. The Tab view builder's label closure is decomposed into a discrete title and image; any additional views (including Spacer() and trailing Image views within an HStack) are silently discarded by the system.
What we've tried
Custom label closure with HStack — trailing views are ignored. The system extracts only the first Image and Text.
.badge() modifier — only supports Int or Text, not custom views such as icons.
Label with complex content — the system normalizes it to icon + title.
The only viable path today is to bridge to UIKit's UITabBarController and customize UITabSidebarItem directly, which defeats the purpose of using SwiftUI's declarative TabView API.
Proposed API
A trailing accessory modifier on Tab, consistent with existing SwiftUI patterns:
Tab("Recently Deleted", systemImage: "trash", value: "deleted") {
RecentlyDeletedView()
}
.tabSidebarAccessory {
Image(systemName: "lock.fill")
.foregroundStyle(.secondary)
}
// Option B: Text accessory (e.g., counts, status labels)
Tab("Inbox", systemImage: "tray", value: "inbox") {
InboxView()
}
.tabSidebarAccessory {
Text("12")
.font(.subheadline)
.foregroundStyle(.secondary)
}
// Option C: Combined text + image accessory
Tab("Shared Albums", systemImage: "rectangle.stack", value: "shared") {
SharedAlbumsView()
}
.tabSidebarAccessory {
HStack(spacing: 4) {
Text("3 new")
.font(.caption)
.foregroundStyle(.secondary)
Image(systemName: "person.2.fill")
.foregroundStyle(.blue)
}
}
Environment
Platform: iPadOS / macOS Catalyst
iOS version: 18.0+
Xcode: 16.0+
Component: SwiftUI TabView with .tabViewStyle(.sidebarAdaptable)
Summary
The Tab API should support trailing accessory content for sidebar rows, bringing it in line with the accessory support already available in UITableViewCell, UICollectionViewListCell, UIListContentConfiguration, and SwiftUI List. Apple's own Photos app demonstrates the need for this capability, yet no public API exists for third-party developers to achieve it.
Any logical reason why applying .sharedBackgroundVisibility(.hidden) to a ToolbarItem would not remove the spacing allocated for glass border?
Thus causing any element utilizing this functionality to appear offset from the regular buttons.
Or is this yet another magical Apple experience I am not blessed enough to understand.
Problem
After launching the host app by tapping the widget (widgetURL), calls to:
WidgetCenter.shared.reloadAllTimelines() WidgetCenter.shared.reloadTimelines(ofKind: ...)
are ignored/deferred for an initial period right after the app opens. During this window, the widget does not reload its timeline and remains unupdated, no matter how many times I call the reload methods. After some time passes (typically ~30 seconds, sometimes shorter/longer), reload calls start working again.
There is also no developer-visible signal (no callback/error/acknowledgement) that the reload was ignored, so the app can’t detect the failure and can’t reliably recover the flow.
Question: Is this expected behavior (throttling/cooldown) after opening the app from a widget ? If so, is there any recommended workaround to update the widget reliably and quickly (or at least detect that the reload was not accepted)?
Any guidance would help.
I've discovered an issue with using iOS 16's Transferable drag-and-drop APIs for SwiftUI. The dropDestination modifier does not work when applied to a subview of a List.
This code below will not work, unless you replace the List with a VStack or any other container (which, of course, removes all list-specific rendering).
The draggable modifier will still work and the item will drag, but the dropDestination view won't react to it and neither closure will be called.
struct MyView: View {
var body: some View {
List {
Section {
Text("drag this title")
.font(.largeTitle)
.draggable("a title")
}
Section {
Color.pink
.frame(width: 400, height: 400)
.dropDestination(for: String.self) { receivedTitles, location in
true
} isTargeted: {
print($0)
}
}
}
}
}
Has anyone encountered this bug and perhaps found a workaround?
The zoom navigation transition with matchedTransitionSource in tabViewBottomAccessory does not work when a Published var in an ObservableObjector Observable gets changed.
Here is an minimal reproducible example with ObservableObject:
import SwiftUI
import Combine
private final class ViewModel: ObservableObject {
@Published var isPresented = false
}
struct ContentView: View {
@Namespace private var namespace
@StateObject private var viewModel = ViewModel()
// @State private var isPresented = false
var body: some View {
TabView {
Button {
viewModel.isPresented = true
} label: {
Text("Start")
}
.tabItem {
Image(systemName: "house")
Text("Home")
}
Text("Search")
.tabItem {
Image(systemName: "magnifyingglass")
Text("Search")
}
Text("Profile")
.tabItem {
Image(systemName: "person")
Text("Profile")
}
}
.sheet(isPresented: $viewModel.isPresented) {
Text("Sheet")
.presentationDragIndicator(.visible)
.navigationTransition(.zoom(sourceID: "tabViewBottomAccessoryTransition", in: namespace))
}
.tabViewBottomAccessory {
Button {
viewModel.isPresented = true
} label: {
Text("BottomAccessory")
}
.matchedTransitionSource(id: "tabViewBottomAccessoryTransition", in: namespace)
}
}
}
However, when using only a State property everything works:
import SwiftUI
import Combine
private final class ViewModel: ObservableObject {
@Published var isPresented = false
}
struct ContentView: View {
@Namespace private var namespace
// @StateObject private var viewModel = ViewModel()
@State private var isPresented = false
var body: some View {
TabView {
Button {
isPresented = true
} label: {
Text("Start")
}
.tabItem {
Image(systemName: "house")
Text("Home")
}
Text("Search")
.tabItem {
Image(systemName: "magnifyingglass")
Text("Search")
}
Text("Profile")
.tabItem {
Image(systemName: "person")
Text("Profile")
}
}
.sheet(isPresented: $isPresented) {
Text("Sheet")
.presentationDragIndicator(.visible)
.navigationTransition(.zoom(sourceID: "tabViewBottomAccessoryTransition", in: namespace))
}
.tabViewBottomAccessory {
Button {
isPresented = true
} label: {
Text("BottomAccessory")
}
.matchedTransitionSource(id: "tabViewBottomAccessoryTransition", in: namespace)
}
}
}
UIHostingConfiguration on tvOS: focus permanently broken with multiple focusable SwiftUI views
Hi everyone,
I'm working on a tvOS app with a UICollectionView. Some cells embed SwiftUI content via UIHostingConfiguration, specifically a row of 3 buttons that should be individually focusable. The cell itself returns canBecomeFocused = false so focus passes through to the SwiftUI buttons.
The problem: after navigating focus into that section once, it becomes permanently unfocusable. Focus enters briefly, then immediately exits to nil on its own, without any user input. From that point on, the focus engine completely skips the section.
The exact same SwiftUI view works perfectly when embedded via UIHostingController instead.
How to reproduce
Press DOWN to move focus into the UIHostingConfiguration section
Focus lands on a SwiftUI button for a split second
Focus exits on its own and bumps to another section
The section is now dead, focus skips it on every subsequent navigation
What the system logs say (-UIFocusLoggingEnabled YES)
Right when focus enters, the system reports the SwiftUI focus items as "disappearing":
Ignoring focus update request for disappearing focus environment <UIKitFocusSectionResponderItem>
Then when searching for a new focusable item:
<SwiftUI._UIInheritedView> → (warning) No focusable items found.
<UIHostingContentView> → (warning) No focusable items found.
=== unable to find focused item in context. retrying with updated request. ===
The views are still in the hierarchy (verified by pointer), but the UIHostingContentView no longer exposes its virtual focus items. I also see mismatched parentFocusEnvironment on those items, pointing to a _UIHostingView from a completely different cell.
What I've tried
I've spent a lot of time on this with my colleagues, dug through the very limited documentation available online, and even used AI agents to help brainstorm. We tested 10 different approaches, none worked:
Overriding preferredFocusEnvironments to point to the UIHostingContentView
setNeedsFocusUpdate() / updateFocusIfNeeded(), rescan finds nothing
Forcing UIKit redraws (setNeedsLayout, setNeedsDisplay)
Removing .focusSection()
Removing all SwiftUI animations, identical behavior
Using canFocusItemAt: delegate instead of cell subclass, identical
remembersLastFocusedIndexPath = true, causes a separate focus trap
configurationUpdateHandler + setNeedsUpdateConfiguration(), config is rebuilt but virtual items stay deregistered
Verified the UIHostingContentView never leaves the hierarchy. It doesn't, its internal state is just corrupted
My workaround
I switched to UIHostingController with proper view controller containment. It works because the hosting controller is a full UIFocusEnvironment, so the focus engine can traverse it and it correctly maintains its virtual items.
Has anyone encountered this? Is there a known pattern for using UIHostingConfiguration on tvOS with multiple focusable SwiftUI elements? Or should I just file a Feedback?
Thanks for any help!
You can find the code here : https://github.com/ThomasDutartre/focus-problem-tvos
I recored the problem here :
https://youtu.be/yPfM5AvU2ko
Description
I've encountered a consistent hang/freeze issue in SwiftUI applications when using nested LazyVStack containers with Accessibility Inspector (simulator) or VoiceOver (physical device) enabled. The application becomes completely unresponsive and must be force-quit.
Importantly, this hang occurs in a minimal SwiftUI project with no third-party dependencies, suggesting this is a framework-level issue with the interaction between SwiftUI's lazy view lifecycle and the accessibility system.
Reproduction Steps
I've created a minimal reproduction project available here:
https://github.com/pendo-io/SwiftUI_Hang_Reproduction
To Reproduce:
Create a SwiftUI view with the following nested LazyVStack structure:
struct NestedLazyVStackView: View {
@State private var outerSections: [Int] = []
@State private var innerRows: [Int: [Int]] = [:]
var body: some View {
ScrollView {
LazyVStack(alignment: .leading, spacing: 24) {
ForEach(outerSections, id: \.self) { section in
VStack(alignment: .leading, spacing: 8) {
Text("Section #\(section)")
// Nested LazyVStack
LazyVStack(alignment: .leading, spacing: 2) {
ForEach(innerRows[section] ?? [], id: \.self) { row in
Text("Section #\(section) - Row #\(row)")
.onAppear {
// Load more data when row appears
loadMoreInner(section: section)
}
}
}
}
.onAppear {
// Load more sections when section appears
loadMoreOuter()
}
}
}
}
}
}
Enable Accessibility Inspector in iOS Simulator:
Xcode → Open Developer Tool → Accessibility Inspector
Select your running simulator
Enable Inspection mode (eye icon)
Navigate to the view and start scrolling
Result: The application hangs and becomes unresponsive within a few seconds of scrolling
Expected Behavior
The application should remain responsive when Accessibility Inspector or VoiceOver is enabled, allowing users to scroll through nested lazy containers without freezing.
Actual Behavior
The application freezes/hangs completely
CPU usage may spike
The app must be force-quit to recover
The hang occurs consistently and is reproducible
Workaround 1: Replace inner LazyVStack with VStack
LazyVStack {
ForEach(...) { section in
VStack { // ← Changed from LazyVStack
ForEach(...) { row in
...
}
}
}
}
Workaround 2: Embed in TabView
TabView {
NavigationStack {
NestedLazyVStackView() // ← Same nested structure, but no hang
}
.tabItem { ... }
}
Interestingly, wrapping the entire navigation stack in a TabView prevents the hang entirely, even with the nested LazyVStack structure intact.
Questions for Apple
Is there a known issue with nested LazyVStack containers and accessibility traversal?
Why does wrapping the view in a TabView prevent the hang?
Are there recommended patterns for using nested lazy containers with accessibility support?
Is this a timing issue, a deadlock, or an infinite loop in the accessibility system?
Why that happens?
Reproduction Project
A complete, minimal reproduction project is available at:
https://github.com/pendo-io/SwiftUI_Hang_Reproduction
Any view that is content for the tabViewBottomAccessory API fails to retain its state as of the last couple of 26.1 betas (and RC). The loss of state happens (at least) when the currently selected tab is switched (filed as FB20901325).
Here's code to reproduce the issue:
struct ContentView: View {
@State private var selectedTab = TabSelection.one
enum TabSelection: Hashable {
case one, two
}
var body: some View {
TabView(selection: $selectedTab) {
Tab("One", systemImage: "1.circle", value: .one) {
BugExplanationView()
}
Tab("Two", systemImage: "2.circle", value: .two) {
BugExplanationView()
}
}
.tabViewBottomAccessory {
AccessoryView()
}
}
}
struct AccessoryView: View {
@State private var counter = 0 // This guy's state gets lost (as of iOS 26.1)
var body: some View {
Stepper("Counter: \(counter)", value: $counter)
.padding(.horizontal)
}
}
struct BugExplanationView: View {
var body: some View {
ScrollView {
VStack(alignment: .leading, spacing: 16) {
Text("(1) Manipulate the counter state")
Text("(2) Then switch tabs")
Text("BUG: The counter state gets unexpectedly reset!")
}
.multilineTextAlignment(.leading)
}
}
}
UIHostingConfiguration on tvOS: focus permanently broken with multiple focusable SwiftUI views
Hi everyone,
I'm working on a tvOS app with a UICollectionView. Some cells embed SwiftUI content via UIHostingConfiguration, specifically a row of 3 buttons that should be individually focusable. The cell itself returns canBecomeFocused = false so focus passes through to the SwiftUI buttons.
The problem: after navigating focus into that section once, it becomes permanently unfocusable. Focus enters briefly, then immediately exits to nil on its own, without any user input. From that point on, the focus engine completely skips the section.
The exact same SwiftUI view works perfectly when embedded via UIHostingController instead.
How to reproduce
Press DOWN to move focus into the UIHostingConfiguration section
Focus lands on a SwiftUI button for a split second
Focus exits on its own and bumps to another section
The section is now dead, focus skips it on every subsequent navigation
What the system logs say (-UIFocusLoggingEnabled YES)
Right when focus enters, the system reports the SwiftUI focus items as "disappearing":
Ignoring focus update request for disappearing focus environment <UIKitFocusSectionResponderItem>
Then when searching for a new focusable item:
<SwiftUI._UIInheritedView> → (warning) No focusable items found.
<UIHostingContentView> → (warning) No focusable items found.
=== unable to find focused item in context. retrying with updated request. ===
The views are still in the hierarchy (verified by pointer), but the UIHostingContentView no longer exposes its virtual focus items. I also see mismatched parentFocusEnvironment on those items, pointing to a _UIHostingView from a completely different cell.
What I've tried
I've spent a lot of time on this with my colleagues, dug through the very limited documentation available online, and even used AI agents to help brainstorm. We tested 10 different approaches, none worked:
Overriding preferredFocusEnvironments to point to the UIHostingContentView
setNeedsFocusUpdate() / updateFocusIfNeeded(), rescan finds nothing
Forcing UIKit redraws (setNeedsLayout, setNeedsDisplay)
Removing .focusSection()
Removing all SwiftUI animations, identical behavior
Using canFocusItemAt: delegate instead of cell subclass, identical
remembersLastFocusedIndexPath = true, causes a separate focus trap
configurationUpdateHandler + setNeedsUpdateConfiguration(), config is rebuilt but virtual items stay deregistered
Verified the UIHostingContentView never leaves the hierarchy. It doesn't, its internal state is just corrupted
My workaround
I switched to UIHostingController with proper view controller containment. It works because the hosting controller is a full UIFocusEnvironment, so the focus engine can traverse it and it correctly maintains its virtual items.
Has anyone encountered this? Is there a known pattern for using UIHostingConfiguration on tvOS with multiple focusable SwiftUI elements? Or should I just file a Feedback?
Thanks for any help!
In my app i need to restrict the user to take screenshot or screen recording .
i used the following code snippet,
let field = UITextField()
let view = UIView(frame: CGRect(x: 0, y: 0, width: field.frame.self.width, height: field.frame.self.height))
// Following view can be customised if required
let newView = UIView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: UIScreen.main.bounds.height))
newView.backgroundColor = .black
field.isSecureTextEntry = true
window.addSubview(field)
view.addSubview(newView)
window.layer.superlayer?.addSublayer(field.layer)
//field.layer.sublayers?.last!.addSublayer(window.layer)
if let lastSublayer = field.layer.sublayers?.last {
lastSublayer.addSublayer(window.layer)
}
field.leftView = view
field.leftViewMode = .always
My query is will below lines meet the Apple compliance?
will ther be any rejection while publishing to Appstore?
window.layer.superlayer?.addSublayer(field.layer)
field.layer.sublayers?.last!.addSublayer(window.layer).
I am working on a Live Activity widget.
In it, I want some of the elements to open different deeplink URLs.
I have found that assigning multiple widgetURL doesn't work, only one of the URLs gets opened no matter where you tap. I also found that Buttons don't seem to do anything, tapping them actually just open my app as if I just tapped a naked Live Activity.
I have found that really only Link elements work if I want to open different URLs upon tapping different elements.
And Links are cool and fine, but I am seeing that on tap, my elements become tinted... As in, there is a highlighted state, and it makes the elements inside blue.
I have tried to use button style API on a link, but it didn't work.
How can I disable the highlighted state for a Link element in a live activity widget?
Hey all,
I found a weird behaviour with the searchable component. I created a custom bottom nav bar (because I have custom design in my app) to switch between screens.
On one screen I display a List component with the searchable component. Whenever I enter the search screen the first time, the searchable component is displayed at the bottom.
This is wrong. It should be displayed at the top under the navigationTitle. When I enter the screen a second time, everything is correct.
This behaviour can be reproduced on all iOS 26 versions on the simulator and on a physical device with debug and release build.
On iOS 18 everything works fine.
Steps to reproduce:
Cold start of the app
Click on Search TabBarIcon (searchable wrong location)
Click on Home TabBarIcon
Click on Search TabBarIcon (searchable correct location)
Simple code example:
import SwiftUI
struct ContentView: View {
@State var selectedTab: Page = Page.main
var body: some View {
NavigationStack {
ZStack {
VStack {
switch selectedTab {
case .main:
MainView()
case .search:
SearchView()
}
}
VStack {
Spacer()
VStack(spacing: 0) {
HStack(spacing: 0) {
TabBarIcon(iconName: "house", selected: selectedTab == .main, displayName: "Home")
.onTapGesture {
selectedTab = .main
}
TabBarIcon(iconName: "magnifyingglass", selected: selectedTab == .search, displayName: "Search")
.onTapGesture {
selectedTab = .search
}
}
.frame(maxWidth: .infinity)
.frame(height: 55)
.background(Color.gray)
}
.ignoresSafeArea(.all, edges: .bottom)
}
}
}
}
}
struct TabBarIcon: View {
let iconName: String
let selected: Bool
let displayName: String
var body: some View {
ZStack {
VStack {
Image(systemName: iconName)
.resizable()
.renderingMode(.template)
.aspectRatio(contentMode: .fit)
.foregroundColor(Color.black)
.frame(width: 22, height: 22)
Text(displayName)
.font(Font.system(size: 10))
}
}
.frame(maxWidth: .infinity)
}
}
enum Page {
case main
case search
}
struct MainView: View {
var body: some View {
VStack {
Image(systemName: "globe")
.imageScale(.large)
.foregroundStyle(.tint)
Text("Hello, world!")
}
.padding()
.navigationTitle("Home")
}
}
struct SearchView: View {
@State private var searchText = ""
let items = [
"Apple",
"Banana",
"Pear",
"Strawberry",
"Orange",
"Peach",
"Grape",
"Mango"
]
var filteredItems: [String] {
if searchText.isEmpty {
return items
} else {
return items.filter {
$0.localizedCaseInsensitiveContains(searchText)
}
}
}
var body: some View {
List(filteredItems, id: \.self) { item in
Text(item)
}
.navigationTitle("Fruits")
.searchable(text: $searchText, placement: .navigationBarDrawer(displayMode: .always), prompt: "Search")
}
}
Hi everyone,
I’m building a messaging app because I’ve seen firsthand how much support and safety is overlooked for this generation online. My goal is to give teens a foundation of security, privacy, and mental health support, while still letting them connect freely. I want to leverage Apple’s platform to help this mission reach the right audience and have real impact.
The app already includes:
Community chat with message blurring for sensitive or harmful words.
Anti-shoulder surfing tools to protect private conversations.
Shake dashboard for quick access to emergency services.
In-chat locks with ML detection for grooming patterns, offering resources while respecting privacy.
Full user control: messages can be deleted anytime, blocking is permanent, and accounts can’t bypass restrictions on the same device.
User consent-first design: every feature is opt-in and controlled by the user.
At this point, I’m looking for guidance on how to position and prepare the app to reach Apple editorial or headline attention — what steps or best practices help mission-driven apps get noticed for features, WWDC spotlights, or App Store promotion? My focus isn’t just on improving the app, but on launch strategy and visibility in a way that amplifies the mission responsibly.
If it’s helpful, I can share a TestFlight build or walkthrough to illustrate the app in action.
Thank you for any insights or advice — I want to make sure this mission has the best chance to reach and support the generation it’s built for.
Topic:
App Store Distribution & Marketing
SubTopic:
General
Tags:
Privacy
SwiftUI
Prototyping
Machine Learning