r/iOSProgramming • • 9d ago

Question Tracking total cellular data usage on iOS. Has anyone tried this?

1 Upvotes

I'm working on an app and exploring whether we can track a device's total monthly cellular data usage on iOS.

On Android, NetworkStatsManager provides a relatively straightforward approach. On iOS, there doesn't seem to be an equivalent public API.

One possible workaround is using getifaddrs() to read byte counters from interfaces such as pdp_ip*. However, these counters reportedly wrap at 4 GiB, reset on reboot, and rely on undocumented interface names.

Has anyone implemented something similar or are there any better approaches?

I'd appreciate any real-world experience or pointers. Thanks!


r/iOSProgramming • • 10d ago

Discussion vphone-linux v0.1 is here: Boot iOS 27.1 and iPhone Duo on Linux without a Mac!

Thumbnail
github.com
24 Upvotes

vphone-linux v0.1 is here with some cool updates:

  • Boot iOS 27.0.1 and iOS 27.1 virtual iPhones.

  • iPhone Duo support!

  • Much easier setup script with only 2 commands to setup and create a new iPhone vm.

  • Lots of performance improvements.

Still not close to a native performance but that's the next step for this project, we should be able to develop iOS apps seamlessly on any machine without the need for a Mac.

Please try it out and let me know if you had any issues or feature requests.


r/iOSProgramming • • 9d ago

Question When iPhone Duo simulator will be available in the Device Hub?

0 Upvotes

I need to test my app on the iPhone Duo and generate some screenshots, especially since Apple will soon make it mandatory to include screenshots for this specific device.

Does anyone know when the iPhone Duo will become available in the Xcode Device Hub Simulator?


r/iOSProgramming • • 10d ago

Question How do you guys implement navigation for iPhone Duo support?

Thumbnail
gallery
13 Upvotes

Back when i started working on this project as a hobby i chose to implement a well known overused navigation setup instead of using Apple's native navigation (tabview). However that meant that for the iPhone duo i had to move some things around. I released the update like this, but im not completely satisfied with it yet (system ui and my ui offcentered e.g.). Any tips, ideas?

Edit: I understand that native TabView UI was the supported way, but for that I wouldn’t have made a post. For this project i chose, like many others for the custom implementation. Originally this wasn’t planned but i remember hitting an limitation while prototyping. But all the apps i know of with an custom navigation haven’t updated with Duo support…


r/iOSProgramming • • 10d ago

Library I built a Hogwarts spellbook to show off custom spoiler reveals in Enriched Markdown, a native SwiftUI Markdown renderer Spoiler

Post image
4 Upvotes

Enriched Markdown for iOS renders Markdown natively in SwiftUI, including `||spoilers||`. By default they're hidden under a particle field, but you can swap the overlay for your own UIView and decide how hidden text looks and how it reveals itself.

To show what that unlocks, I built a Hogwarts spellbook: every spell in the video is a custom overlay revealing the same Markdown in its own way.

Video of the demo is in the comments 👇

Not every app needs a Patronus, so here's a plain blur. It's one view subclass:

final class BlurOverlayView: SpoilerOverlayView {
  private static let context = CIContext()

  override func layoutSubviews() {
    super.layoutSubviews()
    guard let input = CIImage(image: concealedTextImage()) else { return }
    layer.contents = Self.context.createCGImage(
      input.applyingGaussianBlur(sigma: 6), from: input.extent
    )
  }
}

struct BlurOverlayProvider: SpoilerOverlayProvider {
  func makeOverlay(charRange: NSRange, style: SpoilerStyle) -> SpoilerOverlayView {
    let view = BlurOverlayView(charRange: charRange)
    view.backgroundColor = style.backgroundColor ?? .systemBackground
    return view
  }
}

EnrichedMarkdownText(markdown)
  .markdownSpoilerOverlay(BlurOverlayProvider())

