I have downloaded the ShinyTV example to test simplified sign-in on tvOS since it is not working in my own app, and I am having the same issue there.
After assigning my team to the sample app, the bundle ID updates with my team id. I copy the bundle ID into a file entitled "apple-app-site-association" with this format:
{
"webcredentials": {
"apps": [ "{MyTeamID}.com.example.apple-samplecode.ShinyTV{MyTeamID}" ]
}
}
I upload the file to my personal site, ensuring that the content type is application/json. I adjust the Associated Domain entitlement to:
webcredentials:*.{personal-site.com}?mode=developer
using the alternate mode to force it to load from my site, not the CDN.
When I run the build on tvOS, and click the Sign In button, it fails with these errors:
Failed to start session: Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}"
), NSLocalizedDescription=Failed to prepare authorization requests}
Session failed: Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}"
), NSLocalizedDescription=Failed to prepare authorization requests}
ASAuthorizationController credential request failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "(null)" UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"(null)\""
)}
Failed with error: Error Domain=com.apple.AuthenticationServices.AuthorizationError Code=1004 "Failed to prepare authorization requests" UserInfo={NSMultipleUnderlyingErrorsKey=(
"Error Domain=com.apple.CompanionServices.CPSErrorDomain Code=205 \"Missing associated web credentials domains\" UserInfo={NSLocalizedDescription=Missing associated web credentials domains}"
), NSLocalizedDescription=Failed to prepare authorization requests}
What am I missing here?
Delve into the world of built-in app and system services available to developers. Discuss leveraging these services to enhance your app's functionality and user experience.
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
I am writing to report an issue I’m facing after updating my iPhone 11 Pro Max to iOS 26.
I have been using the Hollyland Lark M2 external microphone via the Lightning port, and it was working perfectly before the update. However, after upgrading to iOS 26, the iPhone no longer detects it correctly. The device now recognizes the mic as a pair of wired earphones, and it fails to capture any audio input.
The microphone itself works flawlessly on other devices, so this appears to be an iOS-specific issue.
Could you please confirm:
• Whether this is a known issue in iOS 26?
• If there are any settings or steps I can take to resolve this?
• Whether a fix is planned in an upcoming iOS patch?
I would appreciate any guidance or solution you can provide.
Thank you for your support.
Topic:
App & System Services
SubTopic:
Hardware
A user of my app reported that when trying to remove a file it always fails with the error "file couldn't be removed because you don't have permission to access it (Cocoa Error Domain 513)". After some testing, we found out that it's caused by trying to delete non-empty directories.
I'm using FileManager.removeItem(atPath:) which has worked fine for many years, but it seems that with their particular NAS, it doesn't work.
I could work around this by checking if the file is a directory, and if it is, enumerating the directory and remove each contained file before removing the directory itself. But shouldn't this already be taken care of? In the source code of FileManager I see that for Darwin platforms it calls
removefile(pathPtr, state, removefile_flags_t(REMOVEFILE_RECURSIVE))
so it seems that it should already work. Is the REMOVEFILE_RECURSIVE flag perhaps ignored by the device? But then, is the misleading "you don't have permission to access the file" error thrown by the device or by macOS?
For the FileManager source code, see https://github.com/swiftlang/swift-foundation/blob/1d5d70997410fc8b7700c8648b10d6fc28194202/Sources/FoundationEssentials/FileManager/FileOperations.swift#L444
Note: This failure occurs even when running on the same machine that performed the build, signing, and notarization steps.
We are developing a command-line Endpoint Security (ES) client for macOS, distributed to customers as part of an enterprise security suite.
We have a valid Apple Developer Team ID (redacted for privacy) and have requested and received the Endpoint Security entitlement for our account.
What We’ve Done
Built a universal (x86_64/arm64) CLI ES client using Xcode on macOS Sonoma.
Signed with a Developer ID Application certificate (matching our Team ID).
Applied the entitlement: com.apple.developer.endpoint-security.client.
Notarized the binary via notarytool after receiving Apple’s confirmation that the entitlement was “assigned to our account.”
Distributed and unzipped the notarized ZIP (with com.apple.quarantine xattr intact).
What Happens:
When we run the binary (as root, via sudo) on any test Mac—including the original build/notarization machine—the process is killed immediately at launch. Kernel log (log stream --predicate 'eventMessage CONTAINS "AMFI"' --info) shows:
AMFI: code signature validation failed.
AMFI: bailing out because of restricted entitlements.
AMFI: When validating /path/to/fidelisevents:
Code has restricted entitlements, but the validation of its code signature failed.
Unsatisfied Entitlements:
What We’ve Verified:
codesign -dvvv --entitlements :- ./fidelisevents shows the correct entitlement, team identifier, and certificate.
xattr ./fidelisevents shows both com.apple.provenance and com.apple.quarantine.
spctl -a -vv ./fidelisevents returns:
rejected (the code is valid but does not seem to be an app)
origin=Developer ID Application: [REDACTED]
The process is killed even if run on the same Mac where build/sign/notarization occurred.
Other Details
The entitlement approval email from Apple simply says it is “assigned to your account” and does not mention “production” or “distribution.”
We have rebuilt, re-signed, and re-notarized after receiving the email.
This occurs on both Apple Silicon and Intel Macs, with recent macOS versions (Sonoma, Ventura).
Question
Is it possible that Apple only assigned the development Endpoint Security entitlement, and not the production entitlement required for distributing/running notarized ES clients outside of development?
Is there any way to verify the level of entitlement (dev vs. production) associated with our Team ID?
What additional steps, if any, are needed to enable the production entitlement so that our binaries can run on customer endpoints without being killed by AMFI?
Any advice, experience, or official documentation about production ES entitlement rollout, approval, or troubleshooting would be greatly appreciated!
Thanks in advance!
I am trying to create an app that allows users to opt in and apply a shield to all of their apps during a specified amount of time each day, but they can always turn the shield off from our app or directly ignore the shield for 1 minute from a shield button. It is important that the user doesn't choose what apps to apply a shield to through the activity picker, as some users might not apply it to all apps.
Currently I am doing everything I described in my app and shield all apps and webdomain categories with this:
store.shield.applicationCategories = .all()
store.shield.webDomainCategories = .all()
But the, store.shield.applicationCategories = .all(), seems to block everything except for some system apps like Messages, Phone, FaceTime, Maps, Clock, Settings, Safari, Find My, Clock, Compass, Health, etc. It does block some system apps like Weather, Photos, Camera, Measure, App Store, etc.
I know I can fully block applications from it's bundle identifier but I do not want to remove apps from the home screen. I only want to apply a shield to all of them. I have read every apple documentation possible about this and can't see a way to do it, currently how I am doing it seems to be the best way but it is still not enough. Even blocking a specific category token taken from the activity picker won't apply to some system level applications under it unless you get all the application tokens and apply the shield by applications and not category.
I am really looking for help to see if there is something I can do to achieve my app's goal.
I'm working on a project that says it's to be based on the QNE2TransparentProxyMac sample code but don't have the original sample code. Can I get a pointer to the sample code and documentation please?
Google search didn't find it for some reason.
Thanks!
Peter
Hello,
I recently saw this error from StoreKit in the Console - 'Invalid value for purchase intake' - while debugging a SKPayment subscription issue (where a valid receipt should be verified and restored, but isn't for one user).
I haven't been able to find any documentation about this message and wondered if it was related at all.
There were two other logs from StoreKit right before saying:
'Found 3 products in receipt with ID'
'Processing ad attribution purchase intake'
Does anyone know what 'invalid value for purchase intake' is referencing?
We don't have the AdAttributionKit implemented. It sounds like it might be related to that instead?
Thank you
PLATFORM AND VERSION
iOS
Development environment: Xcode 16.2, macOS 15.5
Run-time configuration: iOS 18
DESCRIPTION OF PROBLEM
Our app (a VoIP and messaging app) has been experiencing a crash when running in the background for long periods of time (a couple of days) while receiving calls, and message notifications. If the app is not receiving notifications, we don't get any crashes while it runs in the background.
It is worth mentioning that we have several pushes that are background pushes and they could happen depending on the outcome of an incoming call. We have the two pushes:
incoming call bye: let the app know that the calling end hanged up the call.
incoming call answered: lets the app know that another device (with the same shared number) answered the call (web app, Android).
Those pushes are delivered within 30 seconds after the call starts. I assume that since the app was awakened by a VoIP push, those background notification won't count towards the iOS restriction of not getting too many background pushes:
"The number of background notifications allowed by the system depends on current conditions, but don’t try to send more than two or three per hour."
Let me know if the above assumption is not accurate.
I don't see details in the crash report (such as a "Termination Description") that could guide me to address the issue. So I would appreciate if you can give me some insight on what could be causing this.
Here is part of the crash report:
Exception Type: EXC_CRASH (SIGKILL)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Termination Reason: FRONTBOARD 0xbaadca11
<RBSTerminateContext| domain:10 code:0xBAADCA11 explanation: reportType:CrashLog maxTerminationResistance:Interactive>
Triggered by Thread: 0
Thread 0 name:
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x00000001dda93ce4 mach_msg2_trap + 8
1 libsystem_kernel.dylib 0x00000001dda9739c mach_msg2_internal + 76 (mach_msg.c:201)
2 libsystem_kernel.dylib 0x00000001dda972b8 mach_msg_overwrite + 428 (mach_msg.c:0)
3 libsystem_kernel.dylib 0x00000001dda97100 mach_msg + 24 (mach_msg.c:323)
4 CoreFoundation 0x000000018c886900 __CFRunLoopServiceMachPort + 160 (CFRunLoop.c:2637)
5 CoreFoundation 0x000000018c8851f0 __CFRunLoopRun + 1208 (CFRunLoop.c:3021)
6 CoreFoundation 0x000000018c886c3c CFRunLoopRunSpecific + 572 (CFRunLoop.c:3434)
7 GraphicsServices 0x00000001d9a65454 GSEventRunModal + 168 (GSEvent.c:2196)
8 UIKitCore 0x000000018f299274 -[UIApplication run] + 816 (UIApplication.m:3845)
9 UIKitCore 0x000000018f264a28 UIApplicationMain + 336 (UIApplication.m:5540)
10 SwiftUI 0x00000001913a97a4 closure #1 in KitRendererCommon(:) + 168 (UIKitApp.swift:68)
11 SwiftUI 0x00000001910af01c runApp(_:) + 112 (UIKitApp.swift:16)
12 SwiftUI 0x00000001910aeed0 static App.main() + 180 (App.swift:136)
13 TheApp Business 0x0000000100686028 static TheApp_BusinessApp.$main() + 52 (TheApp_Business.swift:0)
14 TheApp Business 0x0000000100686028 main + 64
15 dyld 0x00000001b375bf08 start + 6040 (dyldMain.cpp:1450)
STEPS TO REPRODUCE
Open the app.
Leave the app running in the background while it is receiving notifications (VoIP or messages).
Bring the app to the foreground after a day or two of it running in the background.
Notice that after opening the app, the launch screen is presented.
Hello,
I have a question regarding the behavior of BGProcessingTaskRequest when the app is force-quit by the user via the App Switcher.
Based on common understanding and various discussions — including the following Apple Developer Forum threads:
Waking up an iOS app after app is … | Apple Developer Forums
Will BGAppRefreshTaskRequest will … | Apple Developer Forums
Background fetch after app is forc… | Apple Developer Forums
…it is widely understood that iOS prevents background execution (such as background fetch, push notifications, or BGTaskScheduler) after a user force-quits an app via the App Switcher.
However, in my app, I have observed that a scheduled BGProcessingTaskRequest still executes even after the app has been explicitly terminated via App Switcher. The task is scheduled using submit(_:error:), and it is clearly running some time after the app has been closed by the user.
That said, the task does run, but it appears to operate under tighter constraints — for example, it may be allowed to run for a shorter duration, and network requests appear to be more restricted compared to when the app is not force-quit.
My questions are:
Are there any documented or undocumented exceptions that allow this kind of behavior after force-quit?
Could this be a bug or a behavior change in recent iOS versions? (I am observing this on iOS 18.3, 18.4, and 18.5)
Any insights, experiences, or clarifications from Apple engineers or fellow developers would be greatly appreciated.
Thank you!
On macOS Tahoe26.0, iOS 26.0 (23A5287g), Xcode 26.0 beta 3 (17A5276g)
1、Follow this tutorial Downloading asset packs hosted by Apple
When i download a background asset packs hosted by Apple, Xcode callback "Download failed: The helper received an invalid server response with the status code “400”." Before downloading, I uploaded the three aar files to the Apple server using the Transporter app. Three Manifest.json content is:
{"assetPackID":"bdassets2","downloadPolicy":{"onDemand":{}},"fileSelectors":[{"file":"1.jpg"},{"file":"2.pag"},{"file":"3.mp4"}],"platforms":["iOS"]}
and
{"assetPackID":"bdassets1","downloadPolicy":{"prefetch":{"installationEventTypes":["firstInstallation","subsequentUpdate"]}},"fileSelectors":[{"file":"1.jpg"},{"file":"2.pag"},{"file":"3.mp4"},{"directory":"a1"}],"platforms":["iOS"]}
and
{"assetPackID":"bdassets0","downloadPolicy":{"essential":{"installationEventTypes":["firstInstallation","subsequentUpdate"]}},"fileSelectors":[{"file":"1.jpg"},{"file":"2.pag"},{"file":"3.mp4"},{"directory":"a1"}],"platforms":["iOS"]}
The same error was reported when the three aar files were obtained. I obtained it using the following code:
do {
let assetPack = try await AssetPackManager.shared.assetPack(withID: "bdassets2")
try await AssetPackManager.shared.ensureLocalAvailability(of: assetPack)
} catch {
print("Download failed:", error)
}
2、Follow this tutorial Testing your asset packs locally
I use this command line to start the test server:xcrun ba-serve --host 172.17.9.62 bdassets2.aar, The content displayed on the terminal is:
Loading asset packs…
Loading the asset pack at “bdassets2.aar”…
Choose an identity in the panel to continue.
Listening on port 56061…
When running the project, Xcode reports an error:Download failed: Could not connect to the server.
I use iPhone directly visit this website: https://172.17.9.62:56061, on the page display "Hello, world!"
There are too few error messages in both of the above questions. I have no idea what the specific reasons are.I hope someone can offer some guidance.
Best Regards.
Hey Together,
I have seen that critical notifications need to be confirmed by apple to be used.
Sadly I couldn't figure out where to ask for that.
Context: I have a sports tournament app for Beach Handball. There are a couple of Courts like up to 20-25. The main use for that in my app would be to notify first aiders/Medics. Right now they are called in via Speakers or by the referees just writing that into a WhatsApp chat. As this takes a long time and the speakers can be deactivated due to rain, power shortage or even the medics sometimes are not in range to exactly hear the speakers calling them.
To Speed up this process I want them to download the App, Register via an E-Mail or a One Time Code. Now if a referee needs immediate Help from the Medics on their court they can send the Critical alert to the Medics without having to write a chat into a WhatsApp group, to get a call through the speakers 10 minutes later which the medics may not even hear.
A couple of weeks ago we had a player falling on her back/neck/head and they couldn't figure out if she broke her neck or not. Luckily the medics were right next to the court and saw that. but what would happen if they were a couple hundred of meters away and did not notice that? I mean the PA system was off due to a power shortage. someone trying to move her? Risking her death?
And while we are at it we could add those notifications if a team is missing to a court for a game that already should've started. Critical because it is urgent. Those notifications are handled with care.
I'm running into an issue during the iOS build process for my app, and I'm hoping someone can point me in the right direction.
❗ The Problem
When attempting to archive the app via EAS Build (Expo), the build fails with the following error:
`Provisioning profile "HCF_AppStore_ProvisioningProfile" doesn't include the com.apple.developer.push-notifications entitlement. Profile qualification is using entitlement definitions that may be out of date. Connect to network to update.`
What I’ve Already Done:
Enabled Push Notifications capability for the App ID (com.rsmco.helpcreatefamilies) in the Apple Developer portal.
Deleted and regenerated the App Store Provisioning Profile after enabling the capability.
Confirmed the new profile is associated with the correct App ID and Distribution Certificate.
Uploaded the new profile to EAS (Expo) and rebuilt the app.
Yet the error persists during the Xcode archive step with Exit code 65.
Additional Info:
Provisioning Profile Name: HCF_AppStore_ProvisioningProfile
App ID: com.rsmco.helpcreatefamilies
Team: Reproductive Sciences Management Company, LLC
Workflow: Expo EAS Build
Capability causing issue: com.apple.developer.push-notifications
I'm creating a simple p2p server to advertise a service:
// server
let txtRecord = NWTXTRecord(["key": "value"])
NWListener.Service(name: name, type: "_p2p._tcp", domain: nil, txtRecord: txtRecord)
and client to look that service up:
// client
switch result.endpoint {
case let .service(name: name, type: type, domain: domain, interface: interface):
print(result.metadata)
The client is getting the advertisement ok, but metadata is nil. I expected to see a txt record there, is that not supported?
public let metadata: NWBrowser.Result.Metadata
/// Additional metadata provided to the browser by a service. Currently,
/// only Bonjour TXT records are supported.
Is the above server making a Bonjour TXT record or something else?
Basically what I want is to pass a short key/value data as part of advertisement.
I'm encountering an issue with our legacy Objective-C codebase that uses UIApplicationDelegate.
Here are the steps to reproduce the issue:
Uninstall the application from the device.
Install and launch the application.
As part of the launch event, the client requests notification permission.
The permission prompt is still displayed, even though the client receives a remote notification token (which appears to be a cached one).
I followed the same steps with a sample app built with Swift (SwiftUI), and this issue did not occur. In the Swift app, I consistently received a delegate<didRegisterForRemoteNotificationsWithDeviceToken> call after the user allowed the notification permission.
Could you please provide some insights into why this might be happening with only our client?
Topic:
App & System Services
SubTopic:
Notifications
Tags:
APNS
iOS
Notification Center
User Notifications
My app has a couple of consumable IAP items. I have tested this extensively and it works in all test scenarios including loads of beta testers using testflight. However, Apple's production reviewer reports that loading of the products hangs in their setup.
This is very frustrating as I have no means of recreating the problem.
My first product was tested ok an all my IAP items are approved for release. However, I did not explicitly assign them to my build. I read somewhere that you need to do that but could not find in App Store Connect after my first product was approved.
Below is the relevant code section. What am I missing?
class DonationManager: NSObject, ObservableObject, SKProductsRequestDelegate, SKPaymentTransactionObserver {
@Published var products: [SKProduct] = [] // This is observed by a view. But apparently that view never gets populated in Apple's production review setup
@Published var isPurchasing: Bool = false
@Published var purchaseMessage: String? = nil
let productIDs: Set<String> = ["Donation_5", "Donation_10", "Donation_25", "Donation_50"]
override init() {
super.init()
SKPaymentQueue.default().add(self)
fetchProducts()
}
deinit {
SKPaymentQueue.default().remove(self)
}
func fetchProducts() {
print("Attempting to fetch products with IDs: \(productIDs)")
let request = SKProductsRequest(productIdentifiers: productIDs)
request.delegate = self
request.start()
}
func productsRequest(_ request: SKProductsRequest, didReceive response: SKProductsResponse) {
DispatchQueue.main.async {
self.products = response.products.sorted { $0.price.compare($1.price) == .orderedAscending }
print("Successfully fetched \(self.products.count) products.")
if !response.invalidProductIdentifiers.isEmpty {
print("Invalid Product Identifiers: \(response.invalidProductIdentifiers)")
self.purchaseMessage = NSLocalizedString("Some products could not be loaded. Please check App Store Connect.", comment: "")
} else if self.products.isEmpty {
print("No products were fetched. This could indicate a problem with App Store Connect configuration or network.")
self.purchaseMessage = NSLocalizedString("No products available. Please try again later.", comment: "")
}
}
}
...and the view showing the items:
@StateObject private var donationManager = DonationManager()
var body: some View {
VStack(spacing: 24) {
Spacer()
// Donation options -------------------
if donationManager.products.isEmpty {
ProgressView(NSLocalizedString("Loading donation options...", comment: ""))
.foregroundColor(DARK_BROWN)
.italic()
.font(.title3)
.padding(.top, 16)
} else {
ForEach(donationManager.products, id: \.self) { product in
Button(action: {
donationManager.buy(product: product)
}) {
HStack {
Image(systemName: "cup.and.saucer.fill")
.foregroundColor(.pink)
Text("\(product.localizedTitle) \(product.priceLocale.currencySymbol ?? "$")\(product.price)")
}
.buttonStyle()
}
.disabled(donationManager.isPurchasing)
}
}
Hi,
Our project is a MacOS SwiftUI GUI application that bundles a (Sandboxed) System Network Extension, signed with a Developer ID certificate for distribution outside of the app store. The system network extension is used to write a packet tunnel provider (NEPacketTunnelProvider), as our project requires the creation of a TUN device.
In order for our System VPN to function, it must reach out to a (self-hosted) server (i.e. to discover a list of peers). Being self-hosted, this server is typically not accessible via the public web, and may only be accessible from within a VPN (such as those also implemented using NEPacketTunnelProvider, e.g. Tailscale, Cloudflare WARP).
What we've discovered is that the networking code of the System Network Extension process does not attempt to use the other VPN network interfaces (utunX) on the system. In practice, this means requests to IPs and hostnames that should be routed to those interfaces time out. Identical requests made outside of the Network System Extension process use those interfaces and succeed.
The simplest example is where we create a URLSession.downloadTask for a resource on the server. A more complicated example is where we execute a Go .dylib that continues to communicate with that server. Both types of requests time out.
Two noteworthy logs appear when packets fail to send, both from the kernel 'process':
cfil_hash_entry_log:6088 <CFIL: Error: sosend_reinject() failed>: [30685 com.coder.Coder-Desktop.VPN] <UDP(17) out so b795d11aca7c26bf 57728068503033955 57728068503033955 age 0> lport 3001 fport 3001 laddr 100.108.7.40 faddr 100.112.177.88 hash 58B15863
cfil_service_inject_queue:4472 CFIL: sosend() failed 49
I also wrote some test code that probes using a UDP NWConnection and NWPath availableInterfaces. When run from the GUI App, multiple interfaces are returned, including the one that routes the address, utun5. When ran from within the sysex, only en0 is returned.
I understand routing a VPN through another is unconventional, but we unfortunately do need this functionality one way or another. Is there any way to modify which interfaces are exposed to the sysex?
Additionally, are these limitations of networking within a Network System Extension documented anywhere? Do you have any ideas why this specific limitation might exist?
We are developing an iOS application that is interacting with HTTP APIs that requires us to put a unique UUID (a nonce) as an header on every request (obviously there's more than that, but that's irrilevant to the question here).
If the same nonce is sent on two subsequent requests the server returns a 412 error. We should avoid generating this kind of errors as, if repeated, they may be flagged as a malicious activity by the HTTP APIs.
We are using URLSession.shared.dataTaskPublisher(for: request) to call the HTTP APIs with request being generated with the unique nonce as an header.
On our field tests we are seeing a few cases of the same HTTP request (same nonce) being repeated a few seconds on after the other.
Our code has some retry logic only on 401 errors, but that involves a token refresh, and this is not what we are seeing from logs.
We were able to replicate this behaviour on our own device using Network Link Conditioner with very bad performance, with XCode's Network inspector attached we can be certain that two HTTP requests with identical headers are actually made automatically, the first request has an "End Reason" of "Retry", the second is "Success" with Status 412.
Our questions are:
can we disable this behaviour?
can we provide a new request for the retry (so that we can update headers)?
Thanks,
Francesco
Hi everyone,
I’m currently experimenting with building a simple DNS filter using Apple’s Packet Tunnel framework. Here’s the flow I’m trying to implement:
Create a TUN interface
Set up a UDP socket
Read packets via packetFlow.readPackets
Parse the raw IP packet
Forward the UDP payload through the socket
Receive the response from the server
Reconstruct the IP packet with the response
Write it back to the TUN interface using packetFlow.writePackets
Here’s an example of an intercepted IP packet (DNS request):
45 00 00 3c 15 c4 00 00 40 11 93 d1 c0 a8 00 64 08 08 08 08 ed 6e 00 35 00 28 e5 c9 7f da 01 00 00 01 00 00 00 00 00 00 04 74 69 6d 65 05 61 70 70 6c 65 03 63 6f 6d 00 00 01 00 01
And here’s the IP packet I tried writing back into the TUN interface (DNS response):
45 00 00 89 5e 37 40 00 40 11 0b 11 08 08 08 08 c0 a8 00 64 00 35 ed 6e 00 75 91 e8 7f da 81 80 00 01 00 04 00 00 00 00 04 74 69 6d 65 05 61 70 70 6c 65 03 63 6f 6d 00 00 01 00 01 c0 0c 00 05 00 01 00 00 0c fb 00 11 04 74 69 6d 65 01 67 07 61 61 70 6c 69 6d 67 c0 17 c0 2c 00 01 00 01 00 00 03 04 00 04 11 fd 74 fd c0 2c 00 01 00 01 00 00 03 04 00 04 11 fd 74 7d c0 2c 00 01 00 01 00 00 03 04 00 04 11 fd 54 fb
Unfortunately, it seems the packet is not being written back correctly to the TUN interface. I’m not seeing any expected DNS response behavior on the device.
Also, I noticed that after creating the TUN, the interface address shows up as 0.0.0.0:0 in Xcode. The system log includes this message when connecting the VPN:
NWPath does not have valid interface: satisfied (Path is satisfied), interface: utun20[endc_sub6], ipv4, dns, expensive, uses cellular
Does anyone know how to properly initialize the TUN so that the system recognizes it with a valid IP configuration? Or why my written-back packet might be getting ignored?
Any help would be appreciated!
Basically the title. I am trying to implement a local notification to trigger, regardless of internet connection, around 3-5pm if a certain array in the app is not empty to get the user to sync unsaved work with the cloud. I wanted to used the BGAppRefreshTask as I saw it was lightweight and quick for just posting a banner notification but after inspecting it in the console, it looks like it needs internet connection to trigger. Is this the case or am I doing something wrong? Should I be using the BGProcessingTask instead?
Topic:
App & System Services
SubTopic:
Processes & Concurrency
Tags:
Background Tasks
User Notifications
What are my options if I want to iterate over loaded images (dynamic libraries) within a signal handler? I have a few solutions that might work, but without going too much into them, i'm curious if anyone has experience here, or ideas what to look into.
Cheers,
AC