Check programmatically if contact allows FaceTime in Objective-C or Swift - ios

Just like the title states, I am working on contacts app. What I would like to know is if there is a way for me to find out if the contacts are reachable through FaceTime? Is there a public API for it? (Note: Solutions like ChatKit.framework for iMessage are not really acceptable, i.e. private APIs)
UPDATE: found a post here, that partially answers the question: FaceTime programmatically
UPDATE #2: using #"//facetime:" scheme does not seem to work at all, as I always get true in return
UIApplication.sharedApplication().canOpenURL(NSURL(string: "facetime://0000000000")!)

Related

Url scheme for making WhatsApp call programmatically from iOS app (voice call VOIP)?

I have referred How can I place a WhatsApp call from an iOS app? which states that this feature is currently not available in iOS and as per WhatsApp FAQ Share Extension (Custom URL Scheme) it has still not mentioned any schema for placing a call, document it has mentioned:
Placing a WhatsApp call(voice call VOIP)
To make a WhatsApp call, simply open the chat with the person you want to call and tap Call in the top right corner.
Whatsapp FAQ Here
But placing a WhatsApp call from android is possible, Which I could not find in iOS.But placing WhatsApp call feature is available from phone contacts.
So my doubt is whether it is currently available in iOS to place a WhatsApp (voip)voice call from my iOS app?
If possible can you please suggest me with url schema(if available) for this just like place a chat from my app like this #"whatsapp://send?text=Hello%2C%20World!" as I couldn't find this?
I have google it and searched a lot on stackoverflow and https://faq.whatsapp.com
Seems like currently, video call from contact book feature is limited to OS level only.
But you can open particular contact then user has to manually tap on video call button.
This is regardless of phone no is stored in contact book or not. ( You can directly open )
I have tried this in Swift 3 code.
if #available(iOS 10.0, *) {
UIApplication.shared.open(NSURL(string: "whatsapp://send?phone=+91phonenumber")! as URL)
} else {
UIApplication.shared.openURL(NSURL(string: "whatsapp://send?phone=+91phonenumber")! as URL)
}
https://faq.whatsapp.com/en/iphone/23559013
Hope this helps you to figure out further way

Xamarin iOS how to get all available SysSound list?

I'm trying create a list of all available alert sounds given in an iOS device.
In Xamarin's website, there's only one example:
https://developer.xamarin.com/recipes/ios/media/sound/syssound-example/
I would like to know which additional sounds can I access via my Apple device.
Edit:
How do I get the list of build-in alert sounds
Found the answer here :
https://www.theiphonewiki.com/wiki//System/Library/Audio/UISounds
e.g:
string NotificationSoundPath = #"/System/Library/Audio/UISounds/sms-received6.caf";
SystemSound notificationSound = SystemSound.FromFile(NotificationSoundPath);
notificationSound.AddSystemSoundCompletion(SystemSound.Vibrate.PlaySystemSound);
notificationSound.PlaySystemSound();

Get referrer string for Universal Link?

I implemented Universal Links in our iOS 9 app and they work by calling a method in AppDelegate.swift, in which I get an NSUserActvity with an URL attached to it.
Is there a way to get the (HTTP-) referer? I need to know on which website the user has tapped the link that opened the app.
You should be able to use NSUserActivity > referrerURL instance property. See https://developer.apple.com/documentation/foundation/nsuseractivity/2875762-referrerurl.
No, there is no way to get the referrer.
An Apple employee made that pretty clear on the developer forums: https://forums.developer.apple.com/thread/65423
They say that the only way to get some kind of referrer would be to append it to the URL. Maybe take a look Google's campaign tracking URLs (utm_...).
I found another interesting solution if you need to support iOS 9 and 10 - https://appmetrica.yandex.com/blog/referrer-based-tracking-dlya-ios-tochnaya-atributsiya-dlya-lyubogo-istochnika-trafika.
Since iOS 11 I guess can be used NSUserActivity > referrerURL.
In short:
SFSafariViewController uses the same cookies as Safari app.
You can open invisible SFSafariViewController inside your app.
If your site contains some cookie - use Universal Link to pass it back to the app.
Though it requires to implement something like tracking link on your site.

Facebook iOS deep linking - can't parse request_ids since target_url is missing

First I just want to state that I already know this question exist. It is somewhat similar to mine. But since I don't have enough reputation I couldn't comment and ask if there was any progress on the issue.
Ok, so I'm trying to retrive the request_ids from the target_url, as per the Facebook docs. When the user taps on a request in the native Facebook iOS app, iOS switches to my app, and when I try to process the app launch url in order to parse out the request_ids, I can't even find the target_url.
The launch url should look something like:
fb00000000000000://authorize/#access_token=00000000000000&expires_in=86400&target_url= http://m.facebook.com/apps/friendsmashsample?fb_source=notification&request_ids=abc&ref=notif&app_request_type=Duser_to_user
But in my case the target_url is missing, and instead it looks like:
fb00000000000000://authorize/#access_token=0000000000000&expires_in=86400
So my question is: How do I get the target_url, so that I can parse the request_ids in order to deep link in my app?
Thanks!

How to integrate Pinterest using OpenURL?

I have tried calling pinterest app using ios OpenURL scheme but canOpenURL method always return false. I need help to get it work as i'havent find any solution by google. I dont want to use UIWebView to get it working.
Thanks
This is a link that has a way to pin a picture to pinterest. It is a framework that works pretty well. But you can not repin something from someone's pin board. If you search SO you should find some other answers as well. People trying to overcome the fact there is no API currently. Hope this gives you a jump start.

Resources