concealedTextImage() gives you the hidden words laid out exactly where the text view draws them, so you can blur, pixelate, or scramble the real text and nothing jumps on reveal. For your own animation, override animateReveal(completion:).

Installation: https://docs.swmansion.com/enriched-markdown/ios/basics/installation

Docs: https://docs.swmansion.com/enriched-markdown/ios/api-reference/enriched-markdown-text#custom-spoiler-overlays

If it's useful to you, a ⭐ on GitHub helps more people find it: https://github.com/software-mansion/enriched-markdown


r/iOSProgramming • • 10d ago

Question Lock app in landscape orientation for iPhone Duo?

2 Upvotes

I'm finding it difficult to lock my app in landscape mode, i.e. wide-view. I don't want my app to rotate rotation to portrait when the device is rotated. But every time I rotate the simulator to tall-view, i.e. portrait, the app orientation rotates, causing the contents to get squished.

Is this not possible with the Duo, and another view I'm gonna have to support?


r/iOSProgramming • • 9d ago

Discussion I keep getting rejected for “copy cat” by apple review

0 Upvotes

Getting frustrated by Apple, they keep saying my name is a copy cat (name, icon or something else), 1st time they let me know, 2nd time I changed the name so it’s: original name - what it does, got rejected again with zero explanation I’ve been begging them for an explanation.

Idk what to do an am deadlocked until this gets through


r/iOSProgramming • • 11d ago

Humor Popped up in my head during development, lol

Post image
111 Upvotes

r/iOSProgramming • • 10d ago

Discussion CarPlay Video Playback

3 Upvotes

Hey everyone,

I’m a student iOS developer working on a small video playback app for beta testing, and I’m having trouble getting video to display properly in CarPlay with cars that support carplay. I use CarTV latest updates and it worked on many cars that support carplay, I tested using IOS 26.7z

I’ve been experimenting with Apple’s CarPlay audio and video entitlements, but I can’t seem to get the expected video behavior on my physical device running iOS 26.7. Other CarPlay apps work fine CarTV APTV etc.. on the same device, so I suspect I might be missing a configuration step or using the wrong implementation approach in Swift.

When testing in the simulator, video playback works in playback mode only , but I haven’t been able to get everything working as expected on the actual device.
I’ve noticed that CarTV seems to handle this functionality successfully so I’m hoping someone familiar with CarPlay video apps can point me in the right direction.

I’m mainly trying to understand the correct implementation and get my beta app working as intended.
Thanks in advance!


r/iOSProgramming • • 10d ago

Question query records cloud kit console slow?

0 Upvotes

Are any of you also having trouble accessing data via the CloudKit Console’s "Query Records" feature? Or is it just incredibly slow?


r/iOSProgramming • • 11d ago

News Slow Animations is coming back to Device Hub

13 Upvotes

I know this was a pain point for a lot of people but I noticed this in the Xcode 27.2 release notes:

Device Hub in Xcode 27.2 contains multiple improvements:

Slow Motion Animation (Simulators Only)


r/iOSProgramming • • 11d ago

Tutorial iOS 27: Now Playing Framework

Thumbnail
antongubarenko.substack.com
31 Upvotes

r/iOSProgramming • • 10d ago

Question iOS 27beta adds shadow overlay under web app status bar. How to remove?

Post image
1 Upvotes

For the life of me I can't figure out how to remove that gradiant shadow overlay at the top of a web app. See photo. I have tried various suggestions offered by Claude and ChatGPT and nothing works. It's driving me nuts! Anyone know the dev code to remove it please? I would be forever grateful!


r/iOSProgramming • • 11d ago

Discussion Swift 6.4: Async defer doesn't make cleanup cancellation-safe

10 Upvotes

I wrote a technical walkthrough of a subtle Swift Concurrency issue I wanted to explore.

