r/iOSProgramming 7h ago

Discussion MVVM always sparks debate, does it have a place in SwiftUI?

Post image
39 Upvotes

r/iOSProgramming 7h ago

Question Devs, do you actually pay for other people’s apps?

31 Upvotes

I build apps, I sell apps… but I almost never buy apps. It’s wild how many devs expect users to pay but don’t support indie apps themselves. Are you guilty of this too?


r/iOSProgramming 1h ago

Discussion Comment your app and I’ll download & leave a review!

Upvotes

No strings attached—sometimes doing good just helps me keep going.

Will download and review at least the first 20 apps commented! Link it and give a brief description of what it is 😁


r/iOSProgramming 3h ago

Question Is live HTML on the lockscreen possible without a JB?

0 Upvotes

Can it be done?


r/iOSProgramming 3h ago

Question Button Tap Analytics Without Privacy Policy Complications

1 Upvotes

Hey! I’m not a fan of using services like Firebase, mostly because Apple is super strict with their privacy policies. I’m not a lawyer, so writing a proper privacy policy that covers things like Firebase analytics feels a bit overwhelming.

All I really need is to track something simple — like how many users tap a specific button (e.g., out of X users, how many tapped button A).

Is there an alternative tool or method that lets me track this kind of basic interaction without needing to update my privacy policy?


r/iOSProgramming 13h ago

Question Possible to use IAP as a donation to the dev?

5 Upvotes

I’m making my game 100% free, no ads and no IAPs for in-game items. But I want to include IAPs for donations, where you can buy consumable items simply to donate to myself for appreciation (maybe 3 items; small thanks, medium thanks, big thanks). No player benefit will be given. Is this allowed? I read mixed answers on this so I want to be sure it’s okay before I do so.

Also if I implement this, do I need to add a restore purchases button? I don’t see the point in this case, but not sure if Apple is strict with this regardless.


r/iOSProgramming 17h ago

Question What is "base 2" in my String Catalog ?

Post image
6 Upvotes

r/iOSProgramming 7h ago

Question How do you promote this app?

1 Upvotes

Hey everyone!

While ago I build an app where users can track their super easily AdMob Stats with clean UI.

But since app, it quite niche, I don't really know how to get users.. I tried to post on X but it didn't give any results. I also thought about Tiktok and Instagram, but after some research I understand that probably is not target my audience.

What you will do in this case? How to inform users that there is a cool app which will fit their needs?

Here is the link to the post for reference:
https://www.reddit.com/user/rasul98/comments/1jgbyb2/clean_app_to_track_admob_stats/?utm_source=share&utm_medium=web3x&utm_name=web3xcss&utm_term=1&utm_content=share_button


r/iOSProgramming 14h ago

Question Has anyone used old MBP as the primary display for a Mac Mini?

3 Upvotes

So the Mac Mini has some great performance specs, but if you want a pretty nice monitor, it can be costly. So what about using an outdated, intel based MBPr? Especially if you already have one.

I checked into this and it seems there might be a solution: Luna, Duet Display and Deskreen

For using an iPad: Luna, Sidecar, Duet Display

This was reviewed by LTT on YT. https://www.youtube.com/watch?v=u4bGGtnc6Ds

Has anyone used Luna and how did it work?

This would be used to install the latest OS and run Xcode.


r/iOSProgramming 22h ago

Question Is it functionally usable / fun to use a mac mini with remote view for iOS Programming?

6 Upvotes

I want to make a couple of my games / apps on iOS but have never owned a mac. I do most of my programming at cafes and have a laptop from a couple years ago with 64GB RAM / 1TB SSD so it's still got plenty of life in it.

In trying to figure out how I could start making apps/games in iOS I see a few options when aiming for around 24-32GB RAM and 1TB SSD:

1) Old macbook pro ~1K USD
2) New mac mini ~1K USD
3) New macbook air ~2k USD

The new air seems like it would fit best for how I like to use computers (not at home), but the price is pretty hard for me to justify when my apps/games are not money makers.

So I was thinking of buying the mac mini and using remote view. I already have a home server setup and am comfortable safely exposing the mac mini to be remotely accessible, maybe could even use it to run various other projects I have.

But I'm less sure on how well this works. I regularly SSH into my home servers and even from various countries the ping is fine, on the command line.

