Post

Replies

Boosts

Views

Activity

WKWebView Accept Invalid (Date) SSL Certificates
I'm attempting (for a niche internal use only, it doesn't need to appear on the App Store and I'm aware there's no way this would pass their checks!) to ignore SSL certificate dates within a WKWebView I'm completely new to Swift, but not to iOS development, and this is very much a 'solve a problem quickly' rather than a properly designed app. The Info.plist has Allow Arbitrary Loads in Web Content and Allow Arbitrary Loads both set in the ATS Settings and I found this block of code here https://developer.apple.com/forums/thread/15610 func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {         guard let serverTrust = challenge.protectionSpace.serverTrust else { return completionHandler(.useCredential, nil) }         let exceptions = SecTrustCopyExceptions(serverTrust)         SecTrustSetExceptions(serverTrust, exceptions)         completionHandler(.useCredential, URLCredential(trust: serverTrust))     } Which works as expected for trusting a self-signed certificate, but if the certificate isn't yet valid or has expired it doesn't work. Is there a way to completely ignore the certificate issue and expiry date?
0
0
1.1k
Jan ’22
Multicast Network, Unexpected Interfaces, and Binding to Specific Interfaces
Firstly, I'm completely new to native Swift/iOS Development so apologies if this is a simple question that I'm seemingly misunderstanding. I have an app which has the Multicast Networking entitlement and works fine on my own iPhone, however it only has one interface when I list them (en0) The multicast networking, however, fails entirely on another test iPhone but this also appears to have one or more 'ipsecX' interfaces both with the IP 192.0.0.6 - I'm guessing but I wonder if this is related to a connection to Apple Watch as I've noticed two devices that have these additional interfaces, and both of them are connected to Apple Watch (with no VPNs configured) and that's the only thing that differentiates them from my own iPhone. I can reproduce the symptoms on my own iPhone by connecting to a VPN which creates a utunX interface (but in my case disconnecting from the VPN removes this interface and it works as expected) I expect a solution would be to bind my Multicast Group to the WiFi IP but I've tried a few things without success; Setting params.requiredInterfaceType = .wifi Looping through each interface to try and 'find' en0 and bind this way; let queue = DispatchQueue(label: "En0MonitorQueue") monitor.pathUpdateHandler = { [weak self] path in // Find the en0 interface if let en0 = path.availableInterfaces.first(where: { $0.name == "en0" }) { monitor.cancel() // Stop monitoring once found let params = NWParameters.udp params.allowLocalEndpointReuse = true params.requiredInterface = en0 guard let multicast = try? NWMulticastGroup(for: [ .hostPort( host: NWEndpoint.Host(self?.settings.multicastIP ?? "224.224.0.77"), port: NWEndpoint.Port(rawValue: UInt16(self?.settings.multicastPort ?? 23019)) ) ]) else { print("Failed to Start Multicast Group") return } let group = NWConnectionGroup(with: multicast, using: params) // previous multicast stuff is here } else { print("en0 interface not found, waiting...") } } monitor.start(queue: queue) Neither seems to work. I feel I must be missing something simple, because it should not be the case that simply enabling a VPN (or having another interface created by something else) breaks Multicast on en0/WiFi. That said, I also don't want to limit the user to en0 as they may wish to use Ethernet interfaces, but for now it would be good to make it work to confirm this is the problem.
3
0
162
Apr ’25
AVCam Sample Code - Undesired "Jump" in Video Recording Image
On iPhone 16 Pro Max (not tested other devices) there's a noticeable jump in the framing of the preview video when you record in the iOS AVCam Sample App. The same jump in camera framing can be observed by switching to the front facing camera and then back to the rear one. It looks roughly consistent with switching between the 0.5x and 1x camera (but not quite a match for the same viewable area in the Camera app) - and it's only when it's initially loaded, once recording is started it retains the 'closer' image no matter how many times it's stopped/started thereafter. I'm relatively new to Swift and haven't done anything with the camera before, so odd 'buggy' behaviour in the sample code isn't helping me understand it! :-) Is there any way to fix this?
0
0
380
Jan ’26
Video in "Made for iPad" apps on macOS
I'm relatively new to Swift development (and native iOS development for that matter) I've got an iOS app that uses the iPhone / iPad built in cameras, and am looking to make this more compatible with macOS. Using the normal AVCaptureDevice.DiscoverySession I seem to get the iPhone Continuity Camera and the in-built MacBook Pro camera but I don't see other input devices that I see in QuickTime Player (for example) such as connected external cameras or Virtual Inputs provided by NDI Virtual Input and OBS. Is there a way to see access these without a specific Mac build (as the rest of the functionality works great, and I'd rather not diverge the codebase too much as it's easier to update one app than two!
0
0
321
Feb ’26
Sleep/Lock despite UIApplication.shared.isIdleTimerDisabled
I have an app that records video (and also provides a custom remote interface) so it needs to remain awake and in the foreground. It sets; UIApplication.shared.isIdleTimerDisabled = true I've also tried catching willEnterForegroundNotification to ensure it resets it if the app is backgrounded and resumes; .onReceive( NotificationCenter.default.publisher( for: UIApplication.willEnterForegroundNotification) ) { _ in UIApplication.shared.isIdleTimerDisabled = true } However, it seems that on some devices it will still go to sleep. This seems to be the case when Adaptive Power Mode is on (or rather, I've not managed to reproduce it when Adaptive Power Mode is off) even when battery percentage is well over 20% (I sort of expected Low Power Mode to trigger this) Am I missing something obvious? there must be a way to make sure media capture apps stay awake (I'm surprised AVFoundation doesn't do it anyway!) If it is related to Adaptive Power Mode, is there any way to detect that programatically to at least provide a warning to the user that having it on will affect operation of the app?
1
0
274
Feb ’26
Unlocking a demo mode without IAP
I am aware of the following in the App Review Guidelines; 3.1.1 If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use in-app purchase. Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, cryptocurrencies and cryptocurrency wallets, etc. The app itself operates normally, but imposes limits after a limited time of use. Purchasing the full version removes these limits. This is a one-time IAP, not a subscription. My app is aimed at professionals within the entertainment industry, and will only ever be used within a theatre or other similar venue. I do not intend to provide any other paid route to the full version than via the App Store. However, what I would like to do is provide free use at certain events and to students in their educational venues (e.g. college theatres etc)- is it acceptable to use an external mechanism (e.g. a server based API) to temporarily remove the limitations whilst in that venue? Or, likewise, provide an extension to the free trial period for specific uses. Note this is not a purchase, as there is no payment. Therefore there is no revenue outside of the App Store (which surely is the point of the mandate to use IAP for this purpose) Also, it's not fully 'unlocking' the app (the user doesn't get the full version, they just aren't bound by the trial limit timer when within that venue or for a limited time) I'm aware that another route would be to put a different version of the app in the store that requires a username and password for use (for example) and then provide those credentials to log in - as there's lots of apps that follow that model, but it seems clunky to require the user to download a different app.
0
0
142
Feb ’26
Waiting for Review - Hardware Confusion
I'm not sure where to go from here, I've filled in the "appeal" form but had no response. My app has somehow been interpreted to 'only work with specific hardware' - this is not the case it works wither either specific hardware OR a third party piece of software (which is freely available) The third party software provides a TCP server and my app connects to it as a client. I have been rejected four times now because I haven't provided a 'video to show the paring process with the dedicated hardware' There isn't a 'pairing process' any more than there is a pairing process between Safari and a website or Mail and an IMAP server, it literally connects to the specified IP and Port. I've provided a video of this (showing a screen capture of the software in question, and a screen capture from an actual iOS device - my iPhone - showing me connecting to the other application in the app, and demonstrating the functionality of the app - but keep being told I need to provide a video with hardware. I don't own the hardware version, I use the software version. It's exactly the same process and software whether it is running on hardware or software.
2
0
120
Feb ’26
Metadata in Video stripped by Share Sheet / Airdrop
I have an application which records video along with some custom metadata and a chapter track. The resultant video is stored in the Camera Roll. When sharing the video via the Share Sheet or AirDrop, the metadata track is stripped entirely (the chapter markers are preserved) Sharing via AirDrop with the "All Photos Data" option does include the metadata track, as does copying from the device with Image Capture but this is a bad user experience as the user must remember to explicitly select this option, and the filename is lost when sending this way. I have also tried various other approaches (such as encoding my metadata in a subtitle track, which I didn't expect to be stripped as it's an accessibility concern) but it's also removed. Essentially I am looking for a definitive list of things that are not stripped or if there's a way to encode a track in some way to indicate it should be preserved. The metadata is added via AVTimedMetadataGroup containing one AVMutableMetadataItem which has its value as a JSON string. I took a different approach with the Chapter Marker track (mainly because I did it first in a completely different way and didn't rework it when I added the other track). I post-process these after the video is recorded, and add them with addMutableTrack and then addTrackAssociation(to: chapterTrack, type: .chapterList) but I don't think that's the reason the chapter track persists where the custom metadata does not as other tests with video files from other sources containing subtitles etc also had their subtitle data stripped. tl;dr I record videos with metadata that I want to be able to share via Share Sheet and AirDrop, what am I doing wrong?
0
0
383
Mar ’26
HID Device Access / Mode Switch
I might be trying to achieve the impossible here, but if there's another way to go about it any advice would be appreciated. I've got an older Linux application that reflashes firmware on a connected USB HID device that I'm trying to port to macOS. Essentially the device starts as an HID interface (0x03/0x01/0x01) but to update firmware receives a simple control payload and then restarts and connects as a different (non-HID) device. However I can't open the HID device at all, I'm guessing this is some sort of permission error (SIP?). AppleUSBHostUserClient::openGated: failed to open IOUSBHostDevice... provider is already opened for exclusive access by AppleUSB20Hub hid_open_path: failed to open IOHIDDevice from mach entry: (0xE00002E2) not permitted AppleUSBXHCICommandRing::setAddress: completed with result code 4 AppleUSBHostPort::createDevice: failed to create device (0xe00002bc) AppleUSBIORequest ... transaction error ... 0xe00002ed Is there any way at all to do this on macOS? Interestingly if you run a Windows VM in VMWare or similar and connect the device to that VM it works, so there's obviously some way but I'd like to create a simple standalone tool.
1
0
184
2w
WKWebView Accept Invalid (Date) SSL Certificates
I'm attempting (for a niche internal use only, it doesn't need to appear on the App Store and I'm aware there's no way this would pass their checks!) to ignore SSL certificate dates within a WKWebView I'm completely new to Swift, but not to iOS development, and this is very much a 'solve a problem quickly' rather than a properly designed app. The Info.plist has Allow Arbitrary Loads in Web Content and Allow Arbitrary Loads both set in the ATS Settings and I found this block of code here https://developer.apple.com/forums/thread/15610 func webView(_ webView: WKWebView, didReceive challenge: URLAuthenticationChallenge, completionHandler: @escaping (URLSession.AuthChallengeDisposition, URLCredential?) -> Void) {         guard let serverTrust = challenge.protectionSpace.serverTrust else { return completionHandler(.useCredential, nil) }         let exceptions = SecTrustCopyExceptions(serverTrust)         SecTrustSetExceptions(serverTrust, exceptions)         completionHandler(.useCredential, URLCredential(trust: serverTrust))     } Which works as expected for trusting a self-signed certificate, but if the certificate isn't yet valid or has expired it doesn't work. Is there a way to completely ignore the certificate issue and expiry date?
Replies
0
Boosts
0
Views
1.1k
Activity
Jan ’22
Multicast Network, Unexpected Interfaces, and Binding to Specific Interfaces
Firstly, I'm completely new to native Swift/iOS Development so apologies if this is a simple question that I'm seemingly misunderstanding. I have an app which has the Multicast Networking entitlement and works fine on my own iPhone, however it only has one interface when I list them (en0) The multicast networking, however, fails entirely on another test iPhone but this also appears to have one or more 'ipsecX' interfaces both with the IP 192.0.0.6 - I'm guessing but I wonder if this is related to a connection to Apple Watch as I've noticed two devices that have these additional interfaces, and both of them are connected to Apple Watch (with no VPNs configured) and that's the only thing that differentiates them from my own iPhone. I can reproduce the symptoms on my own iPhone by connecting to a VPN which creates a utunX interface (but in my case disconnecting from the VPN removes this interface and it works as expected) I expect a solution would be to bind my Multicast Group to the WiFi IP but I've tried a few things without success; Setting params.requiredInterfaceType = .wifi Looping through each interface to try and 'find' en0 and bind this way; let queue = DispatchQueue(label: "En0MonitorQueue") monitor.pathUpdateHandler = { [weak self] path in // Find the en0 interface if let en0 = path.availableInterfaces.first(where: { $0.name == "en0" }) { monitor.cancel() // Stop monitoring once found let params = NWParameters.udp params.allowLocalEndpointReuse = true params.requiredInterface = en0 guard let multicast = try? NWMulticastGroup(for: [ .hostPort( host: NWEndpoint.Host(self?.settings.multicastIP ?? "224.224.0.77"), port: NWEndpoint.Port(rawValue: UInt16(self?.settings.multicastPort ?? 23019)) ) ]) else { print("Failed to Start Multicast Group") return } let group = NWConnectionGroup(with: multicast, using: params) // previous multicast stuff is here } else { print("en0 interface not found, waiting...") } } monitor.start(queue: queue) Neither seems to work. I feel I must be missing something simple, because it should not be the case that simply enabling a VPN (or having another interface created by something else) breaks Multicast on en0/WiFi. That said, I also don't want to limit the user to en0 as they may wish to use Ethernet interfaces, but for now it would be good to make it work to confirm this is the problem.
Replies
3
Boosts
0
Views
162
Activity
Apr ’25
AVCam Sample Code - Undesired "Jump" in Video Recording Image
On iPhone 16 Pro Max (not tested other devices) there's a noticeable jump in the framing of the preview video when you record in the iOS AVCam Sample App. The same jump in camera framing can be observed by switching to the front facing camera and then back to the rear one. It looks roughly consistent with switching between the 0.5x and 1x camera (but not quite a match for the same viewable area in the Camera app) - and it's only when it's initially loaded, once recording is started it retains the 'closer' image no matter how many times it's stopped/started thereafter. I'm relatively new to Swift and haven't done anything with the camera before, so odd 'buggy' behaviour in the sample code isn't helping me understand it! :-) Is there any way to fix this?
Replies
0
Boosts
0
Views
380
Activity
Jan ’26
Video in "Made for iPad" apps on macOS
I'm relatively new to Swift development (and native iOS development for that matter) I've got an iOS app that uses the iPhone / iPad built in cameras, and am looking to make this more compatible with macOS. Using the normal AVCaptureDevice.DiscoverySession I seem to get the iPhone Continuity Camera and the in-built MacBook Pro camera but I don't see other input devices that I see in QuickTime Player (for example) such as connected external cameras or Virtual Inputs provided by NDI Virtual Input and OBS. Is there a way to see access these without a specific Mac build (as the rest of the functionality works great, and I'd rather not diverge the codebase too much as it's easier to update one app than two!
Replies
0
Boosts
0
Views
321
Activity
Feb ’26
Sleep/Lock despite UIApplication.shared.isIdleTimerDisabled
I have an app that records video (and also provides a custom remote interface) so it needs to remain awake and in the foreground. It sets; UIApplication.shared.isIdleTimerDisabled = true I've also tried catching willEnterForegroundNotification to ensure it resets it if the app is backgrounded and resumes; .onReceive( NotificationCenter.default.publisher( for: UIApplication.willEnterForegroundNotification) ) { _ in UIApplication.shared.isIdleTimerDisabled = true } However, it seems that on some devices it will still go to sleep. This seems to be the case when Adaptive Power Mode is on (or rather, I've not managed to reproduce it when Adaptive Power Mode is off) even when battery percentage is well over 20% (I sort of expected Low Power Mode to trigger this) Am I missing something obvious? there must be a way to make sure media capture apps stay awake (I'm surprised AVFoundation doesn't do it anyway!) If it is related to Adaptive Power Mode, is there any way to detect that programatically to at least provide a warning to the user that having it on will affect operation of the app?
Replies
1
Boosts
0
Views
274
Activity
Feb ’26
Unlocking a demo mode without IAP
I am aware of the following in the App Review Guidelines; 3.1.1 If you want to unlock features or functionality within your app, (by way of example: subscriptions, in-game currencies, game levels, access to premium content, or unlocking a full version), you must use in-app purchase. Apps may not use their own mechanisms to unlock content or functionality, such as license keys, augmented reality markers, QR codes, cryptocurrencies and cryptocurrency wallets, etc. The app itself operates normally, but imposes limits after a limited time of use. Purchasing the full version removes these limits. This is a one-time IAP, not a subscription. My app is aimed at professionals within the entertainment industry, and will only ever be used within a theatre or other similar venue. I do not intend to provide any other paid route to the full version than via the App Store. However, what I would like to do is provide free use at certain events and to students in their educational venues (e.g. college theatres etc)- is it acceptable to use an external mechanism (e.g. a server based API) to temporarily remove the limitations whilst in that venue? Or, likewise, provide an extension to the free trial period for specific uses. Note this is not a purchase, as there is no payment. Therefore there is no revenue outside of the App Store (which surely is the point of the mandate to use IAP for this purpose) Also, it's not fully 'unlocking' the app (the user doesn't get the full version, they just aren't bound by the trial limit timer when within that venue or for a limited time) I'm aware that another route would be to put a different version of the app in the store that requires a username and password for use (for example) and then provide those credentials to log in - as there's lots of apps that follow that model, but it seems clunky to require the user to download a different app.
Replies
0
Boosts
0
Views
142
Activity
Feb ’26
Waiting for Review - Hardware Confusion
I'm not sure where to go from here, I've filled in the "appeal" form but had no response. My app has somehow been interpreted to 'only work with specific hardware' - this is not the case it works wither either specific hardware OR a third party piece of software (which is freely available) The third party software provides a TCP server and my app connects to it as a client. I have been rejected four times now because I haven't provided a 'video to show the paring process with the dedicated hardware' There isn't a 'pairing process' any more than there is a pairing process between Safari and a website or Mail and an IMAP server, it literally connects to the specified IP and Port. I've provided a video of this (showing a screen capture of the software in question, and a screen capture from an actual iOS device - my iPhone - showing me connecting to the other application in the app, and demonstrating the functionality of the app - but keep being told I need to provide a video with hardware. I don't own the hardware version, I use the software version. It's exactly the same process and software whether it is running on hardware or software.
Replies
2
Boosts
0
Views
120
Activity
Feb ’26
Metadata in Video stripped by Share Sheet / Airdrop
I have an application which records video along with some custom metadata and a chapter track. The resultant video is stored in the Camera Roll. When sharing the video via the Share Sheet or AirDrop, the metadata track is stripped entirely (the chapter markers are preserved) Sharing via AirDrop with the "All Photos Data" option does include the metadata track, as does copying from the device with Image Capture but this is a bad user experience as the user must remember to explicitly select this option, and the filename is lost when sending this way. I have also tried various other approaches (such as encoding my metadata in a subtitle track, which I didn't expect to be stripped as it's an accessibility concern) but it's also removed. Essentially I am looking for a definitive list of things that are not stripped or if there's a way to encode a track in some way to indicate it should be preserved. The metadata is added via AVTimedMetadataGroup containing one AVMutableMetadataItem which has its value as a JSON string. I took a different approach with the Chapter Marker track (mainly because I did it first in a completely different way and didn't rework it when I added the other track). I post-process these after the video is recorded, and add them with addMutableTrack and then addTrackAssociation(to: chapterTrack, type: .chapterList) but I don't think that's the reason the chapter track persists where the custom metadata does not as other tests with video files from other sources containing subtitles etc also had their subtitle data stripped. tl;dr I record videos with metadata that I want to be able to share via Share Sheet and AirDrop, what am I doing wrong?
Replies
0
Boosts
0
Views
383
Activity
Mar ’26
HID Device Access / Mode Switch
I might be trying to achieve the impossible here, but if there's another way to go about it any advice would be appreciated. I've got an older Linux application that reflashes firmware on a connected USB HID device that I'm trying to port to macOS. Essentially the device starts as an HID interface (0x03/0x01/0x01) but to update firmware receives a simple control payload and then restarts and connects as a different (non-HID) device. However I can't open the HID device at all, I'm guessing this is some sort of permission error (SIP?). AppleUSBHostUserClient::openGated: failed to open IOUSBHostDevice... provider is already opened for exclusive access by AppleUSB20Hub hid_open_path: failed to open IOHIDDevice from mach entry: (0xE00002E2) not permitted AppleUSBXHCICommandRing::setAddress: completed with result code 4 AppleUSBHostPort::createDevice: failed to create device (0xe00002bc) AppleUSBIORequest ... transaction error ... 0xe00002ed Is there any way at all to do this on macOS? Interestingly if you run a Windows VM in VMWare or similar and connect the device to that VM it works, so there's obviously some way but I'd like to create a simple standalone tool.
Replies
1
Boosts
0
Views
184
Activity
2w