Publish IOS App to Appstore with SSID ( wifi) discovery/connect through app - ios

I was trying to get a specific info before a IOS App development task which I searched but couldn't find anything relevant.
Wanted to know whether this requirement restricts (non compliance issue as per publish guidelines) the app to be published in App Store with features as below
User scans and lists all available wifi connections in a tableview
Selects one of the Wifi connection and connects on button click
Stores the password and SSID for future connections.
Would there be any compliance issue related to the same functionalities when submitting to IOS app store. One of my colleague have advised me about the same but not able to explain why? Which I tried to find out searching the internet, but too specific to find anything relevant. Deeply appreciate an Expert advise on this.
Thanks in advance.

I can't find anything in the Review Guidelines that would object your app idea: https://developer.apple.com/app-store/review/guidelines
A couple of areas where you should have a more detailed look:
2.5.1 Apps may only use public APIs.
2.5.9 Apps that alter the functions of standard switches, such as the Volume Up/Down and Ring/Silent switches, or other native user
interface elements or behaviors will be rejected.
5.1 Privacy
Technically, I'm not sure if it's even possible to change the WIFI not via the settings app, so I'd have a look their first. (https://apple.stackexchange.com/questions/1592/is-there-an-ipod-app-to-easily-switch-wifi-on-and-off)

I don't believe I've ever seen an app or a way to change SSID outside the Settings app. I explored a way to detect network changes, connects, disconnects, which work fine while the app is running. I was never able to influence how the user connected, just that a change happened. It also falls apart pretty quickly when the user backgrounds the app. Trying to keep a background task open long enough to poll the current connection fails pretty fast.
I wish Apple would provide some system level notification of Wifi connect events. This could be very useful to developers that want a little more control than Background App Refresh events.

Related

how to disable wifi assist without user interaction

I have couple of URLs that has to be called(programatically) through wifi not with mobile data.
As WIFI ASSIST is on , whenever the wifi is weak ,packets get transferred through Mobile data.
I would like to stop this from happening.
As far as I have researched, there is no API to toggle wifi assist switch on and off programatically
I can find if the user has mobile data and wifi on with the help of Reachability Class I believe and I can alert the user to keep wifi assist off but this is a very bad user experience.
so I decided to look if its possible to be done with the help of iOS mobile configuration file.
But I couldn't find any keys related with wifi-assist in Apple configuration profile reference.
so I am wondering , is it possible to force wifi to be used for certain URLs.
I remember this is possible with VPN ON DEMAND we can have certain domains to be accessed via VPN.
I am wondering if same is possible for wifi as well through configuration profile
Any suggestions are welcome.
As others have mentioned, there is no way to do manipulate this setting programmatically in iOS. This is not really what you are asking, as you seem to already know the answer to this is "No".
You are asking about the configuration profile, so I am assuming these are managed devices. Unfortunately, there is no configuration profile payload I am aware of that forces the managed devices to disable Wi-Fi Assist.
Your intent, however, is a bit different than what is being asked, I believe. I think you basically have an app that communicates with a resource that is only accessible via the Wi-Fi network (likely a corporate Wi-Fi network). If the app tries to connect to the resource while on cellular, it will not be able to connect. In some cases, when the Wi-Fi signal is weak, the device tries to be helpful and switches to cellular, causing issues with the app. If we could figure out a way to force iOS to not take advantage of Wi-Fi Assist when your app is running, you would be in good shape.
If you can install this app as a managed app, there is a way to identify that the app should only be allowed to run on a Wi-Fi connection. Setting the network usage rules AllowCellularData to false should do this (see this for more details). The thing I am not sure of with this solution, is whether this simply causes the connections to fail when Wi-Fi Assist is on and active, or if it makes iOS prefer to not use Wi-Fi assist when the app is running because it cannot connect over cellular. So I think you can tell an app to only connect over WiFi, but it doesn't really give you a better solution to your user experience problem. The only think it really buys you is that your app connection won't ever try to connect when connected to cellular. There is a chance, however, if you change this value to false for your app bundle ID, it will prevent Wi-Fi Assist from enabling when your app is running. I don't have access to MDM to try it out, but you could test and see.
Ultimately, given that this is probably a corporate device situation, I think you are going to have to address this through user training. The good news is that this is a one-time step. Sure, users may have slight degradation of network performance when Wi-Fi signal is weak but cell signal is strong. This does not matter as much if these are corporate devices where the corporate apps will mostly work only on the company's Wi-Fi network.
Another solution is what you mentioned, basically using on-demand VPN to provide a connection to the internal resources. This is additional infrastructure work, and you already mentioned it, so I'm not sure if it is even an option.
Obviously, the other solution would be to expose the network resources through your firewall, which could allow you to access it over cellular. I'm suspecting this is not possible due to security constraints.
Unfortunately, there are not a lot of good options in this space. However, have hope that there is some way to do it, as Sonos appears to have done something to
allow their app to avoid switching to WiFi Assist while streaming to a local network resource: https://sonos.custhelp.com/app/answers/detail/a_id/4257/~/wi-fi-assist-and-sonos
I wonder if you could have your app open a streaming audio connection to a fixed local network resource, which would cause it to use Wi-Fi. It's a pretty crazy hack, but with a low enough bitrate audio file streaming, it might do what you need while not eating up too much of the network throughput.
Per Apple's notes on Wi-Fi Assist:
Wi-Fi Assist won't automatically switch to cellular if you're data
roaming.
Wi-Fi Assist only works when you have apps running in the
foreground and doesn't activate with background downloading of
content.
Wi-Fi Assist doesn’t activate with some third-party apps
that stream audio or video, or download attachments, like an email
app, as they might use large amounts of data.
Of course the other possible solution that you could consider is improving your Wi-Fi coverage to that the signal doesn't get bad enough for Wi-Fi Assist to be needed. I know this may not be feasible, but wanted to put it out there.
Good luck with this!
There is no public API that allows you to enable/disable "Wi-Fi Assist", and even if you find a way to do it your app will be rejected.
No you can not enable or disable WiFi by programmatically and there is no API for this.

