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 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 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 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