How to use Keychain in iPhone? - ios

I am working on an iPhone/iOS app using phonegap and I am new to this iOS/iPhone environment. It has a login page with two text fields "email" & "Password".Now i want to save email. i.e When I logged out it should remember the email address so it doesn't have to be input again.
I went through many links and found that I can implement this functionality using Keychain.
I found few examples but those are in native c.
Since am using phonegap, can anyone explain me how to implement keychain in phonegap.
And do I have to include any plugins for that?

Related

Sharing / Twitter not working as usual

When trying to share a picture on Twitter from an iOS app (of mine) -- already on the appStore -- I keep getting this message:
But the reality is that I am already logged in to a Twitter account.
I can switch to the Twitter app, confirm that I am logged in and come back to the current app.
Am I doing something the wrong way with Twitter?
Or is possible that something is not working with the app itself?
I need to say that this kind of sharing used to work without problems.
So this might be due to some recent change in the iOS.

IOS Deeplinking- Pass msg from email to your app

Existing user of the app will send email to other user.
Other user may have app installed or not installed on their device.
The email will contain some token. Now I want to pass that token to my app. I have read that by deep-linking, its possible. But how will I handle the case when other user have not installed my app yet in their IOS device.
Any help is appreciated.
What you're describing is called Deferred Deep Linking (Deep Linking refers to using a link to open your app, even 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 yet on either iOS or Android. URL schemes don't work, because they always fail if the app isn't installed. Apple's new Universal Links in iOS 9 get closer, but you'd still have to handle redirecting the user from your website to the App Store
A free service like Branch.io (full disclosure: they're so awesome I work with them) can handle all of this for you though. Here's the docs page covering exactly how to create email links like you described: https://docs.branch.io/pages/emails/email-partners-list/

Integrating Password Manager Into iPhone App

I've noticed a few iPhone apps have started to allow you to use your password manager to sign in. Slack is an example of this:
It looks like there's a link that's triggering a partial version of the share toolbar in Safari which lets you access your favourite password manager's widget. That's all I've been able to figure out so far though.
My question is, how have they got this functionality into their app? I'm primarily developing things using React Native, but if it needs a custom component then that's not a problem.
This is now supported natively by iOS 12+ (and by react-native 0.60+) without the need for an extension.
Documentation for enabling it on iOS is located here on Apple's site.
TLDR is to set the UITextContentType values of .username and .password for your inputs and, optionally, add an associated domain entitlement so your app can share passwords with your website.
The prop for enabling it in React Native is documented here. TLDR there is to provide an autoCompleteType on your TextInput component. The two OSes should handle that properly, though again you will have to add an associated domain if you want to share passwords between your website and app.
You can take a look at generic-password-app-extension which gives you access to password managers. It's provided by the creators of Last Password and 1Password.
You'll obviously need to wrap it with a native component so you can trigger it from your JS code.

Cannot post to Facebook via SLComposeViewController (Social Framework)

I am using SLComposeViewController for sharing in Facebook.
While I didnt have Facebook installed on the device, the controller was coming up with texts pre filled as expected. After i installed Facebook, the setPreText is not showing.
Moreover, I cannot post to Facebook. Twitter is working fine.
My device has iOS8.
A question related to your issue has already been asked here.
This bug report has more details on why the setInitialText: does not work. Basically it is against the Facebook platform policy to pre-fill the share sheet.
Pre-fill using the iOS share sheet. For apps pre-filling using the iOS
share sheet we recommend that you either remove all instances of
pre-fill from your app and submit an update to Apple's App Store or
use Facebook's share dialog for a more seamless experience.

What if Twitter or Facebook accounts are not configured on iOS 6?

Does anybody know a smart way to bring the user to enter their Facebook or Twitter account login information, if they aren't already logged in? For example, a user tries to log in my application with Facebook without configuring the Facebook account in the iOS settings. Can I ask him to do it with an alert, for example, but how can I bring him to the exact section of settings for that?
#rckoenes is correct. Under normal circumstances there is no way to manually send the user to preferences. There was a method of doing this introduced in iOS 5, but Apple quickly depreciated it in iOS 5.0.1 or 5.1 I don't remember exactly which one.
Now, on to the current situation. If you are using an SLComposeViewController in the Social Framework, you don't even have to worry about adding this functionality yourself. It is done automatically by iOS. Below is a screenshot from my 6.0 simulator attempting to post to Facebook without any accounts signed in. This is also true for Twitter and Sina Weibo.
You can't, there is no way to get the user to the settings app lett a lone the correct section.

Resources