├── VoIPTest ├── VoIPTest │ ├── voip_call.caf │ ├── ViewController.h │ ├── VoIPTest.entitlements │ ├── RingCall.h │ ├── AppDelegate.h │ ├── main.m │ ├── ViewController.m │ ├── VideoTalkManager.h │ ├── Info.plist │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── AppDelegate.m │ ├── VideoTalkManager.m │ └── RingCall.m ├── VoIPTest.xcodeproj │ ├── xcuserdata │ │ └── tgw.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ ├── xcschememanagement.plist │ │ │ └── VoIPTest.xcscheme │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── tgw.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── project.pbxproj ├── VoIPTestTests │ ├── Info.plist │ └── VoIPTestTests.m └── VoIPTestUITests │ ├── Info.plist │ └── VoIPTestUITests.m ├── README.md └── pushMe-2.php /VoIPTest/VoIPTest/voip_call.caf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oopsr/VoIPPush/HEAD/VoIPTest/VoIPTest/voip_call.caf -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/xcuserdata/tgw.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # VoIPPush 2 | VoIP Push demo 3 | 利用VIoP推送(PushKit)实现音视频呼叫连续响铃效果 4 | 5 | 详细描述请查看我的博客:https://oopsr.github.io/2016/06/20/voip/ 6 | 7 | ![image](https://raw.githubusercontent.com/oopsr/oopsr.github.io/master/img/voip_huahua.png) -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/project.xcworkspace/xcuserdata/tgw.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oopsr/VoIPPush/HEAD/VoIPTest/VoIPTest.xcodeproj/project.xcworkspace/xcuserdata/tgw.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/VoIPTest.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | aps-environment 6 | development 7 | 8 | 9 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/RingCall.h: -------------------------------------------------------------------------------- 1 | // 2 | // RingCall.h 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface RingCall : NSObject 13 | + (instancetype)sharedMCCall; 14 | - (void)regsionPush; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | 11 | @interface ViewController () 12 | 13 | @end 14 | 15 | @implementation ViewController 16 | 17 | - (void)viewDidLoad { 18 | [super viewDidLoad]; 19 | 20 | 21 | } 22 | 23 | 24 | - (void)didReceiveMemoryWarning { 25 | [super didReceiveMemoryWarning]; 26 | // Dispose of any resources that can be recreated. 27 | } 28 | 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTestTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTestUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/VideoTalkManager.h: -------------------------------------------------------------------------------- 1 | // 2 | // VideoTalkManager.h 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @protocol VideoCallbackDelegate 13 | 14 | /** 15 | * 当APP收到呼叫、处于后台时调用、用来处理通知栏类型和铃声。 16 | * 17 | * @param name 呼叫者的名字 18 | */ 19 | - (void)onCallRing:(NSString*)name; 20 | /** 21 | * 呼叫取消调用、取消通知栏 22 | */ 23 | - (void)onCancelRing; 24 | /** 25 | * APP收到呼叫、从后台回到前台时或者APP就在前台会调用、用于弹出呼叫界面。 26 | * 27 | * @param aSession 会话实体 28 | * @param Callername 呼叫者名字 29 | */ 30 | 31 | @end 32 | 33 | @interface VideoTalkManager : NSObject 34 | 35 | + (VideoTalkManager *)sharedClinet; 36 | 37 | - (void)initWithSever; 38 | 39 | - (void)setDelegate:(id)delegate; 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/xcuserdata/tgw.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | VoIPTest.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 8BA1680F1E5BD88700B3D3DA 16 | 17 | primary 18 | 19 | 20 | 8BA168281E5BD88700B3D3DA 21 | 22 | primary 23 | 24 | 25 | 8BA168331E5BD88700B3D3DA 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTestTests/VoIPTestTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VoIPTestTests.m 3 | // VoIPTestTests 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VoIPTestTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation VoIPTestTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTestUITests/VoIPTestUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // VoIPTestUITests.m 3 | // VoIPTestUITests 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface VoIPTestUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation VoIPTestUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | -------------------------------------------------------------------------------- /pushMe-2.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | '1', 33 | 'alert' => $message, 34 | 'sound' => 'voip_call.caf', 35 | 'badge' => 10, 36 | ); 37 | 38 | // Encode the payload as JSON 39 | $payload = json_encode($body); 40 | 41 | // Build the binary notification 42 | $msg = chr(0) . pack('n', 32) . pack('H*', $deviceToken) . pack('n', strlen($payload)) . $payload; 43 | 44 | // Send it to the server 45 | $result = fwrite($fp, $msg, strlen($msg)); 46 | 47 | if (!$result) 48 | echo 'Message not delivered' . PHP_EOL; 49 | else 50 | echo 'Message successfully delivered' . PHP_EOL; 51 | 52 | // Close the connection to the server 53 | fclose($fp); 54 | 55 | ?> 56 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | VoipPush 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UIBackgroundModes 26 | 27 | voip 28 | 29 | UILaunchStoryboardName 30 | LaunchScreen 31 | UIMainStoryboardFile 32 | Main 33 | UIRequiredDeviceCapabilities 34 | 35 | armv7 36 | 37 | UISupportedInterfaceOrientations 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationLandscapeLeft 41 | UIInterfaceOrientationLandscapeRight 42 | 43 | UISupportedInterfaceOrientations~ipad 44 | 45 | UIInterfaceOrientationPortrait 46 | UIInterfaceOrientationPortraitUpsideDown 47 | UIInterfaceOrientationLandscapeLeft 48 | UIInterfaceOrientationLandscapeRight 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "VideoTalkManager.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | 21 | //注册VoIp 22 | [[VideoTalkManager sharedClinet] initWithSever]; 23 | 24 | return YES; 25 | } 26 | 27 | 28 | - (void)applicationWillResignActive:(UIApplication *)application { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 31 | } 32 | 33 | 34 | - (void)applicationDidEnterBackground:(UIApplication *)application { 35 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 36 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 37 | } 38 | 39 | 40 | - (void)applicationWillEnterForeground:(UIApplication *)application { 41 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 42 | } 43 | 44 | 45 | - (void)applicationDidBecomeActive:(UIApplication *)application { 46 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 47 | } 48 | 49 | 50 | - (void)applicationWillTerminate:(UIApplication *)application { 51 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 52 | } 53 | 54 | 55 | @end 56 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/VideoTalkManager.m: -------------------------------------------------------------------------------- 1 | // 2 | // VideoTalkManager.m 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import "VideoTalkManager.h" 10 | #import 11 | #import "RingCall.h" 12 | /**************注意事项****** 13 | 1、证书制作是否完成 14 | 2、APP bundle identity是否替换成自己的 15 | 3、测试推送时确保推送的设备token跟上传的设备token一致 16 | 4、关于VoIP推送详细流程请看我的个人博客: 17 | *************/ 18 | @interface VideoTalkManager (){ 19 | 20 | NSString *token; 21 | } 22 | 23 | @property (nonatomic,strong)idmydelegate; 24 | 25 | @end 26 | 27 | @implementation VideoTalkManager 28 | 29 | static VideoTalkManager *instance = nil; 30 | 31 | + (VideoTalkManager *)sharedClinet { 32 | 33 | if (instance == nil) { 34 | 35 | instance = [[super allocWithZone:NULL] init]; 36 | } 37 | return instance; 38 | } 39 | 40 | -(void)initWithSever { 41 | //voip delegate 42 | PKPushRegistry *pushRegistry = [[PKPushRegistry alloc] initWithQueue:dispatch_get_main_queue()]; 43 | pushRegistry.delegate = self; 44 | pushRegistry.desiredPushTypes = [NSSet setWithObject:PKPushTypeVoIP]; 45 | //ios10注册本地通知 46 | if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) { 47 | 48 | [[RingCall sharedMCCall] regsionPush]; 49 | } 50 | 51 | } 52 | 53 | - (void)setDelegate:(id)delegate { 54 | 55 | self.mydelegate = delegate; 56 | } 57 | 58 | 59 | #pragma mark -pushkitDelegate 60 | 61 | - (void)pushRegistry:(PKPushRegistry *)registry didUpdatePushCredentials:(PKPushCredentials *)credentials forType:(NSString *)type{ 62 | if([credentials.token length] == 0) { 63 | NSLog(@"voip token NULL"); 64 | return; 65 | } 66 | //应用启动获取token,并上传服务器 67 | token = [[[[credentials.token description] stringByReplacingOccurrencesOfString:@"<"withString:@""] 68 | stringByReplacingOccurrencesOfString:@">" withString:@""] 69 | stringByReplacingOccurrencesOfString:@" " withString:@""]; 70 | //token上传服务器 71 | //[self uploadToken]; 72 | } 73 | 74 | - (void)pushRegistry:(PKPushRegistry *)registry didReceiveIncomingPushWithPayload:(PKPushPayload *)payload forType:(NSString *)type{ 75 | BOOL isCalling = false; 76 | switch ([UIApplication sharedApplication].applicationState) { 77 | case UIApplicationStateActive: { 78 | isCalling = false; 79 | } 80 | break; 81 | case UIApplicationStateInactive: { 82 | isCalling = false; 83 | } 84 | break; 85 | case UIApplicationStateBackground: { 86 | isCalling = true; 87 | } 88 | break; 89 | default: 90 | isCalling = true; 91 | break; 92 | } 93 | 94 | if (isCalling){ 95 | //本地通知,实现响铃效果 96 | [self.mydelegate onCallRing:@"花花"]; 97 | 98 | } 99 | } 100 | 101 | 102 | 103 | @end 104 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest/RingCall.m: -------------------------------------------------------------------------------- 1 | // 2 | // RingCall.m 3 | // VoIPTest 4 | // 5 | // Created by Tg W on 17/2/21. 6 | // Copyright © 2017年 oopsr. All rights reserved. 7 | // 8 | 9 | #import "RingCall.h" 10 | #import "VideoTalkManager.h" 11 | #import 12 | 13 | @interface RingCall (){ 14 | UILocalNotification *callNotification; 15 | UNNotificationRequest *request;//ios 10 16 | } 17 | @end 18 | 19 | @implementation RingCall 20 | + (instancetype)sharedMCCall { 21 | 22 | static RingCall *callInstane; 23 | static dispatch_once_t onceToken; 24 | dispatch_once(&onceToken, ^{ 25 | if (callInstane == nil) { 26 | callInstane = [[RingCall alloc] init]; 27 | [[VideoTalkManager sharedClinet] setDelegate:callInstane]; 28 | } 29 | }); 30 | return callInstane; 31 | } 32 | 33 | - (void)regsionPush { 34 | //iOS 10 35 | UNUserNotificationCenter *center = [UNUserNotificationCenter currentNotificationCenter]; 36 | [center requestAuthorizationWithOptions:(UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert) completionHandler:^(BOOL granted, NSError * _Nullable error) { 37 | if (!error) { 38 | NSLog(@"request authorization succeeded!"); 39 | } 40 | }]; 41 | [center getNotificationSettingsWithCompletionHandler:^(UNNotificationSettings * _Nonnull settings) { 42 | NSLog(@"%@",settings); 43 | }]; 44 | 45 | } 46 | 47 | #pragma mark-VideoCallbackDelegate 48 | 49 | - (void)onCallRing:(NSString *)CallerName { 50 | if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) { 51 | UNUserNotificationCenter* center = [UNUserNotificationCenter currentNotificationCenter]; 52 | UNMutableNotificationContent* content = [[UNMutableNotificationContent alloc] init]; 53 | content.body =[NSString localizedUserNotificationStringForKey:[NSString 54 | stringWithFormat:@"%@%@", CallerName, 55 | @"邀请你进行通话。。。。"] arguments:nil];; 56 | UNNotificationSound *customSound = [UNNotificationSound soundNamed:@"voip_call.caf"]; 57 | content.sound = customSound; 58 | UNTimeIntervalNotificationTrigger* trigger = [UNTimeIntervalNotificationTrigger 59 | triggerWithTimeInterval:1 repeats:NO]; 60 | request = [UNNotificationRequest requestWithIdentifier:@"Voip_Push" 61 | content:content trigger:trigger]; 62 | [center addNotificationRequest:request withCompletionHandler:^(NSError * _Nullable error) { 63 | 64 | }]; 65 | }else { 66 | 67 | callNotification = [[UILocalNotification alloc] init]; 68 | callNotification.alertBody = [NSString 69 | stringWithFormat:@"%@%@", CallerName, 70 | @"邀请你进行通话。。。。"]; 71 | 72 | callNotification.soundName = @"voip_call.caf"; 73 | [[UIApplication sharedApplication] 74 | presentLocalNotificationNow:callNotification]; 75 | 76 | } 77 | 78 | } 79 | 80 | - (void)onCancelRing { 81 | //取消通知栏 82 | if ([[UIDevice currentDevice].systemVersion floatValue] >= 10.0) { 83 | NSMutableArray *arraylist = [[NSMutableArray alloc]init]; 84 | [arraylist addObject:@"Voip_Push"]; 85 | [[UNUserNotificationCenter currentNotificationCenter] removeDeliveredNotificationsWithIdentifiers:arraylist]; 86 | }else { 87 | [[UIApplication sharedApplication] cancelLocalNotification:callNotification]; 88 | } 89 | 90 | } 91 | 92 | @end 93 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/xcuserdata/tgw.xcuserdatad/xcschemes/VoIPTest.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /VoIPTest/VoIPTest.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8BA168151E5BD88700B3D3DA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA168141E5BD88700B3D3DA /* main.m */; }; 11 | 8BA168181E5BD88700B3D3DA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA168171E5BD88700B3D3DA /* AppDelegate.m */; }; 12 | 8BA1681B1E5BD88700B3D3DA /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA1681A1E5BD88700B3D3DA /* ViewController.m */; }; 13 | 8BA1681E1E5BD88700B3D3DA /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8BA1681C1E5BD88700B3D3DA /* Main.storyboard */; }; 14 | 8BA168201E5BD88700B3D3DA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 8BA1681F1E5BD88700B3D3DA /* Assets.xcassets */; }; 15 | 8BA168231E5BD88700B3D3DA /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8BA168211E5BD88700B3D3DA /* LaunchScreen.storyboard */; }; 16 | 8BA1682E1E5BD88700B3D3DA /* VoIPTestTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA1682D1E5BD88700B3D3DA /* VoIPTestTests.m */; }; 17 | 8BA168391E5BD88700B3D3DA /* VoIPTestUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA168381E5BD88700B3D3DA /* VoIPTestUITests.m */; }; 18 | 8BA168481E5BD8B000B3D3DA /* PushKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA168471E5BD8B000B3D3DA /* PushKit.framework */; }; 19 | 8BA1684C1E5BD94D00B3D3DA /* VideoTalkManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA1684B1E5BD94D00B3D3DA /* VideoTalkManager.m */; }; 20 | 8BA1684E1E5BDD6900B3D3DA /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA1684D1E5BDD6900B3D3DA /* UIKit.framework */; }; 21 | 8BA168511E5BDFB700B3D3DA /* RingCall.m in Sources */ = {isa = PBXBuildFile; fileRef = 8BA168501E5BDFB700B3D3DA /* RingCall.m */; }; 22 | 8BA168531E5BED3800B3D3DA /* voip_call.caf in Resources */ = {isa = PBXBuildFile; fileRef = 8BA168521E5BED3800B3D3DA /* voip_call.caf */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXContainerItemProxy section */ 26 | 8BA1682A1E5BD88700B3D3DA /* PBXContainerItemProxy */ = { 27 | isa = PBXContainerItemProxy; 28 | containerPortal = 8BA168081E5BD88700B3D3DA /* Project object */; 29 | proxyType = 1; 30 | remoteGlobalIDString = 8BA1680F1E5BD88700B3D3DA; 31 | remoteInfo = VoIPTest; 32 | }; 33 | 8BA168351E5BD88700B3D3DA /* PBXContainerItemProxy */ = { 34 | isa = PBXContainerItemProxy; 35 | containerPortal = 8BA168081E5BD88700B3D3DA /* Project object */; 36 | proxyType = 1; 37 | remoteGlobalIDString = 8BA1680F1E5BD88700B3D3DA; 38 | remoteInfo = VoIPTest; 39 | }; 40 | /* End PBXContainerItemProxy section */ 41 | 42 | /* Begin PBXFileReference section */ 43 | 8BA168101E5BD88700B3D3DA /* VoIPTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = VoIPTest.app; sourceTree = BUILT_PRODUCTS_DIR; }; 44 | 8BA168141E5BD88700B3D3DA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 45 | 8BA168161E5BD88700B3D3DA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 46 | 8BA168171E5BD88700B3D3DA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 47 | 8BA168191E5BD88700B3D3DA /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 48 | 8BA1681A1E5BD88700B3D3DA /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 49 | 8BA1681D1E5BD88700B3D3DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 50 | 8BA1681F1E5BD88700B3D3DA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 51 | 8BA168221E5BD88700B3D3DA /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 52 | 8BA168241E5BD88700B3D3DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 8BA168291E5BD88700B3D3DA /* VoIPTestTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VoIPTestTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 8BA1682D1E5BD88700B3D3DA /* VoIPTestTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VoIPTestTests.m; sourceTree = ""; }; 55 | 8BA1682F1E5BD88700B3D3DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 56 | 8BA168341E5BD88700B3D3DA /* VoIPTestUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = VoIPTestUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 57 | 8BA168381E5BD88700B3D3DA /* VoIPTestUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = VoIPTestUITests.m; sourceTree = ""; }; 58 | 8BA1683A1E5BD88700B3D3DA /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | 8BA168471E5BD8B000B3D3DA /* PushKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = PushKit.framework; path = System/Library/Frameworks/PushKit.framework; sourceTree = SDKROOT; }; 60 | 8BA168491E5BD8BA00B3D3DA /* VoIPTest.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = VoIPTest.entitlements; sourceTree = ""; }; 61 | 8BA1684A1E5BD94D00B3D3DA /* VideoTalkManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideoTalkManager.h; sourceTree = ""; }; 62 | 8BA1684B1E5BD94D00B3D3DA /* VideoTalkManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideoTalkManager.m; sourceTree = ""; }; 63 | 8BA1684D1E5BDD6900B3D3DA /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 64 | 8BA1684F1E5BDFB700B3D3DA /* RingCall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RingCall.h; sourceTree = ""; }; 65 | 8BA168501E5BDFB700B3D3DA /* RingCall.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RingCall.m; sourceTree = ""; }; 66 | 8BA168521E5BED3800B3D3DA /* voip_call.caf */ = {isa = PBXFileReference; lastKnownFileType = file; path = voip_call.caf; sourceTree = ""; }; 67 | /* End PBXFileReference section */ 68 | 69 | /* Begin PBXFrameworksBuildPhase section */ 70 | 8BA1680D1E5BD88700B3D3DA /* Frameworks */ = { 71 | isa = PBXFrameworksBuildPhase; 72 | buildActionMask = 2147483647; 73 | files = ( 74 | 8BA1684E1E5BDD6900B3D3DA /* UIKit.framework in Frameworks */, 75 | 8BA168481E5BD8B000B3D3DA /* PushKit.framework in Frameworks */, 76 | ); 77 | runOnlyForDeploymentPostprocessing = 0; 78 | }; 79 | 8BA168261E5BD88700B3D3DA /* Frameworks */ = { 80 | isa = PBXFrameworksBuildPhase; 81 | buildActionMask = 2147483647; 82 | files = ( 83 | ); 84 | runOnlyForDeploymentPostprocessing = 0; 85 | }; 86 | 8BA168311E5BD88700B3D3DA /* Frameworks */ = { 87 | isa = PBXFrameworksBuildPhase; 88 | buildActionMask = 2147483647; 89 | files = ( 90 | ); 91 | runOnlyForDeploymentPostprocessing = 0; 92 | }; 93 | /* End PBXFrameworksBuildPhase section */ 94 | 95 | /* Begin PBXGroup section */ 96 | 8BA168071E5BD88700B3D3DA = { 97 | isa = PBXGroup; 98 | children = ( 99 | 8BA168121E5BD88700B3D3DA /* VoIPTest */, 100 | 8BA1682C1E5BD88700B3D3DA /* VoIPTestTests */, 101 | 8BA168371E5BD88700B3D3DA /* VoIPTestUITests */, 102 | 8BA168111E5BD88700B3D3DA /* Products */, 103 | 8BA168461E5BD8B000B3D3DA /* Frameworks */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 8BA168111E5BD88700B3D3DA /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 8BA168101E5BD88700B3D3DA /* VoIPTest.app */, 111 | 8BA168291E5BD88700B3D3DA /* VoIPTestTests.xctest */, 112 | 8BA168341E5BD88700B3D3DA /* VoIPTestUITests.xctest */, 113 | ); 114 | name = Products; 115 | sourceTree = ""; 116 | }; 117 | 8BA168121E5BD88700B3D3DA /* VoIPTest */ = { 118 | isa = PBXGroup; 119 | children = ( 120 | 8BA168491E5BD8BA00B3D3DA /* VoIPTest.entitlements */, 121 | 8BA168521E5BED3800B3D3DA /* voip_call.caf */, 122 | 8BA168161E5BD88700B3D3DA /* AppDelegate.h */, 123 | 8BA168171E5BD88700B3D3DA /* AppDelegate.m */, 124 | 8BA168191E5BD88700B3D3DA /* ViewController.h */, 125 | 8BA1681A1E5BD88700B3D3DA /* ViewController.m */, 126 | 8BA1684A1E5BD94D00B3D3DA /* VideoTalkManager.h */, 127 | 8BA1684B1E5BD94D00B3D3DA /* VideoTalkManager.m */, 128 | 8BA1684F1E5BDFB700B3D3DA /* RingCall.h */, 129 | 8BA168501E5BDFB700B3D3DA /* RingCall.m */, 130 | 8BA1681C1E5BD88700B3D3DA /* Main.storyboard */, 131 | 8BA1681F1E5BD88700B3D3DA /* Assets.xcassets */, 132 | 8BA168211E5BD88700B3D3DA /* LaunchScreen.storyboard */, 133 | 8BA168241E5BD88700B3D3DA /* Info.plist */, 134 | 8BA168131E5BD88700B3D3DA /* Supporting Files */, 135 | ); 136 | path = VoIPTest; 137 | sourceTree = ""; 138 | }; 139 | 8BA168131E5BD88700B3D3DA /* Supporting Files */ = { 140 | isa = PBXGroup; 141 | children = ( 142 | 8BA168141E5BD88700B3D3DA /* main.m */, 143 | ); 144 | name = "Supporting Files"; 145 | sourceTree = ""; 146 | }; 147 | 8BA1682C1E5BD88700B3D3DA /* VoIPTestTests */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | 8BA1682D1E5BD88700B3D3DA /* VoIPTestTests.m */, 151 | 8BA1682F1E5BD88700B3D3DA /* Info.plist */, 152 | ); 153 | path = VoIPTestTests; 154 | sourceTree = ""; 155 | }; 156 | 8BA168371E5BD88700B3D3DA /* VoIPTestUITests */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | 8BA168381E5BD88700B3D3DA /* VoIPTestUITests.m */, 160 | 8BA1683A1E5BD88700B3D3DA /* Info.plist */, 161 | ); 162 | path = VoIPTestUITests; 163 | sourceTree = ""; 164 | }; 165 | 8BA168461E5BD8B000B3D3DA /* Frameworks */ = { 166 | isa = PBXGroup; 167 | children = ( 168 | 8BA1684D1E5BDD6900B3D3DA /* UIKit.framework */, 169 | 8BA168471E5BD8B000B3D3DA /* PushKit.framework */, 170 | ); 171 | name = Frameworks; 172 | sourceTree = ""; 173 | }; 174 | /* End PBXGroup section */ 175 | 176 | /* Begin PBXNativeTarget section */ 177 | 8BA1680F1E5BD88700B3D3DA /* VoIPTest */ = { 178 | isa = PBXNativeTarget; 179 | buildConfigurationList = 8BA1683D1E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTest" */; 180 | buildPhases = ( 181 | 8BA1680C1E5BD88700B3D3DA /* Sources */, 182 | 8BA1680D1E5BD88700B3D3DA /* Frameworks */, 183 | 8BA1680E1E5BD88700B3D3DA /* Resources */, 184 | ); 185 | buildRules = ( 186 | ); 187 | dependencies = ( 188 | ); 189 | name = VoIPTest; 190 | productName = VoIPTest; 191 | productReference = 8BA168101E5BD88700B3D3DA /* VoIPTest.app */; 192 | productType = "com.apple.product-type.application"; 193 | }; 194 | 8BA168281E5BD88700B3D3DA /* VoIPTestTests */ = { 195 | isa = PBXNativeTarget; 196 | buildConfigurationList = 8BA168401E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTestTests" */; 197 | buildPhases = ( 198 | 8BA168251E5BD88700B3D3DA /* Sources */, 199 | 8BA168261E5BD88700B3D3DA /* Frameworks */, 200 | 8BA168271E5BD88700B3D3DA /* Resources */, 201 | ); 202 | buildRules = ( 203 | ); 204 | dependencies = ( 205 | 8BA1682B1E5BD88700B3D3DA /* PBXTargetDependency */, 206 | ); 207 | name = VoIPTestTests; 208 | productName = VoIPTestTests; 209 | productReference = 8BA168291E5BD88700B3D3DA /* VoIPTestTests.xctest */; 210 | productType = "com.apple.product-type.bundle.unit-test"; 211 | }; 212 | 8BA168331E5BD88700B3D3DA /* VoIPTestUITests */ = { 213 | isa = PBXNativeTarget; 214 | buildConfigurationList = 8BA168431E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTestUITests" */; 215 | buildPhases = ( 216 | 8BA168301E5BD88700B3D3DA /* Sources */, 217 | 8BA168311E5BD88700B3D3DA /* Frameworks */, 218 | 8BA168321E5BD88700B3D3DA /* Resources */, 219 | ); 220 | buildRules = ( 221 | ); 222 | dependencies = ( 223 | 8BA168361E5BD88700B3D3DA /* PBXTargetDependency */, 224 | ); 225 | name = VoIPTestUITests; 226 | productName = VoIPTestUITests; 227 | productReference = 8BA168341E5BD88700B3D3DA /* VoIPTestUITests.xctest */; 228 | productType = "com.apple.product-type.bundle.ui-testing"; 229 | }; 230 | /* End PBXNativeTarget section */ 231 | 232 | /* Begin PBXProject section */ 233 | 8BA168081E5BD88700B3D3DA /* Project object */ = { 234 | isa = PBXProject; 235 | attributes = { 236 | LastUpgradeCheck = 0800; 237 | ORGANIZATIONNAME = oopsr; 238 | TargetAttributes = { 239 | 8BA1680F1E5BD88700B3D3DA = { 240 | CreatedOnToolsVersion = 8.0; 241 | DevelopmentTeam = E7P9CREU6H; 242 | ProvisioningStyle = Automatic; 243 | SystemCapabilities = { 244 | com.apple.BackgroundModes = { 245 | enabled = 1; 246 | }; 247 | com.apple.Push = { 248 | enabled = 1; 249 | }; 250 | }; 251 | }; 252 | 8BA168281E5BD88700B3D3DA = { 253 | CreatedOnToolsVersion = 8.0; 254 | DevelopmentTeam = E7P9CREU6H; 255 | ProvisioningStyle = Automatic; 256 | TestTargetID = 8BA1680F1E5BD88700B3D3DA; 257 | }; 258 | 8BA168331E5BD88700B3D3DA = { 259 | CreatedOnToolsVersion = 8.0; 260 | DevelopmentTeam = E7P9CREU6H; 261 | ProvisioningStyle = Automatic; 262 | TestTargetID = 8BA1680F1E5BD88700B3D3DA; 263 | }; 264 | }; 265 | }; 266 | buildConfigurationList = 8BA1680B1E5BD88700B3D3DA /* Build configuration list for PBXProject "VoIPTest" */; 267 | compatibilityVersion = "Xcode 3.2"; 268 | developmentRegion = English; 269 | hasScannedForEncodings = 0; 270 | knownRegions = ( 271 | en, 272 | Base, 273 | ); 274 | mainGroup = 8BA168071E5BD88700B3D3DA; 275 | productRefGroup = 8BA168111E5BD88700B3D3DA /* Products */; 276 | projectDirPath = ""; 277 | projectRoot = ""; 278 | targets = ( 279 | 8BA1680F1E5BD88700B3D3DA /* VoIPTest */, 280 | 8BA168281E5BD88700B3D3DA /* VoIPTestTests */, 281 | 8BA168331E5BD88700B3D3DA /* VoIPTestUITests */, 282 | ); 283 | }; 284 | /* End PBXProject section */ 285 | 286 | /* Begin PBXResourcesBuildPhase section */ 287 | 8BA1680E1E5BD88700B3D3DA /* Resources */ = { 288 | isa = PBXResourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 8BA168231E5BD88700B3D3DA /* LaunchScreen.storyboard in Resources */, 292 | 8BA168201E5BD88700B3D3DA /* Assets.xcassets in Resources */, 293 | 8BA168531E5BED3800B3D3DA /* voip_call.caf in Resources */, 294 | 8BA1681E1E5BD88700B3D3DA /* Main.storyboard in Resources */, 295 | ); 296 | runOnlyForDeploymentPostprocessing = 0; 297 | }; 298 | 8BA168271E5BD88700B3D3DA /* Resources */ = { 299 | isa = PBXResourcesBuildPhase; 300 | buildActionMask = 2147483647; 301 | files = ( 302 | ); 303 | runOnlyForDeploymentPostprocessing = 0; 304 | }; 305 | 8BA168321E5BD88700B3D3DA /* Resources */ = { 306 | isa = PBXResourcesBuildPhase; 307 | buildActionMask = 2147483647; 308 | files = ( 309 | ); 310 | runOnlyForDeploymentPostprocessing = 0; 311 | }; 312 | /* End PBXResourcesBuildPhase section */ 313 | 314 | /* Begin PBXSourcesBuildPhase section */ 315 | 8BA1680C1E5BD88700B3D3DA /* Sources */ = { 316 | isa = PBXSourcesBuildPhase; 317 | buildActionMask = 2147483647; 318 | files = ( 319 | 8BA1681B1E5BD88700B3D3DA /* ViewController.m in Sources */, 320 | 8BA168181E5BD88700B3D3DA /* AppDelegate.m in Sources */, 321 | 8BA168511E5BDFB700B3D3DA /* RingCall.m in Sources */, 322 | 8BA168151E5BD88700B3D3DA /* main.m in Sources */, 323 | 8BA1684C1E5BD94D00B3D3DA /* VideoTalkManager.m in Sources */, 324 | ); 325 | runOnlyForDeploymentPostprocessing = 0; 326 | }; 327 | 8BA168251E5BD88700B3D3DA /* Sources */ = { 328 | isa = PBXSourcesBuildPhase; 329 | buildActionMask = 2147483647; 330 | files = ( 331 | 8BA1682E1E5BD88700B3D3DA /* VoIPTestTests.m in Sources */, 332 | ); 333 | runOnlyForDeploymentPostprocessing = 0; 334 | }; 335 | 8BA168301E5BD88700B3D3DA /* Sources */ = { 336 | isa = PBXSourcesBuildPhase; 337 | buildActionMask = 2147483647; 338 | files = ( 339 | 8BA168391E5BD88700B3D3DA /* VoIPTestUITests.m in Sources */, 340 | ); 341 | runOnlyForDeploymentPostprocessing = 0; 342 | }; 343 | /* End PBXSourcesBuildPhase section */ 344 | 345 | /* Begin PBXTargetDependency section */ 346 | 8BA1682B1E5BD88700B3D3DA /* PBXTargetDependency */ = { 347 | isa = PBXTargetDependency; 348 | target = 8BA1680F1E5BD88700B3D3DA /* VoIPTest */; 349 | targetProxy = 8BA1682A1E5BD88700B3D3DA /* PBXContainerItemProxy */; 350 | }; 351 | 8BA168361E5BD88700B3D3DA /* PBXTargetDependency */ = { 352 | isa = PBXTargetDependency; 353 | target = 8BA1680F1E5BD88700B3D3DA /* VoIPTest */; 354 | targetProxy = 8BA168351E5BD88700B3D3DA /* PBXContainerItemProxy */; 355 | }; 356 | /* End PBXTargetDependency section */ 357 | 358 | /* Begin PBXVariantGroup section */ 359 | 8BA1681C1E5BD88700B3D3DA /* Main.storyboard */ = { 360 | isa = PBXVariantGroup; 361 | children = ( 362 | 8BA1681D1E5BD88700B3D3DA /* Base */, 363 | ); 364 | name = Main.storyboard; 365 | sourceTree = ""; 366 | }; 367 | 8BA168211E5BD88700B3D3DA /* LaunchScreen.storyboard */ = { 368 | isa = PBXVariantGroup; 369 | children = ( 370 | 8BA168221E5BD88700B3D3DA /* Base */, 371 | ); 372 | name = LaunchScreen.storyboard; 373 | sourceTree = ""; 374 | }; 375 | /* End PBXVariantGroup section */ 376 | 377 | /* Begin XCBuildConfiguration section */ 378 | 8BA1683B1E5BD88700B3D3DA /* Debug */ = { 379 | isa = XCBuildConfiguration; 380 | buildSettings = { 381 | ALWAYS_SEARCH_USER_PATHS = NO; 382 | CLANG_ANALYZER_NONNULL = YES; 383 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 384 | CLANG_CXX_LIBRARY = "libc++"; 385 | CLANG_ENABLE_MODULES = YES; 386 | CLANG_ENABLE_OBJC_ARC = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 390 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 396 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 397 | CLANG_WARN_UNREACHABLE_CODE = YES; 398 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 399 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 400 | COPY_PHASE_STRIP = NO; 401 | DEBUG_INFORMATION_FORMAT = dwarf; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | ENABLE_TESTABILITY = YES; 404 | GCC_C_LANGUAGE_STANDARD = gnu99; 405 | GCC_DYNAMIC_NO_PIC = NO; 406 | GCC_NO_COMMON_BLOCKS = YES; 407 | GCC_OPTIMIZATION_LEVEL = 0; 408 | GCC_PREPROCESSOR_DEFINITIONS = ( 409 | "DEBUG=1", 410 | "$(inherited)", 411 | ); 412 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 413 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 414 | GCC_WARN_UNDECLARED_SELECTOR = YES; 415 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 416 | GCC_WARN_UNUSED_FUNCTION = YES; 417 | GCC_WARN_UNUSED_VARIABLE = YES; 418 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 419 | MTL_ENABLE_DEBUG_INFO = YES; 420 | ONLY_ACTIVE_ARCH = YES; 421 | SDKROOT = iphoneos; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | }; 424 | name = Debug; 425 | }; 426 | 8BA1683C1E5BD88700B3D3DA /* Release */ = { 427 | isa = XCBuildConfiguration; 428 | buildSettings = { 429 | ALWAYS_SEARCH_USER_PATHS = NO; 430 | CLANG_ANALYZER_NONNULL = YES; 431 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 432 | CLANG_CXX_LIBRARY = "libc++"; 433 | CLANG_ENABLE_MODULES = YES; 434 | CLANG_ENABLE_OBJC_ARC = YES; 435 | CLANG_WARN_BOOL_CONVERSION = YES; 436 | CLANG_WARN_CONSTANT_CONVERSION = YES; 437 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 438 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 439 | CLANG_WARN_EMPTY_BODY = YES; 440 | CLANG_WARN_ENUM_CONVERSION = YES; 441 | CLANG_WARN_INFINITE_RECURSION = YES; 442 | CLANG_WARN_INT_CONVERSION = YES; 443 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 444 | CLANG_WARN_SUSPICIOUS_MOVES = YES; 445 | CLANG_WARN_UNREACHABLE_CODE = YES; 446 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 447 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 448 | COPY_PHASE_STRIP = NO; 449 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 450 | ENABLE_NS_ASSERTIONS = NO; 451 | ENABLE_STRICT_OBJC_MSGSEND = YES; 452 | GCC_C_LANGUAGE_STANDARD = gnu99; 453 | GCC_NO_COMMON_BLOCKS = YES; 454 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 455 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 456 | GCC_WARN_UNDECLARED_SELECTOR = YES; 457 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 458 | GCC_WARN_UNUSED_FUNCTION = YES; 459 | GCC_WARN_UNUSED_VARIABLE = YES; 460 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 461 | MTL_ENABLE_DEBUG_INFO = NO; 462 | SDKROOT = iphoneos; 463 | TARGETED_DEVICE_FAMILY = "1,2"; 464 | VALIDATE_PRODUCT = YES; 465 | }; 466 | name = Release; 467 | }; 468 | 8BA1683E1E5BD88700B3D3DA /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 472 | CODE_SIGN_ENTITLEMENTS = VoIPTest/VoIPTest.entitlements; 473 | DEVELOPMENT_TEAM = E7P9CREU6H; 474 | INFOPLIST_FILE = VoIPTest/Info.plist; 475 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 476 | PRODUCT_BUNDLE_IDENTIFIER = com.XXXXXXX; 477 | PRODUCT_NAME = "$(TARGET_NAME)"; 478 | }; 479 | name = Debug; 480 | }; 481 | 8BA1683F1E5BD88700B3D3DA /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 485 | CODE_SIGN_ENTITLEMENTS = VoIPTest/VoIPTest.entitlements; 486 | DEVELOPMENT_TEAM = E7P9CREU6H; 487 | INFOPLIST_FILE = VoIPTest/Info.plist; 488 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 489 | PRODUCT_BUNDLE_IDENTIFIER = com.XXXXXXX; 490 | PRODUCT_NAME = "$(TARGET_NAME)"; 491 | }; 492 | name = Release; 493 | }; 494 | 8BA168411E5BD88700B3D3DA /* Debug */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | BUNDLE_LOADER = "$(TEST_HOST)"; 498 | DEVELOPMENT_TEAM = E7P9CREU6H; 499 | INFOPLIST_FILE = VoIPTestTests/Info.plist; 500 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 501 | PRODUCT_BUNDLE_IDENTIFIER = www.szmichoi.com.VoIPTestTests; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VoIPTest.app/VoIPTest"; 504 | }; 505 | name = Debug; 506 | }; 507 | 8BA168421E5BD88700B3D3DA /* Release */ = { 508 | isa = XCBuildConfiguration; 509 | buildSettings = { 510 | BUNDLE_LOADER = "$(TEST_HOST)"; 511 | DEVELOPMENT_TEAM = E7P9CREU6H; 512 | INFOPLIST_FILE = VoIPTestTests/Info.plist; 513 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 514 | PRODUCT_BUNDLE_IDENTIFIER = www.szmichoi.com.VoIPTestTests; 515 | PRODUCT_NAME = "$(TARGET_NAME)"; 516 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/VoIPTest.app/VoIPTest"; 517 | }; 518 | name = Release; 519 | }; 520 | 8BA168441E5BD88700B3D3DA /* Debug */ = { 521 | isa = XCBuildConfiguration; 522 | buildSettings = { 523 | DEVELOPMENT_TEAM = E7P9CREU6H; 524 | INFOPLIST_FILE = VoIPTestUITests/Info.plist; 525 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 526 | PRODUCT_BUNDLE_IDENTIFIER = www.szmichoi.com.VoIPTestUITests; 527 | PRODUCT_NAME = "$(TARGET_NAME)"; 528 | TEST_TARGET_NAME = VoIPTest; 529 | }; 530 | name = Debug; 531 | }; 532 | 8BA168451E5BD88700B3D3DA /* Release */ = { 533 | isa = XCBuildConfiguration; 534 | buildSettings = { 535 | DEVELOPMENT_TEAM = E7P9CREU6H; 536 | INFOPLIST_FILE = VoIPTestUITests/Info.plist; 537 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 538 | PRODUCT_BUNDLE_IDENTIFIER = www.szmichoi.com.VoIPTestUITests; 539 | PRODUCT_NAME = "$(TARGET_NAME)"; 540 | TEST_TARGET_NAME = VoIPTest; 541 | }; 542 | name = Release; 543 | }; 544 | /* End XCBuildConfiguration section */ 545 | 546 | /* Begin XCConfigurationList section */ 547 | 8BA1680B1E5BD88700B3D3DA /* Build configuration list for PBXProject "VoIPTest" */ = { 548 | isa = XCConfigurationList; 549 | buildConfigurations = ( 550 | 8BA1683B1E5BD88700B3D3DA /* Debug */, 551 | 8BA1683C1E5BD88700B3D3DA /* Release */, 552 | ); 553 | defaultConfigurationIsVisible = 0; 554 | defaultConfigurationName = Release; 555 | }; 556 | 8BA1683D1E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTest" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 8BA1683E1E5BD88700B3D3DA /* Debug */, 560 | 8BA1683F1E5BD88700B3D3DA /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | 8BA168401E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTestTests" */ = { 566 | isa = XCConfigurationList; 567 | buildConfigurations = ( 568 | 8BA168411E5BD88700B3D3DA /* Debug */, 569 | 8BA168421E5BD88700B3D3DA /* Release */, 570 | ); 571 | defaultConfigurationIsVisible = 0; 572 | defaultConfigurationName = Release; 573 | }; 574 | 8BA168431E5BD88700B3D3DA /* Build configuration list for PBXNativeTarget "VoIPTestUITests" */ = { 575 | isa = XCConfigurationList; 576 | buildConfigurations = ( 577 | 8BA168441E5BD88700B3D3DA /* Debug */, 578 | 8BA168451E5BD88700B3D3DA /* Release */, 579 | ); 580 | defaultConfigurationIsVisible = 0; 581 | defaultConfigurationName = Release; 582 | }; 583 | /* End XCConfigurationList section */ 584 | }; 585 | rootObject = 8BA168081E5BD88700B3D3DA /* Project object */; 586 | } 587 | --------------------------------------------------------------------------------