1

Something is preventing my game from connecting to a server, and it fails to get approved the Appstore Review Team.

The game was released on GooglePlay and successfully works from all Android devices, even from Linux and Windows. IPv6 networks are working too. The game is using NetworkTransport, which works in my case on Sockets (not Websockets)


I've successfully tested, connected and played the game on:

  • my developer iPhone 5 (iOS 12.4.6) on IPv4 network in United Kingdom (I don't have IPv6 operator)
  • Xiaomi Redmi Note (Android 10) on IPv4 and IPv6 network in Moscow, Russia.
  • PC (Ubuntu 20.04) on IPv4 and IPv6 network
  • PC (Windows 8) on IPv4 and IPv6 network in Moscow, Russia.
  • PC (Windows 10) on IPv4 in United Kingdom

I have 3 VPS servers:

  • Russia, Moscow - IPv4 and IPv6 (listening to port 17777)
  • Germany, Frankfurt - IPv4 and IPv6 (listening to port 17777)
  • USA, New York - IPv4 and IP6 (listening to port 17777)

Client uses some random port, assigned by OS.

The game is made to always connect to the servers that have static IP addresses, it's not using peer-to-peer and the client always initiates connection, not server (...so NAT shouldn't be an issue)

Connection happens directly by IP address, not by DNS request. There are no SSL certificates involved, no encryption. Ping works properly from my office desktop towards all servers (both IPv4 and IPv6 ping).


If there is no internet connection, the game is coded to throw a popup and pause. But when AppStore Review Team launches the game, it somehow thinks that there is internet connection. Yet when it tries to establish connection, both IPv4 and IPv6 networks simply timeout.

Maybe, when compiling the project on XCode, I missed some build options? Maybe there is some permission / "capability" I need to add?

How can it seems work everywhere, but not in AppStore Review Team headquarters?

I even added NSAllowArbitraryLoads key to the .plist file, yet it seems AppStore iPads can't talk to my server. They are running on iOS 13.5.1 on Wi-Fi.

here is my plist:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>CADisableMinimumFrameDuration</key>
    <false />
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>Spider Planet</string>
    <key>CFBundleExecutable</key>
    <string>${EXECUTABLE_NAME}</string>
    <key>CFBundleIdentifier</key>
    <string>${PRODUCT_BUNDLE_IDENTIFIER}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${PRODUCT_NAME}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>1.1</string>
    <key>CFBundleVersion</key>
    <string>24</string>
    <key>LSRequiresIPhoneOS</key>
    <true />
    <key>NSAllowArbitraryLoads</key>
    <true />
    <key>NSAppTransportSecurity</key>
    <dict>
      <key>NSAllowsArbitraryLoads</key>
      <true />
    </dict>
    <key>UIBackgroundModes</key>
    <array>
      <string>remote-notification</string>
    </array>
    <key>UILaunchStoryboardName~ipad</key>
    <string>LaunchScreen-iPad</string>
    <key>UILaunchStoryboardName~iphone</key>
    <string>LaunchScreen-iPhone</string>
    <key>UILaunchStoryboardName~ipod</key>
    <string>LaunchScreen-iPhone</string>
    <key>UIPrerenderedIcon</key>
    <false />
    <key>UIRequiredDeviceCapabilities</key>
    <array>
      <string>armv7</string>
      <string>gamekit</string>
      <string>metal</string>
    </array>
    <key>UIRequiresFullScreen</key>
    <true />
    <key>UIRequiresPersistentWiFi</key>
    <true />
    <key>UIStatusBarHidden</key>
    <true />
    <key>UIStatusBarStyle</key>
    <string>UIStatusBarStyleDefault</string>
    <key>UISupportedInterfaceOrientations</key>
    <array>
      <string>UIInterfaceOrientationLandscapeRight</string>
      <string>UIInterfaceOrientationLandscapeLeft</string>
    </array>
    <key>Unity_LoadingActivityIndicatorStyle</key>
    <integer>-1</integer>
    <key>UnityAddRemoteNotificationCapability</key>
    <true />
    <key>UnityCloudProjectID</key>
    <string></string>
    <key>UnityCrashSubmissionURL</key>
    <string></string>
    <key>UnityNotificationDefaultAuthorizationOptions</key>
    <integer>7</integer>
    <key>UnityNotificationRequestAuthorizationForRemoteNotificationsOnAppLaunch</key>
    <false />
    <key>UnityNotificationRequestAuthorizationOnAppLaunch</key>
    <true />
    <key>UnityRemoteNotificationForegroundPresentationOptions</key>
    <integer>-1</integer>
    <key>UnityUseAPSReleaseEnvironment</key>
    <false />
    <key>UnityUseLocationNotificationTrigger</key>
    <false />
    <key>FacebookAppID</key>
    <string>2895569510500725</string>
    <key>FacebookAutoLogAppEventsEnabled</key>
    <true />
    <key>FacebookAdvertiserIDCollectionEnabled</key>
    <true />
    <key>CFBundleURLTypes</key>
    <array>
      <dict>
        <key>CFBundleURLName</key>
        <string>facebook-unity-sdk</string>
        <key>CFBundleURLSchemes</key>
        <array>
          <string>fb2895569510500725</string>
        </array>
      </dict>
    </array>
    <key>LSApplicationQueriesSchemes</key>
    <array>
      <string>fbapi</string>
      <string>fb-messenger-api</string>
      <string>fbauth2</string>
      <string>fbshareextension</string>
    </array>
  </dict>
</plist>
Kari
  • 1,244
  • 1
  • 13
  • 27

1 Answers1

1

Turned out it's a bug with Unity, that started to appear in March 2020.

LLAPI NetworkTransport was not working for many users. The solution was to use TCP sockets, I used the Telepathy Library, and the app got accepted :) It works just as fast as the NetworkTransport did.

See this discussion and Telepathy

Just make sure your app and server support IPv6 as well as IPv4 and works with NAT.

Kari
  • 1,244
  • 1
  • 13
  • 27