Post

Replies

Boosts

Views

Activity

Reply to UserDefaults value is sometimes returning incorrect value
there are users who see this particular screen again when they open the app. Are they hallucinating? Did they see it on another device? Have they deleted and re-installed the app? Did they see a similar screen in a different app with a similar name to yours? Anyway, why are you using NSUserDefaults for this? Can't you store this flag in the filesystem, somewhere that you have control over it, without the layer of opaque Apple magic that NSUserDefaults adds?
Topic: App & System Services SubTopic: General Tags:
Apr ’24
Reply to What was the error in approving the application? - Guideline 5.0 - Legal
I suspect the problem is specifically with the expression "cheat sheet". I fear that the implication of "cheat sheet" in the context of an exam is that it is simply a list of answers to questions that the candidate can memorise to "cheat" in the exam. I guess the documents are all written in Belrussian / Russian? Are you using the phrase "cheat sheet" in an English version of the metadata, or something? In that case, find a better translation for whatever the original expression is than "cheat sheet".
Apr ’24
Reply to How to find missing PrivacyManifest declaration warning reasons
I can find occurrences of the API names as string, but not all of them are API calls (e.g. creationDate which is a custom property). So you're saying that you have your own objC / swift class with a property called creationDate, and that seems to trigger the warning email? That's worrying. You have a few choices: File a bug, ha ha ha. Rename your creationDate property. (I've always used a different capitalisation style than Apple's in order to avoid issues like this.) Just add one of the innocuous reason codes to your privacy manifest.
Topic: Privacy & Security SubTopic: General Tags:
Apr ’24
Reply to How do I get 10 equally spaced points along a CGLine in SwiftUI?
Pseudo-code: total_length = 0 foreach line segment total_length += length(segment) spacing = total_length / 9 // note not 10! seg = first segment seg_start = 0 seg_end = length(seg) for point in 0 ... 9 distance = point * spacing while distance > seg_end seg = next_segment seg_start = seg_end seg_end = seg_start + length(seg) end while frac = (distance - seg_start) / length(seg) pos = lerp(start(seg), end(seg), frac) output pos end for
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Apr ’24
Reply to How do you get the cursor to appear programmatically in a custom UITextInput with UITextInteraction?
Interesting! I also have some code that has for years used UITextInput on a custom view; I was drawing a cursor myself. I've just tried - with a very quick hack - to add UITextInteraction. It seems promising, not least because it provides the loupe (magnifier) functionality. But as you say, the cursor ("beam") is not initially shown. I can enter characters and it does call my caretRectForPosition method for the position where the cursor should be, but it doesn't draw it until I tap somewhere. I'll let you know if I discover anything useful.
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’24
Reply to How to make sysctl and gettimeofday thread-safe in Swift?
Since sysctlbyname is not guaranteed to be thread-safe. Huh? It’s thread-safe. (See below.) Anyway, what are you actually trying to do? It sounds like you’re trying to get the system boot time without using the functions in the “required reasons” list. I don’t think that’s going to end well. Quinn wrote: Some APIs are atomic, that is, they can be called from any thread at any time but they are still subject to races. Your sysctlbyname case is a good example of this because, in the case of a read/write value, you might race with the folks setting that value. I disagree that his sysctl case is a good example of this, because he’s trying to read the boot time, and nothing is writing that while you’re reading it, is it? Have I missed something?
Topic: App & System Services SubTopic: Core OS Tags:
Apr ’24
Reply to Questions about isExcludedFromBackup option and device migration
Are you saying that the user should be able to turn the isExcludedFromBackup option on/off? Yes, indirectly; when the app starts it reads this setting from NDUserDefaults and updates the xattr to reflect it. have you ever been rejected or encountered any problems during app review? Frequently, but not related to this; I doubt think they’ve ever noticed the feature.
Topic: App & System Services SubTopic: General Tags:
Apr ’24