AppsFlyerSDK / appsflyer-unity-plugin

AppsFlyer Unity Plugin
MIT License
156 stars 64 forks source link

The parameter order of the setHost method is reversed on the iOS platform #188

Closed guojunliu closed 2 years ago

guojunliu commented 2 years ago

The parameter order of the setHost method is reversed on the iOS platform

When I call

AppsFlyer.setHost("","appsflyersdk.com");




The code call stack is

public static void setHost(string hostPrefixName, string hostName)
{

    if (instance != null)
    {
        instance.setHost(hostPrefixName, hostName);
    }
}

https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/Assets/AppsFlyer/AppsFlyer.cs#L375




public void setHost(string host, string hostPrefix)
{
#if !UNITY_EDITOR
    _setHost(host, hostPrefix);
#endif
}

https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/Assets/AppsFlyer/AppsFlyeriOS.cs#L365




const void _setHost (const char* host, const char* hostPrefix) {
    [[AppsFlyerLib shared] setHost:stringFromChar(host) withHostPrefix:stringFromChar(hostPrefix)];
}

https://github.com/AppsFlyerSDK/appsflyer-unity-plugin/blob/master/Assets/AppsFlyer/Plugins/iOS/AppsFlyeriOSWrapper.mm#L143




I will get log

[AppsFlyerSDK] [com.apple.main-thread] `host` cannot be `nil` or `empty`




The parameter order of the setHost method is reversed on the iOS platform

QQ20221110-115001@2x
af-margot commented 2 years ago

Hi @guojunliu,

Thank you for the inupt ! We just released a hotfix for it, v6.8.5.