Post

Replies

Boosts

Views

Activity

Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
Ok now i found how to do port forwarding also i used this code var ipAddr = in_addr() // 1. Convert String to in_addr inet_pton(AF_INET, guestIP, &ipAddr) let status = vmnet_network_configuration_add_port_forwarding_rule( config, UInt8(IPPROTO_TCP), // TCP protocol sa_family_t(AF_INET), // address family guestPort, // internal port (guest) externalPort, // external port (host) &ipAddr // internal address (guest IP) ) if status == .VMNET_SUCCESS { print("✅ Port Forwarding set: Mac:\(externalPort) -> VM(\(guestIP)):\(guestPort)") } else { print("❌ Port Forwarding failed for \(guestIP): \(status.rawValue)") } } for port forwding it is returning success but when i test it it does not work. Is there anything i am doing wrong? Please help me also in fixing this problem
Topic: App & System Services SubTopic: Core OS Tags:
3w
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
my code looks likes this import Virtualization import vmnet import Darwin @available(macOS 26.0, *) public class SharedVMNetManager { public static let shared = SharedVMNetManager() private var activeNetwork: vmnet_network_ref? private var activeConfig: vmnet_network_configuration_ref? // Track which MACs we have already told the kernel about private var registeredMacs: Set<String> = [] private let lock = NSLock() private init() {} public func getAttachment(macAddress: String, reservedIP: String) -> VZVmnetNetworkDeviceAttachment? { lock.lock() defer { lock.unlock() } var status: vmnet_return_t = .VMNET_SUCCESS // 1. Check if we've already initialized the hardware switch if let config = activeConfig, let network = activeNetwork { // ONLY add the reservation if we haven't done it for this MAC yet if !registeredMacs.contains(macAddress) { addReservation(to: config, mac: macAddress, ip: reservedIP) registeredMacs.insert(macAddress) } return VZVmnetNetworkDeviceAttachment(network: network) } // 2. First-time initialization let mode: vmnet.operating_modes_t = .VMNET_SHARED_MODE guard let config = vmnet_network_configuration_create(mode, &status), status == .VMNET_SUCCESS else { return nil } // Define Subnet var subnet = in_addr(), mask = in_addr() inet_pton(AF_INET, "192.168.142.1", &subnet) inet_pton(AF_INET, "255.255.255.0", &mask) vmnet_network_configuration_set_ipv4_subnet(config, &subnet, &mask) // Define the Pool (Make sure your reserved IP is INSIDE this range) /*var start = in_addr(), end = in_addr() inet_pton(AF_INET, "192.168.142.10", &start) inet_pton(AF_INET, "192.168.142.50", &end) vmnet_network_configuration_set_ipv4_pool(config, &start, &end)*/ // 3. Register the first MAC before the network starts addReservation(to: config, mac: macAddress, ip: reservedIP) registeredMacs.insert(macAddress) // 4. Commit and Create Network guard let network = vmnet_network_create(config, &status), status == .VMNET_SUCCESS else { return nil } self.activeConfig = config self.activeNetwork = network return VZVmnetNetworkDeviceAttachment(network: network) } private func addReservation(to config: vmnet_network_configuration_ref, mac: String, ip: String) { var macAddr = ether_addr() guard let macPtr = ether_aton(mac) else { return } macAddr = macPtr.pointee var ipAddr = in_addr() inet_pton(AF_INET, ip, &ipAddr) // This tells the kernel's DHCP server: "If you see this MAC, give it this IP" let status = vmnet_network_configuration_add_dhcp_reservation(config, &macAddr, &ipAddr) if status != .VMNET_SUCCESS { print("dhcp faliure \(status.rawValue)") } } } For the first virtual machine the ip address is getting reserved but from second vm onwards ip is not getting reserved it gets from dhcp server. this makes me not able to assign ip address to second virtual machine onwards thus we cant determine the ipadddress of second vm onwards. is there a way we can ask vmnet to refresh the config. is it possible? Or the only way is to create the network config with all the ip address on start of the app and take it from there. what if the user creates a new vm. how to handle this kind of situation. thanks in advance
Topic: App & System Services SubTopic: Core OS Tags:
3w
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
never mind i managed to get the sample code from apple container github repository. now i can reserve a pool of ip address and assign ip address to guest from that. thanks for the heads up. it seem to be that VZVmnetNetworkDeviceAttachment is only avaialble for mac os 26 how can accomplist this with 14 and 15. any idea? And aslo after doing this i would like to do the port forwarding. Any idea how can i accomplish this.
Topic: App & System Services SubTopic: Core OS Tags:
3w
Reply to process.waitUntilExit never exits in tahoe 26.3
It seems to be that the bug is fixed in Tahoe 26.4 beta 3 release. I heard back from review and they have denied it with the temporary entitlement. I found that the waitforexit hangs but the disk was created so temporary workaround i wait for 5 to 10seconds and if the file was created i terminate the process and continue with my virtual machine creation. this temporarily fixes the problem. submitted for the review.
Topic: App & System Services SubTopic: Core OS Tags:
Mar ’26
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
Ok now i found how to do port forwarding also i used this code var ipAddr = in_addr() // 1. Convert String to in_addr inet_pton(AF_INET, guestIP, &ipAddr) let status = vmnet_network_configuration_add_port_forwarding_rule( config, UInt8(IPPROTO_TCP), // TCP protocol sa_family_t(AF_INET), // address family guestPort, // internal port (guest) externalPort, // external port (host) &ipAddr // internal address (guest IP) ) if status == .VMNET_SUCCESS { print("✅ Port Forwarding set: Mac:\(externalPort) -> VM(\(guestIP)):\(guestPort)") } else { print("❌ Port Forwarding failed for \(guestIP): \(status.rawValue)") } } for port forwding it is returning success but when i test it it does not work. Is there anything i am doing wrong? Please help me also in fixing this problem
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
my code looks likes this import Virtualization import vmnet import Darwin @available(macOS 26.0, *) public class SharedVMNetManager { public static let shared = SharedVMNetManager() private var activeNetwork: vmnet_network_ref? private var activeConfig: vmnet_network_configuration_ref? // Track which MACs we have already told the kernel about private var registeredMacs: Set<String> = [] private let lock = NSLock() private init() {} public func getAttachment(macAddress: String, reservedIP: String) -> VZVmnetNetworkDeviceAttachment? { lock.lock() defer { lock.unlock() } var status: vmnet_return_t = .VMNET_SUCCESS // 1. Check if we've already initialized the hardware switch if let config = activeConfig, let network = activeNetwork { // ONLY add the reservation if we haven't done it for this MAC yet if !registeredMacs.contains(macAddress) { addReservation(to: config, mac: macAddress, ip: reservedIP) registeredMacs.insert(macAddress) } return VZVmnetNetworkDeviceAttachment(network: network) } // 2. First-time initialization let mode: vmnet.operating_modes_t = .VMNET_SHARED_MODE guard let config = vmnet_network_configuration_create(mode, &status), status == .VMNET_SUCCESS else { return nil } // Define Subnet var subnet = in_addr(), mask = in_addr() inet_pton(AF_INET, "192.168.142.1", &subnet) inet_pton(AF_INET, "255.255.255.0", &mask) vmnet_network_configuration_set_ipv4_subnet(config, &subnet, &mask) // Define the Pool (Make sure your reserved IP is INSIDE this range) /*var start = in_addr(), end = in_addr() inet_pton(AF_INET, "192.168.142.10", &start) inet_pton(AF_INET, "192.168.142.50", &end) vmnet_network_configuration_set_ipv4_pool(config, &start, &end)*/ // 3. Register the first MAC before the network starts addReservation(to: config, mac: macAddress, ip: reservedIP) registeredMacs.insert(macAddress) // 4. Commit and Create Network guard let network = vmnet_network_create(config, &status), status == .VMNET_SUCCESS else { return nil } self.activeConfig = config self.activeNetwork = network return VZVmnetNetworkDeviceAttachment(network: network) } private func addReservation(to config: vmnet_network_configuration_ref, mac: String, ip: String) { var macAddr = ether_addr() guard let macPtr = ether_aton(mac) else { return } macAddr = macPtr.pointee var ipAddr = in_addr() inet_pton(AF_INET, ip, &ipAddr) // This tells the kernel's DHCP server: "If you see this MAC, give it this IP" let status = vmnet_network_configuration_add_dhcp_reservation(config, &macAddr, &ipAddr) if status != .VMNET_SUCCESS { print("dhcp faliure \(status.rawValue)") } } } For the first virtual machine the ip address is getting reserved but from second vm onwards ip is not getting reserved it gets from dhcp server. this makes me not able to assign ip address to second virtual machine onwards thus we cant determine the ipadddress of second vm onwards. is there a way we can ask vmnet to refresh the config. is it possible? Or the only way is to create the network config with all the ip address on start of the app and take it from there. what if the user creates a new vm. how to handle this kind of situation. thanks in advance
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
never mind i managed to get the sample code from apple container github repository. now i can reserve a pool of ip address and assign ip address to guest from that. thanks for the heads up. it seem to be that VZVmnetNetworkDeviceAttachment is only avaialble for mac os 26 how can accomplist this with 14 and 15. any idea? And aslo after doing this i would like to do the port forwarding. Any idea how can i accomplish this.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to Programmatic IP Discovery for VZVirtualMachine in an App Store Sandbox
Thank you for the reply. Is there any example with code on how to do this?
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
3w
Reply to "Testflight is currently unavailable" message for all users
I am also facing the same issue. Able to install the previous version of testflight app. Today i updated a new version and cant install the same with testflight.
Replies
Boosts
Views
Activity
Mar ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
It seems to be that the bug is fixed in Tahoe 26.4 beta 3 release. I heard back from review and they have denied it with the temporary entitlement. I found that the waitforexit hangs but the disk was created so temporary workaround i wait for 5 to 10seconds and if the file was created i terminate the process and continue with my virtual machine creation. this temporarily fixes the problem. submitted for the review.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Mar ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
I recommend that you continue to explore App Review options. See here. Thanks. I have submitted an appeal. I will update here once i have some answer.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
I have the feedback from the app review team. The app did not pass the review becuase of the com.apple.storagekitd entitlement usage. They are asking me to find another workaround. I dont know what to do to fix this bug. The bug still exist in Tahoe 26.4 Beta 2 also. It is not fixed in Tahoe 26.4 beta.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
Thank you very much for detailed info about the entitlement key. I have made the changes to app and submitted for app review with the radar info in review notes and appsandbox info. Fingers crossed till the review complete. I will come back once i have some info from app review team.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
Thank you for your reply. A key of com.apple.security.temporary-exception.mach-lookup.global-name I tried this and it works. It does not hang anymore. If i make this changes whether the app will pass the app review? Thanks
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to process.waitUntilExit never exits in tahoe 26.3
indeed it is very annoying. I have a live app on the mac appstore and customers are returning the product for refund because of this problme. what a disappointment.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to How to Create ASIF Disk Image Programmatically in Swift?
with 26.3 i cant create asif disk image in sandboxed environment. It was working fine until 26.2. now i get this problem I have tested and it does not work in sandboxed environment. process.waitUntilExit just hangs. disabling sandbox makes it work.
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Feb ’26
Reply to onContinueUserActivity(CSSearchableItemActionType, perform) does not work on a SwiftUI macOS app
I am also getting the same problem. i have a mac os app ie app content indexing and the perform block is never triggered. dont know what is causing the issue. Any help would be appreciated from DTS engineers.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Spotlight Importer Extension Not Triggered for Custom UTI on macOS
[quote='863004022, DTS Engineer, /thread/786976?answerId=863004022#863004022'] Have you see this thread? [/quote] Thanks for the reference. It is disappointing that it is a known bug still with tahoe.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’25
Reply to Spotlight Importer Extension Not Triggered for Custom UTI on macOS
I haven’t received any response from the DTS engineers regarding this question so far. Could Apple please confirm whether this issue is being reviewed, or if any additional information is required from my side? Thank you.
Topic: App & System Services SubTopic: General Tags:
Replies
Boosts
Views
Activity
Oct ’25