• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

mozilla-mobile/firefox-ios-open-in-client: Reference client for opening links in ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

mozilla-mobile/firefox-ios-open-in-client

开源软件地址:

https://github.com/mozilla-mobile/firefox-ios-open-in-client

开源编程语言:

Swift 56.6%

开源软件介绍:

Opening links in Firefox for iOS

This open-source project provides support for opening links in Firefox for iOS. There are classes (for Objective-C and Swift), along with a sample project that uses them, available for reference and use.

Using OpenInFirefoxControllerSwift or OpenInFirefoxControllerObjC to open links

The OpenInFirefoxControllerSwift and OpenInFirefoxControllerObjC classes provide methods that handle the making of custom URI schemes, checking if Firefox is installed on the device and opening the URL in Firefox. We have provided Swift and Objective-C implementations of these classes to accommodate your language of choice.

Methods

  • isFirefoxInstalled: returns true if Firefox is installed
  • openInFirefox: opens the specified URL in Firefox; used with or without the following:

The Custom Firefox URL

Firefox uses a single URI scheme, firefox://. This scheme can accepts the following query parameter:

  • url: (required) the URL to open in Firefox.

For Example:

firefox://open-url?url=https://www.google.com/search%3Fq%3Dfirefox%2520for%2520ios

Walkthrough

  1. Download the class file in the language of your choice:
  1. Whitelist the Firefox URL scheme in Info.plist, under the LSApplicationQueriesSchemes key:
  • In depth example on how to do that here
  • If LSApplicationQueriesSchemes isn't already in your app's Info.plist, you can just manually add it
  • Add firefox to LSApplicationQueriesSchemes
  1. Call methods to open links in Firefox:

Contribute to Firefox for iOS

Learn more about how to contribute to this project: Firefox for iOS official repo




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap