iPhone contact details corrupted how can I fix them? - ios

At some point I noticed I’m seeing vcard coding or something to that effect and a bunch of my iPhone contacts. Please look at the example is there any way to fix this without having to go into each individual contact and delete the tags etc. it looks to be some type of V card code reference.
As you can see in the attached image for Apple headquarters, there is corrupted data. This is happening in a lot of my contacts I am seeing things such as X-SOCIALPROFILE at the end of phone numbers, etc..

I have another client that is experiencing the same issue (both with phone number and country name fields). I am posting something to the Apple forum hoping that someone there has an answer.

I think I figured out the issue.
Adding my work email, I had accidentally checked sync contacts. It is Microsoft based so it corrupted a bunch of my contacts trying to pull vCard data etc.
Also, Facebook messenger was corrupting my contacts
I disabled both of these syncing features, on my Mac went into contacts and searched for “x”
I found a lot of things like X-social etc appended to phone numbers etc
Based on this search in contacts I has to manually cleanup about 30 contacts. After about 1 hour my phone was synced to the updated iCloud contacts and everything is good.
Bottom line. Choose one source of truth to sync your contacts like iCloud.
Don’t allow 3rd party apps to access your contacts.
If you need anymore information let me know

Related

CloudKit: can't discover identities

Pretty new to CloudKit. Trying to get all the contacts who are using my app. According to the docs and the tutorials out there I'm calling this:
discoverAllIdentities(completionHandler:)
The issue is that only my user (the one who is logged in on the device where the app is running) is returned. So I did some digging and noticed that if I call this one:
discoverUserIdentity(withPhoneNumber:completionHandler:)
and I use phone number directly the user is returned.
So after more investigation, I figured that the reason I do not get those users is that in my Contacts those users do not have their iCloud email stored. So once I add the email, they are returned by discoverAllIdentities(completionHandler:). So it appears the default implementation of that method is tied to iCloud emails for the discovery instead of phone number.
Is it possible to use phone number for discoverAllIdentities(completionHandler:)? Since, I don't think that as you add a new contact you would record anything but just phone number, so you will be missing to discover all those users.
Any kind of help is highly appreciated.

CloudKit share participant no longer returns name

I'm working on an app that uses CloudKit sharing functionality. The sharing features have been working great, but recently I no longer get the user names back from the CKShare.Participant when a user accepts the sharing request.
Details
I'm using the built-in UICloudSharingController to set up the share, which works and sets up the share properly.
When the invited user accepts the share, the owner gets a notification of the change in the zone and then fetches the CKShare.
The fetched CKShare object has an array of share participants (CKShare.Participant), which has a nameComponents property. I've used this in order to get the first and last name of the participants to display in the UI. This was all working fine until recently.
Now, however, I'm only getting values in nameComponents for the owner of the share. The accepted participants have nil values for the nameComponents.givenName and nameComponents.familyName.
I have not changed anything in this part of my code in some time, so don't think I've caused this. I've tried this on iOS 11, 11.4, 12, 12.1 and all have the issue. This leads me to believe there might have been a change on the server side from Apple.
Note
I am not requesting .userDiscoverability permissions. I have not had to do that in order to get the names once a user accepts. I realize that I can request that and then use CKDiscoverUserIdentitiesOperation to get the names. But I'd rather not as I don't want the dialog, which is confusing for users.
Has anyone seen this change? Or better, yet, does anyone have any suggestions for tracking down the cause or fixing it?
Thanks.

iOS app trouble storing user's documents/photos anywhere other than the phone

I'm trying to find a way of letting a user store their photos/documents online for my app. They can upload these to the app after registering an email and they remain on the phone even when the user logs out and then in again. However if the user deletes the app, downloads it again (the developers are using TestFlight at the moment), and logs in, any photo or document that the user saved before deleting has vanished.
I've been told that the data hasn't been stored on the Kinvey SDK service that we have been using as it takes a while to upload the data and then was told the app would be better suited on Kinvey REST API as the SDK version doesn't support background mode which supposedly would help store the data quicker (but this still wouldn't be 100% sure the photos/documents would be stored)
I'm not a developer/coder so I'm afraid I don't know much technically but my app needs to be able to have access across devices for the user's photos and documents, if these are 'lost' it would be catastrophic.
Please could someone help me if there a way of doing this?
Thank you.
Well If you want to save pictures or data that do not get deleted here are few options.
Save them iPhone,iPad gallery if not the use REST API
"Kinvey" can be used for that.
The alternative of "Kinvey", Kindly look into this.
https://www.raywenderlich.com/126098/top-5-parse-alternatives.
and may be you can try this. It provides chat feature too.
http://quickblox.com/

How whatsapp get updated contacts from addressbook faster in iOS?

My findings
I am designing a logic to sync contact with my Backend. I gone through some apps that doing same thing in IOS. I will take the example of WhatsApp, I found that When I update any contact in Native Addressbook, it reflect that change into Whatsapp withing a fraction.
My Concern
I just want to know that how it is syncing in a very faster way. Even a new contact gets synced with its Remote server and get displayed on contact, and with the ability to initiate Whatsapp chat if that number is registered one.
Summary of Queries
So, in nutshell my queries are,
How Whatsapp is syncing the contact?
How whatsapp is getting just updated contact list from Native Addressbook (if it's doing so) ?
How whatsapp is just getting just new Contact added in addressbook, is there anything that manages like timestamp or anything else?
I know the following things are there like,
ABAddressBookGetPersonCount
ABAddressBookGetPersonWithRecordID
ABAddressBookCopyArrayOfAllPeople
Using the ABAddressBookGetPersonCount i can know if any new contacts are there but still how i will be able to know its Record ID without iterating each contact using ABAddressBookCopyArrayOfAllPeople
So i am just asking for the way to get just updated list.
The way to do this is by registering an external change callback. This way, your app will be notified of any changes to the address book as soon as they happen.

Is it possible to programmatically disable an ABSource or ABGroup in the main Contacts app?

I'm building an alcohol prevention app and one of the features is to block the user's contacts for a given period of time so that they don't irresponsibly make drunken calls/texts to people.
The current (and very old) version implements it by letting the user select in-app which contacts to block. Then, it directly changes the selected contacts' phone numbers to an invalid one. That way, even if the user goes to the Phone or Messages app, the call or text won't be sent to the contact because the number is invalid.
I very strongly dislike this approach because it screws up with your address book which can be synced across multiple devices. What I have in mind is to:
Create a separate ABGroup or ABSource of contacts for my app
Copy all the contacts from other groups and sources into my app's group or source
Falsify all the contacts' phone numbers in my app's group or source
Disable all the other groups or source in the main Contacts app.
My question is: Is this possible? I looked into the ABSource and ABGroup references but can't find properties to disable them, but I'm hoping it's available somewhere in the SDK and that I'm just being blind.
If it's not possible, I'd be happy to hear any ideas for alternative implementations (iCloud backups, write original data into a file and screw up everything then put it back later, etc).

Resources