In the iPhone SDK I don't see the same SCDynamicStore used on Mac OS X to get the SSID name that your wireless network is currently connected to isn't available.
Is there a way to get the SSID name that the iPhone is currently connected to?
I see some apps do it (Easy Wi-Fi for AT&T for one) but I can't find how it's done in the iPhone SDK docs. A private or unpublish method would be acceptable just as a proof of concept (although I know that likely wouldn't make it to the AppStore).
This is now possible (iOS 4.1+) via the Captive Network API.
See an example of how to use it on this similar question.
This is not a private API.
After digging around I found the anser to this. There are unpublished APIs in the Preferences framework. For examples of this one can look at the Stumbler code hosted on Google Code.
I filed a radar with Apple (#6407431/OpenRadar version) that was marked as a duplicate of #5814810). If you want this officially supported then please also file a radar at bugreport.apple.com.
Update: The above Stumbler code is for 1.x revision iPhone OS SDK. For iPhone OS 2.0 and beyond developers will have to look in PrivateFrameworks/Apple80211.Framework and all that implies.
Try this code,
#import <SystemConfiguration/CaptiveNetwork.h>
CFArrayRef myArray = CNCopySupportedInterfaces();
CFDictionaryRef myDict = CNCopyCurrentNetworkInfo(CFArrayGetValueAtIndex(myArray, 0));
NSDictionary *ssidList = (__bridge NSDictionary*)myDict;
NSString *SSID = [ssidList valueForKey:#"SSID"];
Related
Non-public API usage:
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6.
If method names in your source code match the private Apple APIs listed above, altering your method names will help prevent this app from being flagged in future submissions. In addition, note that one or more of the above APIs may be located in a static library that was included with your app. If so, they must be removed.
Kindly help me how to i avoid his problem.
Regards
John
Apps are not permitted to access the UDID and must not use the uniqueIdentifier method of UIDevice. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6
Theres your answer.
"Starting May 1, the App Store will no longer accept new apps or app updates that access UDIDs. Please update your apps and servers to associate users with the Vendor or Advertising identifiers introduced in iOS 6"
Source
Apple now block any App which accesses the uniqueIdentifier property of UIDevice. Replace any occurrence with the Vendor or Advertising identifiers or use OpenUDID.
NSUUID *uuid = [[UIDevice currentDevice] identifierForVendor];
NSString *uuidString = [uuid UUIDString];
A few StackOverflow questions which may be of help:
Advertising Identifier for devices lower than iOS 6.0
iOS6 UDID - What advantages does identifierForVendor have over identifierForAdvertising?
The advertisingIdentifier and identifierForVendor return "00000000-0000-0000-0000-000000000000"
If you haven't used uniqueIdentifier yourself, then it will be an SDK Library calling it. Normally from an ad network such as Mobclix, AdMob or Smaato. All the popular ad networks have updated SDK's which remove uniqueIdentifier. Check their websites for the latest SDK.
Update
Just seen in the comments you're using PhoneGap, guessing you haven't updated to the latest version.
Apple have started rejecting UDID access now (PhoneGap)
Re: [PhoneGap] Uuids in ios 5 (PhoneGap)
Make sure your using the latest version (2.7.0) from http://phonegap.com/download/ (Released 30 Apr 2013)
I got the same issue and Apple gave me some tips to find out the Places that use "uniqueIdentifier" API call. Even in a binary lib.
"While you may have removed access and usage of UDIDs from your app,
the invalid binary message indicates that your app uses or accesses
UDIDs. Please check your source code for any occurrence of the
"uniqueIdentifier" method; this is the method that returns a device's
UDID.
Additionally, if you are linking an external framework, such as an
advertising library, these third party libraries may be accessing and
using UDIDs. We encourage you to update your libraries to the most
recent versions and use the "nm" tool to determine if the libraries
are calling this method.
For more information on the "nm" tool, please see the manual page for
the "nm" tool in Xcode Tools:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/nm.1.html
Additionally, if you do not have access to the libraries's source, you
may be able to search the compiled binary using "strings" or "otool"
command line tools. The "strings" tool can output a list of the
methods that the library calls and "otool -ov" will output the
Objective-C class structures and their defined methods. These
techniques can help you narrow down where the problematic code
resides."
Hope it helps
I am using this method to create a Unique Identifier.
Is this now not allowed. It was a month ago when release a previous version of my app.
- (NSString *)uuid
{
CFUUIDRef uuidRef = CFUUIDCreate(NULL);
CFStringRef uuidStringRef = CFUUIDCreateString(NULL, uuidRef);
CFRelease(uuidRef);
return [(NSString *)uuidStringRef autorelease];
}
What else can I use to create a unique identifier.
Cheers
Shane
I would like to know my iPhone places using Xcode like this app.I know all the details related to my iPhones.Kindly help me how to do this.
The actual Find My iPhone implementation details are certainly private and/or using private Apple frameworks (especially as it's a feature that users have to explicitly turn on and off via Settings and there's no user-facing app), but you could use CoreLocation in an app that you create that runs in the background, reporting your location to some server that your own.
I also found an alternative app named iLostMyi, but this requires a jailbroken phone.
A further question about Bluetooth and iPhone.
Is it possible to discover nearby "non-ios" devices via bluetooth programmatically? The device uses the Hands-free-Profile. When I go like "General > Bluetooth > On" it works fine and I can pair with it. And thats exactly what I want to do but in my own App. I know the official SDK doesn`t support it. So my questions are:
When I`m member of the "Made for iPod"-Program, will I have access to the Hands-free-Profile API?
Important: The device already exists and I have no influence on it. So no possibility to implement
a special ship or so.
Another opportunity I found is the Private Framework BluetoothManager.h. Is it possible to
discover/pair the device with an iPhone?
In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
Thank you
I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
No, it is not possible with official APIs, even if you are a part of the Made for iPhone program.
In one sentence: I want to build an app that exactly does what the Bluetooth-function in the iPhone settings does. Possible?
A preliminary search didn't find the official rule about it, but Apple specifically forbids apps that duplicate the functionality of their built-ins. So, no, your app will almost certainly not get approved.
And I'm pretty sure the T&C forbid interaction with non-Apple-approved devices, but I'm not sure whether they strictly apply that to bluetooth things.
Yes , using the bluetooth private APIs. You can get a list of remote devices, each a BluetoothDevice object, and use the afferent methods to pair or connect.
I am struggling with this problem for last 2 days.What I need to do is that i need to transfer data between iPhone and Windows (i.e any other OS, for now i am using Nokia mobile to that). I have gone through this link. Also I had success in that...
I am able to discover my iPhone in my Nokia device, and when I click "ADD" in Nokia a 6 digit number is sent to iPhone, and here problem starts. I don't know what to do next.
I am using private framework BluetoothManager. Please help me as I am not able to get any documentation on BluetoothManager.framework.
I don't know how to use methods in BluetoothManager.h.
A link to any documentation would be a great help.
For data transfer using your application between iPhone and another phone , you will have to go over SPP profile , in iPhone this is not available to everyone.
You will have to get access to the Apple MFi program to get access to it and it also requires adding an Apple Authentication chip on the device you are trying to connect with.
I need to get a file (sms.db) from an iPhone connected to a Mac. I cannot find any way to access the iPhone filesystem searching in Apple Developers Connection...
I cannot SSH to the iPhone, the application I want to develop is meant to be used on non-jailbroken iPhones... And I would like to avoid some MacFuse modules I found googling, too... I would like to access the filesystem thru some sort of API, the simpler the better.
Thanks!
This api was developed to allow access to ios devices:
http://www.libimobiledevice.org/
There is no Apple-documented public API for accessing the entire filesystem on a stock OS iOS device. Even private OS/API calls won't work due to the app sandbox restrictions.
Xcode, iTunes, and probably other apps that take over the iTunes USB driver, are using a non-Apple-documented private API that only works over the USB connection.
It appears that DiskAid silences all nay sayers. That app seems to have complete access to the iOS device filesystem - whether or not iTunes is running and whether or not the files are shared. It even sees files down to root level. I am still trying to figure out how it is done. Oh yea, this is all on a non jailbroken device.
It is not possible for non-jailbroken iPhone due to file system restrictions.
You can't access the filesystem from an OSX application, the filesystem is locked down.
Phoneview (as mentioned in a few comments) does not allow access to the file system.
It uses public APIs to get things like call data and contacts, and allows you to copy files into one location on the phone.
From the FAQ: "PhoneView will store your files in the media section of the iPhone's disk"
Smoke and mirrors.
If it's for your own app, use the document sharing included in iOS 4.x. You can then have files show up in iTunes, and drop files from the desktop into your app's section.
A tutorial is found here:
Ray Wenderlich's nice tutorial