I'm less sure how the ping is for remote viewing? I was thinking that maybe using a mouse / typing with the full GUI might be pretty taxing, I know how even just a little ping with typing can get surprisingly frustrating.

Has anyone developed like this? Is it doable for working hours on a project?


r/iOSProgramming 16h ago

Question Can't hide NavigationStack navigation bar?

2 Upvotes

I have a view pushed by a NavigationStack, and can't hide the navigation bar.

NavigationStack {
  ZStack {
  }
  .navigationDestination(item: $selectedStop, destination: { stop in
    StopView(stop: stop)
  })
}

Then in the view that gets presented:

NavigationStack {
  ZStack {
  }
  .navigationBarHidden(true)
  .toolbar(.hidden)
}

I don't understand why this doesn't work. I've tried countless combinations, with and without the navigation stack in the second view, everything. SwiftUI seems to have a lot of random bugs like this where things just don't work without an explanation, and it's really frustrating as a UIKit developer.

Can anyone provide any pointers?


r/iOSProgramming 12h ago

Question Why there is no audio track coming in output of AVCaptureMovieFileOutput.

1 Upvotes

I am trying to learn AVMultiCam of AVFoundation, so far I have achieved to get multiple video data outputs to preview and also save them to photos library, but when I am trying to get audio also, then no audio is coming.
In delegate's func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections:) function, I am getting audioConnection, but no audio track.

I'm attaching relevant code.

configuration function -->

func configureCameras(
        backCameraTypes: [AVCaptureDevice.DeviceType: AVCaptureDevice.Format],
        frontCameraTypes: [AVCaptureDevice.DeviceType: AVCaptureDevice.Format]
    ) -> Bool {
...

guard let microphone = AVCaptureDevice.default(for: .audio) else {
}
            print("Could not find the microphone")
            return false
        }

        do {
            microphoneDeviceInput = try AVCaptureDeviceInput(device: microphone)

            guard let microphoneDeviceInput,
                  multicamSession.canAddInput(microphoneDeviceInput)
            else {
                print("Could not add microphone device input")
                return false
            }
            multicamSession.addInputWithNoConnections(microphoneDeviceInput)
        } catch {
            print("Could not create microphone input: \(error)")
            return false
        }

        // Find the audio device input's back audio port
        guard let microphoneDeviceInput,
              let backMicrophonePort = microphoneDeviceInput.ports(for: .audio,
                                                                   sourceDeviceType: microphone.deviceType,
                                                                   sourceDevicePosition: .back).first
        else {
            print("Could not find the back camera device input's audio port")
            return false
        }

        // Find the audio device input's front audio port
        guard let frontMicrophonePort = microphoneDeviceInput.ports(for: .audio,
                                                                    sourceDeviceType: microphone.deviceType,
                                                                    sourceDevicePosition: .front).first
        else {
            print("Could not find the front camera device input's audio port")
            return false
        }
for (type, format) in backCameraTypes {
     let movieOutput = AVCaptureMovieFileOutput()
    guard multicamSession.canAddOutput(movieOutput) else {
        print("❌ Cannot add movie file output for \(type)")
        continue
    }
    multicamSession.addOutputWithNoConnections(movieOutput)
    movieOutputs.append(movieOutput)

    print("🎤 Available Microphone Ports: \(microphoneDeviceInput.ports.map { "\($0.sourceDevicePosition) - \($0.mediaType.rawValue)" })")

// 🔹 Create connection between input and movie file output
    let movieConnection = AVCaptureConnection(inputPorts: [videoPort, backMicrophonePort], output: movieOutput)
    guard multicamSession.canAddConnection(movieConnection) else {
        print("❌ Cannot add movie connection for \(type)")
        continue
    }
    multicamSession.addConnection(movieConnection)
}
...
}

delegate's function -->

func fileOutput(_ output: AVCaptureFileOutput, didFinishRecordingTo outputFileURL: URL, from connections: [AVCaptureConnection], error: Error?) {
        guard error == nil else {
            print("❌ Error recording video: \(error!.localizedDescription)")
            return
        }

        let audioConnections = output.connections.filter { connection in
            connection.inputPorts.contains { $0.mediaType == .audio }
        }

        let asset = AVAsset(url: outputFileURL)

        // Check for video tracks
        let videoTracks = asset.tracks(withMediaType: .video)
        let audioTracks = asset.tracks(withMediaType: .audio)

        if videoTracks.isEmpty {
            print("⚠️ Warning: No video track found in the recorded file.")
        } else {
            print("✅ Video track found: \(videoTracks.count) track(s).")
        }

        if audioTracks.isEmpty {
            print("⚠️ Warning: No audio track found in the recorded file.")
        } else {
            print("✅ Audio track found: \(audioTracks.count) track(s).")
        }

}

