TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | Commercial |
ReleasedLast Release | Feb 2024 |
Maintained by Berdikhan, 11Sight LLC, Kutay.
11Sight iOS Framework.
Supported localizations: English and Turkish.
iOS 8
CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:
$ gem install cocoapods
To integrate IISightSDK into your Xcode project using CocoaPods, specify it in your Podfile
:
platform :ios, '8.0'
target '<Your Target Name>' do
pod 'IISightSDK'
end
Then, run the following command:
$ pod install
or
$ pod update
If you prefer not to use any dependency managers, you can integrate IISightSDK
into your project manually.
IISighSDK.framework
under "Embedded Binaries" section.It should appear under "Linked Frameworks and Binaries" as well.
Starting from XCode 9, "Voice over IP" is removed from Capabilities and you have to add it manually to info.plist.
Your "info.plist" should look like this
<key>UIBackgroundModes</key>
<array>
<string>audio</string>
<string>voip</string>
</array>
Add the following keys:
Always Embed Swift Standard Libraries
to YES
// 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
}
Authorization status
@property (nonatomic) BOOL isLoggedIn;
Current connection status
@property (nonatomic, assign) IISightConnectionStatus currentConnectionStatus;
Ringtone for incoming call
@property (strong, nonatomic) NSString * ringtone;
Ringtone file name with extension only. (Ex. "ringtone.wav")
11Sight LLC
11Sight LLC: Copyright 2017 11Sight LLC. All Rights Reserved. Use of this software is subject to the terms and conditions of the 11Sight terms and conditions.