No alert displayed when UIRequiresPersistentWiFi is included - ios

I am currently using Xcode 8.2 and have included the key: UIRequiresPersistentWiFi in my info.plist file.
According to others, when the user is not connected to WiFi, the user should be prompted with an alert to turn WiFi on. However, this alert is not showing up when this key is included. I don't know if the key has been deprecated in later versions of Xcode. I would appreciate it if someone could explain why the message is not showing, and also help in finding a way to display the message.
In Apple's documentation it says this for the UIRequiresPersistentWiFi key:
The inclusion of this key lets the system know that it should display the network selection dialog if it detects any active Wi-Fi hot spots. It also lets the system know that it should not attempt to shut down the Wi-Fi hardware while your app is running.

Related

app rejection due to IPv6 issue

I recently got an iOS app rejected due to lack of IPv6 compatibility.
After browsing the internet to investigate on the subject, I decided to view those two videos:
https://developer.apple.com/videos/play/wwdc2015/719/
https://developer.apple.com/videos/play/wwdc2016/714/
Now back to debugging the app, I am trying to follow what I can read here:
http://www.brianjcoleman.com/tutorial-how-to-test-your-app-for-ipv6-compatibility/
At one point in the document we can read:
14. Once sharing is active, you should see a green status light and a label that says Internet Sharing: On. In the Wi-Fi menu, you will also see a small, faint arrow pointing up, indicating that Internet Sharing is enabled. You now have an IPv6 NAT64 network and can connect to it from other devices in order to test your app.
This is where I hit a problem. In my case I can indeed see:
"a green status light and a label that says Internet Sharing: On"
But I do not see in the Wi-Fi menu:
"a small, faint arrow pointing up, indicating that Internet Sharing is enabled".
So my guess is that I must have either done something the wrong way or have a configuration not matching what is expected by this document.
I have also tried several choice for Share your connection from: but to no avail. In the same way, looking at my iPhone does not show any sign of new access point.
Any suggestion coming from an expert on the subject or someone with some experience would be very much appreciated.
I also recently encountered this issue when uploaded my previous apps to appstore.
The solution is used is - I recorded a video of app functioning while connected to ipv6 network i.e. connected to any mobile hotspot. You just need to record this video and upload it on internet(generally i use google drive) and make public link from it.
Then in itunes, prepare for submission link, there is a section called add notes. In this section, you need to tell apple that your app is functioning properly under ipv6 network and tell them to check you video link.
For sure, after doing these things as defined, Your app will be approved within 14 hours.
I now do these steps everytime i upload my new app.
Thanks

Lock iOS app in single app mode programmatically

