Reload/Refresh an ABPersonViewController - ios4

In my app, users can view and edit their Address Book contacts. Right now, I'm trying to support iOS 4 backgrounding.
Here's my problem. If a user is viewing a contact, say "John Appleseed" in my app, the user can then switch to the iPhone Address Book, open "John Appleseed," and change his contact info. If the user then switches back to my app, my app's view of John Appleseed is now out of date. I want this view to refresh with the new info. Obviously, the user can close and reopen the contact in-app (or the app can do this programmatically), but this is a less than ideal user experience.
I know this is possible the other way around i.e. user edits contact in-app and switches to the iPhone Address Book and the view auto updates.
I already know how to detect if a change has happened, but I want to be able to refresh the view. I am using an ABPersonViewController. Unfortunately, since this isn't an instance of UITableViewController, I can't just do [self.tableView reloadData]
Thanks in advance for any help on the issue!

If you already know how to get the new contact information as ABRecordRef, then try
yourABPersonViewController.displayedPerson = yourNewABRecordRef;
[yourABPersonViewController.view setNeedsDisplay];

Related

How to save user preferences?

We're developing a Gmail Addon to help internal staff to handle customers' email.
Our card widget will have a table with 2 column; first cell of every row will host, one or more domains, and the 2nd one will contains an editable text box with the default label that the addon will add to this user.
I'd like to allow user to change the default label, to adapt to his/her preferences and actual labelling method, adopted in some cases since years.
So the problem: how to save the user preferences, the user settings, of our addon only of course, but keeping related to user account? The goal is allow user to login with different devices and find the same settings
The sample Gmail add-ons projects that Google have published on Github should help you. In particular I've just found this Settings.js source file.
The core seems to be
var savedSettings = cachedPropertiesForUser_().get("settings", {});
But I've not used this in anger.

Direct link to newsletter - kentico 9

We are using kentico 9 at work for our website.
You can subscribe to our newsletter using a "box" which is integrated all the way down on our homepage.
However, I would like to have the opportunity to share a direct subscription link on social media so people can click on it and subscribe to the newsletter.
Now, I have to invite people to go on our website and to go down the page to subscribe which is inconvenient (nobody is going to do this).
I can't find a way to get a direct link (I'm not a developer).
Does anybody know how I could do it ?
Thanks in advance ! :D
Anne
If someone want to subscribe to newsletter, he/she must provide you with email address and I'm not sure that can be done with direct link, because you are not aware of user email address (your target group is unknown group from social media).
You can set up anchor in 'subscribe to newsletter' link, which will automatically scroll down your page to box at the bottom, but I don't think that is the best solution. Maybe, to create a new content page, with only purpose to subscribe users to newsletter (have some introduction text, and widget for 'newsletter' where users can subscribe). I don't know is that what you are looking for, but it is nicer solution then asking people to scroll down and subscribe to newsletter.
Best regards,
Dragoljub
My suggestion would be to create a specific landing page with that signup form on it. This way you can have a link you share in social media that takes them directly to that page and allows them to put in their info (first, last and email) and sign up for that specific newsletter. This way it's a specific call to action on that page and allows for the user to only do one thing.

MEAN Stack / How do I create and manage temporary users without a login or signup?

Okay so I'm currently developing a bit coin related website!
I want it to work like this:
User visits the page and sees a balance of 0.000BTC + a deposit address.
If the user deposits money to that address it shoos up after x confirmations and updates a mongodb doc with the amount they sent.
The user can then make api calls that do stuff with the doc.
Here's what I don't want:
Users to have to sign up to do this...
How can I accomplish this using angularJS or NodeJS?
I was thinking about doing something with sessions / a mongoDB that uses a TTL collection.
However I can't wrap my head around how to do this correctly.
Any ideas, solutions, or example code would be extremely helpful!
-Thanks
I think that when the money is deposited you should open a user with their deposit email and the ability to update details in his profile later on.
I would send mail confirmation on both deposit and the user profile opened.
That way they don't "sign up" but a user object will be created automatically based on the deposit.
All of this stuff should happen in node BTW (logic and workflow in node, appearance and UX in angular)
Lior

WebEngine "keep me logged in" functionality

Is there any way to store state, basically to have a "keep me logged in" functionality like browsers do?
I've been looking into the CookieManager, and search a lot but haven't been able to find anything on this.
I have a social feeds reader, in which if a user clicks on a link it is opened on a WebView. The thing is, that on every run of my app, when they click on a link pointing to a private facebook post, they need to log in to their accounts in order to view it, which is quite uncomfortable.
Appreciate your help.
I found this How do I persist cookies when using HTTPUrlConnection?
and this http://docs.oracle.com/javase/tutorial/networking/cookies/custom.html
which allowed me to create a persistent cookie handler.

Is it possible to launch the iPhone simulators contacts from another app

I am trying to use the contacts from iPhone simulator's or iPhone contacts in my native app.
For this I searched a lot and found that application:openUrl method can be used but this method is invoked in applicationdidFinishedLaunching method.
And I want it to launch the already exist contacts app in my native app.
What are you wanting the user to do with the Contacts?
The API sample for doing anything with the address book is listed under QuickContacts.
http://developer.apple.com/library/ios/#samplecode/QuickContacts/Introduction/Intro.html
From the README:
This sample also shows how to:
Browse a list of Address Book contacts and allow users to choose a contact from that list.
Display and edit information associated with a selected contact.
Prevent users from performing default actions such as dialing a phone number associated with a selected information.
Create a new contact record.
Update a partial contact record.
Present and dismiss the people picker, person view controller, new-person view controller, and unknown-person view controller.

Resources