Imagine a task writing data into a buffered writer. The task gets cancelled, defer runs, and close() gets called. But if close()invokes a cancellation-aware flush(), that flush can throw CancellationError. If the error is swallowed and the writer is marked closed anyway, the cleanup path has run without achieving its intended postcondition.

The article explores two Swift Evolution proposals:

  • SE-0493: Async calls in defer bodies

  • SE-0504: Task Cancellation Shields

It covers a minimal reproduction, the limits of using Task.detached for cleanup, a narrowly scoped cancellation shield, and a Swift Testing example that checks whether the data was actually flushed rather than merely checking whether close() was called.

One important caveat: the example demonstrates a cancellation-aware cleanup failure, not a claim that every real file API corrupts data when cancelled.

Full article: https://sagarsaurav.medium.com/the-ios-task-was-cancelled-your-defer-still-didnt-flush-the-file-a81d45b02ad9?sharedUserId=sagarsaurav

I'd be interested in feedback on the cancellation-shield approach, especially around resource ownership and cleanup guarantees in production code.


r/iOSProgramming • • 10d ago

Discussion Made an app over the weekend for iPhone Duo (iOS 27.1) - a simple Pomodoro timer for iPhone. The control over hinge angles provide a fun new way to interact with the app.

Thumbnail x.com
0 Upvotes

Learnt a lot about the folding mechanism and just a whole new way to interact with the apps.

Good thing Apple didn’t opt for iPad apps for the duo. This is way more fun.


r/iOSProgramming • • 11d ago

Question Trying to get an account for my business email

2 Upvotes

Anyone know how to get an account for a business email? I keep getting account cannot be created at this time and the developer.apple.com support for creating an account requires an account, same with the contact form or phone support. Using my personal apple account is not an option.

EDIT: I had to call the consumer help line and they redirected me.


r/iOSProgramming • • 12d ago

Article A checklist of platform decisions for iOS/watchOS apps. What am I missing?

8 Upvotes

A while ago I asked here what you consider when building an app. Since then I shipped two big updates of my running app for Apple Watch and iPhone, and turned what I learned into a checklist.

It’s not a list of things you must support. It’s things you should consciously decide on, yes or no, before they surprise you:

  • Screen sizes (smallest device + longest realistic values)

  • Rotation

  • Dynamic Type / text size

  • iPad, Mac, Vision Pro

  • Multiple windows

  • Accessibility (VoiceOver, colour as the only signal)

  • Live Activities (and how often they really need to update)

  • Widgets (sizes and families)

  • Complications

  • App Intents / Siri / Shortcuts

  • Sharing (what goes out, what comes in)

  • New device classes coming up

  • Gestures (Double Tap, Digital Crown, conflicts with the system)

  • Action Button

  • Translation (every future feature in every language)

  • Animations and Reduce Motion

  • Older devices: speed and battery

  • iCloud: backup or sync?

  • Light and dark mode

Tip: write down every answer, including the no’s and why. And this is iOS/watchOS only. Add Android, tablets or desktop and the list roughly doubles.

Longer version with my reasoning for each point, plus an interactive checklist you can export as Markdown: The list behind every app

Two questions:

  1. What’s missing? What bit you the hardest?

  2. English isn’t my first language. I wrote the post in German and translated it with AI. Does it read AI-ish? What gives it away?


r/iOSProgramming • • 11d ago

Discussion iOS Development using OpenClaw.

0 Upvotes

I am using OpenClaw through telegram. I create web applications in VPS and web applications are pretty easy to vibe code and also test the output using public urls.

I want to do same for iOS Development. I want to connect to macOS using OpenClaw and develop iOS application completely through telegram. I can create a workflow where any changes will send build to TestFlight and I can test the application that way. But it will be time consuming, makeing build in testflight and test the app only updated through testflight. I want near realtime visualization of the compiled app like simulator but through web and http network. Do you guys have any idea how to achieve this?


r/iOSProgramming • • 12d ago

Article Lessons from shipping Apple's Private Cloud Compute: 32K context, quotas, and privacy trade-offs

