iOS - Retrieve the most visited websites on the device - ios

I am developing a mobile app in objective-c for iOS.
Is there a way inside my app to programmatically retrieve the most visited websites from the browsers on the device?
I am interested in the urls specifically (e.g. "http://www.google.com"), in order to check a couple of things.
I've searched online but I haven't find anything that could satisfy these needs: does every browser save this kind of information in a private folder not accessible to anyone else and so it's not possible to get this data? Or am I missing something else?
Thanks anyway for your answers

The answer is: No, it's impossible. Apple doesn't give as an API to do that.

No, the developed applications are sandboxed. You can't access data out of one app from another. It's part of the security model.
Apple didn't published APIs for this privacy access level, It only published the following APIs for Safari extensions:
https://developer.apple.com/documentation/safariservices/safari_app_extensions
BTW, This question is asked alot before, you can check them:
how to programmatically access iphone browser history
How to access iPhone Safari History in an App?

Related

Where to find complete list of iOS app permissions?

Where to find complete list of iOS app permissions?
For android you may find a complete list of normal and dangerous permissions, which apps could use: https://developer.android.com/guide/topics/permissions/requesting.html
Of course I know the "dangerous" permissions of iOS, they are displayed in settings>privacy. But Im also interested in the normal settings which can not be influenced by user.
I think for developers there should be a list like that for android. Or ist the system working completely another way? So where could I learn about this?
Why am I asking? For my degree Im researching whether users now which data is collected in smart mobile devices. Therefore I need a reference.
This may be useful:
https://www.apple.com/business/docs/iOS_Security_Guide.pdf
Relevant post:
Complete list of iOS app permissions
The info.plist is where you can add keys for permissions when writing your iOS app. Here's the documentation for that:
https://developer.apple.com/library/content/documentation/General/Reference/InfoPlistKeyReference/Introduction/Introduction.html

How to read content of an iOS app from another app?

I am stuck somewhere. My client wants me to develop an application that has a dedicated icon over other applications as well. For example – If I have an ecommerce application opened in my iPhone, there should be an icon over that application through which I can take screenshot and add the image to my application. I know this is possible in android, but is it possible in iOS as well, if yes then how?? Also refer the image attached for more clarification.
Share data between two applications
Historically, the iPhone has tried to prevent data sharing between apps. The idea was that if you couldn't get at another app's data, you couldn't do anything bad to that app.
In recent releases of IOS, they've loosened that up a bit. For example, the iOS programming guide now has a section on passing data between apps by having one app claim a certain URL prefix, and then having other apps reference that URL. So, perhaps you set your event app to answer "event://" URLs the same way that a webserver answers for "http://" URLs.
Have a peek under "Implementing Custom URL Schemes".

What's App sharing files

I’m currently developing an iOS application (with Swift 3). In order to improve the user experience for the sharing, I would like to integrate What’s App.
Indeed, after some actions, the user can, if he wants, share a PDF file with UIActivityViewController.
To assure the best user experience possible, it would be amazing if the user could share directly to a phone number with What's App (without the creation of a conversation before as it's currently possible).
Do you have any ideas ?
I didn’t find anything yet, or is it something impossible ?
Thanks for the informations.
Regards
According to their own documentation, it doesn't seem to be possible. You can read up on the possibilities here:
https://www.whatsapp.com/faq/en/iphone/23559013
But you can't pass a phone number or any contact information with your URL request unfortunately.

Is it possible to get info on other installed iOS apps?

Is it possible to read the contents of another application installed on an iPhone? What about from an extension or keyboard?
I'm trying to come up with something that 'checks' other apps to see if they have any deep links (like Twitter's Twitter://timeline that takes users straight to the timeline in the Twitter app).
Is there any smart way to check a given app for deep links?
Is it even possible to peek at another app's contents from within my app? I suspect no.
If no, what about making a keyboard or extension of some sort that I can access from an app like Twitter and see its contents, such as a URL deep link?
You don't have much options, you may use -canOpenURL:, but, since iOS9, must include special credentails listing all the custom schemes you want to check.
You can't read other app's contents on a non-rooted device unless this app is sharing a keychain (so it can exchange data via the shared keychain). The same thing goes with extensions.
iOS has some high bars on security, so, don't expect much or even, anything.
Something you may want is IntentKit. Also there are ideas around the web about standard url query format like MobileDeepLinking.

How to share data between applications?

I have previously developed on Android but never on iPhone so my question could be stupid for iPhone developers.
Does it exist one or several ways to share data between applications on iPhone ?
In Android, data sharing between applications could be performed thanks to ContentProvider.
I found a post ( How to share custom data between iPhone applications? ) that talks about URL scheme but it seems only usable to share small piece of data.
Your conclusions based on the question you linked to are correct; there's no way for iPhone applications to communicate like on Android. As mentioned, you can send information from one app to another via the URL scheme, or you may share some Keychain information amongst your own apps if you sign them properly.
No - iPhone apps are sandboxed and cannot share information. The few exceptions are that you can access information from some of the Apple apps such as the photo library, calendar, email and contacts.
It depends on what you want to share, if it is contained in a document for example, then if another application supports the document format, then you can impliment a control in your application that will allow you to open it in another app. i think it is a UIDocumentController, or UIDocumentInteractionController.
Im not 100% on the class name but good reader uses this method as does iBook, to open PDF files from another application.

Resources