Search results for

Request failed with http status code 503

190,874 results found

Post

Replies

Boosts

Views

Activity

Reply to How to have clickable/tappable buttons where the toolbar is supposed to be?
Hello Ikester, have you tried giving the button a modifier .zIndex() or applying an .overlay() to the detail view of your NavigationSplitView? Maybe if you implement the two buttons in an .overlay() and give those buttons an .offset() as well it might work. NavigationSplitView() { //your navigation views } detail: { //your content views } .overlay() { Button(click me) {} .offset(CGSize(width: 10, height: 10)) } For accurate positioning you could add a GeometryReader(){geometry in}. If this doesn’t work this maybe will: .toolbarVisibility( .hidden, for: .navigationBar, .tabBar) you add this modifier to your first nested view inside the NavigationSplitView. This is much better explained here: https://developer.apple.com/documentation/swiftui/view/toolbarvisibility(_:for:) I hope this helps.🙂
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3d
Reply to Copying files using Finder and Apple Events
Okay, I made it working exactly as I wanted, so I'd like to inform all people participating here, but also others who might see this while searching for similar content. The first stumbling block was making sure the application can actually send Apple Events in the first place. And in that regard I admit I should've listened better to @Etresoft and I apologize to him for not listening more carefully and dismissing his remark about hoops so that the app can actually send Apple Events too easily. It turned out that, even though the application is NOT sandboxed, com.apple.security.automation.apple-events entitlement is mandatory in the entitlements file. I couldn't assume it would be necessary even for a NON-sandboxed app, but it is. From my experience with executing AppleScript from another, sandboxed, application I remember that defining com.apple.security.automation.apple-events in the entitlements file and NSAppleEventsUsageDescription in the Info.plist file always go together and that's the case here too. S
3d
Copying files using Finder and Apple Events
I need my application to copy some files, but using Finder. Now, I know all different methods and options to programmatically copy files using various APIs, but that's not the point here. I specifically need to use Finder for the purpose, so please, let's avoid eventual suggestions mentioning other ways to copy files. My first thought was to use the most simple approach, execute an AppleScript script using NSUserAppleScriptTask, but that turned out not to be ideal. It works fine, unless there already are files with same names at the copying destination. In such case, either the script execution ends with an error, reporting already existing files at the destination, or the existing files can be simply overridden by adding with overwrite option to duplicate command in the script. What I need is behaviour just like when Finder is used from the UI (drag'n'drop, copy/paste…); if there are existing files with same names at the destination, Finder should offer a resolution panel, asking the user to stop, replace, d
9
0
120
3d
Reply to Picker using SwiftData
The model appears to have not pasted correctly, I used the code block. So here it is again. import SwiftData //Model one: type of contract, i.e. Firm Fixed Price, etc @Model final class TypeOfContract { var contracts: [Contract] @Attribute(.unique) var typeName: String @Attribute(.unique) var typeCode: String var typeDescription: String init(contracts: [Contract], typeName: String = , typeCode: String = , typeDescription: String = ) { self.contracts = contracts self.typeName = typeName self.typeCode = typeCode self.typeDescription = typeDescription } } //Model two: the Contract @Model final class Contract { var contractType: TypeOfContract? var costReports: [CostReport] @Attribute(.unique) var contractNumber: String @Attribute(.unique) var contractName: String var startDate: Date var endDate: Date var contractValue: Decimal var contractCompany: String var contractContact: String var contactEmail: String var contactPhone: String var contractNotes: String init(contractType: TypeOfContract? = nil, costR
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3d
Reply to List jumps back to the top
Thanks @Claude31, I have found stuff like that, yeah. For the section in my list that can be expanded and contracted, ScrollViewReader and .scrollTo work to keep you in the right place, so thanks for the hint. This is the code for the List, if it helps: ScrollViewReader { proxy in List { // Standard items ForEach(modelData.filteredItems.filter { !$0.archived }) { item in ItemRow(item) } // Archived items if(modelData.filteredItems.filter { $0.archived }.count > 0) { ListSectionHeader_Archived() .id(ListSectionHeader_Archived) .onTapGesture { modelData.archivedItemsExpanded.toggle() DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { proxy.scrollTo(ListSectionHeader_Archived) } } if(modelData.archivedItemsExpanded) { ForEach(modelData.filteredItems.filter { $0.archived }) { item in ItemRow(item) } } } } // List .id(UUID()) } I still can't figure out a way to stop the list from jumping back to the top when the device's Dark Mode setting changes. Why does SwiftUI think the data is different?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3d
Automatic Signing failed and Provisioning profile is missing the activitykit
I am a professor at the Mercer University School of Medicine (Macon, GA) and I teach a stress reduction course for first year medical students. I am developing an app to allow the students to trace their mediations as well as time them. Using ChatGPT with Xcode, I was able to get all the features in the app working except that the stopwatch timer would not continue when the iPhone goes to sleep. When ChatGPT made some changes, the build failed because automated signing failed and the com.apple developer.activity kit entitlement is missing I don’t see Live Activities in the capability section of signing & Capabilities and I don’t know how to fix the provisioning profile. How can I get help for this? Thank you!
2
0
228
3d
Reply to List jumps back to the top
If that may help, I found this, but did not test, using ScrollViewReader, but you've probably found as well: Get the scroll position: https://stackoverflow.com/questions/62588015/get-the-current-scroll-position-of-a-swiftui-scrollview Set the scroll position (in .onAppear ?): https://www.hackingwithswift.com/quick-start/swiftui/how-to-scroll-to-a-specific-row-in-a-list Or would it be enough to set the selection when it exists ? https://stackoverflow.com/questions/74365665/force-deselection-of-row-in-swiftui-list-view/74368833#74368833
Topic: UI Frameworks SubTopic: SwiftUI Tags:
3d
Missing Apple-Hosted Background Assets info
After combing the forums and release nodes, here are some extra notes to help other developers using Apple-Hosted Background Assets. I don't promise I got this perfect, but it may help direct you. AssetPack.Status is an OptionSet (not an enum!) - Critical API detail missing from guide It's a bitmask where values can be combined 2⁰ (1) = available to download 2¹ (2) = update available 2² (4) = up to date 2⁶ (64) = downloaded Example: status value 69 = 0b1000101 = available + up to date + downloaded Use .contains() method to check specific flags AssetPack.version property - Undocumented feature Auto-assigned by App Store Connect for Apple-hosted packs Increments with each upload of same asset pack ID No file deduplication across asset packs Same file in two packs = counts twice toward 200GB limit Best practice: create separate pack for shared files Shared namespace path requirements Asset pack ID is NOT part of file path Each file must have unique relative path across ALL app's asset packs Example: Foo
1
0
223
4d
Reply to Methods for dealing with macOS Wallpaper Cache
Thank you for ensuring that this issue is properly routed. That means a lot to us. I understand the risk involved in our approach, but that has to be balanced against the risk of not doing this. For us, our app resulting in a users disk continually filling over time is a far worse problem than any evident side effect of clearing the cache. As far as we know, this, like the vast majority of bugs we submit around wallpapers and screen savers, with either never get fixed, or only partially fixed. You can get the beta with the new cache cleaning feature here: https://testflight.apple.com/join/Bnbm6uJY Thank you.
Topic: App & System Services SubTopic: General Tags:
4d
ManipulationComponent Not Translating using indirect input
When using the new RealityKit Manipulation Component on Entities, indirect input will never translate the entity - no matter what settings are applied. Direct manipulation works as expected for both translation and rotation. Is this intended behaviour? This is different from how indirect manipulation works on Model3D. How else can we get translation from this component? visionOS 26 Beta 2 Build from macOS 26 Beta 2 and Xcode 26 Beta 2 Attached is replicable sample code, I have tried this in other projects with the same results. var body: some View { RealityView { content in // Add the initial RealityKit content if let immersiveContentEntity = try? await Entity(named: MovieFilmReel, in: reelRCPBundle) { ManipulationComponent.configureEntity(immersiveContentEntity, allowedInputTypes: .all, collisionShapes: [ShapeResource.generateBox(width: 0.2, height: 0.2, depth: 0.2)]) immersiveContentEntity.position.y = 1 immersiveContentEntity.position.z = -0.5 var mc = ManipulationComponent() mc.releaseBehavior =
11
0
924
4d
Reply to Complications not showing up after WatchOS 26
I'm unable to reproduce it. It randomly has happened for me and other users. It only happened to me once. Sometimes rebooting the watch fixes it, sometimes it does not. The app was installed before updating to 26. This never happened before WatchOS 26. We also put out an update for 26, so that could be a factor too, but all we did was recompile it. The app is SwitchUI/WidgetKit. I can't imagine it's a problem with our app if it only happens randomly, but are there any things we should look for in the project that could cause this? This is what the icon looks like when it goes blank: https://imgur.com/a/SKo6w9D Thanks
Topic: UI Frameworks SubTopic: General Tags:
4d
List rows disappearing when scrolling
I have a List containing ItemRow views based on an ItemDetails object. The content is provided by a model which pulls it from Core Data. When I scroll through the list one or two of the rows will disappear and reappear when I scroll back up. I have a feeling it's because the state is being lost? Here's some relevant info (only necessary parts of the files are provided): -- ModelData.swift: @Observable class ModelData { var allItems: [ItemDetails] = coreData.getAllItems() ... } -- ItemDetails.swift: struct ItemDetails: Identifiable, Hashable, Equatable { public let id: UUID = UUID() public var itemId: String // Also unique, but used for a different reason ... } -- MainApp.swift: let modelData: ModelData = ModelData() // Created as a global class SceneDelegate: UIResponder, UIWindowSceneDelegate { // Methods in here (and in lots of other places) use `modelData`, which is why it's a global } @main struct MainApp: App { var body: some Scene { WindowGroup { MainView() } } ... } -- MainView.swift: struct MainView:
2
0
90
4d