如何在我的iPhone应用程序中集成Skype [英] How to integrate Skype in my iPhone application

查看:202
本文介绍了如何在我的iPhone应用程序中集成Skype的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是 iOS 的新手。我想在我的iPhone应用程序中集成Skype,为此我搜索了很多但我没有找到解决方案

I am new to iOS. I want to integrate Skype in my iPhone application,for this I have searched lot but I have not found a solution for this

如何获得Skype SDK进行集成。如何在我的应用程序中集成Skype API。有没有其他方法可以使开发者Skype帐户

How can I get Skype SDK for integration. How can I integrate Skype API in my application. Is there any other way to make developer Skype account

如果您的人有任何示例代码请发布。请帮助我。非常感谢。

If your people having any sample code please post that.Please help me. Many Thanks.

我已经尝试了一些代码,请看下面但是使用该代码我的模拟器它显示如下图像的警告

I have tried some code please see that below but using that code my simulator it's showing alert like below image

- (IBAction)skypeMe:(id)sender {

    BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype:"]];
    if(installed)
    {

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"skype:echo123?call"]];
    }

    else
    {

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://itunes.com/apps/skype/skype"]];
    }
}

推荐答案

这是您的快捷代码:

Swift

@IBAction func skypeMe(sender: AnyObject) {

    let installed = UIApplication.sharedApplication().canOpenURL(NSURL(string: "skype:")!)
    if installed {
        UIApplication.sharedApplication().openURL(NSURL(string: "skype:echo123?call")!)

    } else {

        UIApplication.sharedApplication().openURL(NSURL(string: "https://itunes.apple.com/in/app/skype/id304878510?mt=8")!)
    }
}

Objective-C

- (IBAction)skypeMe:(id)sender {

    BOOL installed = [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"skype:"]];
    if(installed){

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"skype:echo123?call"]];
    } else {

        [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://itunes.apple.com/in/app/skype/id304878510?mt=8"]];
    }
}

我更改了Skype URL 对于此代码中的iTunes并使用设备进行测试,并且 URL 都正常工作。

I have changed skype URL for iTunes in this code and tested it with device and both URL is working fine.

这篇关于如何在我的iPhone应用程序中集成Skype的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