Unable to link the profiler to the iOS device

Hi,

I’m using Unity Pro (v4.2.0.f4) with iOS Pro license and unable to link the profiler in the editor to the game running on the device.

  • The build settings under the File menu, has ‘development builds’ and ‘autoconnect profiler’ checked.

  • The build is created not by ‘build and run’, it’s a custom build process that uses BuildPipeline.BuildPlayer().

  • I’m using xCode 4.6.3 to run the game.

  • I tried with both the device being on the same wireless network as the Mac, and with creating a new wireless network from the Mac which the device is using.

  • The firewall on the Mac is disabled.

  • The device, iPhone4 running iOS 6.1.3, isn’t connected to a cellular network

  • Tried with the game running from Xcode, and independently, tried restarting Unity as well.

In all cases the profile didn’t show the device/game under the ‘Active Profile’ dropdown, and manually inputing the device IP address results in ‘Failed to connect to player’

Any help from the community and Unity developers is appreciated.

Update: see solution in my last post.

1 Like

Maybe your wireless router is blocking ports 54998 to 55511?

It’s not blocking anything for internal traffic.
Also, it didn’t work when I created a wireless network from the Mac and had the iPhone connect to it, and the Mac’s firewall is off so nothing should be blocking it in that case either.

Can anyone from the Unity team help, or does someone in the community know?

Try disabling bluetooth on the device if its enabled.

2 Likes

Issue solved, posting here for reference to others encountering the same issue:

Apparently, unlike what’s documented on BuildPipeline.BuildPlayer, the options argument isn’t “additional buildOptions” but the default ones.
I had to add:

BuildOptions.Development | BuildOptions.SymlinkLibraries | BuildOptions.ConnectWithProfiler

as that argument in order for it to work (The last two values are optional).

1 Like

Was trying to connect my iPhone (built from xCode) to the unity profiler of my PC.

This solved it for me: debugging - No abbility to debug Unity app on the android device / Debug and profiler cannot connect to the phone correctly - Stack Overflow

On Windows 10:
Windows Defender Firewall with Advanced Security → Overview → Windows Defender Firewall Properties

in there I had to set Firewall State to ‘off’ for both Domain Profile, Private Profile and Public Profile tabs. (perhaps not all were needed, but was short on time, so didn’t experiment). Disabling all can expose your pc, making it vulnerable.

Also, double check that the wifi is enabled on the actual device (phone) and that you are connected to the same router as your computer. The USB wire between to PC wasn’t enough!"