I need a sample obj-c code that scans and connects to wifi. Private API is ok, I'm not going to publish the app to appStore. I found the app in cydia called "WiFiFoFum" that can scan and connect, unfortunately I can't find the source code of that app. Anybody knows where I can find that code? Thanks
相关问题
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
Objective-C is compiled, so you can't just get the source code of programs like in a scripting language. You can check to see if "WiFiFoFum" is open source, and you might be able to download the source from the author's github. Otherwise you can look at the private frameworks in the
/System/Library/PrivateFrameworks
directory and dump the header files from them using class-dump-z like thiswithout the angle brackets of course.
edit:
just checked, doesn't look like it's open source.
Found the answer here: http://code.google.com/p/iphone-wireless/issues/detail?id=20
It works perfectly fine on my iPhone 4 v5.1.1. I'm able to scan and connect to networks. You can download the project here https://github.com/devinshively/wifiAssociate
Here is a citation:
Apple80211Associate is still working (at least on 3.1.2). Between the iPhone OS 2 and 3, the framework has changed name, so you should bind your functions as following:
The most significant change from v2 to v3 is SCAN_RSSI_THRESHOLD parameter (used for the scan function). It use to take a positive number, far from the physical dB it should have been
and now it takes the dB of the signal. If you make use of it, you can set it to -100: Here is a code snipped (cherry picked from my code, so untested as is):