Are you calling these 3 lines right after each other like so:
UDPConnection *udpConnection = [[UDPConnection alloc] init];
[udpConnection activate];
host = [udpConnection getHost];
If so your issue is that [udpConnection activate];
is going to take some time to connect and figure out the address. You are calling [udpConnection getHost];
too soon.
You will need to setup a delegate or completion block that will be triggered when didReceiveData
is fired