How to get the details of apps installed in a device in my app - uiapplication

is there any way i can have an access to the name of applications that are installed in the current device in my app. is there any api's to get hold of this.
thanks

Not with documented methods. Why do you want to know what other apps the user has installed anyway?
With undocumented methods, you could use (usual warnings apply):
SpringBoardServices:
SBSCopyApplicationDisplayIdentifiers(false, false);
GraphicsServices:
GSSystemCopyCapability(kGSApplicationInstallationCapability);
liblockdown:
... lockdown_copy_value(kLockdownNotificationApplicationInstalled); ...

Related

How can I get identification string look like IMEI in IOS

My project have a case: one account user can only log on to one device ( if user log on to app in device A, user can't log on to app in device B). My Idea is: when user login, I'll get the imei Iphone (like android) and send it with request login to server. But I can't get imei. I try with UUID, but UUID will change when re install app. Keychain does not solve the problem. Please help me.
You have to use Keychain to store Unique Id , this will not change even if user delete app
You can use any wrapper Source code to do this
here is an example
https://github.com/Joe0708/KeychainUUID
At the beginning I'd like to mention that I do not know any method that directly answers your question, especially that Apple does not allow you to read IMEI and other similar stuff due to privacy concerns. This has been answered here.
The workaround might be as follows
Take a look at the UIDevice class, especially at the identifierForVendorProperty which provides you (according to documentation ) with a device specific value.
The value of this property is the same for apps that come from the same vendor running on the same device. A different value is returned for apps on the same device that come from different vendors, and for apps on different devices regardless of vendor.
As far as i know some financial apps are secured this way to permit only one device to access the account. This however requires registering a device each time application is reinstalled.
Alternatively you can use UUID you generate within your app (first run) and then you assign it for the user online. It might take the form similar to two step verification process. Be aware however that with such restrictions user will have to be online all the time to use your app.

How to fetch the list of near by wifi networks and able to connect to them from our App in ios (Using private API for enterprise App)?

I want to fetch the list of near by wifi networks and able to connect to them from our App in ios, and my Application is Enterprise App so even private api's is also fine. Stuck this issue since 2 weeks, please provide me some references..
What you require will only work on JailBroken devices, the blog(blog.guvenergokce.com/iphone-wireless-scanner-ios5/170) which #Ckouta referred also has one comment from the Blog Admin,
I’m assuming that your device is already jailbroken (otherwise not possible)
You shall create release build of sample app and upload release build in to /Applications folder.
(you can use open ssh for that )
Public API allows you to have only information about the current wifi used by your device using CNCopyCurrentNetworkInfo
In order to fetch all the wifi available in your area, take a look at: Stumbler which is using MobileApple80211. I think, it handles what you are looking for. Moreover, you can also use it to connect your device to a specific wifi. You can find a good example of what you need here (answer #9)
Just keep in mind, if you are using private API, your app will be rejected by Apple.
Although it's late but have a look at this link. You can do what you want with the use of MobileWifi.framework and thanks to Cykey there are some reversed headers to use. I have done what you want myself using the link above:)

Unique device identifier iOS 7 for give away purposes

I read a few threads and it seems like the UDID is deprecated. I also checked out CFUUIDCreate() but that's not really what I'm looking for.
I'm planning to do give aways in my app, so the only information I need from the user is the email address and a unique identifier of the device. I don't want the user to be able to simply reinstall the app and re-register for the give away. The easiest way would be to send some kind of device identifier together with the email address.
Any suggestions?
EDIT: Can I use the MAC address for this purpose? Any other ideas?
EDIT2: Nevermind, that's deprecated aswell...
EDIT3: I think I found something: How to generate unique identifier which should work in all iOS versions?
EDIT4: I'm using the solution in the link above, it works great!
Apple no longer allowes access to UDID from public APIs.
Perhaps you can use a web service to tell the device by it's IP, etc. Although there may be a way to mislead it, it will be better than using nothing.
Another solution would be using iCloud, only a few users would actually make the effort to make a new account.
Whatever you do, remember to make sure you don't break Apple's AppStore guidelines:
https://developer.apple.com/appstore/resources/approval/guidelines.html
(see "20. Contests, sweepstakes, lotteries, raffles, and gambling")
See a list of possible identifications below. Only the CFUUID provides you an unique identifier, but when you reinstall the app the ID is regenerated.
You may save the mail address of the user who received a giveaway in a separate online db.
UDID
unique and permanent device identification
(deprecated)
CFUUID / NSUUID
Random-ID, which is not bound to the device
is for each installed app different
only persistent till you delete the app
Advertising Identifier
for all apps identically
can be changed by the user
can be globally turned off
Identifier for Vendor (IDFV)
identically for all apps of one developer
MAC adress
cannot be used
no identification of a device, because the API returns the same MAC address for all devices

Can I do an app like Find my iphone in iOS?

I want to create an app which has the following features.
Track friends / family members location
Locate/track the stolen device location
Lock the device, delete the device datas by using desktop or by SMS.
Most of the above features are provided by Apple's "Find my iPhone" app. But I just want to know whether is it possible to create such an app.
From my understanding, Apple wont let the developers to use private API's and they wont allow to erase datas (like Messages, Calls details) remotely.
Please suggest me some ideas.
If you create any app which directly competes with any of the apples build app will be rejected by appstore.. But most of the above things you can do with private api's and with the help of a web service..
It wasn't possible prior to iOS7. App was not able to respond to any remote calls. There is a new API which "can" be used to solve similar things: http://mobile.tutsplus.com/tutorials/iphone/ios-7-sdk-mutlitasking-enhancements/ or http://www.objc.io/issue-5/multitasking.html (Remote notifications). You may be able to track your friends or stolen device, but not to lock or erase it.
There is a way to remotely erase the iPhone without Apple's Find My iPhone - via Exchange account. There are some open source implementations of MS Exchange, so there may be a chance to make a service which would be able to wipe the device. But even when you make that service, there will be a need to add the "exchange account" into the iDevice. I am not aware of any function which can do so programmatically.
Anyway - You can do an app which is similar to Apple's apps, but it must be somehow different. It must provide some special content or functionality, otherwise it will be rejected.

Programmatically identify if an app is paid or free

I would like to identify whether an app is paid or free; programmatically, at runtime.
To brief on the context I'm working on, I'm developing an SDK which can be used by various third-party apps. I would like to identify if the app that is using my SDK is paid or free.
Any suggestions to find this?
You should make them configure your SDK writing their app id somewhere, and then your SDK have to check the app store webservices like this
https://itunes.apple.com/lookup?id=theAppID
There you can check the price
One thing you can do is this
https://itunes.apple.com/lookup?id=YOUR_APP_ID
and then fetch price & currency values from the returned JSON
There is a way tick into my mind,
Add a logic to get application name which using your SDKalso add some logic to send that name to you via API or any other way you preferred.
Once you get a new name in your server database, you can, open AppStore in iTunes, and search for the application there, and yes you'll get to know whether they are paid or free!
I know its tough if your SDKwill be going to fly with many apps, but not hard.
An alternate way, if there's some way that you get to know whether app is paid or free, then, you can do the same thing, send app name, and its price details.

Resources