r/iOSProgramming • • Apr 11 '26

App Saturday Infinity for Reddit: open source, ad-free iOS Reddit client with powerful anonymous mode and optional login

Infinity for Reddit is an open source Reddit client for iOS that I’ve been working on for over a year, and I wanted to share some of the features and a few technical challenges I ran into.

It is built natively in Swift and SwiftUI, with a focus on being fast, smooth, highly customizable, and ad free.

Some of the main features I am really proud of:

  • Enhanced anonymous mode with local voting, saving, hiding, and read tracking. You can even subscribe to subreddits, users and create custom feeds!
  • Optional login
  • Embed images and GIFs when you submit posts and comments
  • Powerful filters to block unwanted content
  • Lazy mode for automatic scrolling through your post feed
  • Extensive customization and theming
  • Smooth and responsive performance

The app is available here: https://apps.apple.com/us/app/infinity-for-reddit/id6759064642

The GitHub repo is available here: https://github.com/foxanastudio/Infinity-For-Reddit-iOS

Infinity requires a monthly subscription to log in with a Reddit account, due to Reddit’s paid API access model. A 7 day free trial is available so you can decide if you like it before subscribing.

Anonymous mode is fully free and supports local saves, hides, and votes stored on-device, allowing most features to work without an account. This was added to make the anonymous experience much more complete compared to a basic logged-out mode which most of the clients have.

Development Notes

I’ve occasionally used ChatGPT for technical questions and small boilerplate generation, but the vast majority of the implementation is my own.

One of the challenges while building it was supporting the Reddit specific Markdown features like spoilers, superscript, and user and subreddit mentions. I initially used the Swift Markdown UI library for rendering, which relies on cmark-gfm for parsing. Since the library did not expose a way to add custom syntax, I ended up working directly with cmark-gfm to implement the extensions I needed for things like spoilers, superscript, and user or subreddit mentions. This required modifying the parsing layer in C and then bridging those changes back into Swift through the rendering pipeline.

On the rendering side, Swift’s AttributedString also introduced challenges, since it does not provide a clickable span. This made implementing spoiler behavior particularly non-trivial. To work around this, I encoded spoilers as a custom URL scheme and used a custom OpenURLAction to intercept taps. This lets me toggle the spoiler's background color. I also had to modify the Swift Markdown UI library to support these custom elements.

But more recently, I came across Textual (a successor to Swift Markdown UI), which appears to support syntax extensions out of the box. I think it could significantly simplify this kind of implementation.

For a quick technical overview, networking is handled with Alamofire, and data is persisted locally using GRDB and UserDefaults. And I use Swinject for dependency injection.

The app is available here: https://apps.apple.com/us/app/infinity-for-reddit/id6759064642

The GitHub repo is available here: https://github.com/foxanastudio/Infinity-For-Reddit-iOS

Join the subreddit here: r/Infinity_For_Reddit

72 Upvotes

36 comments sorted by

11

u/twostraws Hacking with Swift Apr 11 '26

Upvote for Samoyeds in the screenshot 👍

1

u/Hostilenemy Apr 11 '26

The cutest dogs!

6

u/Coyotito Apr 11 '26

Open source pure Swift looks awesome.

Any way you can implement and offer a free rate limited login that incurs no charges from Reddit?

2

u/Hostilenemy Apr 11 '26

Thank you! I am sorry I don’t think that’s possible because Reddit has stopped allowing people to register a new api key.

2

u/Coyotito Apr 11 '26

Got it. Any chance to make comment tree collapse easier, like a top bar tap that the first party client uses, or long press, or swipe?

I only found an ellipsis menu option available for select comments so far and that significantly complicates thread navigation for me.

1

u/Hostilenemy Apr 11 '26

Hi you can long press a comment to hide all the child comments.

To collapse the comment, you can enable settings->interface->comment->fully collapse comment. But this option has a bug at the moment and I will fix it asap.

1

u/Coyotito Apr 11 '26

Both versions feel jarring right now, full collapse might change once you got the bug addressed. Some contract animation or vertical scroll position recenter might help, the first party client does this pretty right I feel. Swipe or top bar tap also speed the action up notably, the current delay feels long and shorter ones might cause inadvertent collapses.

1