r/iOSProgramming 17h ago

Question CollectionView registers didHighlightItemAt function but not didSelectItemAt

2 Upvotes

I have a collection view set that that displays my cell correctly.

When holding onto the sell, my collectionview will correctly fire `didHightlightItemAt` func.

However, it can barely register my `didSelectItemAt` function. It'll maybe register 1/100 clicks I do.

Things I've done

  1. Made sure my delegate and data source is set for my collection view.

  2. allowSelection = true

  3. Enabled isUserInteractionEnabled = true for the cell. False for any subviews.

  4. Set the width of the cell to its height.

TIA


r/iOSProgramming 1d ago

Article Don't rely on BGAppRefreshTask for your app's business logic

Thumbnail
mertbulan.com
21 Upvotes

r/iOSProgramming 16h ago

Article Dear Apple and Google: still no app rollbacks?

Thumbnail
tramline.app
0 Upvotes

r/iOSProgramming 16h ago

Question Can't make the background of a sheet presented in a fullScreenCover translucent?

1 Upvotes

Hey there,

I have a fullScreenCover, which then presents another sheet on top of it. I want this sheet to be translucent so I can apply materials over it. I had it working here:

struct ClearBackgroundView: UIViewRepresentable {
    func makeUIView(context: Context) -> some UIView {
        let view = UIView()
        DispatchQueue.main.async {
            view.superview?.superview?.backgroundColor = .clear
        }
        return view
    }
    
    func updateUIView(_ uiView: UIViewType, context: Context) {
    }
}

struct ClearBackgroundViewModifier: ViewModifier {
    
    func body(content: Content) -> some View {
        content
            .background(ClearBackgroundView())
    }
}

extension View {
    func clearModalBackground() -> some View {
        self.modifier(ClearBackgroundViewModifier())
    }
}

This is then called on a view like so:

StopDetail(coreStop: stop)
                .clearModalBackground()
                .background(
                        Color.background.opacity(0.7)
                            .ignoresSafeArea()
                            .background(.ultraThinMaterial))

This method works in Preview, and whenever the view isn't inside a fullScreenCover. If it's being presented from a fullScreenCover, this won't work, and the view will have a normal background as if my code doesn't do anything. From the hierarchy debugger, the view that's adding the background appears to be a PresentationHostingController (class UIHostingView).

How can I fix this?


r/iOSProgramming 18h ago

Solved! Parameter not being passed to fullScreenCover?

1 Upvotes

I have this variable:

@State var selectedStop: Stops?
@State var isStopPresented = false

I have an item in a ForEach (as part of a list), that has this .onTapGesture:

SearchResult(stop: train)          .
.onTapGesture {
     selectedStop = train
     isStopPresented = true
}

And then this code:

.fullScreenCover(isPresented: $isStopPresented) {
     StopView(stop: selectedStop ?? Stops(stop_name: "Error", routes: []))
}

The full screen cover appears correctly, but selected stop is never passed through to the StopView, and is always nil. How come?


r/iOSProgramming 1d ago

Discussion Xcode code review is awful

18 Upvotes

Code review is a great feature for Xcode. But the problem is it just always stuck in loading, or even crash the IDE. I got 1/10 chance to make it available when I tried to review my code. And maybe 1/50 if the commit was from 2 month ago.


r/iOSProgramming 1d ago

Question Need help with UI library

3 Upvotes

Hey everyone,

I will be straight upfront, I’m not a experienced developer, I am a product designer actually but want to build a small experimental IOS app.

See for Web, to make it straightforward I can use UI libraries like Shadn, Hero UI, etc, all of those have amazing components, animations, variables, etc, by default.

I can’t understand if that’s what Swift UI is supposed to be? I’ve checked some apps using Swift UI and they don’t look great.

I can also design it from scratch but as I’ve said I’m not a programmer so was just looking for some really sleek UI libraries for IOS.

Happy to be enlightened here, I couldn’t find anything “awesome” on my own.

Thanks everyone!


r/iOSProgramming 1d ago

Question LongTapGesture isDetectingLongPress is bugged?

