iPhone NSURLConnection pop-up for entering user/password requested? - iphone

I observed in a Hotel I am that when other apps trying to access the internet a pop-up appears that ask the iPhone user to enter the user id and password of the Hotel's Wireless LAN. I guess it is some kind of redirect on all requests to protect misuse of the WLAN.
I have an app and it does use the NSURLConnection but I am not getting the pop-up instead it goes via the regular data network of the carrier. I removed the SIM to see what happens then and then the connection fails with an error "The Internet connection appears to be offline".
I wonder whether this is because the NSURLConnection does not provide such a pop-up and this other apps (e.g. Safari, e.g. WhatsApp) use a different API. One the other hand I thought that might be what the documentation says is the "Authorization Challenge". I have implemented those delegate methods but they are not called.
If someone with some experience on this can help me.

Search the documentation for the UIRequiresPersistentWiFi Info.plist key - there are some tradeoffs (users will get an alert every time they open your application if their phone is in Airplane Mode - doesn't seem to be any way to turn that off) but that should force it to make the connection.

Related

Make Autorization on app (Vocal recognition)

I created an app on google home, and I want the app to work only if its MY voice who that asks to do the skills on my google home
How can i do that? Is this possible? I configured my google home at beginning for it recognize my voice, now how to make it mandatory for this app?
I'm trying to make my app secure because it's make banking operations by voice.
Each user request is sent to your application with a unique anonymous UserID. You will need to determine the UserID that belongs to your account (by looking at logs for your application to see which value is yours) and reject requests from other UserIDs.
Even better would be to setup a more proper Account Linking system.
Keep in mind, however, that the voice authentication system isn't perfect and there is a slight, but possible, way for others to duplicate the request - either by using a recording of your voice or by having a similar voice. Consider all the risks when designing such applications.

Does whatsapp store password?? Or are their Sockets always open?

I am trying to figure out how to auto-reconnect a ejabberd socket connection. Like whatsapp, Facebookmessenger etc
For example, when the app is closed, and i receive a push notification to wake the app up and that calls to connect the connection, or if i put the app to the background for an hour, and the connection has been idle too long and get disconnected,then i put the app back to the foreground.
I can only think of 2 ways to automatically connect to the ejabberd server.
1.) To have the JID and Password stored(but this is not good for safety reason)
2.) To have the ejabberd idle connection set to never disconnect a connection(But this uses quite a lot of resources)
Is there any other possibility to automatically re-connect a user to the server?
You cannot stay connected all the time on mobile. This is the case today on iOS and is going to be the same on Android with Android Marshmallow.
So, you need to authenticate and store some form of credentials. It does not have to be a password. If you have a custom auth module in ejabberd for example, it can be a token.
Please, note that you can also store sensitive data encrypted on mobile. Both Apple and Google provide a keychain API that is design to protect the credential. It is not accessible in cleartext from a backup for example.

Can I send a URL Scheme to my App by texting someone?

Basically the problem is my app has some very specific server settings that will change from store location to store location.
Instead of me telling the client over the phone what to set their phone as.
Server IP:
Username:
Password:
Service IP:
etc.
I'd like to be able to send a text message to their iDevice witha URL Scheme that they will tap and will automatically activate my app.
Can I send a message like this?
"And apparently I need 30 characters :P to be able to post..."
This is quite simple. I think what you want to implement is what Apple called a "custom URL scheme"
You can find it in this Apple documentation at page 122.
First, your application registers to the system at install telling it that you will handle this URL scheme, for example, "myapp://"
Then, you simply text it to your client.

Registration Process in XMPP Chat for iPhone

I am implementing a XMPP client for my iPhone App, I ahve completed all the things in (Chatting with other users , showing presence of other users , etc.)
But the one thing for which I am stuck is that , I am unable to get the new user registered from my App. I am using following snippet,
if ([appDelegate.xmppStream supportsInBandRegistration])
[appDelegate.xmppStream registerWithPassword:txt_Password.text error:nil];
But for this, supportsInBandRegistration method always returns NO and the registerWithPassword: method is never called.
Please provide some help regarding the same.
What server are you using? Some servers support in-band registration even thought they don't send the correct stream:feature according to XEP-0077. Most of them should give the feature in the disco results however.
In other words, try commenting out your if ([appDelegate.xmppStream supportsInBandRegistration]) and see if it works. If so, you'll need to complain either to your library developer or to your server developer or both.

Information about blocked calls in iPhone

I want to get information about blocked and dropped calls. When you call someone through your phone, sometimes your call get blocked or dropped, then you hear a message, "Please try again". I want to access that information in my app. Is it possible in iPhone? Maybe for jailbroken devices?
Call information is not available to apps on stock OS iOS devices, due to security sandboxing.
The decision to play a "please try again" recording is (generally) made by a device called a Service Control Point in the telephone network. From the phone's perspective, a "please try again" recording looks the same as a successfully completed call: The network doesn't tell your phone that it routed the call to secondary treatment, so there's no data stored on the phone that you could collect or analyze.
When your iPhone displays a "Call Failed" message and a "Try Again" button, the point of failure is closer to you – usually it means your phone lost contact with the cellular base station – and the phone does log that the call didn't go through. Apparently it's possible to access the iPhone's call history database without using private APIs, so in theory you could use this in your app (if Apple approves).