Launching Facetime from your app?
Asked Answered
B

5

10

I am seeing that you can launch FaceTime from your app via

[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"facetime://tel-number"]];

I am also reading that since there is no officially public FaceTime API apple will reject you.

Does anyone know if this rejection talk is true? PAIR has this feature and they have never been rejected.

Blamable answered 7/12, 2012 at 18:25 Comment(3)
What makes you think it would be rejected?Kobe
Please share the link which says the app will be rejected. Haven't heard of that.Cauley
If you could be rejected for using this then why would Apple bother to make a URL scheme for FaceTime?Ratio
N
5

My app got rejected for using FaceTime url. This is the part of response i got from Apple in resolution center.

We found the following non-public API/s in your app: Specifically, your app uses the FaceTime URL scheme, which is undocumented.

If you have defined methods in your source code with the same names as the above-mentioned APIs, we suggest altering your method names so that they no longer collide with Apple's private APIs to avoid your application being flagged in future submissions.

It was an update of a previous release. The first version got accepted without any problem. Now the update has been rejected due to the above mentioned reason. Seems i have to publish the app without the FaceTime thingy now.

Edit:

Its now legal to use FaceTime url in third party apps.

Newark answered 13/3, 2013 at 12:10 Comment(0)
D
1

As a general rule, if you use undocumented API calls and apple catches you, they will reject your application. The reason is because they could change the API call that you are using in new IOS updates and thus would cause your application to crash or not work properly. You can try and submit using the undocumented API and hope that apple lets it through but as i said, you run the risk of Apple changing this api call or removing it completely from the OS in the future.

Donetta answered 7/12, 2012 at 18:31 Comment(3)
The openURL: method isn't undocumented.Kobe
I know openURL is documented but per the documentation, the facetime url scheme is not, check the documentation at this linke for acceptable url schemes provided by apple: developer.apple.com/library/ios/#featuredarticles/…Donetta
That's true, but Facebook isn't mentioned either, and a lot of published apps open Facebook. I think the documentation is simply clarifying options for parameterizing your links rather than exclusively documenting acceptable uses of openURL:.Kobe
K
1

I don't see any reason this would be rejected, especially if there's already an app that uses this functionality. The App Store Review Guidelines are the best way to determine if your app will be rejected, and I don't see anything in there that applies to you situation.

Of course, Apple can do whatever they want, so the only way to be absolutely sure it will be accepted is to submit it, but I highly doubt you will have a problem.

Kobe answered 7/12, 2012 at 18:39 Comment(1)
Rejections due to the use of the undocumented FaceTime url scheme are happening.Thruway
P
0

It is official that you can use Native app URL strings for FaceTime video calls:

facetime:// 14085551234
facetime://[email protected]

Please refer to the link: https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/FacetimeLinks/FacetimeLinks.html

Though this feature is supported on all devices, you have to change the code a little bit for iOS 10.0 and above as openURL(_:) is deprecated.

https://developer.apple.com/documentation/uikit/uiapplication/1622961-openurl?language=objc

Please refer code below for the current and fallback mechanism, so this way it will not get rejected by Appstore.

      -(void) callFaceTime : (NSString *) contactNumber
      {
          NSURL *URL = [NSURL URLWithString:[NSString 
              stringWithFormat:@"facetime://%@",  contactNumber]];
        if (@available(iOS 10.0, *)) {
              [[UIApplication sharedApplication] openURL:URL options:@{} 
            completionHandler:^(BOOL success)
            {
              if (success)
            {
                NSLog(@"inside success");
            }
             else
            {
               NSLog(@"error");
             }
          }];
       } 
       else {
       // Fallback on earlier versions

             NSString *faceTimeUrlScheme = [@"facetime://" 
         stringByAppendingString:contactNumber];
        NSURL    *facetimeURL       = [NSURL URLWithString:faceTimeUrlScheme];

    // Facetime is available or not
        if ([[UIApplication sharedApplication] canOpenURL:facetimeURL])
        {
            [[UIApplication sharedApplication] openURL:facetimeURL];
        }
         else
        {
           // Facetime not available
           NSLog(@"Facetime not available");
        }   
    }
  }

in contactNumber either pass phone number or appleid.

   NSString *phoneNumber = @"9999999999";
   NSString *appleId = @"[email protected]";
   [self callFaceTime:appleId];

Partible answered 22/4, 2020 at 17:27 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.