Post

Replies

Boosts

Views

Activity

Reply to No sound
Did you try to reinstall the beta ? That's not a question about app development, hence not for this forum. You should either: file a bug report post on support forum: https://discussions.apple.com/welcome
Topic: Media Technologies SubTopic: Audio Tags:
Jan ’25
Reply to Review time
I did notice in the past that cancelling a review may create bad problems. Your new submission is just 8 days old, during the holidays, which may explain delays. I would thus advise: wait a few more days (till January 6 If nothing moves, ask for support, requesting a phone call. Good luck and happy new year.
Jan ’25
Reply to Review time
It is a pretty unusual delay. One point to check. Submitting is a 2 steps action (I may not remember exactly the terms): there is a button close to where you select language, on the right over screenshots gallery first, you click button for Add for Review then the button changes and you have to click again to "Submit to App Review". Once done, situation unlocked quasi instantly. Hope that helps. Could you post a screenshot of the submission page, to see what the button looks like ? I once had a similar issue. Here was the full explanation: The “Ready for Review” status indicates that you’ve entered all of the required metadata for your app and suggests that you intend to submit it for review, but haven’t submitted it yet. You can submit the app by itself or include other items, such as in-app events or custom product pages. You can only send one submission at a time per platform. To submit your app for review follow the steps provided: • From My Apps, select your app. • In the sidebar, click the app version you want to submit. • On the right, scroll down to the Build section and verify that you set the build for the version to the correct build. • In the upper-right, click Add for Review. The app status changes to Ready for Review. • Click Submit to App Review. This is the second step not to miss.
Jan ’25
Reply to PLS HELP
Have you checked there is no dust, crumb ? You could try to use a vacuum cleaner to  bl ow   air and try to remove. What else do you want other developers to do ? Replace the z key !!!! Or go to a repair shop. In any case, that's the wrong forum. This is for developing apps, not hardware or software issues. You'd better post there: https://discussions.apple.com/welcome And don't forget to close this thread by marking the correct answer.
Jan ’25
Reply to App Rejected Due to Guideline 4.1 – Seeking Advice on Next Steps
It would help to know first precisely what the reviewer has reported. What you did is probably a try to solve the reported problems, but without knowing what they were, this information is totally useless. What type of app is it ? Do you know any app it looks more or less like (not only UI, but the very purpose of the app) ? As you say you tried to eliminate any possible confusion, that probably means you are aware of resemblances. If it is in a very crowded category, there is a risk it mimics existing app. An advice: when you reply to the reviewer, be very factual, proving as much as you can with objective elements, not fuzzy general statements as "my app is unique". Be more precise to the reviewer than you are in this post.
Jan ’25
Reply to SWIFTUI - update an Array/property Element gives error (had to replace the Whole structure)
When you post code, please use code formatter, so that we get a more readable code. I've completed to check your code and found many issues (the one you report is a consequence of them): what does this mean ? AllObjects.TestObjects AllObjects (it should be written allObjects as it is an instance, not a class or structure definition) does not contain TestObjects property So replace with allObjects[index].latitude = Double(-999.0) 2  index is declared as Int32. Why so ? If it is an index in the array, it should be Int. Or do you want to pass a seq_id ? If so, you would have to change the logic of the func. 3 latitude is a constant. You cannot change it once assigned. Note that a latitude of -999 is meaningless. With all those errors corrected, it works, as you can test yourself. If that's OK, don't forget to close the thread by marking the answer as correct. struct ContentView: View { @State private var allObjects:[TestObjects] = [TestObjects(seq_id: 1, latitude: 45, longitude: 2)] func TestObjUpdateLoc(index:Int) { // CHANGED to Int if index >= 0 && index < allObjects.count { // Important to avoid crashes} allObjects[index].latitude = Double(-999.0) } //error ..Cannot assign value of type 'Double' to type 'Binding<Subject>' ** } var body: some View { Text("Hello \(allObjects[0].latitude)") Button(action: { TestObjUpdateLoc(index: 0) }) { Text("Test") } } } struct TestObjects: Codable, Hashable { let seq_id:Int32 var latitude:Double // Changed to var var longitude:Double // Changed to var // Many more... }
Topic: UI Frameworks SubTopic: SwiftUI
Jan ’25
Reply to can anybody fix this code
Welcome to the forum. It seems you are misunderstanding what the forum is. It can help to solve properly formatted questions, give advices. But it is not a free debugging service bureau. You should read this excellent thread: https://developer.apple.com/forums/thread/706527 To get help: express precisely what is the problem (not just say help to fix) what do you get ? what did you expect ? what are the error messages ? which line in code ? (not only a comment hidden somewhere in code)   Please also format code with code formatter and indicate the configuration, such as Xcode version.
Topic: Code Signing SubTopic: General
Dec ’24
Reply to SwiftUI From/List Issue: All Buttons Trigger Simultaneously in List View
Confirm what darkpaw said. Whenever you have multiple buttons in a list row, you need to manually set the button style to .borderless or .plain . This is because buttons “adapt” to their context. According to the documentation: So when your button is in a List, its tap target extends to fill the row and you get a highlight animation. SwiftUI isn’t smart enough to stop this side effect when you have more than 2 buttons, so you need to set buttonStyle manually. .buttonStyle(.borderless) Get details here https://stackoverflow.com/questions/70399810/buttons-in-swiftui-list-foreach-view-trigger-even-when-not-tapped
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Dec ’24
Reply to cannot find in scope
@robert0605 Please, STOP mixing all questions. You return to an older part of the post when you have full code available. Do you understand the answers you receive or even read them ? So, just one point left: Does the code you received in the last posts work ? (It works for me, it should for you) Then, close the the thread by marking the correct answer.
Dec ’24
Reply to cannot find in scope
End of code Spacer() // Leaves a gap between the Enter & Detail buttons, and the destructive Delete button Button { delete(costa: &costa, tipa: &tipa, number: &number) } label: { Text("Delete") .font(.title2) .padding(10) .background(Color.red) .foregroundStyle(Color.white) .cornerRadius(12) } .padding(.trailing, 10) // Keeps it off the edge of the screen } Text(text1) // Just to show it is updated DO NOT KEEP THIS Divider() // Nice little divider .padding(.vertical, 20) } VStack { Grid(alignment: .center, horizontalSpacing: 6, verticalSpacing: 6) { GridRow { Text("Avg. Tip") .padding(.horizontal, 20) Text("Tip %") .padding(.horizontal, 20) Text("#") .padding(.horizontal, 20) } .gridColumnAlignment(.center) .font(.title3) GridRow { Text(tipaa) .padding(.horizontal, 20) Text(tipcc) .padding(.horizontal, 20) Text(numbc) .padding(.horizontal, 20) } .gridColumnAlignment(.center) .font(.system(size: 22, weight: .bold)) .foregroundStyle(Color.blue) } Spacer() } VStack { Grid(alignment: .center, horizontalSpacing: 6, verticalSpacing: 6) { GridRow { Text("Total Cost") .padding(.horizontal, 10) Text("Total Tips") .padding(.horizontal, 10) Text("Total Cash") .padding(.horizontal, 10) } .gridColumnAlignment(.center) .font(.title3) GridRow { Text(totalCost) .padding(.horizontal, 10) Text(totalTips) .padding(.horizontal, 10) Text(totalCash) .padding(.horizontal, 10) } .gridColumnAlignment(.center) .font(.system(size: 22, weight: .bold)) .foregroundStyle(Color.blue) } Spacer() } } } } func enterPayment() { var ttips = 0.0 var tcost = 0.0 var tipo = 0.00 costt = Double(cost) paidt = Double(paid) errorMsg = "" if(costt != nil && paidt != nil) { tipo = Double(paid)! - Double(cost)! tipa.append(tipo) costa.append(Double(cost)!) number += 1 numbc = String(number) ttips = (tipa.reduce(0, +)) tcost = (costa.reduce(0, +)) tipaa = (ttips / Double(number)).formatted(.currency(code: "USD")) totalTips = ttips.formatted(.currency(code: "USD")) totalCost = tcost.formatted(.currency(code: "USD")) tipp = tipo.formatted(.currency(code: "USD")) tipc = String(tipo / Double(cost)! * 100) tipc = String(format: "%3.0f%%", Double(tipc)!) tipcc = String(ttips / tcost * 100) tipcc = String(format: "%3.0f%%", Double(tipcc)!) totalCash = (tcost + ttips).formatted(.currency(code: "USD")) } else { errorMsg = "Enter numbers and 1 decimal point only." } } } struct ViewDetail: View { @Binding var text1InDetail: String // Binding here = "" Could be an Array of 44 String @State var tip1: String = "" @State var text23: String = "" @State var tip23: String = "" var body: some View { HStack { Text(text1InDetail) Text(tip1) Text(text23) Text(tip23) } .onAppear { text1InDetail = "125"// If array: text1InDetail[0] = 125 } } func detailLine(costa: inout [Double], tipa: inout [Double]) { // NEVER Called print(costa, tipa) text1InDetail = "125" print("detail") } } func delete(costa: inout [Double], tipa: inout [Double], number: inout Int) { print(costa, tipa) if !tipa.isEmpty && !costa.isEmpty { tipa.removeLast() costa.removeLast() number -= 1 } print(costa,tipa) }
Dec ’24
Reply to cannot find in scope
So the complete code part1: struct ContentView: View { @State var text1: String = "" // <<-- Declare HERE ; could be an array of String @State private var tipa: [Double] = [] @State private var costa: [Double] = [] @State private var cost = "" @State private var costt: Double? = 0.0 @State private var paidt: Double? = 0.0 @State private var paid = "" @State private var tipp = "" @State private var tipc = "" @State private var tipaa = "" @State private var totalCost = "" @State private var totalTips = "" @State private var totalCash = "" @State private var tipcc = "" @State private var numbc = "" @State private var deletep = 0 @State private var number = 0 @State private var errorMsg = "" var body: some View { GeometryReader { g in NavigationStack { VStack { HStack { // No need to manually pad the date out with spaces, which will never be correct. // Just use an HStack and put a Spacer() in, so it goes: |<.....Spacer().....>Date| Spacer() Text(Date().formatted(date: .numeric, time: .omitted)) .foregroundStyle(Color.black) .fontWeight(.bold) .padding(.trailing, 10) } Text("Driver's Food Delivery") .font(.largeTitle) .fontWeight(.bold) Image("Screenshot 2024") VStack { Spacer() Text(errorMsg) .foregroundStyle(Color.red) // Here, put the text in one Text element, and tell SwiftUI to put it on two lines. // No need for msg/msg2 variables. Text("Enter cost and how much was paid. Enter numbers and one decimal point only, then press Enter.") .foregroundStyle(Color.blue) .lineLimit(2, reservesSpace: true) Spacer() } // Use a Grid to lay out your data; much cleaner, and SwiftUI will keep it in columns for you Grid(alignment: .center, horizontalSpacing: 6, verticalSpacing: 6) { GridRow { Text("Cost") .gridColumnAlignment(.leading) Text("Paid") .gridColumnAlignment(.leading) Text("Tip") .gridColumnAlignment(.trailing) Text("Tip %") .gridColumnAlignment(.trailing) } .font(.headline) GridRow { TextField("Cost", text: $cost) .padding(10) .background(Color.brown) .cornerRadius(12) .frame(width: g.size.width * 0.2) .gridColumnAlignment(.leading) TextField("Paid", text: $paid) .padding(10) .background(Color.brown) .cornerRadius(12) .frame(width: g.size.width * 0.2) .gridColumnAlignment(.leading) Text(tipp) .frame(width: g.size.width * 0.2) .gridColumnAlignment(.trailing) Text(tipc) .frame(width: g.size.width * 0.2) .gridColumnAlignment(.trailing) } } .padding(.vertical, 20) HStack { Button { enterPayment() } label: { Text("Enter") .font(.title2) .padding(10) .background(Color.green) .foregroundStyle(Color.white) .cornerRadius(12) } .padding(.leading, 10) // Keeps it off the edge of the screen NavigationLink(destination: ViewDetail(text1InDetail: $text1)) { Text("Detail") .font(.title2) .padding(10) .background(Color.blue) .foregroundStyle(Color.white) .cornerRadius(12) }
Dec ’24