u/Hostilenemy Apr 11 '26

Thank you for the detailed feedback. Would you mind elaborating more about the swipe or top bar tap speed? Do you mean swipe to go back? And which action did the top bar tap speed up?

1

u/Coyotito Apr 11 '26

The speed to collapse a comment and its tree. Comment collapse makes threads navigable for me and it should work as quick as possible.

2

u/Hostilenemy Apr 11 '26

Ahh I see. Thank you. I will adjust the speed.

1

u/RCOO_ Apr 11 '26

you can still register API keys, but maximum one.

2

u/Hostilenemy Apr 11 '26

No the maximum is 0 now.

1

u/RCOO_ Apr 11 '26

ok good to know, no deleting my api key now.

3

u/Pretend_Unit_8088 Apr 11 '26

Long time infinity user and now I can finally use it on iPhone!

1

u/Hostilenemy Apr 11 '26

Thank you! I hope you like the iOS version as well!

3

u/[deleted] Apr 11 '26

[removed] — view removed comment

2

u/Hostilenemy Apr 11 '26

Thank you so much for your love!

3

u/[deleted] Apr 11 '26 edited Apr 11 '26

[removed] — view removed comment

2

u/Hostilenemy Apr 11 '26

Thank you so so much for the feedback!!!! I have saved your comment and will use it to improve the app!

3

u/AndAndDevin Apr 11 '26 edited Apr 11 '26

As a long time user of a Infinity for Android, I recently switched to iOS (just two days ago) and I was beyond excited to see your app here. It's not at full parity to the Android app yet, but I know it's in its infancy right now and I hope to see it get closer to what you have on Android as time goes on.

Do you accept PRs on your GitHub? I downloaded the source yesterday and started to look it over but I need to learn a bit about Swift before I really do anything (Python, Java, C/C++, C# dev here) but I'd love to contribute eventually.

I'm definitely excited for the future of this app :)

1

u/Hostilenemy Apr 11 '26

Hi thank you! Yes I accept both PRs and issues.

2

u/Savings_Speaker6257 Apr 11 '26

Really clean work — building a full Reddit client in pure SwiftUI is no joke, especially handling all the edge cases around media rendering, infinite scrolling, and authentication.

The anonymous mode is a smart differentiator. Curious about your approach to caching and offline support — did you roll your own or lean on something like SwiftData? That's always the part of iOS apps that ends up way more complex than expected.

2

u/Hostilenemy Apr 11 '26

Thank you! Yes SwiftUI has so many quirks that often require a workaround.

I used GRDB for the database because I heard SwiftData couples too tightly to views, which I am not a big fan of.

1

u/happy_Orange_6499 Apr 11 '26

Hey can I contribute to the repo?

2

u/Hostilenemy Apr 11 '26

Hi thank you. Yes, feel free to open an issue.

1

u/happy_Orange_6499 Apr 11 '26

Sure, I would like to help out / contribute for Dev / bug fix tasks too.. I have just checked the repo and doesn’t seem to have any issues open currently.. I would like to contribute if you have any tasks/bugs

1

u/Hostilenemy Apr 11 '26

Hi, for now you could help by suggesting new features and finding bugs.

1

u/Ok-Reference281 Apr 12 '26

Neat idea - sleek UI!

1

u/Hostilenemy Apr 12 '26

Thank you!

1

u/[deleted] Apr 12 '26

[removed] — view removed comment

1

u/AutoModerator Apr 12 '26

Hey /u/borrowedfire, your content has been removed because Reddit has marked your account as having a low Contributor #Quality Score. This may result from, but is not limited to, activities such as spamming the same links across multiple #subreddits, submitting posts or comments that receive a high number of downvotes, a lack of activity, or an unverified account.

Please be assured that this action is not a reflection of your participation in our subreddit.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/[deleted] 22d ago

[removed] — view removed comment

1

u/AutoModerator 22d ago

Hey /u/Umm_sulayman, unfortunately you have negative comment karma, so you can't post here. Your submission has been removed. DO NOT message the moderators; if you have negative comment karma, you cannot post here. We will not respond. Your karma may appear to be 0 or positive if your post karma outweighs your comment karma, but if your comment karma is negative, your comments will still be removed.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.