Post

Replies

Boosts

Views

Activity

Reply to IOS 18.5 Beta
When Apple release a new beta and an app doesn't work, it's likely because that app is doing something that has changed in the new beta. It is up to the app developers to make their app work with the new version of iOS. You should get in touch with them, not us. (We're not Deltek developers, and we don't work for Apple.)
Apr ’25
Reply to Scrollview and a background image set to scaledToFill....
I think you're looking for something like this: import SwiftUI struct ContentView: View { var body: some View { ScrollView { VStack(spacing: 24) { ForEach(1..<20) { i in Text("Line \(i)") } } } .frame(maxWidth: .infinity, maxHeight: .infinity) .background( Image("background") .resizable() .scaledToFill() .ignoresSafeArea() ) } } #Preview { ContentView() } The main difference is that my code adds a background to the ScrollView rather than putting everything on top of an image via a ZStack. When you do it your way, you've kind of told everything on top of that layer how big they'll be, which is why your ScrollView is distorted, and bits of it disappear off the screen.
Topic: Design SubTopic: General Tags:
Apr ’25
Reply to Unable to format SD card
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Topic: Community SubTopic: Apple Developers Tags:
Apr ’25
Reply to Migarate to Subscriptions
It depends on what the IAP gave the customer. If the IAP unlocked something and you're now going to lock it behind a subscription, then no, you shouldn't do that. You can't say to someone, "Pay me $5 and you get Feature A," then some time later say, "Actually, I'm taking away Feature A unless you pay me $5 every year". If, however, the IAP gives a feature that is not going to be locked behind the new subscription, then you can create the new subscription and customers can decide if they want to buy it. Any customers who already bought the IAP should still retain the features it unlocked. In general when doing this, you need to put new features into the subscription and leave previous IAPs as they are. You can remove them from sale so no one can buy them going forward, but anyone who already bought the IAP should retain those features going forward. Or, you could offer previous IAP purchasers a discounted subscription price. So, two subscriptions, one for new customers who have not previously purchased the IAP, and one at a lower price taking into account what they previously paid for the IAP, e.g.: IAP: $5 New sub: $10/year. New sub for IAP purchasers: $8/year. You have to figure out what works best - but you definitely shouldn't annoy your existing customers, or you'll find out you don't have any.
Apr ’25
Reply to System Data full after clearing safari, messages, offloading apps/reinstalling apps
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks. System data is the System, i.e. iOS plus necessary files such as logs and cache files. That number will stay pretty static. There's not really a lot you can do to reduce that. Try and offload some of your data to iCloud. Enable iCloud Photos and turn on "Optimise iPhone Storage" in Settings > Apps > Photos. Regardless, you have a 64GB iPhone, which isn't that big these days. It might've been fine five years ago, but not really now.
Topic: Community SubTopic: Apple Developers Tags:
Apr ’25
Reply to Default Browser issue of Edge Mac
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Apr ’25
Reply to iPad/iPhone - Display best practices….
All my apps work on both the iPhone and iPad, but due to the amount of changes - some structural - that are required to get an iPhone version to look and work properly on the iPad, I use two different views: @main struct MainApp: App { // ... var body: some Scene { WindowGroup { if(UIDevice.current.userInterfaceIdiom == .pad) { TabletView() } else { PhoneView() } } } } So, if the user is using an iPhone, the PhoneView() is the main entry point. For iPads, it's TabletView(). The reason I did this is because the iPad has much more space and allows me to do more things, so the TabletView has more things in it. Also, I'd rather not have one big, unmanageable View full of if ... else statements and ternary operators. It also means your spacers and padding values apply only to that device type. Where the two views have similar UI, those bits are extracted into their own little View structs and called within those two main entry points. When you separate out the two views you may find you're duplicating some work, but you'll also be working on a view that only applies to an iPad or an iPhone and not both. You can make a change in the TabletView and be assured it hasn't affected the PhoneView, so you haven't got to retest that change on the iPhone. You can also then expand this to include Vision Pro, Apple TV, and any other device idioms Apple has or releases in future, and you won't need to add more and more if ... else and ternary operators in that one massive file. If you're having issues with specific models of an iPad or iPhone I'd say you're maybe using too many magic numbers in your code? You've probably found that the padding on an iPhone 13 mini for some label is 5, while on an iPhone 14 Plus it's 12 so you've written that in. You should rework this to align things naturally using SwiftUI's HStacks, YStacks etc. Or, have a consistent padding for your UI so that it looks the same on every device. Let's say you can fit 8 text fields vertically in a form on an iPhone 12 mini, and 10 on an iPhone 15 Pro, that's fine. You don't need to space everything out to always fit 8 fields on the screen, so the padding between the fields can be the same on every device. If you want to show us an example of what's causing you issues, drop some code here (properly-formatted using the code formatting toolbar) and screenshots showing us the issue in the UI so we can visualise it.
Topic: Design SubTopic: General Tags:
Apr ’25
Reply to How to import large data from Server and save it to Swift Data
Do you know how much data is expected to be downloaded? If so, you could ensure the view doesn't update until the right amount of data is received and stored. If you don't know the quantity of data, you could add a Bool and toggle it when the data loading starts, then toggle it when the data has finished loading, so the View is only refreshed when the last of the data is stored. Another way would be to disable the UI so the user can't interact with it until the data has finished loading. The UI would update in the background, but the user wouldn't experience a slow UI as they can't interact with it anyway. You could put a partially-transparent View with a ProgressView in it at the top of a ZStack (which would be at the bottom of the ZStack in the code...) and hide it when you're done. I'll show you how I do it below. There's a few ways of doing it, but I don't think there's a built-in way to achieve this. But then, I'm not a genius on SwiftData, so... Using a blocking view: @State private var loadingData: Bool = false var body: some View { ZStack { // ... UI goes here // ... BlockingView() .additional().hidden(loadingData) // Hide the view when loading data == true } } struct BlockingView: View { var body: some View { ZStack { Rectangle() .fill(Color.black.opacity(0.2)) // Partially-transparent, but doesn't have to be ProgressView(label: { Label(title: { Text("Please Wait") }, icon: { Image(systemName: "exclamationmark.circle") }) }) .frame(width: 240, height: 100) .background(.ultraThickMaterial) .clipShape(RoundedRectangle(cornerRadius: 24)) .shadow(color: .black.opacity(0.3), radius: 4, x: 0, y: 0) } .ignoresSafeArea() } } /* This modifier is required because you can't conditionally hide a view with `.hidden()` but on the plus side, you can use this in tons of places, and add new modifiers like conditional shadows etc. */ public struct Additional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var additional: Additional<Self> { Additional(self) } } extension Additional where Content: View { @ViewBuilder func hidden(_ hide: Bool) -> some View { if(hide) { content.hidden() } else { content } } }
Topic: App & System Services SubTopic: iCloud Tags:
Apr ’25
Reply to IOS 18.5 Beta
When Apple release a new beta and an app doesn't work, it's likely because that app is doing something that has changed in the new beta. It is up to the app developers to make their app work with the new version of iOS. You should get in touch with them, not us. (We're not Deltek developers, and we don't work for Apple.)
Replies
Boosts
Views
Activity
Apr ’25
Reply to Scrollview and a background image set to scaledToFill....
I think you're looking for something like this: import SwiftUI struct ContentView: View { var body: some View { ScrollView { VStack(spacing: 24) { ForEach(1..<20) { i in Text("Line \(i)") } } } .frame(maxWidth: .infinity, maxHeight: .infinity) .background( Image("background") .resizable() .scaledToFill() .ignoresSafeArea() ) } } #Preview { ContentView() } The main difference is that my code adds a background to the ScrollView rather than putting everything on top of an image via a ZStack. When you do it your way, you've kind of told everything on top of that layer how big they'll be, which is why your ScrollView is distorted, and bits of it disappear off the screen.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Can't remove Waze from Carplay
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Replies
Boosts
Views
Activity
Apr ’25
Reply to Unable to format SD card
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Migarate to Subscriptions
It depends on what the IAP gave the customer. If the IAP unlocked something and you're now going to lock it behind a subscription, then no, you shouldn't do that. You can't say to someone, "Pay me $5 and you get Feature A," then some time later say, "Actually, I'm taking away Feature A unless you pay me $5 every year". If, however, the IAP gives a feature that is not going to be locked behind the new subscription, then you can create the new subscription and customers can decide if they want to buy it. Any customers who already bought the IAP should still retain the features it unlocked. In general when doing this, you need to put new features into the subscription and leave previous IAPs as they are. You can remove them from sale so no one can buy them going forward, but anyone who already bought the IAP should retain those features going forward. Or, you could offer previous IAP purchasers a discounted subscription price. So, two subscriptions, one for new customers who have not previously purchased the IAP, and one at a lower price taking into account what they previously paid for the IAP, e.g.: IAP: $5 New sub: $10/year. New sub for IAP purchasers: $8/year. You have to figure out what works best - but you definitely shouldn't annoy your existing customers, or you'll find out you don't have any.
Replies
Boosts
Views
Activity
Apr ’25
Reply to System Data full after clearing safari, messages, offloading apps/reinstalling apps
These are the Developer Forums, where developers of apps for Apple's platforms ask each other for hints and tips on coding. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks. System data is the System, i.e. iOS plus necessary files such as logs and cache files. That number will stay pretty static. There's not really a lot you can do to reduce that. Try and offload some of your data to iCloud. Enable iCloud Photos and turn on "Optimise iPhone Storage" in Settings > Apps > Photos. Regardless, you have a 64GB iPhone, which isn't that big these days. It might've been fine five years ago, but not really now.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Default Browser issue of Edge Mac
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Replies
Boosts
Views
Activity
Apr ’25
Reply to Problem setting up AASA file (paths with queries)
You don't have to create an entirely new thread just to make a small change to your original post. You have a one-hour window to make changes, which you are still within. I'm marking this as a duplicate.
Replies
Boosts
Views
Activity
Apr ’25
Reply to launch older version of Xcode on macOS 15.4?
Why do you need to build a framework with an older version? What's the technical reason you can't build it in macOS Sequoia with Xcode 16?
Replies
Boosts
Views
Activity
Apr ’25
Reply to Arabic Text Appears Reversed and Broken in SwiftUI Lists, TextFields, and Pickers
You should probably raise this as a bug in the usual way. It won't really get progressed if it's only posted in these Developer Forums. You need to raise each issue you find separately at https://feedbackassistant.apple.com/ You can post the FB numbers here if you want, so that others can link to them.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Swift question:
There are tons of online resources to learn how to code in Swift. Apple's own sample code is extensive and allows you to follow along. https://developer.apple.com/swift/
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to How to implement this textfield in SwitfUI
Isn't it just a normal TextField? Maybe with a placeholder? Show us the code you've tried, properly-formatted with the code formatting tools in the toolbar.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to Is the MacBook Air sufficient for iOS Development
Yes. I was using an M1 MacBook Air 2020 with 16GB and 1TB SSD. Never had any issues. You're on the M4 chip. You'll be fine for years.
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to iPad/iPhone - Display best practices….
All my apps work on both the iPhone and iPad, but due to the amount of changes - some structural - that are required to get an iPhone version to look and work properly on the iPad, I use two different views: @main struct MainApp: App { // ... var body: some Scene { WindowGroup { if(UIDevice.current.userInterfaceIdiom == .pad) { TabletView() } else { PhoneView() } } } } So, if the user is using an iPhone, the PhoneView() is the main entry point. For iPads, it's TabletView(). The reason I did this is because the iPad has much more space and allows me to do more things, so the TabletView has more things in it. Also, I'd rather not have one big, unmanageable View full of if ... else statements and ternary operators. It also means your spacers and padding values apply only to that device type. Where the two views have similar UI, those bits are extracted into their own little View structs and called within those two main entry points. When you separate out the two views you may find you're duplicating some work, but you'll also be working on a view that only applies to an iPad or an iPhone and not both. You can make a change in the TabletView and be assured it hasn't affected the PhoneView, so you haven't got to retest that change on the iPhone. You can also then expand this to include Vision Pro, Apple TV, and any other device idioms Apple has or releases in future, and you won't need to add more and more if ... else and ternary operators in that one massive file. If you're having issues with specific models of an iPad or iPhone I'd say you're maybe using too many magic numbers in your code? You've probably found that the padding on an iPhone 13 mini for some label is 5, while on an iPhone 14 Plus it's 12 so you've written that in. You should rework this to align things naturally using SwiftUI's HStacks, YStacks etc. Or, have a consistent padding for your UI so that it looks the same on every device. Let's say you can fit 8 text fields vertically in a form on an iPhone 12 mini, and 10 on an iPhone 15 Pro, that's fine. You don't need to space everything out to always fit 8 fields on the screen, so the padding between the fields can be the same on every device. If you want to show us an example of what's causing you issues, drop some code here (properly-formatted using the code formatting toolbar) and screenshots showing us the issue in the UI so we can visualise it.
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’25
Reply to How to import large data from Server and save it to Swift Data
Do you know how much data is expected to be downloaded? If so, you could ensure the view doesn't update until the right amount of data is received and stored. If you don't know the quantity of data, you could add a Bool and toggle it when the data loading starts, then toggle it when the data has finished loading, so the View is only refreshed when the last of the data is stored. Another way would be to disable the UI so the user can't interact with it until the data has finished loading. The UI would update in the background, but the user wouldn't experience a slow UI as they can't interact with it anyway. You could put a partially-transparent View with a ProgressView in it at the top of a ZStack (which would be at the bottom of the ZStack in the code...) and hide it when you're done. I'll show you how I do it below. There's a few ways of doing it, but I don't think there's a built-in way to achieve this. But then, I'm not a genius on SwiftData, so... Using a blocking view: @State private var loadingData: Bool = false var body: some View { ZStack { // ... UI goes here // ... BlockingView() .additional().hidden(loadingData) // Hide the view when loading data == true } } struct BlockingView: View { var body: some View { ZStack { Rectangle() .fill(Color.black.opacity(0.2)) // Partially-transparent, but doesn't have to be ProgressView(label: { Label(title: { Text("Please Wait") }, icon: { Image(systemName: "exclamationmark.circle") }) }) .frame(width: 240, height: 100) .background(.ultraThickMaterial) .clipShape(RoundedRectangle(cornerRadius: 24)) .shadow(color: .black.opacity(0.3), radius: 4, x: 0, y: 0) } .ignoresSafeArea() } } /* This modifier is required because you can't conditionally hide a view with `.hidden()` but on the plus side, you can use this in tons of places, and add new modifiers like conditional shadows etc. */ public struct Additional<Content> { public let content: Content public init(_ content: Content) { self.content = content } } extension View { var additional: Additional<Self> { Additional(self) } } extension Additional where Content: View { @ViewBuilder func hidden(_ hide: Bool) -> some View { if(hide) { content.hidden() } else { content } } }
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’25