Hi @eskimo,
We have tried the code provided above and we have observed outgoing packets on port 12345, but there are no incoming packets.
NSArray<NENetworkRule *> *includedNetworks = @[
@[@"0.0.0.0", @0],
@[@"::", @0]
];
NSMutableArray<NENetworkRule *> *networkRules = [NSMutableArray array];
for (NSArray *network in includedNetworks) {
NSString *addr = network[0];
NSNumber *prefix = network[1];
NWHostEndpoint *endpoint = [NWHostEndpoint endpointWithHostname:addr port:@"12345"];
NENetworkRule *networkRule = [[NENetworkRule alloc] initWithDestinationNetwork:endpoint prefix:prefix.intValue protocol:NENetworkRuleProtocolTCP];
[networkRules addObject:networkRule];
}
settings.includedNetworkRules = networkRules;
Topic:
App & System Services
SubTopic:
Networking
Tags: