我在场景中创建一个新的GameObject, 并添加AVOSCloud Initialize Behaviour,写上我的Application ID和AppKey.
结果,发现在Unity编辑器中直接运行没问题。
但是只要编译到IOS上运行,便报如下错误:
InvalidOperationException: Process has exited, so the requested information is not available.
at System.Diagnostics.Process.get_ProcessName () [0x00000] in :0
at AVOSCloud.PlatformHooks..cctor () [0x00000] in :0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for AVOSCloud.PlatformHooks
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
at System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.MonoCMethod.Invoke (BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in :0
at System.Reflection.ConstructorInfo.Invoke (System.Object[] parameters) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type, Boolean nonPublic) [0x00000] in :0
at System.Activator.CreateInstance (System.Type type) [0x00000] in :0
at AVOSCloud.AVClient..cctor () [0x00000] in :0
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for AVOSCloud.AVClient
at AVOSCloud.AVOSCloudInitializeBehaviour.Awake () [0x00000] in :0

能帮忙看看如何解决吗?

Android同样也有这个问题,但是Android没有办法用Rset Api来解决,leanCloud方会发一个ssl认证错误过来。

文档近期做修改,初始化的方法仅推荐使用脚本绑定的方式,具体请参照快速入门(https://leancloud.cn/start.htm)里面Unity 快速入门的为 GameObject 绑定 AVOSCloudInitializeBehaviour 脚本的方式初始化。相关问题已经进入修复阶段。