/r/iOSProgramming

Photograph via snooOG

A subreddit to discuss, share articles, code samples, open source projects and anything else related to iOS, macOS, watchOS, tvOS, or visionOS development.

FAQ

About

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:

  • Swift or Objective-C? if you don't know which language to choose. (New posts asking this will be removed)

Related Subreddits

Related Links

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

150,787 Subscribers

0

Check Out My iOS App: ‘Happy Hour: Cocktail Recipes’ – Feedback Appreciated

https://i.redd.it/9bfq0xee0v6e1.gif

Hi everyone! I’d love to share my app, Happy Hour: Cocktail Recipes, and give you a behind-the-scenes look at my journey creating it. This project started as a way to store my favorite cocktail recipes and explore Swift outside of my job, but it turned into a year-long effort filled with challenges and learning experiences.

About the App

Happy Hour: Cocktail Recipes is designed for cocktail lovers of all levels. It features:

  • A vast collection of cocktail recipes, from classics to creative originals.
  • Ingredient-based search: Select the ingredients you have at home and instantly see which cocktails you can make, along with suggestions for what you’re missing to complete other recipes.
  • A custom recipe builder to save and create your own unique drinks.
  • Stunning, minimalistic UI with beautifully designed recipe cards.
  • A one-time payment unlocks a few premium features—no ads, ever!

My Development Journey

I wanted an app that looked beautiful but was also simple and functional. I drew inspiration from another app, Highball, and spent countless hours tweaking the design to ensure it remained user-friendly.

That said, designing the UI without much experience turned out to be incredibly time-consuming. I’ve learned that it’s best to focus on core functionality first before diving too deep into the design. Balancing app development with my job and personal life was also tough, so I dedicated weekends to working on the app consistently.

Learning SwiftData was another big challenge since it was new to me. While I enjoyed its simplicity, working with the Query wrapper and complex predicates was a trial-and-error process.

Lessons Learned

  • UI Takes Time: Designing a visually appealing app is difficult without experience. Start with the core functionality before diving into design.
  • Be Persistent: Small, consistent efforts (like working weekends) add up over time.
  • Listen to Feedback: User input is invaluable for identifying improvements and bugs you might miss.

I’d love to hear your thoughts on the app! Check it out here: Download Happy Hour: Cocktail Recipes on the App Store

Feel free to ask me questions or share feedback on the app’s design, functionality, or overall experience. Cheers 🍹!

0 Comments
2024/12/14
18:45 UTC

1

[Jailbreak dev] Error linking library with Theos

Hi, so I made a library because there's some stuff that I always use in my tweaks. In the makefile, I set `LIBRARY_NAME = libxelahot`. I compile it and it generates a `libxelahot.dylib` file.

In my other tweak's makefile, I try to link the library like this `MemEdit_LIBRARIES = xelahot` (I saw somewhere that I need to remove the "lib" prefix here). I also copied over the `libxelahot.dylib` file to my theos lib folder `/var/jb/var/mobile/theos/lib/libxelahot.dylib`. I also added my library's header file in `/var/jb/var/mobile/theos/include/xelahot/Utils/Utils.h` (that i'm not sure yet if it's ok).

When I compile my tweak, it gives me this error: `ld: library not found for -lxelahot`. I'm not sure why it can't find it.

0 Comments
2024/12/14
18:45 UTC

1

Best Websites built in Vapor/Leaf?

Was looking for the best examples of websites built with Swift to see what’s possible…

1 Comment
2024/12/14
18:34 UTC

1

My First App - Podcast & Audio Summary for Books, Booklists and More (with Free Early Tester Code)

Hi everyone!

Acorn is a podcasts and bite-sized audio summaries App about books, curated booklists, expert insights, and trending topics like technology, history, arts, health, aging and more. This is my very first project as a small team, and we’re launching in early access to gather feedback and connect with our first users. We are more than happy to build around the content and features you are interested in.

In the past week after launch, I have received great feedback from other subreddits. I have added more content plus improved player experience. I also extend early access through out 2025 so that early testers can explore it for a longer period. Hope Acorn can be your first book buddy in the coming 2025.

Download:

IOS: https://apps.apple.com/us/app/acorn-listen-relax-discover/id6737609162?platform=iphone

Android: https://play.google.com/store/apps/details?id=ai.acornx.acorn.discover

