Post

Replies

Boosts

Views

Activity

Reply to can't post a question on this forum.
So, you have written something that is considered (for good reason or not) as sensitive… I handle such a situation by dichotomy: I copy the post in Text Edit to save it. I keep only the first half in the post, to see if it is accepted. if it fails, you know where the problem is. If it works, then edit your post and copy half of the second half if it works, then edit to add the end. It should fail, but you know where is the sensitive language
Jul ’24
Reply to Using Older version of Xcode
It is possible to use Xcode on an older Mac (I do it on a 2015 iMac with Monterrey and Xcode 14.2). But I cannot publish on AppStore with it (you can with Xcode 15.2): as of April 2024 all iOS and iPadOS apps submitted to the App Store must be built with a minimum of Xcode 15 and the iOS 17 SDK. So, sooner or later you will unfortunately have to upgrade to a new Mac (which is a pity when the old one still working perfectly and there is no iMac 27" in the lineup). PS: I use this site to download any version of Xcode: https://xcodereleases.com
Jul ’24
Reply to Why can't SwiftUI state be changed in the middle of view updates?
What @MobileTen said. Plus what you hinted yourself. Authorising this could create infinite loop or a lot of other side effects. As it is impossible to predict and handle all the cases, it is forbidden. In addition, that's fundamentally contrary to SwiftUI principle (we like it or not is not the question) which building principles have been explained by MobileTen. Contracticting the fundamental principles of an architecture would have been the wrong way to go. However, depending on what you want to do exactly, there are several ways to achieve similar result. Here are some examples: struct ContentView: View { @State private var dummy = "OK" var body: some View { Text(dummy) .onAppear() { DispatchQueue.main.asyncAfter(deadline: .now() + 5) { dummy = "changed after 5s" } } Button(action: { self.dummy = "Changed" }) { Text("Change") } } }
Topic: UI Frameworks SubTopic: SwiftUI
Jul ’24
Reply to List Closure not displaying retrieved data in Simulator UI
Here is what I propose to test for onAppear var body: some View { NavigationStack { ZStack { List(NotionCaller.extractedContent) { block in ForEach(block.ExtractedFields, id: \.self) { field in Text(field) } } .onAppear { // <<-- EITHER HERE NotionCaller.makeAPIRequest() } ZStack { Color(hex: "#f9f9f9") .ignoresSafeArea() VStack { TextField(" Search keywords", text: $searchKeywords) //change font later .frame(height: 48) .overlay(RoundedRectangle(cornerRadius: 30).strokeBorder(style: StrokeStyle())) .foregroundColor(.white) .background(.white) .cornerRadius(30) .padding() .scaledToFit() .frame(maxHeight: .infinity, alignment: .top) } VStack { Spacer() Divider() .padding() HStack { Button(action: { //add functionality later }) { Image("menuButton") .frame(alignment: .bottom) .padding(.horizontal, 42) Spacer() } HStack { Button(action: { //add functionality later }) { Image("notificationButton") .frame(alignment: .leading) .padding(.leading, 30) Spacer() } } HStack { Button(action: { }) { Image("notionImportButton") .frame( alignment: .trailing) .padding(.horizontal) .padding(.horizontal) } } } // .onAppear { // <<-- NOT HERE // NotionCaller.makeAPIRequest() // } } } } .onAppear { // <<-- OR HERE NotionCaller.makeAPIRequest() } } } }
Topic: Community SubTopic: Apple Developers Tags:
Jul ’24
Reply to App Store Connect / Trends issue
I face the same problem and filed a bug report: Jul 10, 2024 at 11:14 AM – FB14261684 Here is FB content: I cannot access AppStoreConnect (Trends and sales, overview…) on some iMac: iMac mini Pro, macOS 14.5, Safari Technology Preview Release 197 (Safari 18.0, WebKit 19619.1.18) Same Mac, with Safari Version 17.5 (19618.2.12.11.6) I get the error message When I click on contact us, I get nothing as shown I tested on another iMac (27", 2015) with MacOS 12.7 and Safari Technology Preview Release 171 (Safari 16.4, WebKit 17616.1.15) It works as expected I tested on iPhone Xs, iOS 17.4 It works as expected
Jul ’24
Reply to Can't figure out why Toolbar is not conforming to view
Welcome to the forum. I tested your code (after completing missing parts and removing reference to unknown structure) and it works OK, both with Xcode 16.0ß2 and Xcode 15.0.1. Are you sure you have declared var as State vars ? Have you declared dismiss ? Aren't you missing a closing curly bracket somewhere ? Where exactly do you get the error ? Please show the exact and complete code, as well as your configuration (Xcode version, system version…) Here is the complete code I tested: struct ContentView: View { @State var companyName: String = "" @State var role: String = "" @State var location: String = "" @State var yearlySalary: Double = 0 @Environment(\.dismiss) var dismiss var body: some View { NavigationStack { Form { TextField("Company Name", text: $companyName) TextField("Role", text: $role) TextField("Location", text: $location) TextField("Yearly Salary", value: $yearlySalary, format: .currency(code: "USD")) .keyboardType(.decimalPad) } .navigationTitle("Add Application") .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button("back") { dismiss() } } ToolbarItem(placement: .navigationBarTrailing) { Button("Save") { // let appdata = ApplicationData( // companyName: companyName, // role: role, // location: location, // yearlySalary: yearlySalary, // dateApplied: dateApplied, // notes: notes) // // Save the application data dismiss() } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Jul ’24
Reply to App Store Connect iOS mobile application doesn't update Trends tab
Yes iit is not only you. Issue has already been reported: https://developer.apple.com/forums/thread/759230 What do you mean by: The web version in Safari is ok.
Replies
Boosts
Views
Activity
Jul ’24
Reply to Apple Watch 7 starts flickering. Diagnostics logs don’t pick up an issue
What @darkpaw said, and… Did you try to reset some settings, like luminosity ? Did you check battery health ? But if support could not find the issue, it is unlikely we can on the forum.
Replies
Boosts
Views
Activity
Jul ’24
Reply to can't post a question on this forum.
So, you have written something that is considered (for good reason or not) as sensitive… I handle such a situation by dichotomy: I copy the post in Text Edit to save it. I keep only the first half in the post, to see if it is accepted. if it fails, you know where the problem is. If it works, then edit your post and copy half of the second half if it works, then edit to add the end. It should fail, but you know where is the sensitive language
Replies
Boosts
Views
Activity
Jul ’24
Reply to Using Older version of Xcode
It is possible to use Xcode on an older Mac (I do it on a 2015 iMac with Monterrey and Xcode 14.2). But I cannot publish on AppStore with it (you can with Xcode 15.2): as of April 2024 all iOS and iPadOS apps submitted to the App Store must be built with a minimum of Xcode 15 and the iOS 17 SDK. So, sooner or later you will unfortunately have to upgrade to a new Mac (which is a pity when the old one still working perfectly and there is no iMac 27" in the lineup). PS: I use this site to download any version of Xcode: https://xcodereleases.com
Replies
Boosts
Views
Activity
Jul ’24
Reply to screenshot for iPhone home screen
You can take a screenshot directly on the iPhone. Otherwise, why don't you do it on simulator ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Help
AFAIK, there are: 17.6: https://www.macrumors.com/2024/07/10/apple-releases-ios-17-6-public-beta-3/ 18: 3rd beta (I guess that's the one you are looking for): https://www.macrumors.com/2024/07/08/apple-seeds-ios-18-beta-3/
Replies
Boosts
Views
Activity
Jul ’24
Reply to Why can't SwiftUI state be changed in the middle of view updates?
What @MobileTen said. Plus what you hinted yourself. Authorising this could create infinite loop or a lot of other side effects. As it is impossible to predict and handle all the cases, it is forbidden. In addition, that's fundamentally contrary to SwiftUI principle (we like it or not is not the question) which building principles have been explained by MobileTen. Contracticting the fundamental principles of an architecture would have been the wrong way to go. However, depending on what you want to do exactly, there are several ways to achieve similar result. Here are some examples: struct ContentView: View { @State private var dummy = "OK" var body: some View { Text(dummy) .onAppear() { DispatchQueue.main.asyncAfter(deadline: .now() + 5) { dummy = "changed after 5s" } } Button(action: { self.dummy = "Changed" }) { Text("Change") } } }
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’24
Reply to Can't turn on Developer Mode on iPhone 12 mini
You may have a look here to check if you meet all requirements to enable developer’s mode: https://getupdraft.com/blog/how-enable-ios-developer-mode-iphone-or-ipad
Replies
Boosts
Views
Activity
Jul ’24
Reply to List Closure not displaying retrieved data in Simulator UI
Here is what I propose to test for onAppear var body: some View { NavigationStack { ZStack { List(NotionCaller.extractedContent) { block in ForEach(block.ExtractedFields, id: \.self) { field in Text(field) } } .onAppear { // <<-- EITHER HERE NotionCaller.makeAPIRequest() } ZStack { Color(hex: "#f9f9f9") .ignoresSafeArea() VStack { TextField(" Search keywords", text: $searchKeywords) //change font later .frame(height: 48) .overlay(RoundedRectangle(cornerRadius: 30).strokeBorder(style: StrokeStyle())) .foregroundColor(.white) .background(.white) .cornerRadius(30) .padding() .scaledToFit() .frame(maxHeight: .infinity, alignment: .top) } VStack { Spacer() Divider() .padding() HStack { Button(action: { //add functionality later }) { Image("menuButton") .frame(alignment: .bottom) .padding(.horizontal, 42) Spacer() } HStack { Button(action: { //add functionality later }) { Image("notificationButton") .frame(alignment: .leading) .padding(.leading, 30) Spacer() } } HStack { Button(action: { }) { Image("notionImportButton") .frame( alignment: .trailing) .padding(.horizontal) .padding(.horizontal) } } } // .onAppear { // <<-- NOT HERE // NotionCaller.makeAPIRequest() // } } } } .onAppear { // <<-- OR HERE NotionCaller.makeAPIRequest() } } } }
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to App Store Connect / Trends issue
I face the same problem and filed a bug report: Jul 10, 2024 at 11:14 AM – FB14261684 Here is FB content: I cannot access AppStoreConnect (Trends and sales, overview…) on some iMac: iMac mini Pro, macOS 14.5, Safari Technology Preview Release 197 (Safari 18.0, WebKit 19619.1.18) Same Mac, with Safari Version 17.5 (19618.2.12.11.6) I get the error message When I click on contact us, I get nothing as shown I tested on another iMac (27", 2015) with MacOS 12.7 and Safari Technology Preview Release 171 (Safari 16.4, WebKit 17616.1.15) It works as expected I tested on iPhone Xs, iOS 17.4 It works as expected
Replies
Boosts
Views
Activity
Jul ’24
Reply to I cant create new app
I also have issues with AppstoreConnect (to access trends and sales for instance). I filed a bug report FB14261684
Replies
Boosts
Views
Activity
Jul ’24
Reply to UIRefresh not working for my project?
Could you post a complete sample code to test, not just a single line ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Can't figure out why Toolbar is not conforming to view
Welcome to the forum. I tested your code (after completing missing parts and removing reference to unknown structure) and it works OK, both with Xcode 16.0ß2 and Xcode 15.0.1. Are you sure you have declared var as State vars ? Have you declared dismiss ? Aren't you missing a closing curly bracket somewhere ? Where exactly do you get the error ? Please show the exact and complete code, as well as your configuration (Xcode version, system version…) Here is the complete code I tested: struct ContentView: View { @State var companyName: String = "" @State var role: String = "" @State var location: String = "" @State var yearlySalary: Double = 0 @Environment(\.dismiss) var dismiss var body: some View { NavigationStack { Form { TextField("Company Name", text: $companyName) TextField("Role", text: $role) TextField("Location", text: $location) TextField("Yearly Salary", value: $yearlySalary, format: .currency(code: "USD")) .keyboardType(.decimalPad) } .navigationTitle("Add Application") .navigationBarTitleDisplayMode(.large) .toolbar { ToolbarItem(placement: .navigationBarLeading) { Button("back") { dismiss() } } ToolbarItem(placement: .navigationBarTrailing) { Button("Save") { // let appdata = ApplicationData( // companyName: companyName, // role: role, // location: location, // yearlySalary: yearlySalary, // dateApplied: dateApplied, // notes: notes) // // Save the application data dismiss() } } } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to List Closure not displaying retrieved data in Simulator UI
We cannot test with the code you posted. So only some guesses. Why do you need to DispatchQueue.main.async And try to connect .onAppear { NotionCaller.makeAPIRequest() } to the ZStack or the List and not the VStack
Topic: Community SubTopic: Apple Developers Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to I cant create new app
Your post does not provide enough information to get any help. Could you explain: your configuration (Xcode, MacOS versions, …) what exactly your are doing (all the steps in Xcode) when you get the error
Replies
Boosts
Views
Activity
Jul ’24