When developing and debugging on physical iOS devices with Portal SDK, you may experience slower performance compared to running without a debugger or on simulators. To optimize the debugging experience on physical iOS devices, add the following environment variable to your Xcode scheme:
Open your project in Xcode
Go to Product > Scheme > Edit Scheme
Select “Run” on the left sidebar
Go to the “Arguments” tab
In the “Environment Variables” section, click ”+”
Add:
Name: GODEBUG
Value: asyncpreemptoff=1
This optimization will significantly improve the debugging experience when using a debugger on physical devices.
This environment variable only affects debugging sessions and has no impact on release builds or production performance. Your app will perform optimally in production whether or not you add this debugging configuration - it only helps improve the development experience when debugging on physical devices.