IOS Porting from Android

I have a working Android app that I'd like to port to IOS. I've started working through the Apple API references and am hopeful I can get some quick assistance.
Based on a specific time of day, I'd like to ideally toggle airplane mode so that the user cannot send or receive emails or calls. I appreciate that this can only be accomplished using private APIs which I want to avoid. As such, what other options are available to mimic the end result as closely as possible? Could the app turn off all notifications, or turn the screen off, or set brightness to zero, or disable the pop-up keyboard.
Knowing that Apple has locked down system wide settings, is there another creative idea that could I could employ?
No. Apple does not allow 3rd party apps to alter global settings like Airplane mode. Apps operate in a very limited "sandbox" where they have very limited access to system resources.
What you describe is not possible unless your app is running on a jailbroken (rooted, in Android terms) device.

Can I set an app to run when the device is Idle on iOS?

I work as a software developer, but I am absolutely new to Apple in general. We have the following case in a project, and we have not been able to figure out a solution for it, I would really appreciate some advise to find a solution (or drop the case if not possible)
A (potential) customer with multiple retail stores is interested in having a very simple app to display some content (this could an image or html, nothing too complicated) and periodically update this content from a server (this requirement is important). So it is very simple case, to use the device screen as advertising space
But here is the catch, users should be able to go out of this app and check out the device's system and other apps, and then the content should come back on the foreground when the device is idle. So basically we need something like a screensaver app that fetches the content (images) from a server and keeps them updated.
We have been looking at the guided access mode, but we are not sure it fulfills the requirements, because of the following issues
- Allowing the user to check out the device system and other apps. As far as we understood guided access restricts the device to one app.
- Re-launch the app (or bring it to the foreground) when the device has been idle for a period of time.
Note that we should account for a variety of devices (iPhone and iPads) with different OS versions
I appreciate your help and ideas. Thanks.
Apple does not allow apps to run continuously in the background except for a small limited group of exceptions. (music playing apps, for example.)
It's possible to set up your app to pretend to be a music playing app, and stay running in the background, but that means you will not be allowed on the app store.
Your client may be able to use the enterprise program to create apps for use in their retail stores. Enterprise apps don't have to go through the app store approval process.
I did this for a client recently (for an enterprise app.) As I recall I would have the app request background processing as soon as it moved to the background, and when it was notified that it's background time was ending, I would play a short "silence" sound and request another block of background time. Unfortunately it was work for hire and the contract ended, so I did not retain the source code.

iOS: read sms while app is active, like Drivesafe.ly does

Can you point me to a method which allow an app read sms messages while the app is active.
I know many people say it's not possible, but Drivesafe.ly does it and I know some bank apps do that. The only condition for that to work is that the app is currently active (shown on the screen).
Many thanks!
Iam afraid its still not possible on iPhone. If you check the iTunes page for Drivesafe.ly app, there is a notice about that.
It says:
...the application does not read native text messages out loud that come directly from your wireless carrier. Unfortunately, this is not technically possible on iOS devices today...

Can an iPhone application running in the background transfer data via USB interface?

There are 2 iPhone applications. One application running in the foreground and the other running in the background. Is there any way to get the background application to send data over USB without coming into foreground? Ideally we want to keep the foreground app in the foreground, while the background app process some data. Once the data is processed it will inform the foreground app that the data has been processed.
No it cannot. It cannot even do this without the use of private frameworks, unless you're in the Made for iPhone program. If you are, then your organization will know, based on the documentation made available to you, what you can and cannot access, when and how.
Should you be in the Made for iPhone program, and are unclear as to what you have access to and when, contact the person in your organization who is the technical contact with Apple for this program, they will be able to give you the details.
If the task is started while the app is in the foreground and you call the appropriate beginBackgroundTask/endBackgroundTask methods, you should be able to have it continue running after the app is backgrounded.
Note that access to USB is restricted (see jer's answer) and that there's no officially sanctioned way to communicate between different apps on the same device. Also, you can only buy/download one app at a time in the App Store and I can't see Apple approving an app that required you to download a second app for it to work. So you may have bigger problems to solve first.
It would help significantly if you told us what you actually wanted to achieve. For example, "I want MyApp on the user's phone to communicate with MyApp on the user's computer".
The absolute easiest way is to send data between the phone and a computer is to require that they're both on the same Wi-Fi network. Several iPhone apps incorporate a web server (this was the easiest way of "file sharing" before OS 3.2), and many more iPhone apps connect to a computer running server software.
Your other options, more or less:
Reverse-engineer the Bluetooth side of GameKit and reimplement it on the computer-side. I'm not aware of anyone who's done this. Loosely, I think it's IP over Bluetooth PAN plus some sort of Bluetooth service discovery.
Audio input/output, e.g. the headphone jack or certain pins on the dock connector. I'm not entirely sure how the mic side works (the resistance was a bit high for a carbon mic when I checked), but you might get lucky and find a way to turn it into "line in" or find "line in" pins on the dock connector.
A webcam pointing at the iDevice screen (and the iDevice camera pointing at the computer screen). Ewwwww.
Join the MFi program.

Resources