Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

Fix openUrl handling bugs and add support for cordova-ios-5 #751

Merged
merged 7 commits into from
Jun 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ $ cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID="12345678

If you need to change your `APP_ID` after installation, it's recommended that you remove and then re-add the plugin as above. Note that changes to the `APP_ID` value in your `config.xml` file will *not* be propagated to the individual platform builds.

IMPORTANT: This plugin works as is with cordova-ios 5 but if you use earlier version of cordova-ios then you need to add the code in the following comment to your CordovaLib/Classes/Public/CDVAppDelegate.m file which was added to your project as part of the cordova-ios ios platform template: https://github.com/apache/cordova-ios/issues/476#issuecomment-460907247

## Usage

This is a fork of the [official plugin for Facebook](https://github.com/Wizcorp/phonegap-facebook-plugin/) in Apache Cordova that implements the latest Facebook SDK. Unless noted, this is a drop-in replacement. You don't have to replace your client code.
Expand Down
5 changes: 1 addition & 4 deletions plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<preference name="APP_ID" />
<preference name="APP_NAME" />
<preference name="FACEBOOK_HYBRID_APP_EVENTS" default="false" />
<preference name="FACEBOOK_ANDROID_SDK_VERSION" default="4.40.0"/>
<preference name="FACEBOOK_ANDROID_SDK_VERSION" default="5.0.2"/>

<engines>
<!-- Requires > 3.5.0 because of the custom Framework tag for iOS [CB-6698] -->
Expand Down Expand Up @@ -160,9 +160,6 @@
</array>
</config-file>

<!-- Bolts framework -->
<framework src="src/ios/Bolts.framework" custom="true" />

<!-- Facebook framework -->
<framework src="src/ios/FBSDKCoreKit.framework" custom="true" />
<framework src="src/ios/FBSDKLoginKit.framework" custom="true" />
Expand Down
6 changes: 3 additions & 3 deletions src/android/ConnectPlugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,13 +227,13 @@ public void onError(FacebookException e) {
public void onResume(boolean multitasking) {
super.onResume(multitasking);
// Developers can observe how frequently users activate their app by logging an app activation event.
AppEventsLogger.activateApp(cordova.getActivity());
AppEventsLogger.activateApp(cordova.getActivity().getApplication());
}

@Override
public void onPause(boolean multitasking) {
super.onPause(multitasking);
AppEventsLogger.deactivateApp(cordova.getActivity());
AppEventsLogger.deactivateApp(cordova.getActivity().getApplication());
}

@Override
Expand Down Expand Up @@ -305,7 +305,7 @@ public boolean execute(String action, JSONArray args, final CallbackContext call
cordova.getThreadPool().execute(new Runnable() {
@Override
public void run() {
AppEventsLogger.activateApp(cordova.getActivity());
AppEventsLogger.activateApp(cordova.getActivity().getApplication());
}
});

Expand Down
Binary file removed src/ios/Bolts.framework/Bolts
Binary file not shown.
49 changes: 0 additions & 49 deletions src/ios/Bolts.framework/Headers/BFAppLink.h

This file was deleted.

114 changes: 0 additions & 114 deletions src/ios/Bolts.framework/Headers/BFAppLinkNavigation.h

This file was deleted.

30 changes: 0 additions & 30 deletions src/ios/Bolts.framework/Headers/BFAppLinkResolving.h

This file was deleted.

This file was deleted.

Loading