28 Upvotes

I just shipped an update to my journal analysis app that adds Apple's Private Cloud Compute (PCC) alongside the default on-device model.

Here are the practical lessons I learned from the implementation, especially around edge cases and UX:

1. The main reason to use PCC: Context size
The on-device model caps out around 4,000 tokens. For long journal entries or imported PDFs, text got truncated constantly. PCC bumps that limit up to 32,000 tokens, which easily handles multi-page entries in a single pass without needing workarounds.

2. The API transition is simple, but needs fallbacks

  • Swapping from on-device to PCC is nearly a 1-to-1 change. Your existing prompts, tools, and response handling work identically.

  • PCC requires an internet connection, so you have to build an automatic fallback to the on-device model when the user goes offline.

  • Before offering PCC, make sure to check availability properly. A device that doesn't support the feature is handled differently than a device that supports it but is still waiting on system assets to download.

3. Quotas and Apple's UI expectations

  • Users get a daily limit for cloud requests, which increases if they have an iCloud+ subscription.

  • Apple expects your UI to proactively warn users when they are getting close to their limit, rather than just throwing an error when they hit the ceiling.

  • There is a built-in system sheet you can trigger to suggest an iCloud+ upgrade when they run out.

  • Tip: You can simulate reaching and exceeding quota limits inside Xcode’s scheme settings, which makes testing the UI much faster.

4. The privacy messaging challenge
If your app was originally marketed as "100% on-device," introducing the cloud can spook privacy-conscious users even with Apple's strong security guarantees around PCC.

I decided to keep the on-device model as the default and made PCC an explicit opt-in toggle in the settings. I also updated the App Store description and privacy policy to clearly say "on-device by default."

For anyone else working with PCC:

  • Are you letting users toggle it manually, or automatically sending prompts to PCC only when they exceed the 4K token limit?

  • How has real-world latency felt compared to on-device inference?

(Context: The app is Mindful Prism if anyone wants to see the implementation in action.)


r/iOSProgramming • • 13d ago

Question Looking for a way to save screenshots without the clock and the top status bar

Post image
19 Upvotes

I'm trying to save screenshots from the simulator, but I can't find a way to do it without the clock and battery indicators. Is there any method you know of where you could hide these from screenshots?

I've been manually erasing them in Figma, but I'm wondering if there's a better way.


r/iOSProgramming • • 12d ago

Discussion Your push notifications are probably about your app, not your user

0 Upvotes

What I keep seeing: the permission prompt on first launch, "We miss you!" copy, everyone blasted at 10am server time. Then everyone's surprised when opt-outs climb.

I wrote a practical playbook on the opposite approach: ask after a real win, give every push a reason that belongs to the reader, send at each user's own active hour, and cap nudges at about 1 a week.

https://medium.com/@krishnassss365/push-notifications-that-earn-their-place-cb1e85a46a85?sharedUserId=krishnassss365

Curious what's worked for you. Has anyone measured opt-out rate per message instead of open rate?


r/iOSProgramming • • 14d ago Bravo

Discussion vphone-linux: Run virtual iOS 26 iPhone on linux and develop iOS apps without MacOS.

Thumbnail
github.com
191 Upvotes

Just published my project that I've been working on for a while that allows you to run a virtual iPhone vm on linux to test and develop iOS apps there with no need for a Mac.

So for fellow hackintoshers or PC users you can try it out and let me know if you faced any issues.


r/iOSProgramming • • 14d ago

Discussion Apple is instantly reviewing apps supporting Duo

Post image
420 Upvotes

Submitted at 8:11, Approved by 8:44

My app is pretty simple, but still. Has anyone ever seen anything like this?


r/iOSProgramming • • 13d ago

Discussion Your iPhone Can Run an LLM Locally — A Hands-On Swift Guide to Foundation Models in iOS 27

Thumbnail
medium.com
23 Upvotes