Post

Replies

Boosts

Views

Activity

Reply to Content blockers: ignore-previous-rules not working?
Figured it out. The fix was literally staring me in the face! The JSON I posted here was 100% correct, but what I had in my code was 1 character wrong. Explanation: "if-domain": ["*mydomain.com"] is correct, but in my code I had an extra period in there:"if-domain": ["*.mydomain.com"], i.e. *.. You don't need a period in there; the * covers that for you.
Topic: Safari & Web SubTopic: General Tags:
Feb ’25
Reply to Correct way to label TextField inside Form in SwiftUI
I've never needed to do this, but I've had a quick look, and this seems reasonable: var body: some View { VStack(alignment: .leading) { Form { Text("First Name") TextField("", text: $firstName, prompt: Text("Required")) Text("Last Name") .padding(.top, 10) TextField("", text: $lastName, prompt: Text("Required")) Text("Email") .padding(.top, 10) TextField("", text: $email, prompt: Text("Required")) Text("Job") .padding(.top, 10) TextField("", text: $job, prompt: Text("Required")) Text("Role") .padding(.top, 10) TextField("", text: $role, prompt: Text("Required")) } .formStyle(.columns) .padding(.horizontal, 16) .padding(.vertical, 16) Spacer() } } The key is .formStyle(.columns).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Feb ’25
Reply to Battery Health
Hi. These forums are for third-party developers (i.e. not Apple employees) who write apps for Apple's platforms. We ask for help on code issues and how to do certain things in code etc. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Topic: App & System Services SubTopic: Hardware Tags:
Feb ’25
Reply to Please provide me with an access code to TestFlight
If you want to test an app via TestFlight you need to contact the developer of the app, not us. We're just random developers who write apps for Apple's platforms - we're not Apple's employees, and your scatter-gun approach of asking for a TestFlight code on these forums is not going to get you anywhere. Contact the developer of the relevant app directly.
Feb ’25
Reply to When is the unverified branch of AppTransaction.shared entered?
I use this: private func handle(transaction: VerificationResult<StoreKit.Transaction>) async { guard case .verified(let transaction) = transaction else { return } // Do something with the verified transaction... await transaction.finish() That should ignore any transaction that's not verified. Is an unverified transaction for a jailbroken phone, that sort of thing?
Topic: App & System Services SubTopic: StoreKit Tags:
Feb ’25
Reply to Best way to learn Swift
Since you're having issues with the #Preview, instead of: struct MeetingView_Previews: PreviewProvider { static var previews: some View { MeetingView() } } I think this is what you want: #Preview { MeetingView() } Everything else should just work as before. Stick with the route you're going down, to learn the basic principles, then branch out with your own app and you'll soon learn it. If you need help with specific issues, try hacking with swift . com (no spaces).
Topic: Programming Languages SubTopic: Swift Tags:
Feb ’25
Reply to force update app (breaking changes)
I know The Simpsons: Tapped Out game pushed users to their App Store page to update the app when necessary, so it is possible. You should avoid breaking changes at all costs, especially without warning your current users. If you don't want to be able to support both users of the current app and users of the new version, then how about this: Release an update to the version that's on the App Store now, that includes information about the changes, explaining that this version of the app won't function after X date. Set your next version to be released at that date. Don't ever put an option to exit your app in an app. It's an extremely poor user experience.
Jan ’25
Reply to Coding and Arrays; an Objective issue.
This looks like an amateur AI wrote it. Marking it as spam.
Replies
Boosts
Views
Activity
Feb ’25
Reply to "Multiple commands" error caused by name conflict
What's your problem? Why do I have to go to a comment on Stack Overflow to see what the issue is? Post the specific issue here and we may be able to help you. If you're just firing off duplicates in the hope someone will see it and help you... nah.
Replies
Boosts
Views
Activity
Feb ’25
Reply to Swiftui Rendering issue: View not displayed when using almost full screen height
How about not using .ignoresSafeArea and seeing what happens? You're telling SwiftUI to ignore the safe areas, i.e. the bit where the Dynamic Island is, and manually setting a distance away from that part. Don't use magic numbers; they will change and your app will look rubbish. Adhere to the safe areas and you should be fine.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to copyright complaint
Ask the App Review team. We're just random people like you. We don't have an answer for such a vague question. Go to the source of your issue - ask the App Review team.
Replies
Boosts
Views
Activity
Feb ’25
Reply to Swift Form on iOS
+1 to @Claude31 , and also, if you say there's some layout issue, why not include a screenshot so we can see what you mean?
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Content blockers: ignore-previous-rules not working?
Figured it out. The fix was literally staring me in the face! The JSON I posted here was 100% correct, but what I had in my code was 1 character wrong. Explanation: "if-domain": ["*mydomain.com"] is correct, but in my code I had an extra period in there:"if-domain": ["*.mydomain.com"], i.e. *.. You don't need a period in there; the * covers that for you.
Topic: Safari & Web SubTopic: General Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Correct way to label TextField inside Form in SwiftUI
I've never needed to do this, but I've had a quick look, and this seems reasonable: var body: some View { VStack(alignment: .leading) { Form { Text("First Name") TextField("", text: $firstName, prompt: Text("Required")) Text("Last Name") .padding(.top, 10) TextField("", text: $lastName, prompt: Text("Required")) Text("Email") .padding(.top, 10) TextField("", text: $email, prompt: Text("Required")) Text("Job") .padding(.top, 10) TextField("", text: $job, prompt: Text("Required")) Text("Role") .padding(.top, 10) TextField("", text: $role, prompt: Text("Required")) } .formStyle(.columns) .padding(.horizontal, 16) .padding(.vertical, 16) Spacer() } } The key is .formStyle(.columns).
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Battery Health
Hi. These forums are for third-party developers (i.e. not Apple employees) who write apps for Apple's platforms. We ask for help on code issues and how to do certain things in code etc. Your question is more of a product support one, so I'd suggest you ask it over at the Apple Support Forums. Thanks.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to NSItemProvider.loadItemForTypeIdentifier broken from swift
I'm hitting this error, too, but it's an internal error (it has an _ in front of the method causing the error) and my extension doesn't crash, so I'm going to attempt to release my app with this in.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Can an Action Extension use SwiftUI for its UI?
Ah, it seems to be an issue with Xcode. You have to build and run your app containing the extension, then you can run the extension itself. Seems a bit daft, and really slows you down. https://developer.apple.com/forums/thread/748073
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Please provide me with an access code to TestFlight
If you want to test an app via TestFlight you need to contact the developer of the app, not us. We're just random developers who write apps for Apple's platforms - we're not Apple's employees, and your scatter-gun approach of asking for a TestFlight code on these forums is not going to get you anywhere. Contact the developer of the relevant app directly.
Replies
Boosts
Views
Activity
Feb ’25
Reply to When is the unverified branch of AppTransaction.shared entered?
I use this: private func handle(transaction: VerificationResult<StoreKit.Transaction>) async { guard case .verified(let transaction) = transaction else { return } // Do something with the verified transaction... await transaction.finish() That should ignore any transaction that's not verified. Is an unverified transaction for a jailbroken phone, that sort of thing?
Topic: App & System Services SubTopic: StoreKit Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Best way to learn Swift
Since you're having issues with the #Preview, instead of: struct MeetingView_Previews: PreviewProvider { static var previews: some View { MeetingView() } } I think this is what you want: #Preview { MeetingView() } Everything else should just work as before. Stick with the route you're going down, to learn the basic principles, then branch out with your own app and you'll soon learn it. If you need help with specific issues, try hacking with swift . com (no spaces).
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Feb ’25
Reply to Critical Bug: Children Can Disable Screen Time Apps Like Choreio Without Parental ApprovalI
Have you raised a Feedback report? If not, please do so at https://feedbackassistant.apple.com/ then post the FB number here.
Replies
Boosts
Views
Activity
Feb ’25
Reply to force update app (breaking changes)
I know The Simpsons: Tapped Out game pushed users to their App Store page to update the app when necessary, so it is possible. You should avoid breaking changes at all costs, especially without warning your current users. If you don't want to be able to support both users of the current app and users of the new version, then how about this: Release an update to the version that's on the App Store now, that includes information about the changes, explaining that this version of the app won't function after X date. Set your next version to be released at that date. Don't ever put an option to exit your app in an app. It's an extremely poor user experience.
Replies
Boosts
Views
Activity
Jan ’25