Post

Replies

Boosts

Views

Activity

I am getting validation error message creating sandbox tester account.
I am having trouble creating a sandbox tester account in App Store. I keep getting an error message saying there are one or more validation errors when I click on "Invite", but there are no indications of any errors. None of the fields are marked with red for an error.What is going on? Is there a limit of the number of sandbox tester accounts I can create? Is anyone else having trouble with this?
66
1
46k
Aug ’21
Contacts Framework CNFetchResult
Anyone ever use CNFetchResult successfully? I find nothing on the internet, on stackoverflow, and in Apple Developer Forums. The only thing I have found is Apple Documentation for it. It says CNFetchResult is a Generic Class. What exactly does that mean. I found an explanation that gives its definition, but the rest of the explanation is very long winded.
10
0
1.5k
Mar ’22
sort array of dictionaries
How do I sort an array of dictionary objects based on the value of the dictionary? I understand I should use the sorted method of the array, but I don't understand the notation that uses $0.1 and $0.0. Where is the documentation on that?
9
0
6.6k
Jan ’22
How do I cause a timer to fire while the app is in the background?
When I write code for a timer like below, the timer doesn't fire if the device is locked. How do I cause the code in the timer closure to run when the app is in the background? Are there any other ways to cause specific code to run at a certain time when the app is in the background? func setTimer(alarm: UTIAlarm) { let timer = Timer(fire: alarm.date!, interval: 0, repeats: false) { (timer: Timer) in print("timer fire \(self.dateFormatter.string(from: alarm.date!))") do { try AVAudioSession.sharedInstance().setActive(true, options: .notifyOthersOnDeactivation) } catch { print("Failed to setActive AVAudioSession from timer closure.") print(error.localizedDescription) } let predicate = MPMediaPropertyPredicate(value: alarm.mediaItem!.title, forProperty: MPMediaItemPropertyTitle) let query = MPMediaQuery() query.addFilterPredicate(predicate) self.playerController!.setQueue(with: query) self.playerController!.play() } runLoop.add(timer, forMode: .default) timers.append(timer) }
Topic: UI Frameworks SubTopic: UIKit Tags:
7
0
3.7k
Oct ’21
Environment variables
In Info.plist of my Xcode project, I see for instance "Executable file" is set to "$(EXECUTABLE_NAME)". I believe that "$(EXECUTABLE_NAME)" is called an environment variable. What I'd like to know is where is that environment variable set. I'd like to see where all the environment variables are set so I can use those values.
6
0
12k
Sep ’21
"Failed to prepare device for development." with Xcode 13.2.1 and iOS 15.4 device
I'm getting message "This operation can fail if the version of the OS on the device is incompatible with the installed version of Xcode. You may also need to restart your mac and device in order to correctly detect compatibility." when I try to run an Xcode iOS project on my iPhone 8. I'm using Xcode 13.2.1 and iOS 15.4 on my iPhone 8. This post in this forums gives the solution to restart the iOS device and I did that and also restarted the mac. My Mac has macOS Monterey 12.3. My Xcode, Mac, and iPhone 8 all have the most recent updates. That post gives an answer for the same problem but with iOS 15.2. I have recently changed settings in my iPhone 8 in Accessibility. Could that affect anything?
4
0
4.2k
Jun ’23