Post

Replies

Boosts

Views

Activity

Reply to Do I need a privacy manifest when using UserDefaults and CloudKit in my app?
I didn't realize that User Defaults contained anything other than the data I write to it. Isn't it strange that Apple chose to add this peculiar "required reason" thing, rather than just fixing NSUserDefaults to do what you and I always thought it did? Maybe it's time to reconsider using UserDefaults at all. Yes, this. The only essential feature of NSUserDefaults is when you implement a Settings.bundle to make your settings appear in the Settings app. (Which, bizarrely, is not covered by any of the reason codes - so you have to lie in your privacy manifest if you use that.) Otherwise, just store your data in the filesystem and avoid all this agro.
Sep ’24
Reply to UnsafeMutablePointer direct exposure.
I directly want to use them in c++ as swift::UnsafeMutablePointer. Why? If it's not true what documentation mean, then what is the manifestation for exposing these UnsafeMutablePointer? We’ve already answered that, it’s just T* I guess you could write: namespace swift { template <typename T> using UnsafeMutablePointer = T*; };
Topic: Programming Languages SubTopic: Swift Tags:
Sep ’24
Reply to How to Upload Achievement Icon Image? (App Store Connect API)
Although it's not listed on that page, I'm fairly sure that these image uploads will also work as described in your second link. If you explore the docs starting from your first link (i.e. GameCenterAchievementImageResponse -> GameCenterAchievementImage -> GameCenterAchievementImage.Attributes -> uploadOperations), you'll get to "Upload instructions for assets such as app previews and app screenshots". Use this as described in your second link, under "Upload the Asset", to perform the actual upload.
Sep ’24
Reply to What is the reason for the CLLocationmanager.locationServicesEnabled() "invoked on main thread" warning?
didChangeAuthorizationStatus ... is not called when I turn location services on and off That surprised me, so I looked at my code, and at the docs. There seem to be two CLLocationManagerDelegate methods, locationManagerDidChangeAuthorization: and locationManager: didChangeAuthorizationStatus:. The latter is deprecated and only briefly documented. The former is specifically documented to be called when the global location services setting is changed by the user: https://developer.apple.com/documentation/corelocation/cllocationmanagerdelegate/locationmanagerdidchangeauthorization(_:)?language=objc Events that Cause Authorization Status Changes ... Turn location services on or off globally in Settings > Privacy > Location Services. So... which of those methods have you implemented? And are you sure that it's not called for you? If so, "file a bug" ha ha ha.
Sep ’24
Reply to Is there a way to detect front camera location on the newest iPad Pro's and Air's?
I don't believe there is an API to get this directly. You need to get the model, i.e. the "iPad13,2" string, and look that up in a table. Get the model by calling uname() and looking in the machine field of the result.
Topic: UI Frameworks SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Issue storing SIMD3<Float> (and other simd’s) in a SwiftData model
It's interesting that the error says Vec4, not 3, isn't it?
Replies
Boosts
Views
Activity
Sep ’24
Reply to vImageConverter_CreateWithCGImageFormat Fails with kvImageInvalidImageFormat When Trying to Convert CMYK to RGB
Are you saying that you've called CGImageGetColorSpace(sourceCGImage) and it correctly reports that the image is CMYK?
Topic: Graphics & Games SubTopic: General Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to DSA trader requirements validating phone
How can I validate a phone number that can't be reached directly? You can't. In the end, I bought a "burner phone", used it once to get the code by text, and then discarded it.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Do I need a privacy manifest when using UserDefaults and CloudKit in my app?
I didn't realize that User Defaults contained anything other than the data I write to it. Isn't it strange that Apple chose to add this peculiar "required reason" thing, rather than just fixing NSUserDefaults to do what you and I always thought it did? Maybe it's time to reconsider using UserDefaults at all. Yes, this. The only essential feature of NSUserDefaults is when you implement a Settings.bundle to make your settings appear in the Settings app. (Which, bizarrely, is not covered by any of the reason codes - so you have to lie in your privacy manifest if you use that.) Otherwise, just store your data in the filesystem and avoid all this agro.
Replies
Boosts
Views
Activity
Sep ’24
Reply to Why I am seeing "Grace Period" events for my new subscription app?
FB15090356 Anyway... does anyone else see this?
Replies
Boosts
Views
Activity
Sep ’24
Reply to Why I am seeing "Grace Period" events for my new subscription app?
IAP Apple ID, transaction Ids, How would I get transaction IDs?
Replies
Boosts
Views
Activity
Sep ’24
Reply to UnsafeMutablePointer direct exposure.
I directly want to use them in c++ as swift::UnsafeMutablePointer. Why? If it's not true what documentation mean, then what is the manifestation for exposing these UnsafeMutablePointer? We’ve already answered that, it’s just T* I guess you could write: namespace swift { template <typename T> using UnsafeMutablePointer = T*; };
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UnsafeMutablePointer direct exposure.
Can you Explain what does this mean? If you want, file a bug against the docs asking for that page to be explicit about how those pointer types map. The answer, as mentioned above, is that the Swift mutable pointer types map to * and the immutable pointer types map to const *.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Returning Reference from Swift Function
Are you trying to implement a singleton?
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to UnsafeMutablePointer direct exposure.
Is it not simply: swift::Int* x = Interop::GetPointer(); ? (That's just a guess, I've never used this. But I think the whole point of "unsafe mutable pointer" is that it's Swift's way of spelling "*".)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to Do I need a privacy manifest when using UserDefaults and CloudKit in my app?
User Defaults is, for some reason that I don't understand, a "required reason" API. So you have to mention that. See https://developer.apple.com/documentation/bundleresources/privacy_manifest_files/describing_use_of_required_reason_api
Replies
Boosts
Views
Activity
Sep ’24
Reply to Copy Creation when we pass primitive type such as Int to a Swift Function.
does copy gets created or not here? Yes, the int is copied. (Why do you ask? What alternative behaviour can you imagine?)
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Sep ’24
Reply to How to Upload Achievement Icon Image? (App Store Connect API)
Although it's not listed on that page, I'm fairly sure that these image uploads will also work as described in your second link. If you explore the docs starting from your first link (i.e. GameCenterAchievementImageResponse -> GameCenterAchievementImage -> GameCenterAchievementImage.Attributes -> uploadOperations), you'll get to "Upload instructions for assets such as app previews and app screenshots". Use this as described in your second link, under "Upload the Asset", to perform the actual upload.
Replies
Boosts
Views
Activity
Sep ’24
Reply to What is the reason for the CLLocationmanager.locationServicesEnabled() "invoked on main thread" warning?
didChangeAuthorizationStatus ... is not called when I turn location services on and off That surprised me, so I looked at my code, and at the docs. There seem to be two CLLocationManagerDelegate methods, locationManagerDidChangeAuthorization: and locationManager: didChangeAuthorizationStatus:. The latter is deprecated and only briefly documented. The former is specifically documented to be called when the global location services setting is changed by the user: https://developer.apple.com/documentation/corelocation/cllocationmanagerdelegate/locationmanagerdidchangeauthorization(_:)?language=objc Events that Cause Authorization Status Changes ... Turn location services on or off globally in Settings > Privacy > Location Services. So... which of those methods have you implemented? And are you sure that it's not called for you? If so, "file a bug" ha ha ha.
Replies
Boosts
Views
Activity
Sep ’24