Commit bd6cea63 by zhangyunjie

oimcore.framework

parent 6d2728bb
...@@ -202,6 +202,7 @@ ...@@ -202,6 +202,7 @@
A96621F524EA84160024EB54 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F424EA83D70024EB54 /* libxml2.tbd */; }; A96621F524EA84160024EB54 /* libxml2.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F424EA83D70024EB54 /* libxml2.tbd */; };
A96621F624EA84230024EB54 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F324EA83C90024EB54 /* libsqlite3.tbd */; }; A96621F624EA84230024EB54 /* libsqlite3.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F324EA83C90024EB54 /* libsqlite3.tbd */; };
A96621F724EA842E0024EB54 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F224EA83BB0024EB54 /* libresolv.tbd */; }; A96621F724EA842E0024EB54 /* libresolv.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F224EA83BB0024EB54 /* libresolv.tbd */; };
A96621F924EA860E0024EB54 /* oimcore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A96621F824EA860E0024EB54 /* oimcore.framework */; };
B94FCB1053F8932068A11CC9 /* libPods-OffcnIMSDKiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 49CE5E230A14D9B821170F61 /* libPods-OffcnIMSDKiOS.a */; }; B94FCB1053F8932068A11CC9 /* libPods-OffcnIMSDKiOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 49CE5E230A14D9B821170F61 /* libPods-OffcnIMSDKiOS.a */; };
/* End PBXBuildFile section */ /* End PBXBuildFile section */
...@@ -614,6 +615,7 @@ ...@@ -614,6 +615,7 @@
A96621F224EA83BB0024EB54 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; }; A96621F224EA83BB0024EB54 /* libresolv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libresolv.tbd; path = usr/lib/libresolv.tbd; sourceTree = SDKROOT; };
A96621F324EA83C90024EB54 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; }; A96621F324EA83C90024EB54 /* libsqlite3.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libsqlite3.tbd; path = usr/lib/libsqlite3.tbd; sourceTree = SDKROOT; };
A96621F424EA83D70024EB54 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; }; A96621F424EA83D70024EB54 /* libxml2.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libxml2.tbd; path = usr/lib/libxml2.tbd; sourceTree = SDKROOT; };
A96621F824EA860E0024EB54 /* oimcore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = oimcore.framework; sourceTree = "<group>"; };
D7DCDED1DEE7F99F223D5C73 /* Pods-OffcnIMSDKiOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OffcnIMSDKiOS.release.xcconfig"; path = "Target Support Files/Pods-OffcnIMSDKiOS/Pods-OffcnIMSDKiOS.release.xcconfig"; sourceTree = "<group>"; }; D7DCDED1DEE7F99F223D5C73 /* Pods-OffcnIMSDKiOS.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OffcnIMSDKiOS.release.xcconfig"; path = "Target Support Files/Pods-OffcnIMSDKiOS/Pods-OffcnIMSDKiOS.release.xcconfig"; sourceTree = "<group>"; };
/* End PBXFileReference section */ /* End PBXFileReference section */
...@@ -626,6 +628,7 @@ ...@@ -626,6 +628,7 @@
A96621F624EA84230024EB54 /* libsqlite3.tbd in Frameworks */, A96621F624EA84230024EB54 /* libsqlite3.tbd in Frameworks */,
A96621F524EA84160024EB54 /* libxml2.tbd in Frameworks */, A96621F524EA84160024EB54 /* libxml2.tbd in Frameworks */,
A96621EF24EA83A80024EB54 /* SystemConfiguration.framework in Frameworks */, A96621EF24EA83A80024EB54 /* SystemConfiguration.framework in Frameworks */,
A96621F924EA860E0024EB54 /* oimcore.framework in Frameworks */,
A96621F124EA83B10024EB54 /* CoreTelephony.framework in Frameworks */, A96621F124EA83B10024EB54 /* CoreTelephony.framework in Frameworks */,
B94FCB1053F8932068A11CC9 /* libPods-OffcnIMSDKiOS.a in Frameworks */, B94FCB1053F8932068A11CC9 /* libPods-OffcnIMSDKiOS.a in Frameworks */,
); );
...@@ -664,6 +667,7 @@ ...@@ -664,6 +667,7 @@
A9661B4224EA64EE0024EB54 /* OffcnIMSDKiOS */ = { A9661B4224EA64EE0024EB54 /* OffcnIMSDKiOS */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
A96621F824EA860E0024EB54 /* oimcore.framework */,
A9661FC824EA7AD10024EB54 /* Common-(宏) */, A9661FC824EA7AD10024EB54 /* Common-(宏) */,
A9661F8124EA7AD10024EB54 /* Tools-(工具) */, A9661F8124EA7AD10024EB54 /* Tools-(工具) */,
A9661B5C24EA72900024EB54 /* AppDelegate.h */, A9661B5C24EA72900024EB54 /* AppDelegate.h */,
...@@ -1843,6 +1847,10 @@ ...@@ -1843,6 +1847,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = LA78A3696S; DEVELOPMENT_TEAM = LA78A3696S;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/OffcnIMSDKiOS",
);
INFOPLIST_FILE = OffcnIMSDKiOS/Info.plist; INFOPLIST_FILE = OffcnIMSDKiOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
...@@ -1865,6 +1873,10 @@ ...@@ -1865,6 +1873,10 @@
CODE_SIGN_IDENTITY = "iPhone Developer"; CODE_SIGN_IDENTITY = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = LA78A3696S; DEVELOPMENT_TEAM = LA78A3696S;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/OffcnIMSDKiOS",
);
INFOPLIST_FILE = OffcnIMSDKiOS/Info.plist; INFOPLIST_FILE = OffcnIMSDKiOS/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 8.0; IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = ( LD_RUNPATH_SEARCH_PATHS = (
......
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1120"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A9661B3F24EA64ED0024EB54"
BuildableName = "OffcnIMSDKiOS.app"
BlueprintName = "OffcnIMSDKiOS"
ReferencedContainer = "container:OffcnIMSDKiOS.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A9661B3F24EA64ED0024EB54"
BuildableName = "OffcnIMSDKiOS.app"
BlueprintName = "OffcnIMSDKiOS"
ReferencedContainer = "container:OffcnIMSDKiOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A9661B3F24EA64ED0024EB54"
BuildableName = "OffcnIMSDKiOS.app"
BlueprintName = "OffcnIMSDKiOS"
ReferencedContainer = "container:OffcnIMSDKiOS.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
#ifndef __OFFCN_IM__TYPES_H__
#define __OFFCN_IM__TYPES_H__
#include <stdio.h>
#ifdef _WIN32
#define ZG_OIM_API_EXPORT __declspec(dllexport)
#define ZG_OIM_API_IMPORT __declspec(dllimport)
#else
#define ZG_OIM_API_EXPORT __attribute__ ((visibility("default")))
#define ZG_OIM_API_IMPORT
#endif
#ifdef __cplusplus
#define ZG_OIM_C_API_EXPORT extern "C" ZG_OIM_API_EXPORT
#define ZG_OIM_C_API_IMPORT extern "C" ZG_OIM_API_IMPORT
#else
#define ZG_OIM_C_API_EXPORT ZG_OIM_API_EXPORT
#define ZG_OIM_C_API_IMPORT ZG_OIM_API_IMPORT
#endif
#ifdef ZG_OIM_SDK_EXPORTS //need define this micro,when build dll, undefine this micro when use this dll
#define ZG_OIM_C_API ZG_OIM_C_API_EXPORT
#else
#define ZG_OIM_C_API ZG_OIM_C_API_IMPORT
#endif
namespace offcn
{
namespace im
{
typedef enum
{
kMsg_Type_Normal, //正常的聊天消息
kMsg_Type_Recv_Confirm, //收到服务端发来的消息确认消息
}OImMsgType;
typedef enum
{
Z_CONN_IM_SRV_OK,
Z_CONN_IM_SRV_FAILED,
Z_CONN_IM_SRV_BROKEN,
Z_DISCONN_IM_SRV_OK,
}OImEventCode;
class OImCoreObserver
{
public:
virtual void OnOImCoreEvent(int code, const char *context) = 0;
virtual void OnOImCoreMessage(const char *message, int len) = 0;
};
}
}
#endif
//
// OIMCore.h
//
// Created by zxl on 2020/8/7.
// Copyright © 2020 zxl. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "oim_types.h"
@protocol OIMCoreDelegate <NSObject>
-(void) OnOImCoreMessageWithMessage:(const char *)message msgLength:(int)len;
-(void) OnOImCoreEventWithCode:(int)code context:(const char *)context;
@end
NS_ASSUME_NONNULL_BEGIN
@interface OIMCoreAdapter : NSObject
@property(nonatomic, readonly) id<OIMCoreDelegate> delegate;
+ (instancetype)sharedOIMCore;
- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;
- (id)copy NS_UNAVAILABLE;
- (id)mutableCopy NS_UNAVAILABLE;
/**
* 连接服务器
*
* @param params must contain server'ip and port in json format eg:{"server_ip": "xxxx", "server_port": 123}
*/
-(void) ConnectImServerWithParam:(NSString*)param;
/**
* 与服务器断开连接
*/
-(void) DisConnectImServer;
/**
* 发送消息
*
* @param message message data, size less than 256 BYTES
* @param type message's type
*/
-(void) SendUserMessage:(NSString*)message length:(int)len type:(offcn::im::OImMsgType)type;
@end
NS_ASSUME_NONNULL_END
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment