Post

Replies

Boosts

Views

Activity

Reply to My iMac user login script that 30 minutes to start up even though I have tons of hard drive space and just recently slammed it with vanilla MacOS Sonoma 14.4.1.
What should I do? Explain precisely what happens. How do you know script does not start ? Could you show the script ? Could you explain how you launch the script ? Note: it seems you never close your threads, even when you've got correct answer. You should do it to keep forum clean and let those who helped know that their answer solved the issue.
Topic: App & System Services SubTopic: Hardware Tags:
Apr ’24
Reply to passing data from view one to seven
@sonam93 Yes, that requires that observer is added when notification is sent See details here: https://stackoverflow.com/questions/66489663/nsnotification-not-observing-or-posting-data Where and when do you load VC1 to VC6 ? If it is just a timing delay, you could post the notification in a dispatch with a 0.2s delay. That should work (increase the delay a little bit if needed). DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { NotificationCenter.default.post(name: .sendApple, object: nil, userInfo: [kNotificationValue : "apple"]) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to IOS publish app Issue
I understand all the text, except last line, is Reviewer mail. Exact ? You should edit your post to make it clearer. The request from reviewer seems very clear: Your app provides financial services but does not meet all the requirements for apps providing these services. Specifically: The app must be published under a seller and company name that is associated with the organization or company providing the services. In this case, your app must be published under a seller name and company name that reflects the Askmefund name. The account that submits the app must be enrolled in the Apple Developer Program as an organization, and not as an individual. So what is your question ? Are you able to "provide ownership documentation or modify the vendor seller name." Otherwise, you will not pass the review.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’24
Reply to TextField gives error message
Is it the real code or did you type it here ? I noticed several errors: var id: UUID() soudé be var id = UUID() var body: Some View { should be var body: some View { What is this closure after TextField (it is only supported in MacOS: https://stackoverflow.com/questions/58776561/add-label-to-swiftui-textfield): TextField("xValue", value: $vars.xValue, format: .number) { Text("X") } So here is a code that works and that is properly formatted with code formatter. If that's OK, please close the thread by marking this answer as correct. Otherwise explain what's the problem. @Observable class Variables: Identifiable { var id = UUID() // <<-- Changed here var xValue: Int = 1 var yValue: Int = 1 } struct MainView: View { @State var vars = Variables() var body: some View { VStack { Subview() .environment(vars) .padding() Text("Value X = \(vars.xValue)") // No $vars here Text("Value Y = \(vars.yValue)") } } } struct Subview: View { @Environment(Variables.self) private var vars var body: some View { @Bindable var vars = vars // <<-- Added here // https://developer.apple.com/documentation/swiftui/bindable VStack { HStack { Text("X") TextField("xValue", value: $vars.xValue, format: .number) /*{ Text("X") }*/ // <<-- Changed here .textFieldStyle(.roundedBorder) } HStack { Text("Y") TextField("yValue", value: $vars.yValue, format: .number) /*{ Text("Y") }*/ .textFieldStyle(.roundedBorder) } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to Privacyinfo.xcprivacy doesn't work
Requirement for 3rd party framework is not really clear… See here: https://jochen-holzer.medium.com/embrace-the-evolution-preparing-your-ios-app-for-the-required-reason-api-38f2d12bbce5 3rd Party Libs Third-party SDKs need to provide their own privacy manifest files that record the types of data they collect. Your app’s privacy manifest file doesn’t need to cover data collected by third-party SDKs that your app links to. Did CBORCoding 1.3.2 and Half 1.3.1. provide such manifest ? Maybe you could ask to the author (same for both packages) : https://swiftpackageindex.com/SomeRandomiOSDev/CBORCoding. Author Joe Newton, somerandomiosdev @ gmail.com
Apr ’24
Reply to Privacyinfo.xcprivacy doesn't work
Do you use a library that could have more use cases of UserDefault ? Your file seems OK as long as UserDefaults are used exclusively by this app (not apps from same group). Maybe you could try to add some info to the String and see if it works: <string>CA92.1 access user defaults to read and write information that is only accessible to the app itself</string>. privacyInfo declaration is a really cryptic.
Apr ’24
Reply to Persisting User Input Data in SwiftUI
With this scheme, user can create its own articles and prices as well (just need to check that item is not a duplicate in that case). What do you want exactly to save in iCloud ? To save in iCloud: https://www.hackingwithswift.com/example-code/system/how-to-store-userdefaults-options-in-icloud
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to Persisting User Input Data in SwiftUI
So, if I understand correctly, you want to use (and save) 2 pricing tables: the default one that may be updated when app is updated the user's one if he/she has defined. And you want user to be able to keep it if desired. What is the size of these pricing tables ? If they are not too large (let's say, less than 1000 items), I would: create a dictionary with the price list include the default pricing in a JSON and include it in the project resources if user creates a price list, save it in User.defaults as another JSON (containing only the prices that were modified). When you load the app, you first decode the default pricing from the JSON Then you read user defaults to see if some price has to be superseded by a user price. You update the price dictionary for those keys (product name) Doing so will allow: add new prices in the JSON when you create a new release or modify some default prices work with whatever number of prices modified by user (even 0) preserve user prices. When uploading new release, you may ask user if he wants to keeps its prices or update with new defaults. If so, you should clear those user defaults. If several 1000 of items, SwiftData may be a better choice. This may help you create the JSON from the initial dictionary: https://www.tutorialspoint.com/convert-a-dictionary-to-json-in-swift Please tell if anything is not clear enough.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to My iMac user login script that 30 minutes to start up even though I have tons of hard drive space and just recently slammed it with vanilla MacOS Sonoma 14.4.1.
What should I do? Explain precisely what happens. How do you know script does not start ? Could you show the script ? Could you explain how you launch the script ? Note: it seems you never close your threads, even when you've got correct answer. You should do it to keep forum clean and let those who helped know that their answer solved the issue.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to passing data from view one to seven
@sonam93 Yes, that requires that observer is added when notification is sent See details here: https://stackoverflow.com/questions/66489663/nsnotification-not-observing-or-posting-data Where and when do you load VC1 to VC6 ? If it is just a timing delay, you could post the notification in a dispatch with a 0.2s delay. That should work (increase the delay a little bit if needed). DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { NotificationCenter.default.post(name: .sendApple, object: nil, userInfo: [kNotificationValue : "apple"]) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to IOS publish app Issue
I understand all the text, except last line, is Reviewer mail. Exact ? You should edit your post to make it clearer. The request from reviewer seems very clear: Your app provides financial services but does not meet all the requirements for apps providing these services. Specifically: The app must be published under a seller and company name that is associated with the organization or company providing the services. In this case, your app must be published under a seller name and company name that reflects the Askmefund name. The account that submits the app must be enrolled in the Apple Developer Program as an organization, and not as an individual. So what is your question ? Are you able to "provide ownership documentation or modify the vendor seller name." Otherwise, you will not pass the review.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to TextField gives error message
Is it the real code or did you type it here ? I noticed several errors: var id: UUID() soudé be var id = UUID() var body: Some View { should be var body: some View { What is this closure after TextField (it is only supported in MacOS: https://stackoverflow.com/questions/58776561/add-label-to-swiftui-textfield): TextField("xValue", value: $vars.xValue, format: .number) { Text("X") } So here is a code that works and that is properly formatted with code formatter. If that's OK, please close the thread by marking this answer as correct. Otherwise explain what's the problem. @Observable class Variables: Identifiable { var id = UUID() // <<-- Changed here var xValue: Int = 1 var yValue: Int = 1 } struct MainView: View { @State var vars = Variables() var body: some View { VStack { Subview() .environment(vars) .padding() Text("Value X = \(vars.xValue)") // No $vars here Text("Value Y = \(vars.yValue)") } } } struct Subview: View { @Environment(Variables.self) private var vars var body: some View { @Bindable var vars = vars // <<-- Added here // https://developer.apple.com/documentation/swiftui/bindable VStack { HStack { Text("X") TextField("xValue", value: $vars.xValue, format: .number) /*{ Text("X") }*/ // <<-- Changed here .textFieldStyle(.roundedBorder) } HStack { Text("Y") TextField("yValue", value: $vars.yValue, format: .number) /*{ Text("Y") }*/ .textFieldStyle(.roundedBorder) } } } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to How can I check if my project is set up to use SwiftData?
You don't select SwiftData at start (you may select CoreData).
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Is SwiftData created specifically for SwiftUI?
No, SwiftData can be used with UIKit for instance, not requiring SwiftUI.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Error when calling function to move an element: "Cannot use mutating member on immutable value: 'self' is immutable"
Thanks for the feedback. Don't forget to mark the correct answer to close the thread. Good continuation.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Unable to add an iOS 14 simulator on Xcode 14.3
WHich target have you set for your app ?
Replies
Boosts
Views
Activity
Apr ’24
Reply to High Kernel Dispatch Overhead for Metal for Swift
Just by curiosity: why do you pass commandQueue as fill argument in objC and not in Swift (even though that should not make a big difference) ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Generating 5.5-inch iPhone Screenshots for App Store Submission (Xcode 17.4)
Welcome to the forum. Xcode 17.4 does not exist yet… Is it Xcode 15.4 ? Or more likely iOS 17.4 ? In any case, you can set temporarily the target to iOS 16.0 instead of 17.4 (that will be useful in addition for all users who have not yet or cannot upgrade to 17). Then you will be able to generate for iPhone 8 Plus.
Replies
Boosts
Views
Activity
Apr ’24
Reply to Privacyinfo.xcprivacy doesn't work
Requirement for 3rd party framework is not really clear… See here: https://jochen-holzer.medium.com/embrace-the-evolution-preparing-your-ios-app-for-the-required-reason-api-38f2d12bbce5 3rd Party Libs Third-party SDKs need to provide their own privacy manifest files that record the types of data they collect. Your app’s privacy manifest file doesn’t need to cover data collected by third-party SDKs that your app links to. Did CBORCoding 1.3.2 and Half 1.3.1. provide such manifest ? Maybe you could ask to the author (same for both packages) : https://swiftpackageindex.com/SomeRandomiOSDev/CBORCoding. Author Joe Newton, somerandomiosdev @ gmail.com
Replies
Boosts
Views
Activity
Apr ’24
Reply to Privacyinfo.xcprivacy doesn't work
Do you use a library that could have more use cases of UserDefault ? Your file seems OK as long as UserDefaults are used exclusively by this app (not apps from same group). Maybe you could try to add some info to the String and see if it works: <string>CA92.1 access user defaults to read and write information that is only accessible to the app itself</string>. privacyInfo declaration is a really cryptic.
Replies
Boosts
Views
Activity
Apr ’24
Reply to Persisting User Input Data in SwiftUI
With this scheme, user can create its own articles and prices as well (just need to check that item is not a duplicate in that case). What do you want exactly to save in iCloud ? To save in iCloud: https://www.hackingwithswift.com/example-code/system/how-to-store-userdefaults-options-in-icloud
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to Persisting User Input Data in SwiftUI
So, if I understand correctly, you want to use (and save) 2 pricing tables: the default one that may be updated when app is updated the user's one if he/she has defined. And you want user to be able to keep it if desired. What is the size of these pricing tables ? If they are not too large (let's say, less than 1000 items), I would: create a dictionary with the price list include the default pricing in a JSON and include it in the project resources if user creates a price list, save it in User.defaults as another JSON (containing only the prices that were modified). When you load the app, you first decode the default pricing from the JSON Then you read user defaults to see if some price has to be superseded by a user price. You update the price dictionary for those keys (product name) Doing so will allow: add new prices in the JSON when you create a new release or modify some default prices work with whatever number of prices modified by user (even 0) preserve user prices. When uploading new release, you may ask user if he wants to keeps its prices or update with new defaults. If so, you should clear those user defaults. If several 1000 of items, SwiftData may be a better choice. This may help you create the JSON from the initial dictionary: https://www.tutorialspoint.com/convert-a-dictionary-to-json-in-swift Please tell if anything is not clear enough.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24
Reply to How to correctly use Accessibility Identifiers for Rows of Elements
Try adding buttonStyle so that a button is effectively selected and not the whole row (https://developer.apple.com/forums/thread/119541?page=2) Button(action: {}, label: { Text("Submit") }) .buttonStyle(PlainButtonStyle()) .accessibilityIdentifier("submit_button")
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Apr ’24