iOS Cloud Sample
Options
I signed up for Photon, went to the dashboard and got my app id, and downloaded the Photon-iOS_v3-0-0-1_Cloud_SDK.zip since I'm interested in using the cloud service for an iOS app.
I then found the demo_loadBalancing_objc sample and compiled and ran it, as is, but it only says "connection failed with error 1040".
Next, based on some forum posts here, I tried modifying this sample to use the cloud by passing my app id into [[LoadBalancingClient alloc] initClient] and then calling [mLoadBalancingClient connect] without a URL, but still I get "connection failed with error 1040".
I searched the forums for 1040, but nothing.
What else can I try? Any suggestions?
I then found the demo_loadBalancing_objc sample and compiled and ran it, as is, but it only says "connection failed with error 1040".
Next, based on some forum posts here, I tried modifying this sample to use the cloud by passing my app id into [[LoadBalancingClient alloc] initClient] and then calling [mLoadBalancingClient connect] without a URL, but still I get "connection failed with error 1040".
I searched the forums for 1040, but nothing.
What else can I try? Any suggestions?
0
Comments
-
So these lines look like this:
[[LoadBalancingClient alloc] initClient:self :@"123456789" :appVersion :PLAYER_NAME] // imagine your appID instead of 123456789
and this:[mLoadBalancingClient connect];
And you have nothing else changed in the code?
If, yes, then it should work.
Have you checked your internet connection and firewall and port settings? You can try with passing true for useTcp for a try and/or check, if it helps, if you try 3G instead of ethernet/wfi or download the server sdk and try, if you can connect to the lcoal server (if anything of that helps, then the problem is msot likely with your fiirewall/port-settings). Perhaps just a typo in your appID?
1040 means a timeout disconnect, as you can see in PhotonConstants.h. If you get it right at the beginning, then its likely, that you could never successfully conenct to the server.0 -
Thanks for the response. I've contacted our IT department to see about opening these ports.0
-
kharris wrote:Thanks for the response. I've contacted our IT department to see about opening these ports.
The policy request (used by Flash and Unity) is going to 843 TCP. 943 TCP is used by Silverlight (same reason).0 -
I added the policy request port to Ludi's repsonse.0