Post

Replies

Boosts

Views

Activity

Reply to Casino app appears on appstore
Gambling apps are not forbidden nor censored but strictly controlled. See guidelines 5.1.1: (ix) Apps that provide services in highly regulated fields (such as banking and financial services, healthcare, gambling, legal cannabis use, and air travel) or that require sensitive user information should be submitted by a legal entity that provides the services, and not by an individual developer. Do you know if those apps follow those rules ? If you know they don't (but how could you ?), you could file a bug report.
Jul ’24
Reply to Difference between private and fileprivate?
You'll get this type of information in Swift programming language. fileprivate Apply this modifier to a declaration to indicate the declaration can be accessed only by code in the same source file as the declaration. private Apply this modifier to a declaration to indicate the declaration can be accessed only by code within the declaration's immediate enclosing scope. For a more comprehensive explanation with examples: https://www.avanderlee.com/swift/fileprivate-private-differences-explained/ I personally prefer using private.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’24
Reply to Are tinted app icons required in iOS 18?
Then the system will perform its own tinting if user asks for it, which may lead to a result you don't like. But it is not required to provide a tinted version of app icon: iOS and iPadOS support three stylistic variations for app icons: Light, Dark, and Tinted. You can create your own variations to ensure that each one looks exactly the way you way you want. If you prefer, you can take advantage of the system’s automatically generated treatment that is applied to all app icons. It is crafted intelligently to preserve design intent and maintain legibility. This also helps maintain a consistent visual experience across the Home Screen. https://developer.apple.com/documentation/xcode/configuring-your-app-icon
Topic: Design SubTopic: General Tags:
Jul ’24
Reply to Bad user experience because of NFC timeouts
You should file a bug report, as I suspect it is not possible to modify those timeouts which are set for maximum security. have you a way to notify user that he/she should present the card promptly ? Or could the trick described here for Apple Pay work in your case ? https://stackoverflow.com/questions/58463408/how-can-i-increase-the-failure-timeout-of-an-apple-pay-operation
Topic: App & System Services SubTopic: General Tags:
Jul ’24
Reply to ContentView
Welcome to the forum. only thing I see when I launch the Simulator and I open my app the only thing I see is a white page. So this is not the Preview, but the app on simulator. Please give more precise information: source code screenshot of what you get (Preview or Simulator ?)
Jul ’24
Reply to How can we delete posts?
Unfortunately, we can't, even when there's no answer yet to it, unless moderator does it. Only option, as you posted less than 1 hour ago is to edit it, change the title (Post deleted for instance) and leave quasi empty content (that's probably what you did already)… Not really cool, but that's it.
Jul ’24
Reply to How to create a variable that can be used or changed in all swift files
Welcome to the forum. as @ssmith_c has told, your question is hard to understand. What is your environment ? Playground ? app development ? SwiftUI or UIKit… What is home ? Are settings the settings of your app in iOS settings ? If so, you have to create a settings bundle. See complete details here: https://makeapppie.com/2016/03/14/using-settings-bundles-with-swift/ So, please explain so that we can better help.
Jul ’24
Reply to A new message 'Answered by forumsContributor in' with a link to nowhere
While investigating, here is another bug I noticed: I received an email notifying that my answer was recommended by Apple. Going to the thread https://developer.apple.com/forums//thread/758452?answerId=793464022#793464022, I noticed that the correct answer was, logically, the DTS's answer, not mine which was just for asking for more information. Filed a bug report: FB14172207
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
as soon as I try it out with other matrices, the function crashes with this error: 'Matrix is structurally singular'. Could you show examples of Matrix that cause crash ? It would be surprising that any other matrix be singular. Unless it is not the original matrix but some derived one.   However, the other leastSquaresSolution-method that I initially wrote also returns zero's Did you post this method, to see the difference ?
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
The article does not give complete code, so you probably had to complete for your own code. If I understood it correctly, the SparseSolve function changes x, which in turn changes xPtr and xValues. x is passed as a parameter (and const) to the function, so it is not modified by SparseSolve. To be clear, I did not analyse nor understand the details of how SparseSolve works, but I looked at the doc for SparseSolve (however I did not find one that returns a status), and it seems to be a bit different: let xValues = [Double](unsafeUninitializedCapacity: n) { buffer, count in bValues.withUnsafeMutableBufferPointer { bPtr in let b = DenseVector_Double(count: 3, data: bPtr.baseAddress!) let x = DenseVector_Double(count: 3, data: buffer.baseAddress!) SparseSolve(factorization, b, x) count = n } } On return, xValues contains the values [1.0, 2.0, 3.0]. Here, xValues is changed in the completion handler. Could you try to replicate this ?
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
Much better with the comments. However, I still do not catch where xValues is modified (initialised as zeros). It should be in this part, correct ? bValues.withUnsafeMutableBufferPointer { bPtr in xValues.withUnsafeMutableBufferPointer { xPtr in // Construct the matrices B and x in Ax = B let b = DenseVector_Double( count: Int32(B.count), data: bPtr.baseAddress! ) let x = DenseVector_Double( count: Int32(A.transpose().count), data: xPtr.baseAddress! ) // Try to find X with SparseSolve (this is where it seems to go wrong) let status = SparseSolve(SparseLSMR(), a, b, x, SparsePreconditionerDiagScaling) if status != SparseIterativeConverged { fatalError("Failed to converge. Returned with error \(status).") } } } through the change of xPtr. Correct ? But where is xPtr modified ?
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’24
Reply to iOS 18 and iPhone 12 battery
Your question is about product performance. Sio that's not a question for the developers forum. You'd better ask on Apple Support Community https://discussions.apple.com/welcome or file a bug report.
Replies
Boosts
Views
Activity
Jul ’24
Reply to Casino app appears on appstore
Gambling apps are not forbidden nor censored but strictly controlled. See guidelines 5.1.1: (ix) Apps that provide services in highly regulated fields (such as banking and financial services, healthcare, gambling, legal cannabis use, and air travel) or that require sensitive user information should be submitted by a legal entity that provides the services, and not by an individual developer. Do you know if those apps follow those rules ? If you know they don't (but how could you ?), you could file a bug report.
Replies
Boosts
Views
Activity
Jul ’24
Reply to Difference between private and fileprivate?
You'll get this type of information in Swift programming language. fileprivate Apply this modifier to a declaration to indicate the declaration can be accessed only by code in the same source file as the declaration. private Apply this modifier to a declaration to indicate the declaration can be accessed only by code within the declaration's immediate enclosing scope. For a more comprehensive explanation with examples: https://www.avanderlee.com/swift/fileprivate-private-differences-explained/ I personally prefer using private.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Are tinted app icons required in iOS 18?
Then the system will perform its own tinting if user asks for it, which may lead to a result you don't like. But it is not required to provide a tinted version of app icon: iOS and iPadOS support three stylistic variations for app icons: Light, Dark, and Tinted. You can create your own variations to ensure that each one looks exactly the way you way you want. If you prefer, you can take advantage of the system’s automatically generated treatment that is applied to all app icons. It is crafted intelligently to preserve design intent and maintain legibility. This also helps maintain a consistent visual experience across the Home Screen. https://developer.apple.com/documentation/xcode/configuring-your-app-icon
Topic: Design SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Question about preview using code in SwiftUI
If I'm right the correct syntax is struct ContentView_Previews: PreviewProvider and not struct ContentView_Preview:PreviewProvider Note the "s"
Topic: UI Frameworks SubTopic: SwiftUI
Replies
Boosts
Views
Activity
Jul ’24
Reply to Bad user experience because of NFC timeouts
You should file a bug report, as I suspect it is not possible to modify those timeouts which are set for maximum security. have you a way to notify user that he/she should present the card promptly ? Or could the trick described here for Apple Pay work in your case ? https://stackoverflow.com/questions/58463408/how-can-i-increase-the-failure-timeout-of-an-apple-pay-operation
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to ContentView
Welcome to the forum. only thing I see when I launch the Simulator and I open my app the only thing I see is a white page. So this is not the Preview, but the app on simulator. Please give more precise information: source code screenshot of what you get (Preview or Simulator ?)
Replies
Boosts
Views
Activity
Jul ’24
Reply to How can we delete posts?
Unfortunately, we can't, even when there's no answer yet to it, unless moderator does it. Only option, as you posted less than 1 hour ago is to edit it, change the title (Post deleted for instance) and leave quasi empty content (that's probably what you did already)… Not really cool, but that's it.
Replies
Boosts
Views
Activity
Jul ’24
Reply to Xcode Says " 'App' is only available in macOS 11.0 or newer "
What about the package itself. Are the minimum deployment you show (macOS 14.0) for this package ? Is it a package you developed or one you imported ?
Replies
Boosts
Views
Activity
Jul ’24
Reply to How to create a variable that can be used or changed in all swift files
Welcome to the forum. as @ssmith_c has told, your question is hard to understand. What is your environment ? Playground ? app development ? SwiftUI or UIKit… What is home ? Are settings the settings of your app in iOS settings ? If so, you have to create a settings bundle. See complete details here: https://makeapppie.com/2016/03/14/using-settings-bundles-with-swift/ So, please explain so that we can better help.
Replies
Boosts
Views
Activity
Jul ’24
Reply to App screenshots - PNG or JPG?
I always use png. I think it is safer (note that's the format generated by simulator screen shots).
Replies
Boosts
Views
Activity
Jul ’24
Reply to A new message 'Answered by forumsContributor in' with a link to nowhere
While investigating, here is another bug I noticed: I received an email notifying that my answer was recommended by Apple. Going to the thread https://developer.apple.com/forums//thread/758452?answerId=793464022#793464022, I noticed that the correct answer was, logically, the DTS's answer, not mine which was just for asking for more information. Filed a bug report: FB14172207
Replies
Boosts
Views
Activity
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
as soon as I try it out with other matrices, the function crashes with this error: 'Matrix is structurally singular'. Could you show examples of Matrix that cause crash ? It would be surprising that any other matrix be singular. Unless it is not the original matrix but some derived one.   However, the other leastSquaresSolution-method that I initially wrote also returns zero's Did you post this method, to see the difference ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
The article does not give complete code, so you probably had to complete for your own code. If I understood it correctly, the SparseSolve function changes x, which in turn changes xPtr and xValues. x is passed as a parameter (and const) to the function, so it is not modified by SparseSolve. To be clear, I did not analyse nor understand the details of how SparseSolve works, but I looked at the doc for SparseSolve (however I did not find one that returns a status), and it seems to be a bit different: let xValues = [Double](unsafeUninitializedCapacity: n) { buffer, count in bValues.withUnsafeMutableBufferPointer { bPtr in let b = DenseVector_Double(count: 3, data: bPtr.baseAddress!) let x = DenseVector_Double(count: 3, data: buffer.baseAddress!) SparseSolve(factorization, b, x) count = n } } On return, xValues contains the values [1.0, 2.0, 3.0]. Here, xValues is changed in the completion handler. Could you try to replicate this ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’24
Reply to Peculiar EXC_BAD_ACCESS, involving sparse matrices
Much better with the comments. However, I still do not catch where xValues is modified (initialised as zeros). It should be in this part, correct ? bValues.withUnsafeMutableBufferPointer { bPtr in xValues.withUnsafeMutableBufferPointer { xPtr in // Construct the matrices B and x in Ax = B let b = DenseVector_Double( count: Int32(B.count), data: bPtr.baseAddress! ) let x = DenseVector_Double( count: Int32(A.transpose().count), data: xPtr.baseAddress! ) // Try to find X with SparseSolve (this is where it seems to go wrong) let status = SparseSolve(SparseLSMR(), a, b, x, SparsePreconditionerDiagScaling) if status != SparseIterativeConverged { fatalError("Failed to converge. Returned with error \(status).") } } } through the change of xPtr. Correct ? But where is xPtr modified ?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’24