/r/iOSProgramming
A subreddit to discuss, share articles, code samples, open source projects and anything else related to iOS, macOS, watchOS, tvOS, or visionOS development.
There is an extensive FAQ for beginners. Please browse it first before asking questions that are answered there.
If you are looking to get started (iOS programming in general or some specific area), here are more relevant links for you:
There's too many to list them all, however here's a convenient link to all programming guides at apple.com
Take note that this list is live and based on most frequent questions in posts will be updated with "quicklinks".
/r/iOSProgramming
Hello, our app is being rejected with the error Guideline 4.3(a) - Design - Spam.
I am planning to solve the problem by:
Request a 30-minute online meeting with an App Review expert to discuss the guidelines and best practices for a smooth review process.
Is this a solution, and what should I prepare for the meeting?
Looking forward to receiving your experience in handling this case.
Note: We are a non-US or EU development team.
So I've been having an iOS app built by a developer and it's in review process.
Now I have another iOS app that I built on my own and is almost ready to publish.
I also have 2 other Mac apps that might be ready to publish soon. Building myself as well.
I heard from the developer that Apple does not like people who publish too many apps.
The iOS apps are an AI wrapper and somewhat of a novel utility.
The Mac apps are utilities that I built for myself.
So I'm kind of scared of publishing them too closely together and want to see if anyone has any experience with this or recommendations or best practices.
I have made no code changes to our backend in the last three days. The p99 of DeviceCheck validation was previously unpredictable. You can see in the last 3 days, suddenly the p99 is only marginally above the P50. Not sure how many others here perform DeviceCheck validation, but if so would love to see if your data corroborates!
I am trying to write a value to UserDefaults.standard
in iOS swift. It works without a problem when the app is running, but I get an error when the device is closed/locked and I trigger the code via remote notification:
Code:
UserDefaults.standard.set("abc", forKey: "abc")
print("TEST \(UserDefaults.standard.string(forKey: "abc"))")
Output:
Couldn't write values for keys (
abc
) in CFPrefsPlistSource<0x3037e0480> (Domain: com.example, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): Path not accessible
Not updating lastKnownShmemState in CFPrefsPlistSource<0x3037e0480> (Domain: com.example, User: kCFPreferencesCurrentUser, ByHost: No, Container: (null), Contents Need Refresh: No): 78213 -> 78213
TEST Optional("abc")
Is there a way to fix this or work around?
I had a remotely similar issue when downloading and saving files ("access denied"), had to use URLSession.shared.data
and data.write(to: destinationURL, options: .completeFileProtectionUntilFirstUserAuthentication)
to keep it working when the device is closed/locked and code is triggered via remote notification. But how could that be applied to UserDefaults.standard
?
are they coming from the system itself, or are they something I should address?
It is wild, but entry level M4 now beats M2 Pro in the Xcode benchmarks: https://github.com/devMEremenko/XcodeBenchmark
This progress is amazing, but it also makes one implication - Pro devices aren't that good investment anymore.
Historically you could buy a Pro device and use it for 5 years or even more, that is why they were very popular. Now it seems to be more sound to spend 2x less for some entry model and replace it every other year...
I wonder how you guys implemented it would love to learn more and do it the best way
With the release of iOS 16, Apple introduced Live Activities, and later with iPhone 14 Pro, the Dynamic Island—two powerful tools that allow us to present real-time, glanceable updates directly on the Lock Screen and at the top of the screen on the Dynamic Island.
These features are designed to keep users informed about ongoing activities, like delivery tracking, live sports scores, or wait times, without requiring them to unlock their devices or open the app.
In this two-part guide, we’ll discuss everything you need to know to integrate Live Activities and Dynamic Island effectively in your iOS app.
We'll detail each step from understanding design constraints to setting up a Live Activity, handling updates, and adding interactions.
What we're going to cover in this first part,
Blog Post — https://canopas.com/integrating-live-activity-and-dynamic-island-in-i-os-a-complete-guide
Video Tutorial — https://youtu.be/AtxuTtUa3NI?si=TK1QITFDB7i6dI-r
I will be sharing series of articles on what are design systems and how you can implement it in your mobile app developemnt process. If you are interested please let me know what you want me to write about?
I will going through:
I'm developing an app which has the following forms of payment:
Our business ultimately is for physical services. Apps like Uber also has subscriptions and passes, but they're not eligible for IAP. Would our model be considered IAP-eligible then? There's a murky line between what is IAP and what's not, and I'm really confused where my business model falls in. Please help me understand.
Im using AppShortcutsProvider to provide shortcuts and siri phrases for my app intents. My phrases look like:
phrases: [
"Make a payment to \(.applicationName)",
"Make a payment with \(.applicationName)",
"Pay \(.applicationName)",
"Pay my \(.applicationName) bill",
],
When i use siri and invoke one of those phrases Siri brings up a dialog and asks which app I'd like to use:
My App
or
Wallet
is there any way to avoid this and have it go straight to my shortcut?
Hi fellow developers,
I have an app live on app store and one of the user is complaining of a bug that I can't reproduce. Is there a way I can access logs from their device? Something which is easy for a non technical person to do.
I have an app that displays local notifications on iOS. In versions prior to iOS 18.1, changing the app icon would automatically update the notification icon as well. However, in version 18.1, the notification icon remains the same, regardless of any changes to the app icon. Does anyone know how to work around this limitation?
Hello everyone, I’ve been coding in Swift for a while and I feel solid with the actual coding, But I worry that in future interviews if I ever have, I might get thrown off by technical terms I already know in practice but not by name. It’s frustrating because I understand the concepts and use them regularly, but I might struggle to connect what I know to the ‘fancy’ terms if interviewers use, like ‘pattern matching’ or ‘trailing closures.’ Has anyone else faced this? How can I better prepare for the terminology side of interviews so I don’t feel caught off guard?
I help clients solve some issues with their products, and they need us to provide this as an iOS SDK. Our SDK runs locally and is eventually integrated into their code, so we cannot provide it through a remote API. Do you have any good solutions for this?
So I've posted about this before how my websocket was getting turned off when the screen was turned off or switching apps. I'm using react native.
With regard to the capabilities you can choose I had seen push notifications and background processing. I'm not sure how other apps that do real-time dictation do it, is it a local speech model maybe that's shipped with the app vs. sending buffer chunks?
I was just thinking about making a CarPlay app and was just wondering this. I couldn’t get it to work in Xcode and then looked at apples doc. Not sure if I did it correctly or not. Thanks for any help you may provide.
Working with a recently launched app and running their paid ad campaigns on social/search. the founder doesn't want to show the ATT prompt because of the verbiage.
does anyone know what happens if you try to run paid media to the app? i haven't worked with anyone who didn't show the prompt. i'm assuming our ad campaigns are just going to perform much less efficiently BUT i know ATT opt in is quite low so not sure how much it actually helps ad campaigns anyway.
Anybody have experience with this?
Is there a workaround to change the color of left bar to a custom color in Xcode. The color of the left bar is not contrasting well with my custom Xcode theme. I have tried everything.
Hi dev community,
I've run into an interesting situation with App Review that I'd like to get the community's perspective on.
My Safari extension "Protego for Reddit" (a content filter for Reddit) was rejected under Guidelines 2.3.7 for using "Reddit" in the name/subtitle, citing potential customer confusion.
What's puzzling is there are many established apps using the same naming pattern for the app name and subtitle, all currently on the App Store:
I submitted a reply to the app review rejection and they told me that if I disagree with the outcome of their review that I need to file appeal to the App Review Board.
I've already submitted an appeal pointing out these precedents and explaining that the name accurately describes the app's functionality without implying any official association. While I wait for the response, I'm curious about a few things:
My concern is whether I'll need to go through this rejection/appeal cycle with every update, which would significantly impact our ability to push out timely fixes and improvements. I've had to delay two updates due to this issue.
Many of these established apps even use "Reddit" in their subtitles, which makes the rejection of my subtitle "Filter your Reddit Feed" particularly confusing.
Thanks in advance for any guidance or shared experiences!
Hello everybody,
Around a year ago I took a course to learn Swift and continue learning for myself. Since I have a non-programing career and my job was very busy, I stopped my learning process. Now my company change my role to a more relaxing position, I returned back to my learning process.
First thing I notice is that I lack practice. Can someone recommend me a few projects from simple to advance?
Please note that, after I had some self confidence, I want to find a remote a part time work or internship this my main goal.
I have a question about handling subscription changes for my already released iOS app. The app currently has a single subscription group with two plans: monthly and yearly. Currently, subscriptions allow users to view their UV Exposure data from the past 10 days while subscribed. The new version of my app will allow users to see all of their historical UV Exposure data (not just the last 10 days) while they are subscribed. I am not sure how I should approach this change.
My first idea is to modify the subscription description to indicate that it now includes access to all historical data. For example, change the current description from "See past 10 days of UV scores for 1 year" to "See all historical UV scores for 1 year". I'm concerned that changing the description might not pass the review. It could be seen as a 'modification' that impacts existing users, potentially causing confusion even though the modification strictly adds new functionality as an upgrade. Is this a valid concern?
Do I need to create new subscriptions for the "unlimited" access and somehow migrate existing users? Or should I create a new subscription group? I'm lost at how to proceed here. Can someone point me in the right direction? Any help would be greatly appreciated!
I have an iPad app, written in objective-c and distributed through Enterprise developer, as it is not for public use but specific to some large companies.
The app has a local database and works offline
For some functions of the app I need to display images (not edit or cut them, just display them)
Right now there is integrated MWPhotoBrowser viewer, which has not been maintained for almost 10 years, so in addition to warnings in compilation I have to fight with some historical bugs especially on high resolution images. https://github.com/mwaterfall/MWPhotoBrowser
Do you know of a modern and maintained OFFLINE photo viewer? I evaluate both free and paid (maybe an SDK). My needs are very basic
I have found this one https://github.com/TimOliver/TOCropViewController, but I need to disable the photos edit features and especially I would lose the useful feature of displaying multiple images (mwphoto for multiple images showed a gallery)
I'm using NSPersistentCloudKitContainer to save, edit, and delete items, but it only works half of the time. The operations are simple enough:
moc.delete(thing)
try? moc.save()
When I delete an item and terminate the app and reopen, sometimes the item is still there and sometimes it isn't.
Here is my DataController. I'm happy to provide more info as needed
class DataController: ObservableObject {
let container: NSPersistentCloudKitContainer
@Published var moc: NSManagedObjectContext
init() {
container = NSPersistentCloudKitContainer(name: "AppName")
container.loadPersistentStores { description, error in
if let error = error {
print("Core Data failed to load: \(error.localizedDescription)")
}
}
#if DEBUG
do {
try container.initializeCloudKitSchema(options: [])
} catch {
print("Error initializing CloudKit schema: \(error.localizedDescription)")
}
#endif
moc = container.viewContext
}
}