Skip to content
This repository has been archived by the owner on Sep 14, 2020. It is now read-only.

A proxy UIActivity to use when Facebook account has not been set up yet in iOS Settings

License

Notifications You must be signed in to change notification settings

apploft/APLFacebookProxyActivity

Repository files navigation

APLFacebookProxyActivity

A UIActivity for use when Facebook is not activated yet. Apple's UIActivityViewController does not display a Facebook Button if the user is not already connected. We add a custom application activity here, to display a Facebook Button in this case. Our activity tries to present a composeViewControllerForServiceType:SLServiceTypeFacebook which triggers a system alert view that displays further instructions for setting the Facebook account in iOS system settings.

Installation

Install via cocoapods by adding this to your Podfile:

pod "APLFacebookProxyActivity", "~> 0.0.1"

Usage

Import header file:

#import <APLFacebookProxyActivity/APLFacebookProxyActivity.h>

Initialize APLFacebookProxyActivity:

APLFacebookProxyActivity *facebookProxyActivity = 	[APLFacebookProxyActivity proxyActivityIfNeeded];
NSArray *applicationActivities = facebookProxyActivity ? @[facebookProxyActivity] : nil;

Finally init your UIActivityViewController with the applicationActivities array.

About

A proxy UIActivity to use when Facebook account has not been set up yet in iOS Settings

Resources

License

Stars

Watchers

Forks

Packages

No packages published