Early Tester code: F10719

My Goal with Acorn
Acorn started from my love of exploring books, podcasts, and stories—Also Reddit has always been my go-to for discovery. I wanted to create a seamless audio experience that makes knowledge and inspiration feel effortless like carrying a TED Talk in your pocket. It is not just about books - neither I want to replace reading - But I want to create a more fun way to explore and connect the dots among insightful ideas.

If anyone's interested in full membership when we have official release, let me know! Thanks for your support.

0 Comments
2024/12/14
18:21 UTC

1

Xcode Predictive Code Completion vs GitHub Copilot Xcode Plug-In?

Any experience between these two tools? Which one is more accurate and effective? Especially now that Copilot for Xcode has been released, no more pre-release version, thanks

0 Comments
2024/12/14
18:09 UTC

2

Type inference & annotation

🎉 I just finished Day 4 of the #100DaysOfSwiftUI at https://www.hackingwithswift.com/swiftui/4 via @twostraws

Golly…. This has been quite a lot. Did my second checkpoint, did get it after a lot more time than I expected but hey, making progress!

1 Comment
2024/12/14
17:53 UTC

3

I recently published my first iOS App, a lottery scratch ticket game called Scratch Away!

Hey everyone,

I first posted about this app two weeks ago, and I wanted to thank everyone for their feedback and questions.

Since then I've been working on some promotional videos, here are the first two:

Crossword: Scratch Away! We have Crossword!

Bingo: Scratch Away! We have Bingo!

 

About the app

It's a single-developer game exclusively in the iOS App Store for iPhone and iPad called Scratch Away! A lottery scratch ticket simulation game, where you win in-game hearts to use to buy scratch tickets. There are 20 unique tickets in the launch version, including games like Bingo, Crossword, Blackjack, and Poker (plus a few more).

The idea is a buy once, play forever game without any micro transactions or in-app purchases. It seems that most of the lottery games in the App Store are just freemium games with the intention of getting the user to pay as much as they can. So I hope that Scratch Away! can fill a void so people can just play as many scratch tickets as they like without having to continuously spend real money. (I also show how much real money you would have lost in the list of game stats).

The game itself is something I would consider very casual. With money removed from the equation, I feel that scratch tickets become a very relaxing experience, just pick up a few tickets here and there and play at your leisure. The scratching experience on the phone actually ends up being quite meditative and is surprisingly satisfying (I think!).

Game website: https://scratchaway.ca

App Store: https://apps.apple.com/us/app/scratch-away/id6738307765

 

About the development

Here's a list of some of the more interesting challenges I worked on during the development. If you're interested, feel free to ask any questions about these or any other areas of the app:

Syncing with Game Center - The app syncs two different file types through Game Center. A player file with stats, score, tickets owned, unlocks, etc. It also syncs a single tickets' scratch state if you back out of a ticket part way through (say you're playing a large bingo card and put it down half way through), you can continue on another device and your exact set of scratches will be there as well. (This also prevents you from winning the ticket separately on each device).

Using Metal to analyze images - I use metal to determine the exact scratch percentage of every tile on a ticket. There's different tasks you can do with metal, like transforming an image, passing in image A and getting image B back, and you can also just analyze the image, pixel by pixel, and return a result based on that (a count, bool, or struct). All GPU optimized and performed in the background.

UIViews with 3D perspective using CATransform3D - I created this ticket carousel view that responds to touch events and can be spun with a deceleration effect. I made it generalized class with a delegate/dataSource pattern akin to UICollectionView. (I also added a mirror effect to each card on the bottom).

Masking a "hole" in a view that can be moved around - As part of my tutorial, I wanted to have an overlay, but also allow a peek at a control underneath. On top of that, I wanted to be able to move the peek-through like a spotlight. This ended up being a bit tricky, but once I came up with the concept, I was able to encapsulate it within a view and a clean API.

Full Dependency Injection - This is much more about the code base, but I came into this project with a desire to do full dependency injection starting at the Scene Delegate. This won't be interesting if you're not familiar with DI, but if you are, I'm happy to talk about my methodology and tools here. The main focus is to use the DI stack for your reusable non-UI controllers/objects only, and once you get to the UI layer to manage it via builders. A builder can build a UI object and hold all of the necessary dependencies, but UI objects should themselves not be held in the DI graph.

 

