wxr
2020-04-14 06696e6f225733a60b03eea4a7c6374053d92c1d
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
using System;
using Foundation;
using UIKit;
 
namespace Shared
{
    public class Ezviz
    {
        public static void OpenEzviz(string url)
        {
            // NSLog(@"添加摄像头");
            // 1.获取应用程序App-B的URL Scheme
            //var appBUrl = new NSUrl("com.hdl.ezviz-monitor://?com.hdl.i-Life-ezviz");
            //if (language == "en")
            {
                //appBUrl = "";
            }
            // 2.判断手机中是否安装了对应程序
            //if (UIApplication.SharedApplication.CanOpenUrl(appBUrl))
            {
                // 3. 打开应用程序App-B
                UIApplication.SharedApplication.OpenUrl(new NSUrl(url));
            }
            //else
            {
                //    //NSLog(@"没有安装");
                //appBUrl=[NSURL URLWithString:@"https://itunes.apple.com/cn/app/i-life-ezviz/id1232176145?mt=8"];
                //    UIAlertController* alertVC =[UIAlertController alertControllerWithTitle: @"Go to Apple Store" message: @"download the APP" preferredStyle: UIAlertControllerStyleAlert];
                //[alertVC addAction:[UIAlertAction actionWithTitle:@"sure" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
                //        [[UIApplication sharedApplication]
                //openURL:appBUrl];
                //    }]];
                //    [alertVC addAction:[UIAlertAction actionWithTitle:@"cancel" style:UIAlertActionStyleCancel handler:nil]];
                //    [self presentViewController:alertVC animated:YES completion:nil];
                //}
            }
        }
    }
}