Post

Replies

Boosts

Views

Activity

Reply to Battery level getting from UIDevice is not accurate on iOS17
This has changed in the past; in 2013 it had a resolution of 5%. (Does it depend on the device?) I wasn't aware that it had changed to 1% at some point, but it does seem to be 1% on my current iOS 16 devices. I guess reducing it to 5% is another anti-fingerprinting measure. Back in 2013 I asked for the API to report what rounding it was applying. My requirement was to let the user choose a battery level at which the app would stop doing some background activity. If the user chooses e.g. 2% but the reported value jumps from 5% to 0%, that's not a great user experience. So I wanted to have my slider jump in the same resolution steps as the reported values. Of course the suggestion got zero replies from Apple, as usual.
Topic: UI Frameworks SubTopic: UIKit Tags:
Aug ’23
Reply to Is device fingerprinting allowed for fraud detection purposes?
is it possible to use device fingerprinting for fraud detection purposes? The new "reason required" API rules do not include fraud detection as a permitted reason. I think Apple's advice would be to use identifierForVendor and/or Device Check / App Attest. For example, a device used to create and access multiple fake accounts to engage in fraudulent activities should be able to be identified and blocked. If they don't delete and re-install the app between each fake user, you can detect that with identifierForVendor and/or just creating your own random token in the filesystem. If they do delete and re-install the app for each fake user, I think App Attest's Risk Metric may detect that.
Topic: App & System Services SubTopic: Core OS Tags:
Aug ’23
Reply to write() not working in OS betas for files in App Group, from app and extension
The data in the NSString is all data which can be represented with the ASCII encoding I was caught out a few years ago when the iOS keyboard started automatically converting straight quoutes into curly open- and close-quotes, which are not ASCII. I wonder if something similar is happening to you? Maybe your date-time string has come from a formatter that has changed behaviour? Is there a reason you can’t convert to UTF-8?
Topic: App & System Services SubTopic: Core OS Tags:
Jul ’23
Reply to Save texture as Tiff
My first guess would be that something is trying to undo a pre-multiplied alpha that never happened. Yes, probably. I have a vague recollection that CGImage's default behaviour is not what you expect and you need to set a flag somewhere. Call CGImageGetAlphaInfo and see if it claims to be premultiplied or not. But the numbers don't seem to work out. Is that something to do with gamma? I notice that you have set linearSRGB as the colour space.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’23
Reply to AppStoreConnect API - How to set pricing
Still no word from Apple on setting individual pricing. If anyone has suggestions I'm still looking for a solution. I wrote up how I set IAP pricing here: https://developer.apple.com/forums/thread/732527 You want to set the app's price, right? That's not the same, but maybe my notes will give you some clues. Is there a way for me to report incomplete DocC in the online documentation File a bug, ha ha. or even ask questions? You can ask here. Or Stack Overflow.
Jul ’23
Reply to "Required Reason" API - stat()
I've submitted a request for an additional reason using the form here: https://developer.apple.com/contact/request/privacy-manifest-reason/ I've suggested that an additional reason be added for stat() etc., "to read non-timestamp metadata". I'll update this if I get a reply. I've also submitted a bug (FB12798615) saying that C++ timestamp-reading functions aren't on the list. Of course there isn't a suitable Feedback category for that so it's under "something else". I'll update here if I get a reply.
Topic: Privacy & Security SubTopic: General Tags:
Jul ’23
Reply to SQLite - Select statement to extract 1 year of data
Is there a way to include capturing the latest date as part of the query? SELECT * FROM table WHERE d > date( (SELECT max(d) FROM table), '-1 year' ) With more complex sub-selects, it might look better if you move it to a WITH clause at the start. Turns out that SQLite supports a case statement. So I incorporated that and strftime into my query to adjust the date back to Friday if the current date is Saturday '6' or Sunday '0'. Julian Day Numbers are often useful for calculations like this. It possibly isn't quicker or clearer than what you're currently doing but it's a useful feature to be aware of generally.
Topic: Programming Languages SubTopic: Swift Tags:
Jul ’23
Reply to Battery level getting from UIDevice is not accurate on iOS17
This has changed in the past; in 2013 it had a resolution of 5%. (Does it depend on the device?) I wasn't aware that it had changed to 1% at some point, but it does seem to be 1% on my current iOS 16 devices. I guess reducing it to 5% is another anti-fingerprinting measure. Back in 2013 I asked for the API to report what rounding it was applying. My requirement was to let the user choose a battery level at which the app would stop doing some background activity. If the user chooses e.g. 2% but the reported value jumps from 5% to 0%, that's not a great user experience. So I wanted to have my slider jump in the same resolution steps as the reported values. Of course the suggestion got zero replies from Apple, as usual.
Topic: UI Frameworks SubTopic: UIKit Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to Is device fingerprinting allowed for fraud detection purposes?
is it possible to use device fingerprinting for fraud detection purposes? The new "reason required" API rules do not include fraud detection as a permitted reason. I think Apple's advice would be to use identifierForVendor and/or Device Check / App Attest. For example, a device used to create and access multiple fake accounts to engage in fraudulent activities should be able to be identified and blocked. If they don't delete and re-install the app between each fake user, you can detect that with identifierForVendor and/or just creating your own random token in the filesystem. If they do delete and re-install the app for each fake user, I think App Attest's Risk Metric may detect that.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Aug ’23
Reply to write() not working in OS betas for files in App Group, from app and extension
The data in the NSString is all data which can be represented with the ASCII encoding I was caught out a few years ago when the iOS keyboard started automatically converting straight quoutes into curly open- and close-quotes, which are not ASCII. I wonder if something similar is happening to you? Maybe your date-time string has come from a formatter that has changed behaviour? Is there a reason you can’t convert to UTF-8?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Save texture as Tiff
My first guess would be that something is trying to undo a pre-multiplied alpha that never happened. Yes, probably. I have a vague recollection that CGImage's default behaviour is not what you expect and you need to set a flag somewhere. Call CGImageGetAlphaInfo and see if it claims to be premultiplied or not. But the numbers don't seem to work out. Is that something to do with gamma? I notice that you have set linearSRGB as the colour space.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to AppStoreConnect API - How to set pricing
Still no word from Apple on setting individual pricing. If anyone has suggestions I'm still looking for a solution. I wrote up how I set IAP pricing here: https://developer.apple.com/forums/thread/732527 You want to set the app's price, right? That's not the same, but maybe my notes will give you some clues. Is there a way for me to report incomplete DocC in the online documentation File a bug, ha ha. or even ask questions? You can ask here. Or Stack Overflow.
Replies
Boosts
Views
Activity
Jul ’23
Reply to "Required Reason" API - stat()
I've submitted a request for an additional reason using the form here: https://developer.apple.com/contact/request/privacy-manifest-reason/ I've suggested that an additional reason be added for stat() etc., "to read non-timestamp metadata". I'll update this if I get a reply. I've also submitted a bug (FB12798615) saying that C++ timestamp-reading functions aren't on the list. Of course there isn't a suitable Feedback category for that so it's under "something else". I'll update here if I get a reply.
Topic: Privacy & Security SubTopic: General Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to SQLite - Select statement to extract 1 year of data
Is there a way to include capturing the latest date as part of the query? SELECT * FROM table WHERE d > date( (SELECT max(d) FROM table), '-1 year' ) With more complex sub-selects, it might look better if you move it to a WITH clause at the start. Turns out that SQLite supports a case statement. So I incorporated that and strftime into my query to adjust the date back to Friday if the current date is Saturday '6' or Sunday '0'. Julian Day Numbers are often useful for calculations like this. It possibly isn't quicker or clearer than what you're currently doing but it's a useful feature to be aware of generally.
Topic: Programming Languages SubTopic: Swift Tags:
Replies
Boosts
Views
Activity
Jul ’23