Note : I don't want to submit this app to app store.
What i want to achieve :
I want simple app with one view having two button Lock and Unlock.
Lock - This button will lock device. Only this app's screen will show nothing else will be accessible even after restart same screen will show up. Home button, gestures will get disabled similar to single app mode.
Unlock - This will unlock device and switch to normal behaviour of device.
iOS :
I want this for iOS 4.3 and above.
I have checked following solutions, but these don't match my requirements
Configuration profile
Lock-down iPhone/iPod/iPad so it can only run one app
But it is manual (reboot device, open app which you want to run in single app mode). I want to do it programmatically the way i mentioned above through my app.
Guided access (iOS 6 and above)
How to lock down user to Single App mode in iOS 6, Programmatically?
I want it do for all os and programatically.
Is there any way to do this ? As i don't wan't to submit it to app store is there any private api, some hack for springboard to achieve this ?
Thanks in advance !!
As I know in iOS 7 there is a new feature which allow to do exactly what you want.
However, it's only applicable for iOS 7 (and I believe it's only applicable to a supervised devices).
1) You will need to install restriction configuration profile with autonomousSingleAppModePermittedAppIDs key (take a look here)
This is one time step and a user will need to manually accept this configuration profile.
There is another option to use MDM to install it silently, but it could be an overkill for you.
2) You should use API:
UIAccessibilityRequestGuidedAccessSession (to lock/unlock)
It is defined here
3) And most beautility part. All of it is officially document. So, you can even submit it to AppStore.
P.S. Why do you care about 4.3 or 5? They have tiny market share by now. Most likely even iOS 6 has below 20% market share already.
Update 1
Potentially, you can try to use API which sends clicks and keys (search for GSEvent in iPhone-privateapi tag). May be using these API's you can do triple home to toggle accessibility on and off.
If this work, I think you should be able to cover iOS 6. I am not sure whether both this API and triple home click were available prior that.
It looks like this private API is unaccessible anymore in iOS 7. So, probably you can ignore this idea.
Just wanted to write on this even though this is old as i needed to implement a similar solution and i got it working. The steps for me as follows and a note here is that this involves MDM and other specific steps.
My requirement was as follows. Each of the iPad at different locations has a set of apps installed.For ease of it lets assume each Dept. has their own apps. Participants open a app related to their dept. to take a test, the APP automatically Locks the iPad to single-app Mode and at the end of the test, it will unlock it self.
Supervise the iPad/iphone using the Apple Configurator.
Install the MDM related files ( Each MDM has its own set of instructions, usually involves downloading a profile).
Every MDM has a option of Single APP Mode or MultipleAppMode. Select the second option and add the app IDs to the list. (A single APP mode works pretty well with MDM's but i did not want the app to be locked to a single APP all the time).
I used the UIAccessibilityRequestGuidedAccessSession api to lock unlock the device from single app mode.
http://bobxcode.blogspot.com/2015/12/programmatically-implement-single-app.html
Thanks,
Bob
In MDM configuration, There is an option
autonomousSingleAppModePermittedAppIDs
Optional. Supervised only. If present, allows apps
identified by the bundle IDs listed in the array to
autonomously enter Single App Mode.
Availability: Available only in iOS 7.0 and later.
But this needs Supervised Device mode.

app does not appear under cellular data ios7

Under "App > Settings > Cellular Data" my application doesn't appear under “Use Cellular Date For” on the iPad.Can anybody help me fix this?
MoreOver it should be defaulted to off.
It only adds apps when you use them to connect using 3G (cellular).
Turn off your wifi while you are doing this
then go into the app that you want to see in cellular data
go back into the setting, cellular and scroll down
you should see the app listed.
You should also remember to turn your wifi back on.
I have an app that use internet only via system. I mean iCloud and iCloud Keychain. There is no network code in it. And as far as I tested it never appears in this list though it does synchronise data when wi-fi turned off.
From what i found is that, the app will only appear on the list, if it has used data. So switch of your wifi and force the app to use some data. In my case i had to send an email in the outlook app which was not appearing in the list under cellular data. Once i sent and dowloaded an email it appeared.

Pasteboard not accessible when locked with passcode on iOS

I have noticed I cannot access the Pasteboard in iOS whenever my device is locked with passcode. I know there was a restriction regarding keychain, but not sure why its affecting pasteboard as well. Is this a known issue or purposeful restriction?
I'm assuming this is desired function.
Imagine an app like 1Password. That app supports copying a password to the paste/clip board.
If I have a passcode set on my device, it's probably because I don't want people to be able to see the data on that device - it could contain stuff like, say, all the specs and launch date for the next iPad.
As a user, I probably shouldn't be copying such information to the pasteboard, but, hey - my device is locked with a passcode, right? No one can see my info, right?
Apple knows that users often use this line of reasoning, and, however flawed it may be, you build your OS for the user - not the user for your OS.*
* Unless you're Microsoft building Windows 8. Then you can break all the rules and make a strange OS.

how to check iOS 6 privacy setting on contact for a particular app?

I have an iOS app reading native phonebook and save them into a local sqlite3 db. you know in iOS6, a new feature named privacy setting is added in system.
so my question comes, how to check privacy setting for my app on reading contact is disabled?
is there any notification sent?
I searched lots of sites but no good result. Currently my app's behavior is,
disable reading contact, when app is switch from background to foreground, or re-launch sometimes(other times works.), contact still showed in my app's list.
Thanks in advance!
now iOS 6 is open to public. I tried and found that is simple. check address book is nil is fine.This is work for iOS release version.
For previous prerelease version, it is not always true. it may return 0 contact number. Anyway, it is not the end user version.

Resources