BonjourDevAPIFinder 0.1.1

BonjourDevAPIFinder 0.1.1

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2014年12月

Tomek Kopczuk维护。



演示

切换到Bonjour发现的本地网络开发服务器

Production to Development

切换回使用原始API地址

Development to Production

安装

用法

要运行示例项目,首先从仓库中克隆它,然后在示例目录中运行`pod install`。

启用功能调整

BonjourDevAPIFinder使用功能调整。

您需要确保功能调整可以被打开(参见Tweaks文档)。

添加API

在任何项目中,在使用API地址之前执行以下操作

[BonjourDevAPIFinder.sharedInstance addApiService:@"API server"
                                       identifier:@"example"];

identifier 是您的服务的Bonjour广告名称。

使用以下方法获取当前选择的API地址

[BonjourDevAPIFinder.sharedInstance apiAddressForIdentifier:@"example"
                                          defaultAPIAddress:@"api.example.com"];

就是这样!

提示:您可以添加不止一个地址。

使服务器能够宣传其存在

Node.js®

var mdns = require("mdns");
var ad = mdns.createAdvertisement(mdns.tcp(advertisedName), port);
ad.start();

在“Server Example”文件夹中附加了启用Bonjour的Node服务器项目示例。

作者

Tomek Kopczuk,[email protected]

Swing开发

许可证

BonjourDevAPIFinder可在MIT许可证下使用。有关更多信息,请参阅LICENSE文件。