Post

Replies

Boosts

Views

Activity

Reply to .presentationDetents not working on iOS 17
I've just experienced something similar to this with Xcode Version 26.0 (17A321) I don't have any other versions of Xcode I can try this with. Supplying .presentationDetents() with any value, e.g. .presentationDetents([.height(250)]) or .presentationDetents([.medium, .large]), does the following: iOS 17.5 Simulator: The sheet is not displayed at all, effectively freezing the app as there's no sheet displayed and no way to dismiss it. iOS 18.5 Simulator: The sheet is 250px tall. iOS 26.0 Simulator: The sheet is 250px tall. My current workaround is to do this: .sheet(isPresented: $showSheet) { if #available(iOS 18.0, *) { ChooseImageSheet(showSheet: $showSheet) .presentationDetents([.height(250)]) } else { ChooseImageSheet(showSheet: $showSheet) } } It's not elegant having to repeat some code without a modifier on it in this way. Also, this forces the sheet to use the .large detent, which fills the screen and isn't really appropriate for what I need to display in the sheet. Sadly, I can't provide a sample project that exhibits this behaviour, as something as simple as this code doesn't exhibit it: import SwiftUI struct ContentView: View { @State private var showSheet: Bool = false var body: some View { VStack { Button { showSheet.toggle() } label: { Text("Show the sheet") } } .padding() .sheet(isPresented: $showSheet) { SheetView() .presentationDetents([.height(200)]) } } } struct SheetView: View { var body: some View { ZStack { Color.blue.opacity(0.4) Text("I'm the sheet! Hi!") .foregroundStyle(Color.black) } .ignoresSafeArea() } } #Preview { ContentView() }
Topic: UI Frameworks SubTopic: SwiftUI
Sep ’25
Reply to Novice SwiftUI developer can't make network call
It totally depends on what your app is supposed to do, and when. If you want it to run when the app starts, put it inside the @main app, i.e.: // This is defined at the 'top level' because it's not within a function, struct, class etc. let myString = "https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=AAPL&apikey= *********" func doNetworkCall() { if let banjo = URL(string: myString) { let Lulah = URLSession.shared.dataTask(with:banjo ) { myDatastring , response , error in} Lulah.resume() } else { myDatastring="nil url" } } @main struct MyApp: App { doNetworkCall() // This will be executed first } If you want it to be executed when the user presses a button, then add a View struct with the Button in it that calls the doNetworkCall() function. You've stated you're a novice developer, and that's fine; I just can't go into much more detail as this isn't the place for that, and Apple has perfectly useful sample code and coding exercises you can follow. It looks like you've jumped in and missed a few fundamentals. Try the tutorials here: https://developer.apple.com/tutorials/develop-in-swift/welcome-to-develop-in-swift-tutorials
Topic: Design SubTopic: General
Sep ’25
Reply to iOS 26 SwiftData crash does not happen in iOS 16
What project? The way you've written this, I'm guessing you've raised this as a bug and are just posting it here, too? https://feedbackassistant.apple.com/ If you haven't raised it and feel it's definitely a bug and not something you've done, please raise it. On that, you can't attach a project here so is it easy enough for you to simply provide the code in text form? If not, we can't really help you.
Sep ’25
Reply to Images are distorted.
Images in what? If you're having issues in an app you're writing, show us some code and we can help you out. These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. These forums are not a direct line to Apple's employees. Also, you chose "Code Signing" and "General" tags for your post. Are those really the right tags? If you choose random tags your post gets put in random places, and doesn't end up where someone with the right skills can help you, so please choose better in future.
Sep ’25
Reply to IOS 26
These are the Developer Forums, where third-party developers ask each other for hints and tips on how to code their apps for Apple's platforms. Posting about bugs in these forums isn't going to progress them unless you also raise them as bugs in the usual place, which is not these Developer Forums. Apple's developers aren't sitting around reading these forums, waiting for things to fix. Please raise each bug separately at: https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Topic: Design SubTopic: General
Sep ’25
Reply to Safari 26 close and Refresh buttons not working in Compact tab layout
These are the Developer Forums, where third-party developers ask each other for hints and tips on how to code their apps for Apple's platforms. Posting bugs in these forums isn't going to progress them unless you also raise them as bugs in the usual place, which is not these Developer Forums. Apple's developers aren't sitting around reading these forums, waiting for things to fix. Please raise each bug separately at: https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Topic: Safari & Web SubTopic: General
Sep ’25
Reply to Xcode's new-tab vs. reuse-tab behavior is still infuriating and baffling.
I have Xcode 16.4 and exactly the same settings as you. Here's how it works: No files open: I've just single-clicked my payees file - this opens it in a new tab, but note that the tab's filename is in italics (I call this a temporary tab). This denotes that if you single-click or double-click any other file in the project tree, this one will be replaced. You can keep this file open in this tab by double-clicking the tab itself. Now, I've single-clicked the payload file. Because the payees file wasn't in a permanent tab the payload file replaced it: And here I've now double-clicked the lookups file. It opened in a new tab, and it replaced the payload tab because it was a temporary tab. Now I've double-clicked the notes file. It opened a new permanent tab of its own. And lastly, I've single-clicked the DataModel file, so it's in a temporary tab. So, the rules are: If the current tab has an italicised title, single-clicking will replace that tab with the clicked file. Single-click another file and it will replace it again. Think of this tab as a preview tab where you can just click to view a file but not have hundreds of tabs open just when you're trying to find a file. If the current tab's title is plain, single-clicking a new file opens a new tab in temporary mode. If the current tab's title is plain, doublie-clicking opens a new tab in permanent mode.
Sep ’25
Reply to safari - missing suggested passwords
Have you raised a Feedback report? If not, please do so at https://feedbackassistant.apple.com/ then post the FB number here. Bug reports didn't get logged, triaged and acted upon if they're only posted in these Developer Forums. You're basically telling people who are just like you that there's an issue. We aren't Apple's employed developers.
Topic: Community SubTopic: Apple Developers Tags:
Sep ’25
Reply to I need help
Difficult to help without seeing any code, but that error generally means the View you're seeing the error in has no link back to the ApplicationData object that the View is trying to use. For example: // ApplicationData.swift @Observable class ApplicationData { var someInteger: Int = 1 } This creates an Observable object called ApplicationData. You can then use it with: // MainApp.swift @main struct MainApp: App { var body: some Scene { WindowGroup { let applicationData: ApplicationData = ApplicationData() ContentView() .environment(applicationData) } } } // ContentView.swift struct ContentView: View { @Environment(applicationData) var applicationData var body: some View { Text("someInteger = \(applicationData.someInteger)") } } The error you're receiving is suggesting you haven't added something like line 8. That's required to bind the object you instantiated (in MainApp in this example, which is the view's ancestor) to the object you want to use in the View, at line 15.
Topic: UI Frameworks SubTopic: SwiftUI
Sep ’25
Reply to NFC innovation
These are the Developer Forums, where developers of third-party apps for Apple's platforms ask each other for hints and tips on coding. These forums are not where Apple's actual developers chat about new features. If you have a suggestion, you should raise it at: https://feedbackassistant.apple.com/
Topic: Design SubTopic: General
Sep ’25