Skip to content

Commit

Permalink
Merge pull request #60 from luckyyuqiang/3.9.0.1
Browse files Browse the repository at this point in the history
3.9.0.1
  • Loading branch information
dujiepeng authored Jul 15, 2022
2 parents ce56a0e + f7c6f6b commit 7409695
Show file tree
Hide file tree
Showing 19 changed files with 399 additions and 48 deletions.
70 changes: 43 additions & 27 deletions ChatSDKDemo/Assets/ChatSDK/ChatSDK/Client/IClient.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
using UnityEngine;

using UnityEngine;

namespace ChatSDK
{
internal abstract class IClient
Expand All @@ -15,11 +15,13 @@ public static IClient Instance
if (instance == null)
{
CallbackManager.Instance();
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
instance = new Client_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
instance = new Client_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
instance = new Client_Mac();
#else
instance = new Client_Mac();
#endif
_initialized = true;
Expand All @@ -45,11 +47,13 @@ public IChatManager ChatManager()
{
if (_initialized == false) return null;
if (chatImp != null) { return chatImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
chatImp = new ChatManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
chatImp = new ChatManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
chatImp = new ChatManager_Mac(instance);
#else
chatImp = new ChatManager_Mac(instance);
#endif
return chatImp;
Expand All @@ -63,11 +67,13 @@ public IContactManager ContactManager()
{
if (_initialized == false) return null;
if (contactImp != null) { return contactImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
contactImp = new ContactManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
contactImp = new ContactManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
contactImp = new ContactManager_Mac(instance);
#else
contactImp = new ContactManager_Mac(instance);
#endif
return contactImp;
Expand All @@ -81,11 +87,13 @@ public IGroupManager GroupManager()
{
if (_initialized == false) return null;
if (groupImp != null) { return groupImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
groupImp = new GroupManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
groupImp = new GroupManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
groupImp = new GroupManager_Mac(instance);
#else
groupImp = new GroupManager_Mac(instance);
#endif
return groupImp;
Expand All @@ -99,11 +107,13 @@ public IRoomManager RoomManager()
{
if (_initialized == false) return null;
if (roomImp != null) { return roomImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
roomImp = new RoomManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
roomImp = new RoomManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
roomImp = new RoomManager_Mac(instance);
#else
roomImp = new RoomManager_Mac(instance);
#endif
return roomImp;
Expand All @@ -117,11 +127,13 @@ public IPushManager PushManager()
{
if (_initialized == false) return null;
if (pushImp != null) { return pushImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
pushImp = new PushManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
pushImp = new PushManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
pushImp = new PushManager_Mac(instance);
#else
pushImp = new PushManager_Mac(instance);
#endif
return pushImp;
Expand All @@ -130,11 +142,13 @@ public IPushManager PushManager()
internal IConversationManager ConversationManager()
{
if (conversationImp != null) { return conversationImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
conversationImp = new ConversationManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
conversationImp = new ConversationManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
conversationImp = new ConversationManager_Mac(instance);
#else
conversationImp = new ConversationManager_Mac(instance);
#endif
return conversationImp;
Expand All @@ -143,11 +157,13 @@ internal IConversationManager ConversationManager()
internal IUserInfoManager UserInfoManager()
{
if (userInfoImp != null) { return userInfoImp; }
#if UNITY_ANDROID
#if UNITY_ANDROID && !UNITY_EDITOR
userInfoImp = new UserInfoManager_Android();
#elif UNITY_IOS
#elif UNITY_IOS && !UNITY_EDITOR
userInfoImp = new UserInfoManager_iOS();
#elif UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE
#elif UNITY_STANDALONE || UNITY_EDITOR
userInfoImp = new UserInfoManager_Mac(instance);
#else
userInfoImp = new UserInfoManager_Mac(instance);
#endif
return userInfoImp;
Expand Down Expand Up @@ -280,4 +296,4 @@ public void DeleteMultiDeviceDelegate(IMultiDeviceDelegate multiDeviceDelegate)
}

}
}
}
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</data>
<key>Resources/easemob.framework/Versions/A/easemob</key>
<data>
D58iaOs3w0VZzCPeLLNQwvJihB8=
0BrvRlJXMYdzxQoWsI7jfsdGdWM=
</data>
<key>Resources/lib/libc++.1.dylib</key>
<data>
Expand Down Expand Up @@ -78,11 +78,11 @@
<dict>
<key>hash</key>
<data>
D58iaOs3w0VZzCPeLLNQwvJihB8=
0BrvRlJXMYdzxQoWsI7jfsdGdWM=
</data>
<key>hash2</key>
<data>
7sSaH+rSwO1v20NQj1uybfDKRRElrhSITNrwF4pugrU=
GM1ssbiS3btPGlpc+nN0IWZbdQG3ZFV7T/1rZtmSf3s=
</data>
</dict>
<key>Resources/easemob.framework/Versions/Current</key>
Expand Down
Binary file modified ChatSDKDemo/Assets/ChatSDK/Plugins/x64/hyphenateCWrapper.dll
Binary file not shown.
5 changes: 3 additions & 2 deletions ChatSDKDemo/Assets/Script/Login.cs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ void LoginAction() {
SceneManager.LoadSceneAsync("Main");
}
else {
UIManager.DefaultAlert(transform, "login failed, code: " + code);
UIManager.DefaultAlert(transform, "login failed, code: " + code + "; desc:" + desc);
}
//UIManager.DefaultAlert(transform, "login failed, code: " + code);
}
Expand Down Expand Up @@ -159,7 +159,8 @@ void AutoLoginBtnAction()

void InitEaseMobSDK() {
//default appkey
string appkey = "easemob-demo#easeim";
//string appkey = "easemob-demo#easeim";
string appkey = "easemob-demo#unitytest";

#if UNITY_STANDALONE_OSX || UNITY_EDITOR_WIN || UNITY_STANDALONE

Expand Down
2 changes: 2 additions & 0 deletions Unity_SDK/c_wrapper/callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

using namespace easemob;

extern EMClient* gClient;

//callback entries definition
#if defined(_WIN32)
//Callback
Expand Down
Loading

0 comments on commit 7409695

Please sign in to comment.