# Troubleshooting
This document compiles common issues you might encounter during iOS integration, helping you troubleshoot effectively.
# unrecognized selector sent to instance exception
When encountering this error, add -ObjC to Other Linker Flags
in Xcode Build Settings
.
# Why Does the SDK Display a Different Language Than Specified?
Normally, you can specify the SDK's display language through the last parameter of the init method. If not set, the SDK will initialize using the device language.
To ensure optimal user experience, AIHelp implements a language correction logic:
- We standardize different language codes. For example, zh / zh-cn / zh-CN / zh_CN / zh-hans are all converted to zh-CN for processing
- If the corrected language isn't enabled in the backend, it will be corrected to the default language set in the AIHelp backend
The AIHelp backend typically defaults to English as the fallback language. This default can be adjusted based on specific requirements.
Note that AIHelp API currently accepts ISO 639-1 language codes. Country codes should not be used during initialization, as some country codes might conflict with language codes. For example, 'KR' represents South Korea in country codes but refers to the Kanuri language in language codes.
If your project currently uses country codes, we recommend mapping ISO-3166 country codes to ISO 639-1 language codes before passing them to AIHelp.
# Why Does Player Information Show as 'anonymous' with Random Characters?
By default, before calling the updateUserInfo
API, AIHelp uses 'anonymous' as the username and 'deviceId' as the user ID.
UID information isn't synchronized with the backend until the AIHelp page opens. Since UID is stored in memory, sessions work correctly if UID is available before page opening.
If information isn't showing in the backend, the API likely wasn't called effectively.
This might be due to timing - the API must be called after initialization:
AIHelpSupport.init(/* your code here */);
AIHelpSupport.updateUserInfo(/* your code here */);
The updateUserInfo call only needs to follow init; successful initialization isn't required.
If user information updates occur before initialization, they might fail. Consider updating just before opening the page.
# Why Does iOS Always Display in Portrait/Landscape Mode?
First, verify that device orientation lock is disabled, as auto-rotation requires screen rotation to be enabled.
Second, iOS screen rotation control follows this hierarchy: AppDelegate > Project Settings/info.plist > rootController. AIHelp cannot follow screen rotation if multiple orientations aren't allowed at these levels.
Proposed solutions:
Enable multiple orientations in project settings and remove orientation settings from info.plist and AppDelegate
Set desired orientation in your game's rootController
AIHelp SDK will then follow orientation settings as specified in the integration documentation