chenqiyang
2024-07-17 be56723cce4cd60ddc144ebe6ac20607675b3006
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//
//  AppDelegate.m
//  HDLLinPhoneDemo
//
//  Created by 陈启扬 on 2021/8/3.
//  Copyright © 2021 陈启扬. All rights reserved.
//
 
#import "AppDelegate.h"
@interface AppDelegate ()
 
@end
 
@implementation AppDelegate
@synthesize window = _window;
 
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    [[HDLLinPhoneSDK instance] initalLinPhone];
    [HDLLinPhoneSDK instance].IsAutoJumpCallView=YES;
//    [HDLLinPhoneSDK.instance login:@"5555" password:@"85521566" domain:@"116.62.26.215:35060"];
//
//    HDLLinPhoneSDK.instance.hdlLinphoneCallDelegate=self;
    
    /*1.了解linphone,集成linphone到原生sdk,调试跑通原生sdk
    2.学习了解xamarin跨平台打包,将原生sdk打包成供跨平台调用的dll包
    3.解决集成到on+项目编译问题(主要是swift和oc混编后xamarin编译不通过问题)
    4.尝试解决集成linphone sdk后ios高低版本适配问题,目前先适配12.2及以上版本
    5.封装可视对讲相关方法给跨平台调用,调试各个接口功能
     18316672920
     123456*/
    return YES;
}
 
#pragma mark - UISceneSession lifecycle
 
 
- (UISceneConfiguration *)application:(UIApplication *)application configurationForConnectingSceneSession:(UISceneSession *)connectingSceneSession options:(UISceneConnectionOptions *)options {
    // Called when a new scene session is being created.
    // Use this method to select a configuration to create the new scene with.
    return [[UISceneConfiguration alloc] initWithName:@"Default Configuration" sessionRole:connectingSceneSession.role];
}
 
 
- (void)application:(UIApplication *)application didDiscardSceneSessions:(NSSet<UISceneSession *> *)sceneSessions {
    // Called when the user discards a scene session.
    // If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
    // Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}
 
 
#pragma mark - Core Data stack
 
@synthesize persistentContainer = _persistentContainer;
 
- (NSPersistentContainer *)persistentContainer {
    // The persistent container for the application. This implementation creates and returns a container, having loaded the store for the application to it.
    @synchronized (self) {
        if (_persistentContainer == nil) {
            _persistentContainer = [[NSPersistentContainer alloc] initWithName:@"HDLLinPhoneDemo"];
            [_persistentContainer loadPersistentStoresWithCompletionHandler:^(NSPersistentStoreDescription *storeDescription, NSError *error) {
                if (error != nil) {
                    // Replace this implementation with code to handle the error appropriately.
                    // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
                    
                    /*
                     Typical reasons for an error here include:
                     * The parent directory does not exist, cannot be created, or disallows writing.
                     * The persistent store is not accessible, due to permissions or data protection when the device is locked.
                     * The device is out of space.
                     * The store could not be migrated to the current model version.
                     Check the error message to determine what the actual problem was.
                    */
                    NSLog(@"Unresolved error %@, %@", error, error.userInfo);
                    abort();
                }
            }];
        }
    }
    
    return _persistentContainer;
}
 
#pragma mark - Core Data Saving support
 
- (void)saveContext {
    NSManagedObjectContext *context = self.persistentContainer.viewContext;
    NSError *error = nil;
    if ([context hasChanges] && ![context save:&error]) {
        // Replace this implementation with code to handle the error appropriately.
        // abort() causes the application to generate a crash log and terminate. You should not use this function in a shipping application, although it may be useful during development.
        NSLog(@"Unresolved error %@, %@", error, error.userInfo);
        abort();
    }
}
 
@end