Posts

Post not yet marked as solved
4 Replies
1.3k Views
here my code to using multicast : guard let multicast = try? NWMulticastGroup(for:       [ .hostPort(host: "224.0.0.251", port: 5353) ])       else { return }  self.group = NWConnectionGroup(with: multicast, using: .udp)       group.setReceiveHandler(maximumMessageSize: 16384, rejectOversizedMessages: true) { (message, content, isComplete) in print("Received message from (String(describing: message.remoteEndpoint))") let sendContent = Data("ack".utf8) message.reply(content: sendContent) }       group.stateUpdateHandler = { (newState) in print("Group entered state (String(describing: newState))") } group.start(queue: .main) i have try every library for socket and every time get error on real ios device ios 14 and 15 when start happen stateDidUpdate called with field : 2021-11-01 11:07:21.106160+0200 SamRiskSDKPOC[1528:39332] [connection_group] nw_connection_group_handle_listener_state_change [G1] listener failed with error Group entered state waiting(POSIXErrorCode: Network is down) Group entered state failed(POSIXErrorCode: Address already in use) iv request for using multicast network from apple , get approved add the capability: iv created .entitlement file and add to app setting after i create developer provision profile and download it and run those: ➜ ~ codesign -d --entitlements :- /Users/menny-a/Library/Developer/Xcode/DerivedData/SamRiskSDKPOC-gccczhfgcyqowifmuucaawrwfibu/Build/Products/Debug-iphoneos/SamRiskSDKPOC.app | grep -A 1 "com.apple.developer.networking.multicast" Executable=/Users/menny-a/Library/Developer/Xcode/DerivedData/SamRiskSDKPOC-gccczhfgcyqowifmuucaawrwfibu/Build/Products/Debug-iphoneos/SamRiskSDKPOC.app/SamRiskSDKPOC com.apple.developer.networking.multicast ➜ ~ security cms -D -i /Users/menny-a/Library/Developer/Xcode/DerivedData/SamRiskSDKPOC-gccczhfgcyqowifmuucaawrwfibu/Build/Products/Debug-iphoneos/SamRiskSDKPOC.app/embedded.mobileprovision | grep -A 1 "com.apple.developer.networking.multicast" com.apple.developer.networking.multicast after i done this my plist change : on ios simulatore work perfect on read ios device not please help
Posted
by mennya.
Last updated
.
Post not yet marked as solved
1 Replies
336 Views
we developing app that use vpn to prevent user to brows to fishing website by redirect to blocking page i try all the combination off OnDemand rules but still some time when the phone return from sleep / bedtime vpn stuck on connecting state and the device internet trafic are stuck and the only way to start von again is by manually set the vpn switch from setting to close and it starting again any idea what i'm doing wrong and also maybe it an iOS bug ?
Posted
by mennya.
Last updated
.