That's it for now, thanks so much for checking it out.

0 Comments
2024/12/14
17:21 UTC

6

Best way to write personal apps for iOS

I want to write my own productivity apps for my iPhone. Simple voice command things, shortcuts aren’t powerful enough.

In a competent developer but I don’t want to pay 100 pounds just for the privilege of deploying an app for 14 days on your own device.

7 Comments
2024/12/14
16:16 UTC

1

Xcode Predictive Code Completion not working after 16.1/Sequoia 15.1.1 update?

I noticed after updating my OS and Xcode versions that predictive code completion suggestions stopped populating. Has anybody else noticed this? I tried disabling and reenabling, but that didn’t seem to do anything.

1 Comment
2024/12/14
14:26 UTC

0

Old IOSSimulator delete

Not sure in which community to post this, old simulator files files take up space in system data, I tried to find a way to delete them but they are not located in

~/Library/Developer/CoreSimulator/Devices

Therefore it is not a simulator runtime. After some digging the simulator files are saved as a volume on my disk. How to properly delete this un-needed data? Do I just.. format the volume and extend the existing volume? Im still new on macOS and I don't want to ruin some system files.

Edit* - I can't seem to add images on this post

1 Comment
2024/12/14
13:23 UTC

2

I'm changing the subscriptions on my app and need your opinion

I have a well-being app focusing on sleep and stress tracking, and also offering workout analysis.

Currently, I have 3 subscription options: monthly, yearly, and one-time purchase.

Yearly has a 3-day free trial, and some of you said that you would start a free trial if it was on the monthly...

Do you think that I should change monthly to include a free trial, and should I keep it on the yearly?

1 Comment
2024/12/14
13:02 UTC

6

Published My first App ever as an architect and released it on App Store! -MeowFocus Productivity Timer

Evening guys!

I am Excited to announce my first app released on the App Store!

I work in architecture industry for 6 years, but always have a dream to develop an app or a game since my childhood. Back when AI or IT technology were not that advance(2005-2008ish), my parents were not a big fan for me to become an IT related person, so I took the path of architecture all the way till now.

This year I'm turning 33, and I decided to take some time off, just go for it before I feel too old to do so. So I took solid 3 months to learn by myself using online tutorial videos and AI tools, ended up developed this app from scratch as a person with zero coding background.

The app is called MeowFocus, essentially a furry friend that naps when you set the timer up and study/work, and will got waken up if you are using the phone for other purpose during the session. You get rewarded coins for completing the session, and they can be used to buy cute outfits for the cat to put on.

My strong will motivated me to create a non-complex, just simple and heart-warming timer with no overwhelming analytical features and fancy widgets flowing all over the screen.

I was a solid focus timer user back when I was in uni. I was feeling those unessential analytical features overloaded my attention. I became less focused on the actual task but more on the statistical performance the app showed me and drowned in the charts.

So, here I am with my product. It is a simple, minimalistic productivity timer app with a cute little cat to accompany you while you focus on your task, with a straightforward reward system.
it is

