连接到 adhoc wifi 时使用 3g 上网(使用私有 API)
首先也是最重要的, 我正在寻找使用私有 API 的资源。 这是一个企业应用程序,永远不会进入应用商店 我需要尽可能多地从用户手中获取配置。
话虽这么说,我有一个设备,ipad 将通过该设备提供的 adhoc wifi 网络连接并与之通信。 ipad 连接到该设备并通过套接字连接向其发送原始数据。我还需要连接到互联网进行数据同步。
80% 的时间,ipad 会连接到这个 adhoc wifi 设备。 ipad 上的管理软件不允许用户调整 wifi 设置,因此我试图确保在不限制服务器同步的情况下连接到我的设备。我知道我可以使用苹果的 Reachability 类确定连接,这不是我想要的。我需要同时使用 3g 和 wifi。
有没有办法在代码中强制执行此操作?或者我可以查看私有 API 的资源来找到方法吗?
这将在 iOS 5 中出现,最可取的方法是通过一些私有 api 方法路由我的 http 请求以使用 3G,并让套接字请求使用 wifi 发送到 adhoc 设备。
代码示例会很棒,非常感谢研究的链接/类名。
再次这不会进入应用程序商店,它是一个企业应用程序
First and foremost,
I am looking for a resource to use Private API's.
this is an enterprise application and will never go to the app store
I need to take as much configuration out of the users hands as possible.
That being said, I have a device that an ipad will be connected to and communicate with via an adhoc wifi network supplied by the device. the ipad connects to this device and sends raw data to it via socket connections. I also need to connect to the internet for data syncing.
80% of the time, the ipad will be connected to this adhoc wifi device. Management software on the ipad does not allow the user to adjust wifi settings so I am trying to make sure I am connected to my device without limiting my server syncing. I know I can determine the connection using apples Reachability class, this is not what i am looking for. I need to use BOTH 3g AND wifi.
Is there a way to enforce this in code? Or is there a resource for the private API's that I can look at to find a way?
This will be in iOS 5 and the most preferable method would be to just route my http requests via some private api method to use 3G and let the socket requests use wifi to the adhoc device.
code samples would be awesome, links / class names to research would be very much appreciated.
and once again this is not going into the app store, it is an enterprise app
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我找到的解决方案是在ipad使用的私有IP范围(169.254.xx)中分配一个IP给adhoc设备,然后让ipad确定一个IP。然后看看我是否可以打开到设备的套接字连接(以确定其是否可用),然后发出打印。
按照这条路线,我仍然可以使用 3g 数据并通过 wifi 与设备通信。
the resolution i found was to assign an ip in the privately assigned ip range the ipad uses (169.254.x.x) to the adhoc device then let the ipad determine an ip. Then see if i can open a socket connection to the device (to determine if its available) and then issue a print.
Going this route, i am still able to use 3g data as well as communicate with the device via wifi.