SSAppURLs

码农软件 · 软件分类 · 其他(Others) · 2019-07-25 18:57:41

软件介绍

SSAppURLs 可以根据 URL scheme 来检测本地设备是否装有某个App,并且可以打开某个App,可以传递参数。比如打开Safari或者Chrome浏览器,可以传递要打开的网址。

示例代码:

#import <UIApplication+SSAppURLs.h>

// Does the current device have skype installed?
BOOL deviceSupportsSkype = [[UIApplication sharedApplication] 
                             canOpenAppType:SSAppURLTypeSkype];

// If so, let's make a call!
if( deviceSupportsSkype )
  [[UIApplication sharedApplication] openAppType:SSAppURLTypeSkype 
                                       withValue:@"415-555-1212"];

// Does the current device have Chrome installed?
BOOL deviceHasChrome = [[UIApplication sharedApplication] 
                        canOpenAppType:SSAppURLTypeChromeHTTP];

// If so, open a website in chrome!
if( deviceHasChrome )
    [[UIApplication sharedApplication] openAppType:SSAppURLTypeChromeHTTP 
                                         withValue:@"http://www.splinesoft.net"];

// Check for an arbitrary scheme type
BOOL deviceHasTelnetApp = [[UIApplication sharedApplication] 
                           canOpenAppWithScheme:@"telnet"];

// Let's play NANVAENT!
if( deviceHasTelnetApp )
    [[UIApplication sharedApplication] openAppWithScheme:@"telnet"
                                               withValue:@"nanvaent.org:23"];

本文地址:https://codercto.com/soft/d/10928.html

The Little Typer

The Little Typer

Daniel P. Friedman、David Thrane Christiansen、Duane Bibby、Robert Harper、Conor Mcbride / MIT Press / 2018-10-16 / GBP 30.00

An introduction to dependent types, demonstrating the most beautiful aspects, one step at a time. A program's type describes its behavior. Dependent types are a first-class part of a language, and are......一起来看看 《The Little Typer》 这本书的介绍吧!

Base64 编码/解码
Base64 编码/解码

Base64 编码/解码

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具