IISightSDK 6.2.7

IISightSDK 6.2.7

测试已测试
语言语言 Obj-CObjective C
许可证 商业许可证
发布最后发布2024年2月

Berdikhan11Sight LLCKutay维护。



  • 11Sight LLC

IISightSDK Header

IISightSDK

概览

11Sight iOS 框架。

特性

  1. 视频通话
  2. 聊天

支持本地化:英语和土耳其语。

要求

iOS 8

设置

CocoaPods

CocoaPods 是 Cocoa 项目的依赖管理器。您可以使用以下命令安装它

$ gem install cocoapods

要使用 CocoaPods 将 IISightSDK 集成到您的 Xcode 项目中,请在 Podfile 中指定它

platform :ios, '8.0'

target '<Your Target Name>' do
    pod 'IISightSDK'
end

然后,运行以下命令

$ pod install

$ pod update

手动

如果您不希望使用任何依赖管理器,您可以手动将 IISightSDK 集成到项目中。

嵌入框架

  • 下载 IISightSDK 并将其解压缩到您喜欢的文件夹。
  • 接下来,在项目导航器(蓝色项目图标)中选择您的应用程序项目,以访问目标配置窗口,并在侧边栏的 "Targets" 节下选择应用程序目标。
  • 在窗口顶部的选项卡栏中,打开 "General" 面板。
  • IISighSDK.framework 拖至 "Embedded Binaries" 部分。

它还应在 "Linked Frameworks and Binaries" 下显示。

  • 这样就完成了!

附加配置

功能

  • 在项目导航器中(蓝色项目图标)选择您的应用程序项目,以访问目标配置窗口,并在侧边栏的 "Targets" 节下选择应用程序目标。
  • 在窗口顶部的选项卡栏中,打开 "Capabilities" 面板。
  • 启用 "推送通知"
  • 启用 "后台模式",选择 "音频、AirPlay 和画中画" 以及 "VoIP"
  • 最终结果应如图所示
    Capabilities

从 Xcode 9 开始,"VoIP" 被从功能中删除,您必须手动将其添加到 info.plist 中。
您的 "info.plist" 应类似于以下内容

<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
</array>

Info.plist

添加以下密钥

  • NSAppleMusicUsageDescription
  • NSCameraUsageDescription
  • NSMicrophoneUsageDescription
  • NSPhotoLibraryUsageDescription

Objective-C 项目的必要配置

  • 在项目导航器(蓝色项目图标)中选择您的应用程序项目,以访问目标配置窗口,并在侧边栏的 "Targets" 节下选择应用程序目标。
  • 在窗口顶部的选项卡栏中,打开 "Build Settings" 面板。
  • Always Embed Swift Standard Libraries 设置为 YES

用法

AppDelegate

// define macro
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v)  ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)

@import IISightSDK;

@interface AppDelegate ()<UNUserNotificationCenterDelegate>

@end

@implementation AppDelegate


    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
        if( SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO( @"10.0" ) )
        {
            UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter];
            center.delegate = self;
            [center requestAuthorizationWithOptions:(UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionBadge) completionHandler:^(BOOL granted, NSError * _Nullable error){
                if( !error ){
                    [[UIApplication sharedApplication] registerForRemoteNotifications];
                }
            }];
        }

        [[IISightSDKManager sharedManager] startWithPartnerUrl:@"YOUR_PARTNER_URL"];
        return YES;
    }

    #pragma mark - iOS 8.0 Notifications
    - (void)application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification {
        BOOL belongsToSDK = [[IISightSDKManager sharedManager] localNotificationBelongsToIISight:notification.category];

    }

    - (void)application:(UIApplication *)application handleActionWithIdentifier:(NSString *)identifier forLocalNotification:(UILocalNotification *)notification completionHandler:(void (^)())completionHandler {
        BOOL belongsToSDK = [[IISightSDKManager sharedManager] localNotificationBelongsToIISight:notification.category];
        completionHandler();
    }

    #pragma mark - iOS 10.0 Notifications
    -(void)userNotificationCenter:(UNUserNotificationCenter *)center didReceiveNotificationResponse:(UNNotificationResponse *)response withCompletionHandler:(void (^)())completionHandler{
        BOOL belongsToSDK = [[IISightSDKManager sharedManager] localNotificationBelongsToIISight:response.actionIdentifier];
    }

    -(void)userNotificationCenter:(UNUserNotificationCenter *)center willPresentNotification:(UNNotification *)notification withCompletionHandler:(void (^)(UNNotificationPresentationOptions))completionHandler{
        BOOL belongsToSDK = [[IISightSDKManager sharedManager] localNotificationBelongsToIISight:notification.request.content.categoryIdentifier];
        completionHandler(UNNotificationPresentationOptionAlert);
    }

登录

    - (void) login {
        [[IISightSDKManager sharedManager] setLoginDelegate:self];
        [[IISightSDKManager sharedManager] login_userWithEmail:@"USERNAME" password:@"PASSWORD"];
    }                               
    #pragma mark - Login Delegate
    -(void)loginSuccessful{
        // Successful login
    }

    -(void)loginFailedWithErrorMessage:(NSString *)errorMessage {
        // Login failed
    }                               

发起通话

    - (void) makeCall {
        [[IISightSDKManager sharedManager] startOutgoingCall:@"BUTTON_ID"];
    }

登出

    - (void) logout {
        [[IISightSDKManager sharedManager] setLogoutDelegate:self];
        [[IISightSDKManager sharedManager] logout_user];
    }
    #pragma mark - Logout Delegate
    - (void) logoutSuccessful{
        // Successful sign out
    }

    - (void) logoutFailedWithErrorMessage:(NSString *)errorMessage{
        // Sign out failed
    }

属性

授权状态

    @property (nonatomic) BOOL isLoggedIn;

当前连接状态

    @property (nonatomic, assign) IISightConnectionStatus currentConnectionStatus;

来电铃声

    @property (strong, nonatomic) NSString * ringtone;

带扩展名的铃声文件名。例如:"ringtone.wav"

资源

作者

11Sight LLC

许可证

11Sight LLC:版权所有©2017 11Sight LLC。本软件的使用受11Sight 服务条款和条件的约束。