Search results for

column

2,071 results found

Post

Replies

Boosts

Views

Activity

Reply to NavigationSplitView does not properly show detail pages on macOS 15
This was release noted here: https://developer.apple.com/documentation/macos-release-notes/macos-15-release-notes (Search 127626852) Behavior was changed because the composition is undefined on iOS and was undefined on macOS, but happened to work in some cases. This change was made behind a link check, so hopefully you are only seeing this when compiling against the newest Sequoia toolchains. View-destination links (e.g. NavigationLinks that take a View as their destination) and value-destination links (e.g. NavigationLinks that take a value argument) cannot be mixed. By attaching an id to the link, you are wiring the link up to the Lists selection, and thus trying to drive navigation that way. The correct way to do this in releases including and prior to iOS 15 and macOS 18 is by switching over the selection in the NavigationSplitView's subsequent column: NavigationSplitView { List(selection: $selection) { NavigationLink(Value-destination link, value: 5) } } detail: { if let selection { SelectedDest
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to How to permanently delete Sonoma aerial wallpapers?
I want the wallpapers gone because I dislike them greatly. I have dozens of much higher quality (as wallpapers go) because they are simple and non-distracting, non-entertainment. I've been struggling to get rid of them for a long time. Additionally, the Sonoma wallpaper system is broken in many ways. The worst is that it keeps putting back that default wallpaper of some vineyard somewhere. I think I finally found an answer, although it is terribly kludgy. WARNINGS BEFORE YOU START THIS, BE AWARE OF THESE THINGS; READ THEM ALL If all you want is to delete the downloaded live wallpapers to save space THIS IS NOT THE WAY. Go find other posts for that. If you want to be rid of the downloaded wallpapers AND stupid selection thumbnails for all those stupid wallpapers, then find a different post for deleting, AND do the steps below. The Sonoma wallpaper selection pane (in Settings) might not work. Ever. Sometimes it does. Because of the above, if you can, set some wallpapers that you do like (wallpapers of your own
Topic: App & System Services SubTopic: Core OS Tags:
Oct ’24
Reply to iOS 18 NavigationSplitView in NavigationStack not loading properly
@vladimirs NavigationSplitView is a top level navigation container and it's meant to be used without being wrapped in another navigation container. You can embed a NavigationStack in a column of a NavigationSplitView not the other way around since a navigation split view collapses into a single stack on iPhone. If you'd like to learn more about navigation structures, you could review The SwiftUI cookbook for navigation WWDC session Could you elaborate on why you have the NavigationSplitView inside stack and what you're trying to achieve ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
ShareLink not reliable, entitlement errors
I am using public struct ShareLink : View where Data : RandomAccessCollection, PreviewImage : Transferable, PreviewIcon : Transferable, Label : View, Data.Element : Transferable {} And it is generating entitlement errors and not working reliably ( will transfer 1-3 items, but not 4+ ; will not work a second time) Error is: Error acquiring assertion: Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with error:Error Domain=RBSServiceErrorDomain Code=1 Client not entitled UserInfo={RBSEntitlement=com.apple.runningboard.process-state, NSLocalizedFailureReason=Client not entitled, RBSPermanent=false} elapsedCPUTimeForFrontBoard couldn't generate a task port Received port for identifier response: <> with er
6
0
7.6k
Sep ’24
Reply to NavigationSplitView hide sidebar toggle button
Although Apple introduced .toolbar(removing: .sidebarToggle) finally, users can still drag the divider to change the column width and hide the side bar on macOS, and since sidebar toggle button is removed, users could never get back. In Sonoma Xcode15, developers have to use something like this: .introspect(.navigationSplitView, on: .macOS(.v13,.v14,.v15)) { splitview in if let delegate = splitview.delegate as? NSSplitViewController { delegate.splitViewItems.first?.canCollapse = false } } But it fails to work on Sequoia with Xcode16. Developers have to search around again to make it work just like the built-in Settings App, it's a shame.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’24
Reply to Custom struct Codable for SwiftData
Ditto here. All the other advice on the subject of struct-typed model attributes asserts the struct must be Codable and it stored in a single column. The evidence shows the struct's properties are stored as individual columns, spreading the structure out and using some truly unexpected Encoder/Decoder that's not JSON. For instance, I defined struct ComplexNumber: Codable { var real: Double var imaginary: Double } and @Model final class Item { var timestamp: Date var number1: ComplexNumber var number2: ComplexNumber and got this in SQLite: This works fine when fetching the records, but in my app it fails to decode when some of the struct's properties are Optional. I can write decoder() to deal with the optionals, but apparently SwiftData's Decoder can't cope. I suppose there's some similar limitation for Dictionary properties.
Sep ’24
How do I access TestFlight feedback?
Hi allI have put my first app on TestFlight for beta testing and have approximately 20 testers who have joined anonymously. When I look at the All Testers page I can see that several of them have submitted feedback ( there is a number in the feedback column), however I have not received any of this email.I have had some peope who are known to me try sending feedback via the Send Beta Feedback button in TestFlight and these emails are coming through to me fine so I think my email is configured ok. I seem to be missing something very basic here - I was wondering if someone could tell me how I can access the feedback related to the number shown in the feedback column on the All Testers page? Is this an iOS 13 functionality??Many thanks and best wishes
26
0
20k
Oct ’22
How can I make NSToolbar on Catalyst check canPerformAction on UISplitViewController's secondary view controller instead of primary?
I have a Catalyst app that I'm adding a sidebar to via UISplitViewController. I have a toolbar on the window with buttons that I want to be enabled or disabled based on the state of the view controller in the split view's secondary column. But it seems to want to check the primary view controller instead. In the Catalyst tutorial Adding a Toolbar, this exact approach is demonstrated. The RecipeDetailViewController has methods for toggleFavorite and editRecipe, and the toolbar items are set up to reference those selectors in the ToolbarDelegate class. In the screenshots in the tutorial, the buttons are shown as enabled based on RecipeDetailViewController.canPerformAction. But when I download and run the complete project on my computer (macOS 14.4.1), the toolbar items are disabled. And if I add the methods to the RecipeListViewController (which is in the primary column of the UISplitViewController, the toolbar items get enabled. Is there a way to make the system ask the correct split view column
1
0
718
Sep ’24
Reply to Cannot enable Network Extensions - Objective-C
[quote='763281021, aynas, /thread/763281, /profile/aynas'] I wanted to get my hands dirty with objective-c [/quote] You have chosen a very difficult task for My First Objective-C Project™ (-: Specifically… [quote='763281021, aynas, /thread/763281, /profile/aynas'] I created a simple command line project with xcode and tried to load this extension [/quote] That’s not supported. In general, only the NE provider’s container app can configure the NE provider. [quote='763281021, aynas, /thread/763281, /profile/aynas'] I don't have a developer license yet [/quote] That’s a showstopper. If you’re using a Personal Team — aka free provisioning — you can only use a limited set of capabilities. See the Apple Developer column in Developer Account Help > Reference > Supported capabilities (macOS). Notably, Network Extension is not on that list. Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Sep ’24
Reply to Applescript seems to run in Rosetta on M2
Try this: In Script Editor, create a new script like so: display dialog Hello Cruel World! buttons {OK} default button OK Save it as an application. Launch it from the Finder. Run Activity Monitor and, in the CPU tab, look for the value in the Kind column. It should show Apple (for Apple silicon). What do you see? Share and Enjoy — Quinn “The Eskimo!” @ Developer Technical Support @ Apple let myEmail = eskimo + 1 + @ + apple.com
Topic: Programming Languages SubTopic: General Tags:
Sep ’24
iOS 18 beta - .onAppear in NavSplitView creates an infinite loop
Bug in iOS 18 beta? .onAppear of a NavSplitView-DetailView is called repeatedly after dismissing the view. The app gets unresponsive and can only be killed and cold-restartet. What happens: I update a Binding property in .onAppear of a NavigationSplitView-DetailView. Whenever I leave the DetailView going back to the ListView (the NavSplitView’s first column), the DetailView's .onAppear get’s triggered in an endless loop. This blocks the main thread and freezes the app. This behaviour is only appearing in iOS 18 betas (simulators and devices) and not on iOS 17.x releases. If I remove the code updating the Binding, the .onAppear loop does not happen. Another way of triggering the same unexpected behaviour is by updating an OberservedObject appState.shared singleton, e.g. by a timer. Has anybody come across this type of behaviour? Is this a know change of iOS 18 behaviour or a bug even?
2
0
620
Sep ’24
iPadOS in iOS18 with new UITabBarController ... UIBarButtonItems disappear
I have an iPad app using the new UITabBarController on iPadOS18, which is suffering from a new issue from the new layout. Within my tabs, I have a UISplitViewController, with a 2 column layout. If I load the app, it works ok, but if I put the app in the background, and then bring it to foreground, the navigation bar buttons and title just disappear from the splitView controller’s primary view controller. Before going to background: After coming back from background: I also get the following layout issues posted in the debugger consoler: Unable to simultaneously satisfy constraints. Probably at least one of the constraints in the following list is one you don't want. Try this: (1) look at each constraint and try to figure out which you don't expect; (2) find the code that added the unwanted constraint or constraints and fix it. ( , , , = UILayoutGuide:0x600003b00a80'TabBarGuide(0x103d18810)'.trailing (active)>, , ) Will attempt to recover by breaking constraint Make a symbolic breakpoint at UIVie
1
0
1.4k
Aug ’24
Failed to produce diagnostic for expression; please submit a bug report (https://swift.org/contributing/#reporting-bugs)
Xcode prompts the error at var body: some View. I cannot understand what's wrong here because there was no changes after the last successful build. To solve I have already done: Clean Build Folder for several times Restart Xcode Nothing worked. import SwiftUI struct HomeView: View { @StateObject private var viewModel = HomeViewModel() @State var tabSelection: Int = 0 var body: some View { TabView { NavigationStack { Group { if viewModel.entries.isEmpty { EmptyStateView() } else { EntriesGridView(entries: viewModel.entries, tags: viewModel.tags, selectedTag: $viewModel.selectedTags) } } } .tabItem { Label(Saved, systemImage: bookmark) } SettingsView() .tabItem { Label(Settings, systemImage: gear) } } .onAppear { viewModel.fetchTags() viewModel.fetchEntries() } } } #Preview { HomeView() } Other related parts without any errors: HomeViewModel.swift import SwiftUI import Firebase import FirebaseFirestore import FirebaseFirestoreSwift import os.log @MainActor class HomeViewModel: ObservableObject { @Published var
2
0
514
Aug ’24
Reply to Unexpected Transparency in .fullScreenCover(isPresented:) Background in SwiftUI iOS 18 Beta
@marudavid I am not able to reproduce your issue using the following sample code. There is a default background color always on both Xcode 15 and Xcode 16.1 Beta. It is possible you are using some type of ViewModifier that is causing this. The following works fine. import SwiftUI struct Icon: Identifiable { var id: String var color: Color } struct ContentView: View { let icons = [ Icon(id: figure.badminton, color: .red), Icon(id: figure.fencing, color: .orange), Icon(id: figure.gymnastics, color: .green), Icon(id: figure.indoor.cycle, color: .blue), Icon(id: figure.outdoor.cycle, color: .purple), Icon(id: figure.rower, color: .indigo), ] @State private var selected: Icon? var body: some View { LazyVGrid(columns: [.init(.adaptive(minimum: 100, maximum: 300))]) { ForEach(icons) { icon in Button { selected = icon } label: { Image(systemName: icon.id) } .foregroundStyle(icon.color.gradient) .font(.system(size: 100)) } } .fullScreenCover(item: $selected, content: { icon in DestinationView(icon: icon, anim
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’24