Iphone application for parental control over browsing - ios

Here I am interested in developing an Iphone application which will check the outgoing URL form any browser,or at least from safari browser.
So how can I check user entered URL or user clicked URL. I want to perform some other actions depending on the URL clicked .
Is there any way to get the URL sending from the device or URL receiving to the device.??
what can be the best approach to develope parental control application to avoid child from browsing unwanted sites.
Thanks

This is not possible, app on iOS are sandboxed and can not just interact with other apps let alone change there behavior.

iOS already provides such functionality (Settings -> General -> Restrictions -> Websites). As stated before, third-party apps are sandboxed and may not access these system level functionality.

Related

How to use url scheme for application not installed in device

I have an application in store, which allow to display a list of items in a first view, details of an item in the second view.
I use the url schemes to access to the details of an item from an external source (Facebook for exemple)
My question: if the application was not installed in the device, is there any way that allow to download the application and open it at the right item (using url scheme)
Thank in advance
For iOS>9
if ([[UIApplication sharedApplication] openURL:SchemaURL] == false)
{
[[UIApplication sharedApplication] openURL:iTunesAppURL];
}
What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app directly to a specific piece of content, and Deferred means that it works even if the app isn't installed first).
Unfortunately there's no native way to accomplish this on either iOS or Android. URL schemes don't work, because they always fail with an error if the app isn't installed. Apple's newer Universal Links in iOS 9+ get closer in that they at least don't trigger an error if the app isn't installed, but you'd still have to handle redirecting the user from your website to the App Store. You can't pass context through to the app after install with Universal Links, so you wouldn't be able to send the user to the correct item, and they actually aren't supported in a lot of places.
To make this work, you need a remote server to close the loop. You can build this yourself, but you really shouldn't for a lot of reasons, not the least of which being you have more important things to do. A free service like Branch.io (full disclosure: they're so awesome I work with them) or Firebase Dynamic Links can handle all of this for you.
First Query that URLScheme and know about the status of the application whether it is installed or not. If it is not installed give him/her a popup to install that application from app store. You can navigate user to app store link when clicks OK from alert.

Check if another app handles A URL scheme that your app handles

I will to check if another iOS application installed on a device handles a URL scheme. I can easily do that with the canOpenURL(_:).
The catch is my app also implements the same URL scheme but I only want my application to handle calls to the URL if no other application on the device handles it.
As you might've noticed, Apple values its users' privacy with utmost priority. Similarly, it also values its developers. Your task at hand at hand requires accessing the code of another application — which (un)fortunately is not possible.

Mobile deep linking behavior on desktop OS

Would like to know if expected behavior on deep linking using branch.io so when clicked on should check for app availability and prompt customer on iOS device to
Prompts to download app in App Store if not installed
Open in iOS app seamlessly if installed
If customer declines app download it will open in iOS mobile browser
My concern is this deep link behavior on a desktop experience. When a user clicks the same url I am being told this will take them to the iTunes app store resulting in a poor experience. Is this a correct statement? Is there any way to provide a better experience to the end user.
Thanks in advance!
I am being told if the same url is opened in Windows10 it will take me to the App
For example
1. Users opens email with deeplink url
2. what is expected behavior on mobile device with app installed that deep link
For iOS redirects, you'll have to set yourself up for Universal Linking per the documentation here:
https://dev.branch.io/getting-started/universal-app-links/guide/ios/
This is very important for redirect behavior on iOS 9 and later. Please note that not all 3rd party apps and browsers support Universal Linking functionality yet, so you should test on iOS from iMessage or Notes initially.
As for Desktop, you can set your Desktop redirect on the Link settings page - this will not take users to the App store/Play store on Desktop, but to the page you set. You can use the Branch hosted text-me-the-app page if you want to have this as your default for Branch redirects, or your site homepage, or any other page of your choosing. You can add Deeplink data that will be used for all redirects by adding key/value pairs in the SDK or manually when creating a marketing link from the Branch Dashboard. You can also set a $deeplink_path value that will be honored for a specific link, and you can further set a $desktop_url that will override defaults if you want a different redirect for a specific link.
There are many options and ways for you to configure how your redirects work - all of this is up to how you set your Link Settings on the Dashboard, and if you choose to override these defaults for any particular link. For example, you might have default redirects to the App store set for iOS and a desktop URL set to your main webpage on Link Settings. In this case, a link created without modifying these values will take the user to the App store on iOS (or the App if installed), and to the desktop URL specified in Link settings if clicked from Desktop. If, however, you want to override and set $desktop_url as something else for a given link, say, to a specific page on your webpage using the $desktop_url key, on iOS the redirects will be the same but on desktop you will be taken to the set $desktop_url. For any of these scenarios you can specify Deeplink Data to be passed through.

Opening an app from URL schema

