/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
Genuine question for a relative noob with Swift and programming in general, why not built in hot reloading?
Having to rebuild every little change it a real pain in the ass, especially UI elements.
I’m sure there’s a good reason…
Hey guys, I'm only 14 and have decided I want to start earning some money in app creation. But there's a catch. I have to code but have no idea at all. Yes, I have basic knowledge of how coding works like "if" and stuff but I honestly am not very good at coding at all. Can some of you more knowledgable people who have had success please help I need it.
Thanks!
From a wanna be coder
I’m having an issue with Firebase Cloud Messaging (FCM) where direct messages sent via the FCM token work perfectly, but notifications from Firebase Messaging Campaigns don’t reach my iOS app. Here’s what I’ve tried and confirmed so far:
UNUserNotificationCenterDelegate
methods to show notifications when the app is in the foreground.class AppDelegate: NSObject, UIApplicationDelegate, MessagingDelegate, UNUserNotificationCenterDelegate {
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
FirebaseApp.configure()
Messaging.messaging().delegate = self
UNUserNotificationCenter.current().delegate = self
UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound, .badge]) { granted, error in
if granted { print("Notification permission granted") }
}
application.registerForRemoteNotifications()
return true
}
func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
Messaging.messaging().apnsToken = deviceToken
}
func messaging(_ messaging: Messaging, didReceiveRegistrationToken fcmToken: String?) {
print("FCM Token received: \\(String(describing: fcmToken))")
}
func userNotificationCenter(_ center: UNUserNotificationCenter, willPresent notification: UNNotification, withCompletionHandler completionHandler: @escaping (UNNotificationPresentationOptions) -> Void) {
completionHandler([.alert, .badge, .sound])
}
}
I’m working on a WebView-based iOS app that uses WKWebView to load a website, where users log in and receive a token from the backend (verified via JSON response).
I’ve gotten it to the point where I’m on the app, I use login.php to log in, and the token is returned ({ "status": "success", "token": "a597afbd8ec014e787aa490314e447308ace869e1a20d31ae4d7df2098afad82" }).
The token is then supposed to be saved to Keychain and used for future sessions. While I can see the token being returned, my app isn’t saving it or transitioning to the main page after login—it stays stuck on the login page with the JSON.
Can anyone provide advice on properly saving and using the token from WebView to Keychain and handling the session transition? I have been at this for awhile, and any help would be greatly appreciated!
Hello there,
Quick dump about me: I started learning swift ui via the 100daysofswiftui course about two months ago. The reasons I started, are maybe a bit unusual: I really wanted to learn a new skill and programming has always kinda interested me and, I’m kneedeep into all things apple already so I pulled the trigger with App development.
I didn’t start this to land a job, an the way the job market is going I’m glad this is not my main drive, but the drive to learn a skill, and just build a potential foundation for the future, that I might go that route.
( I have no tech background, but I’d say overall a solid understanding on how technology works)
And so far I’ve been having a mostly great time. I’ll probably will publish an app at some point, but here is where the crux come in: I have huge imposter syndrome. Devs where allways people I saw as „above me“. Super smart entities who create software like some kind of god. I understood enough about tech to grasp the complexity of it and that intimidated the hell out of me, wich is why I stated so „late“ (23yo) So now that I’m dipping my toes into this world this feeling is still kinda there. That „real devs“ have something I don’t and that no amount of learning can replicate it. But it is just a feeling. I don’t know how true it is, since this just an expression of my insecurity and admiration for the field and the people working in it.
Now as complexity in the course is ramping up, so are the selfsoubts. I really wanna do this, I’ve come to far to quit, and for that I pushed past my doubts, but it’s getting harder to ignore when I spend 2 hours trying to understand a subject, where I felt like I should known this.
If anyone has any tips, either for learning, my journey or really anything, I’d be grateful. Hearing from people on the field might help me shut down my selfsoubts and adjust expectations.
ChatGPT is recommending for me to go with XCTest. I imagine more companies and people use XCTest instead of the new swift data syntax assuming that's what it is? I'm just hoping to hear from some pros.
Hi all, I'm creating this Focus Launcher app for complete and utter focus for a person and here is the only thing that any person would be getting but nothing else? I personally believe these are the only elements necessary for a person and nothing else if focus is your primary goal and basically if you stop looking at the icons, eventually you stop thinking about it. I'm also trying to place a timer for people to get their personal record without switching to someother app so that they'll know if they are focussing or not?
Now the help I need is am I missing anything and living in my own thoughts or is this helpful and should I continue or make any changes to this
It seems like every time I think I am figuring this out I find another roadblock.
I have textfields that will either have currency at 2 or 3 decimal places.
I tried using a double and find the calculations don’t always come out exact(that will be a problem for this app). I got it to work as decimal until trying to batch write to firebase.
It seems my choice is convert to double and risk the calculations being wrong or save it as a string and then convert it to decimal for calculations.
All of that to ask my question if I save it as a string what would be the correct way to make sure only decimal numbers at 2 or 3 digits are entered.
I implemented a WebRTC-App where you can speak through your microphone and your Mac or another Computer outputs. The only problem is the delay between me speaking and me hearing my voice. The ping is reliably around 7ms but I hear my voice after about 100 -200 ms. Where does this delay come from and is there a way to minimize it? And is there even a way to make the delay smaller?
I took some measures already:
- I turned of RTCMediaConfiguration settings like: noise detection, echo cancellation.
- decreased the IOBuffer
-optimized the opus codec for lower latency.
My memos get lost in the chronological list. When I put them into folders, there's no way to see which ones haven't been put into folders. The database/files are restricted so I can't use another app to manage them.
I know there are a ton of these, but I haven't found anyone who does it quite right. I want there to be an FSNotes for audio memos.
Do you know of any open source projects that meet all of these criteria?
I find myself wishing I could build apps on my phone whenever I am away from home and make tiny personal utility apps for everything
is anyone else here equally as addicted to coding and making iOS apps as me?
Hello everyone,
Like many of us, I have always struggled to find project ideas. Too often, I started projects in fields where I had little knowledge, and most of the time, I never finished them.
Sometimes, we try so hard to find innovative and disruptive ideas that we overlook all the opportunities surrounding us. If you have a job or a hobby, and you make an effort to identify small, daily problems that clients at your job or people involved in your activity face, you will come up with much better ideas and higher chances of success than trying to create something in a field where you lack expertise.
I'm a 20-year-old computer science student and have been tutoring math and physics for four years to high school and middle school students. I've noticed a common problem among all of them: they have great potential but often struggle to reach it due to a lack of organization. I started thinking about solutions to this issue and came up with the idea that an app could be a powerful tool to help them overcome it. This is how I finally created Revisio.
The best part of this approach is that you will find your first users very easily, and you can activate word of mouth quickly just by talking about and showing your app to people you interact with daily. In my case, my first users were my students since I built this app to solve their problems, and they even recommended it to their friends.
I hope you will be more aware of app idea opportunities in your daily life!
Thanks
I’m trying to renew my apple developer account with my debit card that I used last year and it keeps declining, I was wondering if anyone else is experiencing the same issue
I was averaging around 5-7 minutes to Build -> Archive -> Release to test flight
Now I've added a few packages, and modularized my app into different frameworks and now I'm lucky to be finished in 15 minutes. Most of the time is being eaten up by the Archive workflow. Any suggestions or is this normal?
Dear All,
I am currently facing a challenge with updating the contentScaleFactor
of my PKCanvasView
, which is embedded within a custom UIScrollView
. I have configured the PKCanvasView
to have both its maximum and minimum zoomScale
set to 1.0, ensuring that users can only zoom into the UIScrollView
and not directly into the PKCanvasView
.
Upon the completion of a zoom action in my UIScrollView
, a notification is published and received by the PKCanvasView
. This triggers a function intended to update the contentScaleFactor
. However, this process is not functioning as expected.
Despite consulting with several engineers at WWDC24 and exploring multiple potential solutions, the issue remains unresolved.
Interestingly, when zooming into a PDF in the Documents app on iOS 17, the strokes are re-rendered perfectly, while in previous iOS versions, this bug persists in the Documents app.
I would greatly appreciate any insights or solutions from those who might have encountered and resolved this issue.
Thank you in advance for your assistance.
Best regards,
Timon
Im seeing conflicting information about this and am having trouble making this work. I have deep link working via URL scheme in my app to take you to specific flows. When the app is open or backgrounded it works fine, however when the app is forced closed the deep link simply launches the app, but does not do anything further.
SceneDelegate openURLContexts and willConnectTo are simply not called if the app is forced closed. Previous solutions point to didFinishLaunchingWithOptions in AppDelegate when the app is forced closed, but when i check launchOptions?[.url] it is nil.
From a force close, can i use url scemes like myApp://contactus and expect to take action on it?
Edit: figured this out. This wont work from AppDelegate. I was nearly there in SceneDelegate. To open a deep link from urlscheme from force close in SceneDelegate in your scene(_:willConnectTo:options:)
func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
guard (scene as? UIWindowScene) != nil else { return }
//Delay just a moment so the rest of scene delegate can finish loading before acting on your deep link
if let url = connectionOptions.urlContexts.first?.url {
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
self.handleDeepLink(url)
}
}
}
separately add
func scene(_ scene: UIScene, openURLContexts URLContexts: Set<UIOpenURLContext>) {
guard let url = URLContexts.first?.url else { return }
handleDeepLink(url)
}
Looking to build an application that uses Apple Messages for Business. Not sure which Message Service Provider to use—there are a ton.
I can't find a proper comparison anywhere online. I'm trying to evaluate
- Costs
- Ease of use (APIs, docs, etc)
- Reliability (prev worked at a company where messages were consistently not being delivered by our MSP)
Can anyone speak to their experience working with MSPs and offer any recs? Thank you
Hey guys, I[22 M] am a new grad and I got my first job as an iOS developer at one of India’s well known product based company. Pretty much all of India’s youth has this company’s app installed on their iPhone.
I was excited to work for such an app and to build features that could be used by so many people is amazing. It’s only been a couple of months since I started but I am having a really hard time getting adjusted, the deadline are pretty tight, navigating around the codebase is still pretty overwhelming. In the 2 months I worked there I worked on extending some of their already existing features in their other verticals to our platform. And currently am working on a new feature.
But it’s pretty overwhelming with all the process involved, I have my own app on the App Store as well, so I feel like quitting my job and working on my own apps for some time.
But I understand that leaving a well paying job this early in my career could also have negative impact.
So if any senior member could give any advice, I would be very grateful.
Edit: Thank you to all the folks who commented for your valuable advice, I really appreciate it.
P.S: Decided not to quit.
I had signed up for an individual account and then got it converted to an Organization account. My membership details hows Organization, Entity name Shows my organisation name, and Account holder shows My own Name.
My app was published today, and my Developer Name Shows my name instead of my company name, Scrolling down, the Provider name then again shows My organization name
Anyone knows why?
Apple developer Contact webpage just shows empty for me
https://developer.apple.com/contact/
Is it the same with everyone?
I have tried on Chrome, Safari and different networks too
Hello, I made an application where I pull data from the API called TMDB to the app store and show movies and tv shows. The general purpose of my application is to create a portfolio and improve myself. I completed this application and followed the necessary steps to upload it to the app store, this morning I received an e-mail and saw that my application was not accepted.
Guideline 5.2.2 - Legal
Your app contains various copyrighted movies or TV shows. The use of third-party copyrighted materials requires documented evidence of your right to use such content in your app.
Your app and its contents should not infringe upon the rights of another party. In the event your app infringes another party’s rights, you are responsible for any liability to Apple because of a claim.
Next Steps
To resolve this issue, please attach documentary evidence in the App Review Information section in App Store Connect. Once we have reviewed your documentation and confirmed its validity, we will proceed with the review of your app.
Alternatively, please remove the third-party content from your app and its metadata.
I don't fully understand this error, I thought this API was free, I worked hard for this application and I don't want my labor to go to waste, I don't want to make any profit from the application in any way, I just want it to be a portfolio for me. If I need to contact the API owner and get a legal document, I want to do this, I worked hard for this application and I didn't fully understand this e-mail I received, I would like help from more knowledgeable and experienced developers.
My app (Pixquare) is a little bit more than 1 year old and has a substantial user base. A few of them already offered to help develop the app further. I'm also shifting my focus to a new product, so it seems to make sense to open-source the app and utilize the strength of the community.
Has anyone had experience with open-source apps before?
Is it gonna be a problem that a few bad players will clone my code and submit slightly different apps to compete with me? Even if I have proof, I will still need to check the app store and chase after them to make sure those are removed.
Thanks, guys
Let me explain, I have this app, Nivora, it's designed to help backcountry and snow sports enthusiasts stay safe, plus, it provides info about ski resorts.
The app is working fine and honestly I think it is really good looking. Just nobody uses it. I even translated it in a few languages.
Would anyone with experience be interested in helping make it somewhat popular? I would be willing to split the revenue.
As stated in description I have some questions about developing an app on IOS. According to Google’s AI, development could cost between $5000-$250,000. I don’t have investors or really any budget at this time. My question is: Do I, or anybody else for that matter, have to pay for any service (Swift for example) to develop an IOS app if I am not outsourcing the work to develop the app? If I do have to pay some sort of developer like Swift, do any of you know ballpark what the fees are for using the developer to make the app? Sorry if these are stupid questions, I’m just trying to know what it would take to develop an app myself. Never done anything of the sort before. Thanks in advance!
I’ve started my journey into backend engineering and have hopes to work with web and mobile apps as soon as I become proficient and also for practice purposes.