Post

Replies

Boosts

Views

Activity

Reply to app rejected
You're supposed to provide requested information. Try to imagine reviewer concern: they see a developer speak in the name a company without any official credential. It could well be someone usurping the name of the company to publish an app without their consent. Reviewer cannot guess you have a (verbal) agreement. If the owner is a friend of yours, that should be pretty easy to get the signed document.
May ’24
Reply to SwiftData relationships
In the “Vegetable” class, why is the field “notes” an array of type Notes? You may have several notes, so it is logical to get them in an array. What else did you think about ?   Again in the “Vegetable” class does the field “notes” get stored in the database, if so what is stored? By default, all non-computed attributes are stored. Unless you use the @Transient macro.   In the “Note” Class it looks like the whole of the class “Vegetable” gets stored in the variable “vegetable”, which may or may not get stored in the database. With @Relationship, SwiftData knows what needs to be saved to be able to rebuild the relations when needed. This tutorial should give you some insight.
Topic: App & System Services SubTopic: iCloud Tags:
May ’24
Reply to Swift UI How can I get the click of a button to change the wording of Label
my label should be a state var. And you cannot change with string value, but just reassign a new label: struct ContentView: View { @State private var myLabel = Label("Text to be Changed", systemImage: "circle") var body: some View { Spacer() Button("Change Label Wording"){ myLabel = Label("Changed text", systemImage: "star") } Spacer() myLabel Spacer() } } You could also do it differently. Create a state variable @State private var newLabel = false Toggle in button action: Button("Change Label Wording"){ newLabel.toggle() } Here is a small code snippet to show: struct ContentView: View { @State private var newLabel = false var body: some View { Spacer() Button("Change Label Wording"){ newLabel.toggle() // myLabel.stringValue = "Changed text" } Spacer() Text(newLabel ? "Changed text" : "Text to be Changed") // Or this form Spacer() if newLabel { Text("Changed text (2)") } else { Text("Text to be Changed (2)") } Spacer() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to FCPXML Creation issue...
Is that just a warning ? Does the file works correctly ? There are many references to similar issues on the web (notably on discussions.apple.com). Did you search ? For instance, this one, where error was due to timecode: https://discussions.apple.com/thread/255188736?sortBy=best
Topic: Media Technologies SubTopic: Video Tags:
May ’24
Reply to Error event - Minimed Mobile App . Triggered by insufficient update interval of the Watch iOS system of only 50 updates/day problem with update interval of the Apple Watch iOS
Welcome to the forum. You have a problem with an existing app ? So this forum is not the right one. you should contact the developer directly. this forum is to be uses for your app, if you have any issue during developpent . So you‘d better close this thread and post it again on minimed forum or send directly to its developer.
May ’24
Reply to Decoding dynamic json
The dictionary "attributes" is always an dictionary but the content inside could be everything. Be more explicit. Is it [String: Any] ? Please show how you have defined the struct that will hold the decoded JSON. How is attributes defined there ? You may find interesting info here: https://stackoverflow.com/questions/44603248/how-to-decode-a-property-with-type-of-json-dictionary-in-swift-45-decodable-pr
Topic: App & System Services SubTopic: General Tags:
May ’24
Reply to A syntax error I'm not understanding...
Problem is that map does not work on Set: https://stackoverflow.com/questions/29107928/swift-map-extension-for-set Even this does not compile: extension IntSet { func aFunction() -> Set<String> { let array: [String] = self.map { "\($0)" } print(array) // This prints correctly let aSet = Set(array) // ERROR: No exact matches in call to initializer return [] //Set(array) // No error here } } If you work on array, no issue typealias IntSet = [Int] //Set<Int> extension IntSet { func aFunction() -> Set<String> { let array: [String] = self.map { "\($0)" } return Set(array) } } I tried what is proposed in the referenced link, to no avail. extension Set { /// Map, but for a `Set`. /// - Parameter transform: The transform to apply to each element. func map<T>(_ transform: (Element) throws -> T) rethrows -> Set<T> { var tempSet = Set<T>() try forEach { tempSet.insert(try transform($0)) } return tempSet } } I got it working by building the set manually extension IntSet { func aFunction() -> Set<String> { var set3: Set<String> = [] for s in self { set3.insert(String(s)) } return set3 } } But building from an array did not work… extension IntSet { func aFunction() -> Set<String> { var array2: [String] = [] for s in self { array2.append(String(s)) } return Set(array2) // Cannot convert return expression of type 'Set<Int>' to return type 'Set<String>' } }
Topic: Programming Languages SubTopic: Swift Tags:
May ’24
Reply to How can I create a custom SignInWithAppleButton that uses only the Apple logo and implements the onRequest and onCompletion logic?
There is an instance method in SignInWithAppleButton: dialogIcon(_:). func dialogIcon(_ icon: Image?) -> some View Unfortunately, not documented (but some limited info here: https://stackoverflow.com/questions/76860051/how-to-change-the-icon-for-confirmation-dialogs-and-alerts-in-swiftui). Did you try it ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
May ’24
Reply to How to prevent Menu view from redrawing?
What does the backend modifies ? Does it modify PresetPicker ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to app rejected
You're supposed to provide requested information. Try to imagine reviewer concern: they see a developer speak in the name a company without any official credential. It could well be someone usurping the name of the company to publish an app without their consent. Reviewer cannot guess you have a (verbal) agreement. If the owner is a friend of yours, that should be pretty easy to get the signed document.
Replies
Boosts
Views
Activity
May ’24
Reply to SwiftData relationships
In the “Vegetable” class, why is the field “notes” an array of type Notes? You may have several notes, so it is logical to get them in an array. What else did you think about ?   Again in the “Vegetable” class does the field “notes” get stored in the database, if so what is stored? By default, all non-computed attributes are stored. Unless you use the @Transient macro.   In the “Note” Class it looks like the whole of the class “Vegetable” gets stored in the variable “vegetable”, which may or may not get stored in the database. With @Relationship, SwiftData knows what needs to be saved to be able to rebuild the relations when needed. This tutorial should give you some insight.
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Submission rejected has mention App Review Guideline 3.1.5(iii)
We just provide decentralized application for users to easily interact with our smart contracts. That's not very clear. What does your app really offers ? Are a you aka go between with exchange organisations ? In any case, I would advise you to very clearly explain as a comment to reviewer, what your app does.
Replies
Boosts
Views
Activity
May ’24
Reply to Apple Developer Reject Because of Report Criminal Activity
My App detects the user's location to provide a list of nearby police, ambulances, etc to use for emergency purposes. AFAIU, that does not change appStore review requirement. As you provide users with police contacts, you have to have an agreement with local authority.
Replies
Boosts
Views
Activity
May ’24
Reply to Swift UI How can I get the click of a button to change the wording of Label
my label should be a state var. And you cannot change with string value, but just reassign a new label: struct ContentView: View { @State private var myLabel = Label("Text to be Changed", systemImage: "circle") var body: some View { Spacer() Button("Change Label Wording"){ myLabel = Label("Changed text", systemImage: "star") } Spacer() myLabel Spacer() } } You could also do it differently. Create a state variable @State private var newLabel = false Toggle in button action: Button("Change Label Wording"){ newLabel.toggle() } Here is a small code snippet to show: struct ContentView: View { @State private var newLabel = false var body: some View { Spacer() Button("Change Label Wording"){ newLabel.toggle() // myLabel.stringValue = "Changed text" } Spacer() Text(newLabel ? "Changed text" : "Text to be Changed") // Or this form Spacer() if newLabel { Text("Changed text (2)") } else { Text("Text to be Changed (2)") } Spacer() } }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to FCPXML Creation issue...
Is that just a warning ? Does the file works correctly ? There are many references to similar issues on the web (notably on discussions.apple.com). Did you search ? For instance, this one, where error was due to timecode: https://discussions.apple.com/thread/255188736?sortBy=best
Topic: Media Technologies SubTopic: Video Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Error event - Minimed Mobile App . Triggered by insufficient update interval of the Watch iOS system of only 50 updates/day problem with update interval of the Apple Watch iOS
Welcome to the forum. You have a problem with an existing app ? So this forum is not the right one. you should contact the developer directly. this forum is to be uses for your app, if you have any issue during developpent . So you‘d better close this thread and post it again on minimed forum or send directly to its developer.
Replies
Boosts
Views
Activity
May ’24
Reply to App Store Connect problem
Maintenance was announced a few days ago to occur on Saturday at 6 am PST. It is working normally (at least for me) now.
Replies
Boosts
Views
Activity
May ’24
Reply to iPad 13'' Display couldn't get
I noticed that there's an option for a 13'' display You have to provide only if it marked as required. If it is marked as optional, it is up to you.
Topic: App & System Services SubTopic: Hardware Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Decoding dynamic json
The dictionary "attributes" is always an dictionary but the content inside could be everything. Be more explicit. Is it [String: Any] ? Please show how you have defined the struct that will hold the decoded JSON. How is attributes defined there ? You may find interesting info here: https://stackoverflow.com/questions/44603248/how-to-decode-a-property-with-type-of-json-dictionary-in-swift-45-decodable-pr
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to A syntax error I'm not understanding...
Problem is that map does not work on Set: https://stackoverflow.com/questions/29107928/swift-map-extension-for-set Even this does not compile: extension IntSet { func aFunction() -> Set<String> { let array: [String] = self.map { "\($0)" } print(array) // This prints correctly let aSet = Set(array) // ERROR: No exact matches in call to initializer return [] //Set(array) // No error here } } If you work on array, no issue typealias IntSet = [Int] //Set<Int> extension IntSet { func aFunction() -> Set<String> { let array: [String] = self.map { "\($0)" } return Set(array) } } I tried what is proposed in the referenced link, to no avail. extension Set { /// Map, but for a `Set`. /// - Parameter transform: The transform to apply to each element. func map<T>(_ transform: (Element) throws -> T) rethrows -> Set<T> { var tempSet = Set<T>() try forEach { tempSet.insert(try transform($0)) } return tempSet } } I got it working by building the set manually extension IntSet { func aFunction() -> Set<String> { var set3: Set<String> = [] for s in self { set3.insert(String(s)) } return set3 } } But building from an array did not work… extension IntSet { func aFunction() -> Set<String> { var array2: [String] = [] for s in self { array2.append(String(s)) } return Set(array2) // Cannot convert return expression of type 'Set<Int>' to return type 'Set<String>' } }
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to How can I create a custom SignInWithAppleButton that uses only the Apple logo and implements the onRequest and onCompletion logic?
There is an instance method in SignInWithAppleButton: dialogIcon(_:). func dialogIcon(_ icon: Image?) -> some View Unfortunately, not documented (but some limited info here: https://stackoverflow.com/questions/76860051/how-to-change-the-icon-for-confirmation-dialogs-and-alerts-in-swiftui). Did you try it ?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to Can a button call a new view without using NavigationStack/Link/View?
You just don't control the "when" directly. Yes, but we can have some control with a dispatch: Button { // CreateUser() //another SwiftUI view, not a function DispatchQueue.main.asyncAfter(deadline: .now() + 3) { showCreate.toggle() } } label: { Text(buttonLabel) }
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
May ’24
Reply to TipKit: "The filter function is not supported in this rule."
Please show more code. How did you declare viewedDetails ?
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
May ’24