This may sounds crazy but just curious to know how a deep link/ URL schema reaches to an app to open it up in the device. Searched for an article but all contain how to make it work technically which I completely experienced, but could not find one how the handshake works.
If anybody can share if known, much appreciated!
Thanks.
The best information I could find so far on the subject is Wikipedia:
Unlike the Web, where the underlying technology of HTTP and URLs allow
for deep linking by default, enabling deep linking on mobile apps
requires these apps be configured to properly handle a uniform
resource identifier (URI). Just like a URL is an address for a
website, a URI is the address for an app on a mobile device. Examples
of URIs that launch a mobile app:
twitter:// is the iOS URI to launch Twitter’s mobile app
YouTube:// is
the iOS URI to launch YouTube’s mobile app
The format of the URI used
to trigger or deep link an app is often different depending on the
mobile operating system. Android devices work through intents,
BlackBerry 10 devices works through BB10's invocation framework,
Firefox OS devices works through Web Activities, iOS devices works
through the openUrl application method, and Windows Phone 8 devices
works through the UriMapper class.
fb://profile/33138223345 is an example of a mobile deep link. The URI
contains all the information needed to launch directly into a
particular location within an app, in this case the profile with id
'33138223345', i.e. the Wikipedia page, within the Facebook app,
instead of simply launching the Facebook app fb://. eBay's apps
demonstrate the use of different schemes by platform.
eBay://launch?itm=360703170135 is the URI that deep links into eBay’s
iOS app while eBay://item/view?id=360703170135 links into eBay’s
Android app
Basically the URL matching starts at the OS level.
iOS will use the settings in your apps plist file for a whole bunch of other things outside the app. One of them being the deep linking.
You declare your URL scheme in the plist, and whenever the OS encounters a URL matching this scheme (usually when user taps a button or link), it will open your app and pass the URL information on. It's then your responsibility to determine what to do with this information.
Does it jump into a profile page? A particular product? That's all left up to you.

What does Unrestricted Web Access mean in iTunes Connect

When you are submitting your app to Apple app store, there is a section named "Rating" where you should rate your content based on the chart and identify how frequently the content appears.
There is one option called "Unrestricted web access" which there are no further details available about this on the Internet nor iTunes Connect Developer Guide. All you can find everywhere is:
Select Yes if your app allows users to navigate and view web pages, such as with an embedded browser.
What does this mean? Does this mean your app can open links in embedded or Safari browser? Or does this mean your app features a browser where users can enter URLs and navigate through the web unrestricted? Because saying yes to this question will make your app 17+!
If this means opening links from your app (Safari or embedded), how come other apps that have embedded browser capability have 4+ rating (like Twitter and Facebook)? As it can be seen in screenshots, there is no way to select this one and not be rated 17+
Update: My app was approved with embedded WebView (TOWebViewController) with the answer "No" (4+). As the answer mentions, any way you let users navigate through the internet such as dynamic address bar that means it should be "Yes" (17+) because it is not possible to do Parental Control on your WebView.
Update 2: Since the release of iOS 9, Apple has introduced SFSafariViewController which is a way of opening any URLs on the internet. This feature also has an address bar but read-only. So users can't surf the Web without parental control. It also inherits content blocking from Safari (ads, explicit content, etc.). I am highly positive by using SFSafariViewController in iOS 9 or above you still can choose 4+ as the device with parental control can't open any URLs anyway. (Let me know if I am wrong)
Update 3: Twitter now is 17+ based on the followings:
You must be at least 17 years old to download this application.
Infrequent/Mild Profanity or Crude Humor
Frequent/Intense Mature/Suggestive Themes
Infrequent/Mild Sexual Content and Nudity
Update 4: It is possible to use Twitter content inside your app without inheriting its rating (17+). My app is displaying Tweets, but since the users are verified and trusted public figures I could go down to 12+:
Infrequent/Mild Sexual Content and Nudity
Infrequent/Mild Profanity or Crude Humour
Infrequent/Mild Mature/Suggestive Themes
It means that a user of the app can access any URL. The issue is parental controls. If the parent has restricted web access an app that allows unlimited access, that is access to any site the user chooses then the parental controls are subverted.
Once Apple provided parental controls that caused a ripple effect on the capabilities of apps and also required Apple to review all apps for parental control violations. It also means that alternate app stores could not be allowed, they could contain apps that did not properly honor parental controls. Hence:"The Walled Garden."
I think if you use default WebView control it is ok and you don't need to set Unrestricted web access to YES. My app has defaut WebView control with dynamic address bar and if i turn ON restrictions (limited websites access) embedded default WebView control does not display restricted content. It behaves the same as Safari app. So i would say you only need to set this to YES if your app has third party WebView control which can not be controlled by Apple.
TO CORRECT MY OWN ANSWER: sorry, but not true. If your app uses any kind of WebView (default or third party) with option to access any website you have to set Unrestricted Web Access to Yes otherwise your app will be Metadata Rejected. It just happend with my apps!
If you provide an internal web browser or UIWebView which allows to the user access to any URL you have to select YES or your app will be Metadata Rejected.
My app just got rejected because it has a link to the corresponding article on wikipedia. My guess is that because wikipedia allows you to search for other articles on wikipedia then it is considered "Unrestricted Web Access" and resulting 17+ app rating.
Kind of extreme in my opinion.
Hope, You have got your answer.
Let me ADD some more specific question, I think it will help.
QUESTIONS :
Does a link that opens in an external browser (like iOS Safari) constitute "Unrestricted Web Access?"
Does an embedded browser in an app without a URL bar constitute "Unrestricted Web Access?"
ANSWER :
If your app uses the embedded browser (which does not display a URL bar) and the link does not reference objectionable content, then you should not need to label it "Unrestricted Web Access."
If your app calls up an external web browser (like iOS Safari) and the link does not reference objectionable content, then you should not need to label it "Unrestricted Web Access."
Apple has not specifically addressed these questions and leaves it to the review process to determine whether the rating is correct. Through my own investigation, I have observed the above.
I use the Ionic/Cordova In-App browser plugin and no issues here with that. i.e. user cannot change the URL of it. So the answer here is NO
https://ionicframework.com/docs/native/in-app-browser

Resources