Note: I know the app isn't perfect, the current Version doesn't allow background or lockscreen timer running(will push notification even it's lock screen), which is a bit counter-intuitive, so I have already updated with an updated version for Apple to review that has 'focus mode' on/off so you can choose whether you allow the timer to run in the background or not, it should be available soon next week.

Let me know what you think of my app, and feel free to reach me if you have any questions or suggestions. Any positive feedback on App store would be appreciated! Free trial available for 14 days.

Avaliable on App Store for iPhone: https://apps.apple.com/au/app/meowfocus-productivity-calm/id6738399628

https://i.redd.it/drg5iaeh4t6e1.gif

4 Comments
2024/12/14
12:23 UTC

0

Looking for React native devs

So I run a software agency and I'm looking for some react native devs experience with IOS.

I'm hiring as contact based anyone interested DM me.

Looking for someone form india.

0 Comments
2024/12/14
11:48 UTC

92

Made My First $20 From My First Ever App – Feeling Proud and Grateful 🎉

Hi iOS Devs,

I just wanted to share a small but meaningful milestone with you all. I recently launched my first app, BrickInvest, on the App Store, and something incredible happened: 4 people have actually spent money inside the app! That might not sound like a lot, but it feels surreal to say I’ve made my first $20 from something I built.

BrickInvest is an app for LEGO enthusiasts to track the value of their collections, monitor price trends, and organize their sets. As a huge LEGO fan myself, I wanted to create something that I’d use – and to see other people finding it valuable enough to support has been the most rewarding feeling.

This is my first-ever product launch, and there’s been a lot of learning along the way (and plenty of nerves). Seeing those first few in-app purchases has given me a huge boost of confidence, and I can’t wait to keep improving the app based on feedback.

I know it’s not a huge win compared to others here, but I wanted to share because it feels like a small step towards something bigger. If anyone else is just starting out, I hope this encourages you to keep going. Even small wins can feel amazing.

The app has been out for only about 2 weeks, yet i still feel proud!

Thanks for reading – and if anyone has advice, thoughts, or just wants to chat about first launches, I’d love to hear from you!

Cheers,
Andreas

31 Comments
2024/12/14
09:07 UTC

1

Xcode: Switching targets leads to very long build time every time

After I change the target in a project of mine it takes 5 minutes to build. If I change something in the code and run it again, the next build launches almost immediately so whatever caching Xcode is doing it works great. However, each time I switch the targets, I have to wait 5 minutes again for the next build.

I'd assume Xcode would be able to cache the previous target but that's not what I'm seeing. Is there a setting I can toggle for this to work better? I have to switch targets quite a bit in the next few days and I don't think this waiting time is intended behavior.

0 Comments
2024/12/13
16:16 UTC

7

Fellow Ios devs, how did you get your first gig/job?

5 Comments
2024/12/14
06:01 UTC

0

Is Now the Right Time to Start a Career in iOS Development?

Hey everyone! I’m a recent graduate passionate about iOS development and Apple programming. I want to build a career developing apps/software for iOS, but with the rise of AI, I’m unsure about the current market and its future direction.

For those already working in iOS development:

•	Is this a good time to start learning iOS programming?

•	Do you think it’s still a viable long-term career path with AI gaining traction?

Any advice or insights would be greatly appreciated! Thanks!

11 Comments
2024/12/14
03:23 UTC

0

Would love some feedback on this paywall. Got the code from @adamlyttleapps on X (Twitter)

9 Comments
2024/12/14
00:59 UTC

5

Where can I initialize an object with an async initializer

Given this code:

actor SomeActor {
    init() async { }
}

struct SomeView: View {
    var body: some View {
        VStack {
            Text("Hi")
        }
    }
}

Is there any way I can keep a reference to the actor on the View? I must be approaching this wrong.. but if I am.. where can I can keep a reference to an object with an asynchronous initializer? My use case here is that I want to batch updates that a user makes on device, and then every 60 seconds, send those to a remote database.

5 Comments
2024/12/14
00:17 UTC

0

Do you use Component libraries?

Hi dear community, do you use component libraries and if so, which ones?

What good or bad experiences have you had?

Things like tailwind or shadcn/ui are at the Moment very popular for web Development.

What do you wish for in the future? Is there something you've always wanted in this area but have missed?

Thanks for the answers

4 Comments
2024/12/13
23:34 UTC

1

Your enrollment could not be completed.

Your enrollment in the Apple Developer Program could not be completed at this time.

Apple Developer Support: For one or more reasons, your enrollment in the Apple Developer Program couldn't be completed. We can't continue with your enrollment at this time. 

Did anyone else experience the same thing, and how did you manage to solve it?

2 Comments
2024/12/13
22:36 UTC

0

Looking for someone to get an MVP done

Looking to launch an app and need a dev's help.

It's likely to hit and do well, so I am offering two options:

  1. I pay per project for an MVP

  2. We do a 35% - 65% equity split. I'll do the marketing and the product work + use my own ad spend but if you want to chip in on the ad spend, we can do 50 - 50% split.

It's an app for stories. Looking to get the the following done:

1. 1. User Authentication

  • Sign In/Sign Up:
  • Guest Access:

2. User Profiles

  • Reading Preferences: Users can customize their reading experience, such as font size, background color, and dark mode settings.

3. Story Management

  • Story Library: The app features a library of stories categorized by genres (e.g., contemporary, historical).
  • Reading History: The app tracks the user's reading history, allowing them to revisit stories they’ve read.

4. Reading Experience

  • Chapter Navigation: Users can navigate through chapters of a story easily.
  • Reading Progress: The app tracks how much of a story the user has read, providing a percentage completion.
  • Interactive Features: Users can leave comments or reactions on stories, enhancing community engagement.
  1. Paid upgrade: Users can pay to read more chapters of the story.

Not in MVP but want to get it done later:

6. Technical Architecture Backend:

Backend: The app uses Firebase for authentication, database management (Firestore), and storage (for images and other media).

  • Frontend: Built using SwiftUI for iOS, providing a modern and responsive user interface.
  • Data Management: The app employs a data manager to handle interactions with the Firestore database, ensuring smooth data retrieval and updates.

7. Notifications and Updates

  • Push Notifications: Users receive notifications for new story releases, updates, or community interactions.
  • Email Notifications: Users can opt-in for email updates about their favorite stories or authors.
8 Comments
2024/12/13
21:29 UTC

1

Why Are Apple Developer Accounts Being Sold Online?

I've come across many individuals, especially from India and Pakistan, offering Apple Developer accounts for sale on social media. I’m curious to know the reason behind this practice.

From my perspective, I wouldn’t consider publishing my app using an account linked to an unfamiliar email. However, I’m interested in understanding why some people choose to purchase these accounts instead of creating one with their own email.

1 Comment
2024/12/13
18:22 UTC

184

If you don't know these as an iOS dev in 2024, you're NGMI 🚫

Look, I've been interviewing iOS candidates for my agency, and I'm shocked at the basic skills people are missing. Here's what you ABSOLUTELY need to know:

Basic

  1. Swift syntax
  2. UIKit fundamentals (yawn)
  3. SwiftUI (duh)

But here's what separates the 10x developers from the peasants:

  • Ability to recite all 987 WWDC session titles from 2019-2024 in alphabetical order while debugging a memory leak
  • Experience implementing ARKit in your sleep (Sleep walking counts as YOE)
  • Proficiency in convincing Xcode that you actually meant to do that
  • At least 3 years experience building apps for iOS 18
  • Advanced degree in quantum computing to understand Swift's type system
  • Mastery of writing UI tests that pass on first try
  • Deep understanding of why your app worked perfectly until you had to demo it
  • Ability to deploy to App Store using only interpretive dance
  • Fluency in explaining to PM why that "small design change" will take 2 sprints
  • Skills to fix production bugs by gently whispering "it's not a bug, it's a feature"

Let me know if I'm missing anything.

[EDIT]

  • Ability to identify Satire
44 Comments
2024/12/13
20:42 UTC

0

iCloud broke my widgets

I thought upgrading to iOS 18 broke my widgets (they turned blank), but I now believe the issue is related to implementing iCloud support for my app.

Previously, users could select which element in an array to display on the widget by long-pressing the widget and selecting "Edit Widget." They could also choose a widget type (not size - just a different picker in the "Edit Widget" tab).

Now, the widget turns blank if there are 0 elements to display. In this case, I can still edit the widget type, but it doesn't change anything - the widget remains blank. If there is 1 or more element in the array, I can't change anything in the widget settings - the widget type picker doesn't load, the elements don't load, and the widget stays blank.

I added the iCloud Capability to my Widget Extension, but this hasn't resolved the issue.

I'd really appreciate any help with this problem!

0 Comments
2024/12/13
18:39 UTC

1

Possible to automate or streamline adding text replacements for iPhone keyboard?

I’m looking for a way to automate or at least streamline the process of adding text replacements with iPhone (Settings > General > Keyboard > Text Replacement).

Doing it manually is pretty unintuitive and time consuming. I want the ability quickly put my text replacements on my mom and dad’s phones without the inconvenience.

Thanks in advance if anyone has feedback or a solution 💖

2 Comments
2024/12/13
17:40 UTC

10

Anyone here transitioned from backend development to doing both backend and iOS?

I am a backend developer with 5 years of experience, mainly in Go and Java. I just want to know about the experience of people who were solely into backend development and later got into iOS development alongside. What stack/framework did you pick up and did your experience in backend help speed things up? And did it actually benefit you if you did it out of interest rather than an obligation?

10 Comments
2024/12/13
16:47 UTC

5

What podcast do you recommend?

Do you listen to any podcast about programming, learning or working in the field?

6 Comments
2024/12/13
15:35 UTC

Back To Top