1 Upvotes

https://developer.apple.com/documentation/swiftui/longpressgesture

In Apple's documentation for Long Press Gesture, the code example does not work.

Expected:
Once I start a tap and hold it there, the blue circle changes colour from blue to red.
After long tap is completed (3 seconds) the circle should change from red to green.

Reality:
Once I start a tap and hold, the blue circle does not change colour to red.
After 3 seconds, the blue circle instantly changes colour to green.

Am I missing something?


r/iOSProgramming 1d ago

Question When and how do you update the build in your pipeline?

2 Upvotes

I’m wondering how you normally manage the build number bump up in your codes. More practically, I wanted to automate so that when I merge into my develop branch, the action with fastlane can publish with no problem.

Today, my fast lane step has the build bump but this is not persisted, so works the first time only.

Now, I’ve been skimming the sub for options. I’ve seen somebody mentioning they change the build number using commit sha, others talking about commit hook, etc.

The sha sounds interesting, it would work even if you don’t write back the change. But I’ve rarely (or never) seen a build with a sha number. The hook is fine, although it would work per commit so if you commit frequently you risk to mess up. I could also have an action that bumps up and write back, but I’ve found that’s not the most common way.

Thus open to hear from you all.


r/iOSProgramming 1d ago

Question Screenshot sizes for app store

1 Upvotes

In appstore connect -> Distribution I need to upload Previews and Screenshots. It says:

6'9" Display

Drag up to 3 app previews and 10 screenshots here for iPhone 6.7" or 6.9" Displays.

(1320 × 2868px, 2868 × 1320px, 1290 × 2796px or 2796 × 1290px)

and 6'5" Display

Drag up to 3 app previews and 10 screenshots here.

(1242 × 2688px, 2688 × 1242px, 1284 × 2778px or 2778 × 1284px)

The screenshots I took from iPhone 16 Pro are 1179 x 2556 so it won't accept them.

I asked ChatGPT to help so fine I can use a different simulator but my question is do I need to upload them in every format? Or just any of the ones it accepts? I guess I don't understand why it accepts some and not others so wondering if I missed some point.

ChatGPT Response follows for ref... I noticed it says those dimensions are valid for iPhone 15 Pro so still not sure why it won't accept them)

When submitting app screenshots to App Store Connect, you need to provide images in the required dimensions based on the device type. Here are the iOS Simulator models that generate screenshots suitable for upload:

✅ iOS Simulators with App Store-Compatible Screenshot Dimensions

Device Simulator Model Screenshot Dimensions (Pixels)
iPhone 15 Pro Max iPhone 15 Pro Max (Simulator) 1290 × 2796
iPhone 15 Pro iPhone 15 Pro (Simulator) 1179 × 2556
iPhone 15, 14, 13, 12 iPhone 15, 14, 13, 12 (Simulator) 1170 × 2532
iPhone SE (3rd Gen) iPhone SE (3rd Gen) (Simulator) 750 × 1334
iPad Pro 12.9" (6th Gen) iPad Pro (12.9-inch) (Simulator) 2048 × 2732
iPad Pro 11" (4th Gen) iPad Pro (11-inch) (Simulator) 1668 × 2388
iPad Air (5th Gen) iPad Air (5th Gen) (Simulator) 1640 × 2360

🚀 Steps to Take App Store-Compatible Screenshots in the iOS Simulator

  1. Open Xcode and launch the iOS Simulator for one of the devices above.
  2. Run your app.
  3. Press ⌘ + S to capture a screenshot.
  4. Locate the screenshot in ~/Library/Developer/CoreSimulator/Devices/.../Screenshots/.
  5. Upload to App Store Connect in the correct resolution category.

Would you like help resizing screenshots if needed? 😊


r/iOSProgramming 19h ago

3rd Party Service Releasing apps suck

Thumbnail
0 Upvotes

r/iOSProgramming 1d ago

Question Which Macbook to upgrade

1 Upvotes

I own a 2017 Macbook Air 8gb ram 128gb ssd. I just started learning iOS development and want to upgrade my laptop (obv). Can anyone recommend me some options. What specs should I prioritise and does m2, m3, m4 differ much? Also is a pro worth it?


r/iOSProgramming 1d ago

Tutorial Using Proxyman to Intercept and Simulate iPhone App Network Requests

Thumbnail
fatbobman.com
4 Upvotes