How to use unlock code iphone into my app? - swift

I have a Swift app with TouchID request when open first viewController. If I enter invalid TouchID some times, This request unlock code of device.
How can I request directly the unlock code device instead TouchID?
There is a framework, api or code available?
Thanks!

Related

Get data from all app's notification in IOS

I would like to develop an IOS app to get notification such as title and body from all applications in iPhone. Is it possible to do that?
No it is not. On Android, yes this is possible. But not on Apple. They restrict permissions so that you cannot access that information as a developer.
Every application is given a sandbox, a directory it can use to store data in. If the application needs access to data on the device that isn't located in the application's sandbox, it needs to request the data through a system interface.
App can only read their notifications, other things are possible with Jailbreak.
Learn about app sandbox here

OneSignal - Sending silent notifications that only increment badge (app in background)

My app (iOS) is in background and I want to send a push notification that won't display anything (silent) and that will only increment badge count on the app's icon.
I am still not clear on how to manage that.
Is it a parameter in the message body or in my handler code?
Thanks
Try to send a push notification with content-available=1
Turn on the content-available (iOS) or silent-notification (Android)
fields. This will cause your application to be automatically woken
up in the background whenever a notification is received (even if
it's not clicked). Your custom code must be write with native code,
Java on Android and Swift or Objective-C on iOS. See Apple's
content-available for iOS and our Android Background Data guides for
details on receiving and processing the event.
In your app, we
provide an API that you can use to run custom code when the above
occurs. Your custom code can then save a copy of the notification
content on the device in order to be displayed in an activity feed
when the app is next launched. Or it could save a copy of it on your
servers.
https://documentation.onesignal.com/v3.0/reference

Safari App takes user to Settings App in iPhone in iOS 6. How can this be done in my iPhone app?

I had a requirement to redirect a user to the iOS Settings application from within my application. I know that in iOS 5, we could use the following URL scheme to achieve this: prefs:root=General.
And I could use the following line of code:
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:#"prefs:root=General"]]
But Apple no longer supports this open URL scheme since the iOS 5.1 update.
But recently I have noticed that, in the Appstore app and Safari browser etc, Apple let this happen.Please refer to the attached image where Apple shows the alert. And on clicking the Settings button, user is taken to the Settings app. Any idea, how this is done. I believe if this can be done in App Store application, there should be some way that I can do it in my application also. Please comment if someone has a fix, or more idea on how this can be done.

iPhone Push notifications via mobile safari

Is there a way to simulate push notifications by pushing data to mobile safari? Here are 2 scenarios.
I make a web app via phonegap and dont want to use APNS but rather make a web-socket connection and push data to the device myself. On the device end is there a "alert" function I can call to emulate a pop up when a user is not in the application?
Lets throw web app out the window. Is there a way I can do this in native mobile safari? Im not talking about a plain old JS alert window that would only come up if the user was in the app, but be able to do so with it backgrounded.
You cannot run background tasks with mobile safari so for #2 you can't do true push notifications or alerts. However you can send a user an SMS if you have the user's phone number. This can have a hyperlink to a part of your web site (which can contain some sort of payload). You can use a service such as Twilio to help you send SMS'es. However this costs money. APNS does not.
For scenario #1 I'm assuming you're talking about a native app using a phonegap solution. In this case when the app is backgrounded you cannot access any UI at all and wake up the app and show a UIAlert. In fact unless an app is registered for location updates or background music, the app is effectively not going to respond after a set period of time (it only can "finish" certain operations it had started before). So the websocket solution will only be effective if the user has the app opened.
You could register a local notification that runs at some predetermined time which will show an alert. But that is not being pushed from the server so its probably not what you want.
APNS is your best solution for scenario #1. Its not that hard to implement and its pretty inexpensive. Check out urban airship if you want to avoid building out your own server-side components for it.

iPhone: How to Programmatically Respond to SMS Messages

After a review of the iPhone SDK documentation, I have not yet found a way for an application to be written such that it can programmatically process the content of an incoming SMS message within the iPhone platform. The idea would be for such an application to be running in the background and based on specifically formatted SMS messages would be able to take specific actions.
Does anybody know if this is possible with an iPhone SDK application and if so, provide a pointer to information about how this can be done?
Unfortunately, you cannot intercept - or be notified of - incoming SMS messages with the iPhone SDK.
One possible alternative, is to register a custom URL scheme that launches your application when a url with that scheme is embedded in the sms message and the user cicks on it.
to set a custom url scheme, you must implement both the CFBundleURLSchemes and CFBundleURLName keys in your application's info.plist.
In your Application's delegate, you can then implement the application:handleOpenURL: method to get any paramaters that were passed to your App from the url in the SMS message.
I believe that currently the SDK doesn't allow for background apps (except for apple ones).
BREW and J2ME had (and probably still have) ways to launch your app via specially formatted SMS, which may be what the Jeff is referring to.
Apple does have the upcoming Push Server which will allow you to send the user an alert which will give them the option of launching your app, but you cannot launch your app for them.
Unfortunately just registering an URL scheme dosn't help you at all, because the SMS app makes "http://" urls clickable only...
You can use CoreTelephony framework.But you must user some private api.And I have some demo code for this. https://github.com/edison0951/AppNotifyBySMSDemo