React Native FBSDK Next

Overview

React Native FBSDK Next

This project aims to keep continuity of the React Native FBSDK from Facebook. As Facebook dropped support from it. As a community for this is our effort in order to keep upgrading and improving support for this module.

React Native FBSDK is a wrapper around the iOS Facebook SDK and Android Facebook SDK, allowing for Facebook integration in React Native apps. Access to native components, from login to sharing, is provided entirely through documented JavaScript modules so you don't have to call a single native function directly.

Functionality is provided through one single npm package so you can use it for both platforms without downloading any extra packages. Follow this guide to use react-native-fbsdk in your React Native app. You can also visit https://developers.facebook.com/docs/react-native for tutorials and reference documentation.


Installation

React Native Compatibility

To use this library you need to ensure you match up with the correct version of React Native you are using.

FB SDK lib version Required React Native Version
>= 9.3.0+ react-native-fbsdk-next > 4.3.0 >=0.63.3*
>= 9.0.0+ react-native-fbsdk-next >= 3.0.1 >= 0.60
<= 8.0.1 react-native-fbsdk >= 1.0.0 >= 0.60
<= 8.0.1 react-native-fbsdk <= 0.10 <= 0.59.x

⚠️ * Attention

Please notice that this module in versions after 4.2.0 only supports React Native versions above 0.63.3 as it's the oldest version of React Native which support latest XCode version. Technically, it may work on older versions (test it to be sure) but they are not supported. Changes that accidentally break older react-native versions may be issued without regard to semantic versioning constraints because we do not test against the older versions. Please see this issue for an example of a previous break. Please update to current react-native versions.

1. Install the library

using either Yarn:

yarn add react-native-fbsdk-next

or npm:

npm install --save react-native-fbsdk-next

2. Link

  • React Native 0.60+

CLI autolink feature links the module while building the app.

Note For iOS using cocoapods, run:

$ cd ios/ && pod install
  • React Native <= 0.59

For support with React Native <= 0.59, please refer to React Native FBSDK

If you can't or don't want to use the CLI tool, you can also manually link the library using the instructions below (click on the arrow to show them):

Manually link the library on iOS

Either follow the instructions in the React Native documentation to manually link the framework or link using Cocoapods by adding this to your Podfile:

pod 'react-native-fbsdk-next', :path => '../node_modules/react-native-fbsdk-next'
Manually link the library on Android

Make the following changes:

android/settings.gradle

include ':react-native-fbsdk-next'
project(':react-native-fbsdk-next').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-fbsdk-next/android')

android/app/build.gradle

dependencies {
   ...
   implementation project(':react-native-fbsdk-next')
}

android/app/src/main/.../MainApplication.java

On top, where imports are:

import com.facebook.reactnative.androidsdk.FBSDKPackage;

Add the FBSDKPackage class to your list of exported packages.

@Override
protected List<ReactPackage> getPackages() {
    return Arrays.asList(
            new MainReactPackage(),
            new FBSDKPackage()
    );
}

3. Configure projects

3.1 Android

Before you can run the project, follow the Getting Started Guide for Facebook Android SDK to set up a Facebook app. You can skip the build.gradle changes since that's taken care of by the rnpm link step above, but make sure you follow the rest of the steps such as updating strings.xml and AndroidManifest.xml.

3.2 iOS

Follow steps 3 and 4 in the Getting Started Guide for Facebook SDK for iOS.

If you're not using cocoapods already you can also follow step 1.1 to set it up.

If you're using React Native's RCTLinkingManager

The AppDelegate.m file can only have one method for openUrl. If you're also using RCTLinkingManager to handle deep links, you should handle both results in your openUrl method.

#import <FBSDKCoreKit/FBSDKCoreKit.h> // <- Add This Import
#import <React/RCTLinkingManager.h> // <- Add This Import

- (BOOL)application:(UIApplication *)app
            openURL:(NSURL *)url
            options:(NSDictionary
   id> *)options
{
  
   if ([[FBSDKApplicationDelegate 
   sharedInstance] 
   application:app 
   openURL:url 
   options:options]) {
    
   return 
   YES;
  }

  
   if ([RCTLinkingManager 
   application:app 
   openURL:url 
   options:options]) {
    
   return 
   YES;
  }

  
   return 
   NO;
}
  

Troubleshooting

  1. I cannot run the Android project.
  • Make sure you added the code snippet in step 3.1.
  • Make sure you set up a Facebook app and updated the AndroidManifest.xml and res/values/strings.xml with Facebook app settings.
  1. Duplicate symbol errors
  • Make sure that FBSDK[Core, Login, Share]Kit.framework are NOT in Link Binary with Libraries for your root project when using cocoapods.
  1. I get this build error: no type or protocol named UIApplicationOpenURLOptionsKey:
  • Your Xcode version is too old. Upgrade to Xcode 10.0+.
  1. You get a compilation error with the error Undefined symbols for architecture x86_64
Undefined symbols for architecture x86_64:
    "_swift_FORCE_LOAD$_swiftUniformTypeIdentifiers", referenced from:
    _swift_FORCE_LOAD$swiftUniformTypeIdentifiers$_FBSDKShareKit in libFBSDKShareKit.a(Enums+Extensions.o)
    (maybe you meant: _swift_FORCE_LOAD$swiftUniformTypeIdentifiers$_FBSDKShareKit)
    "_swift_FORCE_LOAD$_swiftCoreMIDI", referenced from:
    _swift_FORCE_LOAD$swiftCoreMIDI$_FBSDKShareKit in libFBSDKShareKit.a(Enums+Extensions.o)
    (maybe you meant: _swift_FORCE_LOAD$swiftCoreMIDI$_FBSDKShareKit)
    "_swift_FORCE_LOAD$_swiftWebKit", referenced from:
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKCoreKit in libFBSDKCoreKit.a(AccessToken.o)
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKCoreKit in libFBSDKCoreKit.a(Permission.o)
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKCoreKit in libFBSDKCoreKit.a(Settings.o)
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKLoginKit in libFBSDKLoginKit.a(FBLoginButton.o)
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKLoginKit in libFBSDKLoginKit.a(LoginManager.o)
    _swift_FORCE_LOAD$swiftWebKit$_FBSDKShareKit in libFBSDKShareKit.a(Enums+Extensions.o)
    (maybe you meant: _swift_FORCE_LOAD$swiftWebKit$_FBSDKLoginKit, _swift_FORCE_LOAD$swiftWebKit$_FBSDKShareKit , _swift_FORCE_LOAD$swiftWebKit$_FBSDKCoreKit )
    ld: symbol(s) not found for architecture x86_64

After facebook-ios-sdk v7 (written with Swift parts) you need to coordinate Swift language usage with Objective-C for iOS.

Either:

  • add a new file named File.Swift in the main project folder and answer "yes" when Xcode asks you if you want to "Create Bridging Header" The empty swift file makes this change to the Header Search Path on your build settings:
$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)
$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)
  • or add this stanza in the postinstall section of your Podfile as a possible workaround (then pod deintegrate && pod install):

     # Mixing Swift and Objective-C in a react-native project may be problematic.
     # Workaround:  https://github.com/facebookarchive/react-native-fbsdk/issues/755#issuecomment-787488994
     installer.aggregate_targets.first.user_project.native_targets.each do |target|
       target.build_configurations.each do |config|
         config.build_settings['LIBRARY_SEARCH_PATHS'] = ['$(inherited)', '$(SDKROOT)/usr/lib/swift']
       end
     end

    Both result in fixing search paths.

  1. AppLink.fetchDeferredAppLink does not work (on iOS at least)

    Both the Facebook App and your app have to have App Tracking Transparency (ATT) permission granted for facebook deferred app links to work. See this related issue

  2. You get an exception App ID not found. Add a string value with your app ID for the key FacebookAppID to the Info.plist or call [FBSDKSettings setAppID:].

If you find yourself in this situation, and you are certain that you have the FacebookAppID in your Info.plist or that you have called setAppId, you may be able to fix it by adding the following lines to AppDelegate.m inside the - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions, just before the return YES statement:

  [[FBSDKApplicationDelegate sharedInstance] application:application
                         didFinishLaunchingWithOptions:launchOptions];
  1. You don't see any events in the Facebook Events Manager

For it to work you need to:

  • Run the app on a real device
  • Have the facebook app running in the background and logged in to an account
  • Have that account you used on Facebook added as an "Advertising Account" for your app on Facebook's dashboard
  • MOST IMPORTANT: Have ATT enabled both on the FACEBOOK APP and YOUR APP.

This will make it so events you log on your app by YOU—which I guess they determine by seeing who is logged in on the Facebook App— are the ones to show up on the Event manager.

Usage

SDK Initialization

To comply with Apple privacy requirements, for iOS the autoInitEnabled option is removed from facebook-ios-sdk#v9.0.0.

Using this module, there are two options to comply with this requirement, one is platform-neutral and can be used from your javascript code whenever it makes sense for your app, and one is native.

Setting Facebook app ID from code

In case you e.g. would like to use multiple facebook apps, you can set the facebook app ID using setAppID

import { Settings } from 'react-native-fbsdk-next';

// Setting the facebook app id using setAppID
// Remember to set CFBundleURLSchemes in Info.plist on iOS if needed
Settings.setAppID('APP ID');

Platform-neutral SDK initialization

If you do not need to handle a GDPR-type opt-in flow, on iOS you should include the following javascript code as early in startup as possible. For Android auto-init is the default still, so this is not strictly necessary for Android but will work.

If you need to handle a GDPR-type flow, make sure your SDK is configured natively to delay all logging activity according to the GDPR instructions, ask for user consent, and after obtaining consent include code similar to this:

import { Settings } from 'react-native-fbsdk-next';

// Ask for consent first if necessary
// Possibly only do this for iOS if no need to handle a GDPR-type flow
Settings.initializeSDK();

iOS Native Initialization

If you would like to initialize the Facebook SDK even earlier in startup for iOS, you need to include this code in your AppDelegate.m file now that auto-initialization is removed.

#import <FBSDKCoreKit/FBSDKCoreKit.h> // <- Add This Import

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  [FBSDKApplicationDelegate.sharedInstance initializeSDK]; // <- add this

  // your other stuff
}

Login

Login Button + Access Token

{ console.log(data.accessToken.toString()) } ) } } } onLogoutFinished={() => console.log("logout.")}/> ); } }; ">
import React, { Component } from 'react';
import { View } from 'react-native';
import { LoginButton, AccessToken } from 'react-native-fbsdk-next';

export default class Login extends Component {
  render() {
    return (
      <View>
        <LoginButton
          onLoginFinished={
            (error, result) => {
              if (error) {
                console.log("login has error: " + result.error);
              } else if (result.isCancelled) {
                console.log("login is cancelled.");
              } else {
                AccessToken.getCurrentAccessToken().then(
                  (data) => {
                    console.log(data.accessToken.toString())
                  }
                )
              }
            }
          }
          onLogoutFinished={() => console.log("logout.")}/>
      </View>
    );
  }
};

Requesting additional permissions with Login Manager

You can also use the Login Manager with custom UI to perform Login.

// ...

import { LoginManager } from "react-native-fbsdk-next";

// ...

// Attempt a login using the Facebook login dialog asking for default permissions.
LoginManager.logInWithPermissions(["public_profile"]).then(
  function(result) {
    if (result.isCancelled) {
      console.log("Login cancelled");
    } else {
      console.log(
        "Login success with permissions: " +
          result.grantedPermissions.toString()
      );
    }
  },
  function(error) {
    console.log("Login fail with error: " + error);
  }
);

Get profile information

You can retrieve the profile information after a succesfull login attempt. The data returned will be related to the type of authentication you are using (limited or not) and the permission granted by the login method.

// ...

import { Profile } from "react-native-fbsdk-next";

// ...

const currentProfile = Profile.getCurrentProfile().then(
  function(currentProfile) {
    if (currentProfile) {
      console.log("The current logged user is: " +
        currentProfile.name
        + ". His profile id is: " +
        currentProfile.userID
      );
    }
  }
);

There's some platform related specific behaviours that you need to consider:

Limited Login [IOS]

Login Button with Limited Login [IOS only] + Authentication Token [IOS only]

Limited Login allows developers to signal that a login is limited in terms of tracking users.

loginTrackingIOS - The possible values are enabled and limited. Defaults to enabled.

When loginTrackingIOS is limited - AccessToken will be unavailable. Use AuthenticationToken instead.

nonceIOS - Limited Login allows developers to pass a custom nonce for use in verifying an authentication attempt on their servers. A valid nonce must be a non-empty string without whitespace. An invalid nonce will not be set. Instead, default unique nonces will be used for login attempts.

import React, { Component } from 'react';
import { View, Platform } from 'react-native';
import {
  AccessToken,
  AuthenticationToken,
  LoginButton,
} from 'react-native-fbsdk-next';

export default class Login extends Component {
  render() {
    return (
      <View>
        <LoginButton
          onLoginFinished={(error, result) => {
            if (error) {
              console.log('login has error: ' + result.error);
            } else if (result.isCancelled) {
              console.log('login is cancelled.');
            } else {
              if (Platform.OS === 'ios') {
                AuthenticationToken.getAuthenticationTokenIOS().then((data) => {
                  console.log(data?.authenticationToken);
                });
              } else {
                AccessToken.getCurrentAccessToken().then((data) => {
                  console.log(data?.accessToken.toString());
                });
              }
            }
          }}
          onLogoutFinished={() => console.log('logout.')}
          loginTrackingIOS={'limited'}
          nonceIOS={'my_nonce'}
        />
      </View>
    );
  }
}

Login Manager with Limited Login [IOS only] + Authentication Token [IOS only]

  import {
    AccessToken,
    AuthenticationToken,
    LoginManager,
  } from 'react-native-fbsdk-next';

  //...

  try {
    const result = await LoginManager.logInWithPermissions(
      ['public_profile', 'email'],
      'limited',
      'my_nonce'
    );
    console.log(result);

    if (Platform.OS === 'ios') {
      const result = await AuthenticationToken.getAuthenticationTokenIOS();
      console.log(result?.authenticationToken);
    } else {
      const result = await AccessToken.getCurrentAccessToken();
      console.log(result?.accessToken);
    }
  } catch (error) {
    console.log(error);
  }

  //...

Sharing

Share dialogs

All of the dialogs included are used in a similar way, with differing content types. All content types are defined with Flow Type Annotation in js/models directory.

// ...

import { ShareDialog } from 'react-native-fbsdk-next';

// ...

// Build up a shareable link.
const shareLinkContent = {
  contentType: 'link',
  contentUrl: "https://facebook.com",
  contentDescription: 'Wow, check out this great site!',
};

// ...

// Share the link using the share dialog.
shareLinkWithShareDialog() {
  var tmp = this;
  ShareDialog.canShow(this.state.shareLinkContent).then(
    function(canShow) {
      if (canShow) {
        return ShareDialog.show(tmp.state.shareLinkContent);
      }
    }
  ).then(
    function(result) {
      if (result.isCancelled) {
        console.log('Share cancelled');
      } else {
        console.log('Share success with postId: '
          + result.postId);
      }
    },
    function(error) {
      console.log('Share fail with error: ' + error);
    }
  );
}

Share Photos

See SharePhotoContent and SharePhoto to refer other options.

const FBSDK = require('react-native-fbsdk-next');
const {
  ShareApi,
} = FBSDK;

const photoUri = 'file://' + '/path/of/photo.png'
const sharePhotoContent = {
  contentType = 'photo',
  photos: [{ imageUrl: photoUri }],
}

// ...

ShareDialog.show(tmp.state.sharePhotoContent);

Share Videos

See ShareVideoContent and ShareVideo to refer other options.

const FBSDK = require('react-native-fbsdk-next');
const {
  ShareApi,
} = FBSDK;

const videoUri = 'file://' + '/path/of/video.mp4'
const shareVideoContent = {
  contentType = 'video',
  video: { localUrl: videoUri },
}

// ...

ShareDialog.show(tmp.state.shareVideoContent);

Share API

Your app must have the publish_actions permission approved to share through the share API. You should prefer to use the Share Dialogs for an easier and more consistent experience.

// ...

import { ShareApi } from 'react-native-fbsdk-next';

// ...

// Build up a shareable link.
const shareLinkContent = {
  contentType: 'link',
  contentUrl: "https://facebook.com",
  contentDescription: 'Wow, check out this great site!',
};

// ...

// Share using the share API.
ShareApi.canShare(this.state.shareLinkContent).then(
  var tmp = this;
  function(canShare) {
    if (canShare) {
      return ShareApi.share(tmp.state.shareLinkContent, '/me', 'Some message.');
    }
  }
).then(
  function(result) {
    console.log('Share with ShareApi success.');
  },
  function(error) {
    console.log('Share with ShareApi failed with error: ' + error);
  }
);

App Events

App events

// ...

import { AppEventsLogger } from "react-native-fbsdk-next";

// ...

// Log a $15 purchase.
AppEventsLogger.logPurchase(15, "USD", { param: "value" });

// Log standard event. e.g. completed registration
AppEventsLogger.logEvent(AppEventsLogger.AppEvents.CompletedRegistration, {
  [AppEventsLogger.AppEventParams.RegistrationMethod]: "email",
});

Graph API

Graph Requests

// ...

import { GraphRequest, GraphRequestManager } from 'react-native-fbsdk-next';

// ...

//Create response callback.
_responseInfoCallback(error: ?Object, result: ?Object) {
  if (error) {
    console.log('Error fetching data: ' + error.toString());
  } else {
    console.log('Success fetching data: ' + result.toString());
  }
}

// Create a graph request asking for user information with a callback to handle the response.
const infoRequest = new GraphRequest(
  '/me',
  null,
  this._responseInfoCallback,
);
// Start the graph request.
new GraphRequestManager().addRequest(infoRequest).start();

Example app

To run the example app, you'll first need to setup the environment:

refresh-example.sh

This will create a new app in the RNFBSDKExample directory, using the latest version of React Native. Next, it will patch the necessary files so you may run the example app.

yarn example:ios

or

yarn example:android

Note: You'll probably want to change the Facebook App ID to your own, else the example app won't be able to login. To change it, edit your local copy of refresh-example.sh, update the FacebookAppId variable, then re-run refresh-example.sh to regenerate the example directory.

Testing with Jest

We have a example mock inside jest/setup.js but you just add the following line to your setup file:

jest.mock('react-native-fbsdk-next', () => require('react-native-fbsdk-next/jest/mocks').default);

You also can spyOn one of this mock to return whatever you want inside your test:

import { LoginManager } from 'react-native-fbsdk-next'

jest.spyOn(LoginManager, 'logInWithPermissions').mockImplementation(() => Promise.resolve({ isCancelled: false }))

Join the React Native community

See the CONTRIBUTING file for how to help out.

License

See the LICENSE file.

Comments
  • Could not resolve com.facebook.android:facebook-android-sdk:12.+ [SOLUTION: remove jcenter from your builds]

    Could not resolve com.facebook.android:facebook-android-sdk:12.+ [SOLUTION: remove jcenter from your builds]

    🐛 Bug Report

    When I try to get android release I'm getting a error . It was working 3 day ago without a any problem This is the error `FAILURE: Build failed with an exception.

    • What went wrong: Could not determine the dependencies of task ':app:minifyReleaseWithR8'.

    Could not resolve all task dependencies for configuration ':app:releaseRuntimeClasspath'. Could not resolve com.facebook.android:facebook-android-sdk:12.+. Required by: project :app > project :react-native-fbsdk-next > Failed to list versions for com.facebook.android:facebook-android-sdk. > Unable to load Maven meta-data from https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml. > Could not HEAD 'https://jcenter.bintray.com/com/facebook/android/facebook-android-sdk/maven-metadata.xml'. > org.apache.http.client.ClientProtocolException (no error message) `

    How can I resolve this problem ?

    To Reproduce

    ./gradlew assembleRelease

    Environment

    opened by BerkD145 46
  • Error with FacebookSdk Initialize [SOLUTION: read v8 release notes: need client access token configured now]

    Error with FacebookSdk Initialize [SOLUTION: read v8 release notes: need client access token configured now]

    🐛 Bug Report

    I keep having the error : The SDK has not been initialized, make sure to call FacebookSdk.sdkInitialize() first.

    To Reproduce

    Install the package Fill the AndroidManifest and strings.xml files with facebook-app-id as in the docs. Run npx react-native run-android or launch the app through Android Studio on the emulator.

    I also tried with a brand new app and another computer. I still have the same issue.

    Expected Behavior

    The SDK should be auto-initialized at the launch of the app.

    Code Example

    Environment

    System:
        OS: Windows 10 10.0.22000
        CPU: (12) x64 Intel(R) Core(TM) i7-8700K CPU @ 3.70GHz
        Memory: 1.93 GB / 15.92 GB
      Binaries:
        Node: 16.14.0 - C:\Program Files\nodejs\node.EXE
        Yarn: 1.22.17 - ~\AppData\Roaming\npm\yarn.CMD
        npm: 8.5.5 - C:\Program Files\nodejs\npm.CMD
        Watchman: Not Found
      SDKs:
        Android SDK: Not Found
        Windows SDK: Not Found
      IDEs:
        Android Studio: Version     2021.1.0.0 AI-211.7628.21.2111.8309675
        Visual Studio: Not Found
      Languages:
        Java: 17.0.2 - C:\Program Files\Common Files\Oracle\Java\javapath\javac.EXE
      npmPackages:
        @react-native-community/cli: Not Found
        react: 17.0.2 => 17.0.2 
        react-native: 0.67.4 => 0.67.4 
        react-native-windows: Not Found
      npmGlobalPackages:
        *react-native*: Not Found
    
    opened by boreales 44
  • Login is returning unsupported request error [LIKELY RESOLUTION: blocked app, you need to contact facebook support]

    Login is returning unsupported request error [LIKELY RESOLUTION: blocked app, you need to contact facebook support]

    When users clicks to login with facebook on android, facebook servers return an error as follows:

    "SERVER_ERROR: [code] 1675030 [message]: An error occurred during query [extra]: "

    And on IOS webview opens and when user clicks to connect, web views show the attached error. Screen Shot 2021-11-08 at 13 40 18

    And all of this issues just appeared suddenly without any changes to code.

    Do you have any idea what might be the problem?

    Thanks

    wontfix upstream 
    opened by pisacode 33
  • Forward port to facebook-ios-sdk v12

    Forward port to facebook-ios-sdk v12

    Looks like a sizable batch of changes, at the least I think the initialization code will change, some of the other removals/deprecations will likely be hit as well

    https://github.com/facebook/facebook-ios-sdk/blob/master/CHANGELOG.md#1200

    enhancement released 
    opened by mikehardy 32
  • Facebook App Events not working

    Facebook App Events not working

    🐛 Bug Report

    We are having a lot of trouble implementing the FB SDK and optimizing our Facebook campaigns for App Installs and are looking for any guidance possible.

    We have added react-native-fbsdk-next to our app and followed instructions for both iOS and Android. We confirmed App Events are being sent to Facebook:

    Screen Shot 2022-06-20 at 8 06 58 AM

    However, when we attempt to create a campaign that optimizes for App Installs in Facebook, we contioustly receive this error:

    Screen Shot 2022-06-16 at 3 57 22 PM

    We spoke over the weekend for hours with Facebook Support via chat and their reply has been consistent that:

    Our team has reviewed our case and has found that the ad can't be optimized for app installs because the app haven't received any app activation events / standard app events from their app.

    To prove the point even more, our Facebook App received more events this morning for App Installs:

    Screen Shot 2022-06-20 at 8 06 38 AM

    But we continue to receive the same message from Facebook.

    So now, our next thought is possibly there is a bug in react-native-fbsdk-next or missing documentation on how to set this up correctly in Facebook Business Manager for App Install optimization.

    To Reproduce

    • Install react-native-fbsdk-next 8.0.5 (npm and pods)
    • Follow set up guide https://www.npmjs.com/package/react-native-fbsdk-next
    • Deploy to the App Store
    • Set up App and Ad Account in Facebook Business Manager
    • In Facebook Business Manager, attempt to create a campaign optimized for App Installs
    • Select your App in the App Store
    • Then receive this error:

    To optimize for app installs, app events or value, your ad account must be connected to the same business as the app and must be a connected asset of the app. You can complete these steps in Business Manager.

    Expected Behavior

    App Events should be successfully sent to Facebook to allow us to create an App Install optimized campaign

    Environment

    Production

    I understand that this may be a little vague or not super clear whether this is a bug in react-native-fbsdk-next, with us, or with Facebook. At the very least, a sanity check would be helpful. When Facbeook is telling us that the app is not receiving events, but we can clearly see the events, it's making us feel like we're kind of going crazy.

    If anyone can provide any guidance on this, we would greatly appreciate it! Also, if there is a better community space to post this, please let me know. Want to make sure we don't clog up the issue pipeline for this project if this isn't the right space. Thanks!

    wontfix 
    opened by squirrelhomie 27
  • [SOLVED: use react-native 0.63+ or patch locally] react-native-fbsdk-next:compileDebugJavaWithJavac

    [SOLVED: use react-native 0.63+ or patch locally] react-native-fbsdk-next:compileDebugJavaWithJavac

    Hi, months ago I use react-native-fbsdk and everything is already set. And this week I found that lib is already archived and it says to use react-native-fbsdk-next instead. So, I removed react-native-fbsdk and install react-native-fbsdk-next. I thought I don't need to follow any steps in Android Getting Started Guide because I already done that. I am able to run iOS but get an error in Android:

    ((my_directory_path))/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/FBProfileModule.java:16: error: constructor ReactContextBaseJavaModule in class ReactContextBaseJavaModule cannot be applied to given types; public class FBProfileModule extends ReactContextBaseJavaModule { ^ required: ReactApplicationContext found: no arguments reason: actual and formal argument lists differ in length Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: ((my_directory_path))/node_modules/react-native-fbsdk-next/android/src/main/java/com/facebook/reactnative/androidsdk/Utility.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':react-native-fbsdk-next:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

    I never change anything yet and get this error. Then I open my app/build.gradle and found my old code: implementation 'com.facebook.android:facebook-core:5.+' I tried to replace it with: implementation 'com.facebook.android:facebook-android-sdk:[5,6)' or implementation 'com.facebook.android:facebook-core:[8,9)'

    but it gives no effect. I also do manually linking but still the same. So can anyone help me to solve this please?

    Environment

    1. "react": "16.9.0",
    2. "react-native": "0.61.1",
    3. "react-native-fbsdk-next": "^4.2.0",
    opened by rukmanary 26
  • IOS build failed with FBSDKCoreKit/FBSDKCoreKit.modulemap not found

    IOS build failed with FBSDKCoreKit/FBSDKCoreKit.modulemap not found

    🐛 Bug Report

    I need to build ios archive from command line for detox testing. All works perfect when running on simulators/real devices, but on archive build (command in code snippet), I see next error:

    <unknown>:0: error: module map file '/Users/dmitry/Projects/AwesomeApp/ios/build/Build/Products/Release-iphonesimulator/FBSDKCoreKit/FBSDKCoreKit.modulemap' not found
    1 error generated.
    <unknown>:0: error: failed to emit precompiled header '/Users/dmitry/Projects/AwesomeApp/ios/build/Build/Intermediates.noindex/PrecompiledHeaders/AwesomeApp-Bridging-Header-swift_6WC6263DQMVA-clang_2T5L1QNOD8N2C.pch' for bridging header '/Users/dmitry/Projects/AwesomeApp/ios/AwesomeApp-Bridging-Header.h'
    3 errors generated.
    

    Additional info

    My Bridging-Header.h is empty file, I already have File.swift and trying to clear all cache in project.

    To Reproduce

    On project with setuped react-native-fbsdk-next correctly, try to build ios archive (command line in code snippet).

    Expected Behavior

    Get builded ios app in ios/build.

    Code Snippet

    xcodebuild -project ios/AwesomeApp.xcodeproj -scheme AwesomeApp -configuration Release -sdk iphonesimulator VALID_ARCHS=arm64 ARCHS=arm64 -derivedDataPath ios/build
    

    Environment

    Xcode: 12.5
    Mac: Apple silicon m1
        
    "react-native": "0.64.0"
    "react-native-fbsdk-next": "^4.3.0"
    
    bug no reproduction 
    opened by Navipro70 25
  • duplicate symbols for architecture x86_64

    duplicate symbols for architecture x86_64

    I got this error after i remove the old version "react-native-fbsdk" and install "react-native-fbsdk-next" and run it on ios. Is there anyone know why it happened ? I'm using rn 0.64.2 and newest react-native-fbsdk-next

    duplicate symbol 'OBJC_CLASS$_FBSDKBase64' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBase64.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBase64.o) duplicate symbol 'OBJC_METACLASS$_FBSDKBase64' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBase64.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBase64.o) duplicate symbol 'OBJC_CLASS$_FBSDKBasicUtility' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBasicUtility.o) duplicate symbol 'OBJC_METACLASS$_FBSDKBasicUtility' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBasicUtility.o) duplicate symbol '_fb_dispatch_on_default_thread' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBasicUtility.o) duplicate symbol '_fb_dispatch_on_main_thread' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKBasicUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKBasicUtility.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._observers' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._processedCrashLogs' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._dataExtractor' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_CLASS$_FBSDKCrashHandler' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_METACLASS$_FBSDKCrashHandler' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKMappingTableIdentifier' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._fileManager' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKCrashTimestamp' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKCrashReason' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKAppVersion' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKDeviceOSVersion' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._isTurnedOn' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKDeviceModel' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKCallstack' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKCrashHandler._bundle' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol '_kFBSDKMapingTable' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKCrashHandler.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKCrashHandler.o) duplicate symbol 'OBJC_IVAR$_FBSDKJSONValue._rawObject' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_IVAR$_FBSDKJSONField._rawObject' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol '_FBSDKCreateJSONFromString' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_CLASS$_FBSDKJSONValue' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_METACLASS$_FBSDKJSONValue' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_CLASS$_FBSDKJSONField' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_METACLASS$_FBSDKJSONField' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKJSONValue.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKJSONValue.o) duplicate symbol 'OBJC_CLASS$_FBSDKLibAnalyzer' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKLibAnalyzer.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKLibAnalyzer.o) duplicate symbol 'OBJC_METACLASS$_FBSDKLibAnalyzer' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKLibAnalyzer.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKLibAnalyzer.o) duplicate symbol 'OBJC_CLASS$_FBSDKTypeUtility' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKTypeUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKTypeUtility.o) duplicate symbol 'OBJC_METACLASS$_FBSDKTypeUtility' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKTypeUtility.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKTypeUtility.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSession._session' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSession.o) duplicate symbol 'OBJC_CLASS$_FBSDKURLSession' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSession.o) duplicate symbol 'OBJC_METACLASS$_FBSDKURLSession' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSession.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSession._delegateQueue' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSession.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSession._delegate' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSession.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSession.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSessionTask._handler' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSessionTask._loggerSerialNumber' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSessionTask._task' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_CLASS$_FBSDKURLSessionTask' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_METACLASS$_FBSDKURLSessionTask' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSessionTask._requestStartDate' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol 'OBJC_IVAR$_FBSDKURLSessionTask._requestStartTime' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKURLSessionTask.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKURLSessionTask.o) duplicate symbol '_FBSDKAppEventCity' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventCountry' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventGender' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventZip' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventEmail' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventDateOfBirth' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventState' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol 'OBJC_CLASS$_FBSDKUserDataStore' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol 'OBJC_METACLASS$_FBSDKUserDataStore' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventPhone' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventFirstName' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventLastName' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) duplicate symbol '_FBSDKAppEventExternalId' in: /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit/libFBSDKCoreKit.a(FBSDKUserDataStore.o) /Users/macos/Library/Developer/Xcode/DerivedData/Subscribers-gprnudlwzckogsayiqfajngwctkx/Build/Products/Debug-iphonesimulator/FBSDKCoreKit_Basics/libFBSDKCoreKit_Basics.a(FBSDKUserDataStore.o) ld: 58 duplicate symbols for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

    opened by jacow 24
  • Facebook Event Manager not receive events from iOS 14+

    Facebook Event Manager not receive events from iOS 14+

    🐛 Bug Report

    I tried to send some events to Facebook Event manager, like this: AppEventsLogger.logEvent('test', 14, { type: 'ios' }); In android and IOS < 14 it works fine, I can easily check this event in Event Manager, but if I try to send an event on IOS 14+, I don't receive anything. Not any errors appear.

    To Reproduce

    Well, I don't do any special, just make all like in setup instruction. I used 'react-native-permissions' package to get permission for advertiser tracking enabled on the first app run. I also made 5 and 6 steps from here https://developers.facebook.com/docs/app-events/getting-started-app-events-ios#disable-auto-events In my app I had AppDelegate.swift file, so in 6 I used Swift part I init SDK like this:

    export const facebookSDKInit = async () => {
      const trackingStatus = await requestTrackingPermission();
      if (Platform.OS === 'ios' && parseInt(Platform.Version) > 13) {
        if (trackingStatus === 'authorized') {
          await Settings.setAdvertiserTrackingEnabled(true);
        }
      }
      Settings.initializeSDK();
    };
    

    (I use requestTrackingPermission method from 'react-native-tracking-transparency' package to check if I really had permissions)

    and I added to button calling event: AppEventsLogger.logEvent('test', 14, { type: 'ios' });

    Expected Behavior

    Should receive an event in Facebook Event Manager and check it in recent activity.

    Code Example

    https://github.com/AlexButovFairo/testFacebookSDK This is an example of my setup, only left to configure Info.plist

    Environment

    opened by AlexButovFairo 23
  • 'FBSDKCoreKit/FBSDKCoreKit.h' file not found

    'FBSDKCoreKit/FBSDKCoreKit.h' file not found

    I'm receiving the error 'FBSDKCoreKit/FBSDKCoreKit.h' file not found always when trying to run the app on my iPhone from xCode.

    But when I run it from terminal, with the react-native run-ios it's working normally, as expected.

    I already tried to update podfile, rerun it and a lot of other things and nothing solved the problem.

    I must run this on device for testing in app purchase in another part of the app.

    The import seems to be correct but does not work.

    Captura de Tela 2022-05-13 às 10 48 29

    The podfile.

    Captura de Tela 2022-05-13 às 10 48 45

    The most weird part is that it's always working in the simulator with no problem.

    opened by JonathanVeg 21
  • LoginManager.logInWithPermissions never resolve or reject its promise

    LoginManager.logInWithPermissions never resolve or reject its promise

    🐛 Bug Report

    LoginManager.logInWithPermissions never resolve or reject its promise, but LoginButton works fine (tested on iOS only)

    To Reproduce

    I followed the tutorial, added code in AppDelegate.m, Info.plist. called Settings.initializeSDK() in a useEffect.

    When I call the example code with LoginManager.logInWithPermissions (with .then or with async/await), the native modal "wants to use 'facebook.com'to sign in" appears. if I press cancel, the function resolve a cancel event. If i press "continue", a webview opens, I log in facebook, the modal closes, and nothing happens. The logInWithPermissions does not resolve, as if the webview is still opened.

    Note : I added LoginButton next to my code, when the webview closes, the loginbutton changes to a Logout button, meaning that I did Log in successfully, only the callback is broken somewhere

    Expected Behavior

    logInWithPermissions should either resolve an object or throw an error. Note that LoginButton works perfectly fine

    Code Example

    import {AccessToken, LoginManager} from 'react-native-fbsdk-next';
    
    const onFacebookButtonPress = async () => {
      try {
        // Attempt login with permissions
        const result = await LoginManager.logInWithPermissions(['public_profile']);
        // stuck here
    
        if (result.isCancelled) {
          throw 'User cancelled the login process';
        }
    
        // Once signed in, get the users AccessToken
        const data = await AccessToken.getCurrentAccessToken();
    
        if (!data) {
          throw 'Something went wrong obtaining access token';
        }
    
      } catch (error) {
        console.log(error);
      }
    };
    

    Environment

    
    "react-native-fbsdk-next": "^4.4.1"
    
    System:
        OS: macOS 11.6
        CPU: (8) x64 Intel(R) Core(TM) i7-8557U CPU @ 1.70GHz
        Memory: 264.71 MB / 16.00 GB
        Shell: 5.8 - /bin/zsh
      Binaries:
        Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
        Yarn: 1.22.11 - /usr/local/bin/yarn
        npm: 6.14.14 - ~/.nvm/versions/node/v14.17.5/bin/npm
        Watchman: 2021.08.02.00 - /usr/local/bin/watchman
      Managers:
        CocoaPods: 1.10.1 - /Users/arnaud/.rvm/gems/ruby-2.4.0/bin/pod
      SDKs:
        iOS SDK:
          Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
        Android SDK:
          API Levels: 26, 27, 28, 29, 30
          Build Tools: 27.0.3, 28.0.3, 29.0.2, 29.0.3
          System Images: android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom, android-30 | Google Play Intel x86 Atom
          Android NDK: Not Found
      IDEs:
        Android Studio: 4.1 AI-201.8743.12.41.7199119
        Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
      Languages:
        Java: 1.8.0_265 - /usr/bin/javac
      npmPackages:
        @react-native-community/cli: Not Found
        react: 17.0.1 => 17.0.1
        react-native: 0.64.0 => 0.64.0
        react-native-macos: Not Found
      npmGlobalPackages:
        *react-native*: Not Found
    
    
    help wanted wontfix no reproduction 
    opened by arnaud9145 21
  • fix: type definition of AppEvents and AppEventParams in FBAppEventsLogger.ts

    fix: type definition of AppEvents and AppEventParams in FBAppEventsLogger.ts

    The compiled version of present FBAppEventsLogger.d.ts looks like this:

    ...
        /**
         * Predefined event names for logging events common to many apps.
         */
        AppEvents: any;
        /**
         *  Predefined event name parameters for common additional information to accompany events logged through the `logEvent`.
         */
        AppEventParams: any;
    };
    ...
    

    As you can see, AppEvents and AppEventParams are typed as any. This PR attempts to fix this issue.

    opened by w00ing 0
  • [IOS] ShareDialog return empty object if user share successfully and also if user not install FB app.

    [IOS] ShareDialog return empty object if user share successfully and also if user not install FB app.

    🐛 Bug Report

    ShareDialog return empty object if user share successfully and also if user not install FB app.

    To Reproduce

    • yarn add react-native-fbsdk-next

    • cd ios && pod install

    • Screenshot 2022-12-28 at 12 29 59 PM

    Expected Behavior

    Need something to distinct between share successfully and if App is not installed

    Code Example

    ShareDialog.canShow(state.shareLinkContent).then(canShow => {

        if (canShow) {
          return ShareDialog.show(state.shareLinkContent)
        }
      })
      .then(async (result: any) => {
        if (result.isCancelled) {
         Alert.alert('Cancelled')
        } else {
          Alert.alert('Shared')
        }
      })
      .catch(error => {
        console.log('Error: ', error)
      })
    

    Environment

    "react-native-fbsdk-next": "^11.1.0", "react-native": "0.69.3",

    opened by hoanghuy0604 1
  • Crash on IOS Simulator launch

    Crash on IOS Simulator launch

    🐛 Bug Report

    When trying to build the app using eas, I am getting an error when launching the app on IOS Simulator: Library not loaded: @rpath/FBSDKCoreKit.framework/FBSDKCoreKit It was because I totally forgot to add this line from the readme: [[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions]; Now, I am writing an expo plugin to add all the necessary config, we don't want to manually manage native code. But when launching the app, I get the following error:

    
    Exception Type:  EXC_CRASH (SIGABRT)
    Exception Codes: 0x0000000000000000, 0x0000000000000000
    Triggered by Thread:  0
    
    Last Exception Backtrace:
    0   CoreFoundation                	       0x1187fd89b __exceptionPreprocess + 226
    1   libobjc.A.dylib               	       0x1123dfba3 objc_exception_throw + 48
    2   CoreFoundation                	       0x118885019 -[__NSCFString characterAtIndex:].cold.1 + 0
    3   CoreFoundation                	       0x11888f7d0 -[__NSPlaceholderDictionary initWithCapacity:].cold.1 + 0
    4   CoreFoundation                	       0x118870243 -[__NSPlaceholderDictionary initWithObjects:forKeys:count:] + 251
    5   CoreFoundation                	       0x1187fc4dd +[NSDictionary dictionaryWithObjects:forKeys:count:] + 49
    6   RAHADEV                       	       0x102b0c761 -[EXDevLauncherController _ensureUserInterfaceStyleIsInSyncWithTraitEnv:] + 193
    7   RAHADEV                       	       0x102b0bf92 __62-[EXDevLauncherController _initAppWithUrl:bundleUrl:manifest:]_block_invoke + 706
    8   libdispatch.dylib             	       0x113f817fb _dispatch_call_block_and_release + 12
    9   libdispatch.dylib             	       0x113f82a3a _dispatch_client_callout + 8
    10  libdispatch.dylib             	       0x113f9232c _dispatch_main_queue_drain + 1338
    11  libdispatch.dylib             	       0x113f91de4 _dispatch_main_queue_callback_4CF + 31
    12  CoreFoundation                	       0x11875cb1f __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    13  CoreFoundation                	       0x118757436 __CFRunLoopRun + 2482
    14  CoreFoundation                	       0x1187566a7 CFRunLoopRunSpecific + 560
    15  GraphicsServices              	       0x11d2c928a GSEventRunModal + 139
    16  UIKitCore                     	       0x1292c5ad3 -[UIApplication _run] + 994
    17  UIKitCore                     	       0x1292ca9ef UIApplicationMain + 123
    18  RAHADEV                       	       0x102851680 main + 96 (main.m:7)
    19  dyld_sim                      	       0x11034e2bf start_sim + 10
    20  dyld                          	       0x208096310 start + 2432
    

    To Reproduce

    1. clone the reproduction repo from here
    2. Go inside the project then type yarn to install all the packages.
    3. yarn build:plugin (this is a custom command added to package.json, so I can write plugins in typescript and compile them in javascript).
    4. yarn expo prebuild (works without any issue, but if you are using M1, you may need to add arch -x86_64 before the command like arch -x86_64 yarn expo prebuild).
    5. yarn ios or arch -x86_64 yarn ios if you are on M1 5)The build should be okay, but when the simulator tries to open the app, it will just crash and not open

    Expected Behavior

    The app should build and launch without any issue.

    Code Example

    • The link to the reproduction repository: react-native-fbsdk-next-reproduction-repo
    • The plugin that I am trying to implement (you will find it inside the project inside plugins/src/withReactNativeMapIOS.ts file:
    import {ConfigPlugin, withAppDelegate} from "@expo/config-plugins";
    
    const withFaceBookSDKIOS: ConfigPlugin = (config) => {
      config = withAppDelegate(config, (config) => {
        const contents = config.modResults.contents;
        const addedImportContent = contents.replace(
          `#import <React/RCTConvert.h>`,
          `#import <React/RCTConvert.h>
      #import <FBSDKCoreKit/FBSDKCoreKit-swift.h>`,
        );
        const addedSetupContent = addedImportContent.replace(
          `[super application:application didFinishLaunchingWithOptions:launchOptions];`,
          `[[FBSDKApplicationDelegate sharedInstance] application:application didFinishLaunchingWithOptions:launchOptions];`,
        );
    
        config.modResults.contents = addedSetupContent;
        return config;
      });
      return config;
    };
    
    module.exports = withFaceBookSDKIOS;
    

    Environment

    Device: Apple Macbook Pro M1 Pro IDE: Visual Code Studio

    package.json(non-exhaustive):

     "dependencies": {
        "expo": "~47.0.9",
        "expo-app-loading": "~2.1.1",
        "expo-application": "~5.0.1",
        "expo-build-properties": "^0.4.1",
        "expo-constants": "~14.0.2",
        "expo-dev-client": "~2.0.1",
        "expo-device": "~5.0.0",
        "expo-font": "~11.0.1",
        "expo-image-picker": "~14.0.2",
        "expo-linear-gradient": "~12.0.1",
        "expo-linking": "~3.3.0",
        "expo-localization": "~14.0.0",
        "expo-location": "~15.0.1",
        "expo-permissions": "~14.0.0",
        "expo-secure-store": "~12.0.0",
        "expo-splash-screen": "~0.17.5",
        "expo-status-bar": "~1.4.2",
        "expo-system-ui": "~2.0.1",
        "expo-tracking-transparency": "~3.0.1",
        "expo-updates": "~0.15.6",
        "graphql": "^16.5.0",
        "i18next": "^21.8.11",
        "react": "18.1.0",
        "react-dom": "18.1.0",
        "react-hook-form": "^7.33.0",
        "react-i18next": "^12.0.0",
        "react-instantsearch-hooks": "^6.30.2",
        "react-native": "0.70.5",
        "react-native-fbsdk-next": "11.1.0",
      },
      
    

    My app.config.ts plugin section:

    [
          "react-native-fbsdk-next",
          {
            appID: facebookAppID,
            clientToken: facebookClientToken,
            displayName: facebookDisplayName,
            isAutoInitEnabled: true,
          },
        ],
    [
          "expo-build-properties",
          {
            ios: {
              deploymentTarget: "13.0",
              useFrameworks: "static",
            },
          },
        ],
        "./plugins/build/withReactNativeMapIOS.js", // Fix for ios
        "./plugins/build/withFaceBookSDKIOS.js",
    
    opened by nazam1998 8
  • Execution failed for task ':app:processDebugManifest'.

    Execution failed for task ':app:processDebugManifest'.

    🐛 Bug Report

    Execution failed for task ':app:processDebugManifest'.

    Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 [com.facebook.android:facebook-common:15.2.0] /Users/shopyardshopyard/.gradle/caches/transforms-2/files-2.1/fa2ba5b6a25f3ccc8bff867bf8f50ded/AndroidManifest.xml:18:9-55 Error: Missing 'package' key attribute on element package at [com.facebook.android:facebook-common:15.2.0] AndroidManifest.xml:18:9-55 [com.facebook.android:facebook-common:15.2.0] /Users/shopyardshopyard/.gradle/caches/transforms-2/files-2.1/fa2ba5b6a25f3ccc8bff867bf8f50ded/AndroidManifest.xml Error: Validation failed, exiting Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/shopyardshopyard/Documents/GitHub/luliz-main/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed with multiple errors, see logs

    To Reproduce

    Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 [com.facebook.android:facebook-common:15.2.0] /Users/shopyardshopyard/.gradle/caches/transforms-2/files-2.1/fa2ba5b6a25f3ccc8bff867bf8f50ded/AndroidManifest.xml:18:9-55 Error: Missing 'package' key attribute on element package at [com.facebook.android:facebook-common:15.2.0] AndroidManifest.xml:18:9-55 [com.facebook.android:facebook-common:15.2.0] /Users/shopyardshopyard/.gradle/caches/transforms-2/files-2.1/fa2ba5b6a25f3ccc8bff867bf8f50ded/AndroidManifest.xml Error: Validation failed, exiting Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: /Users/shopyardshopyard/Documents/GitHub/luliz-main/node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

    FAILURE: Build failed with an exception.

    • What went wrong: Execution failed for task ':app:processDebugManifest'.

    Manifest merger failed with multiple errors, see logs

    Expected Behavior

    Bug don't work in android

    Code Example

    No code error when run app

    Environment

    opened by ahmadalghalban 1
  • An error message

    An error message "sorry, something went wrong" appears when I try to login Facebook app through my react native application

    unnamed (1) As you can see in the screenshot above, I got the warning message when I added "user_friends" to loginButton.setPermissions("email", "public_profile", "user_friends"), but when I tried logging into Facebook, I received a message saying, "Sorry, something went wrong." Is this a permission disable issue or not? It has been over a year since I submitted the app and there were no issues. However, it is one month before the issue begins. React native package used is : react-native-fbsdk-next unnamed (2)

    opened by Hari-krish-v 1
  • BUG in Profile.getCurrentProfile() - Return NULL everytime, in your frist startup

    BUG in Profile.getCurrentProfile() - Return NULL everytime, in your frist startup

    🐛 Bug Report

    NullPointerException: Attempt to get length of null array The application also crashes after a while! I found that this bug is only caused when I use Profile.getCurrentFrofile()

    To Reproduce

    When I try to login, delete a user... Or whatever action I need Profile.getCurrentProfile()

    Code Example

    Login Code:

     const signInWithFacebook = useCallback(async () => {
        try {
          const userLogged = await Profile.getCurrentProfile();
    
          if (!!userLogged?.userID) {
            LoginManager.logOut();
          }
    
          const result = await LoginManager.logInWithPermissions([
            'public_profile',
            'email',
          ]);
    
          setLoading(true);
    
          if (result.isCancelled) {
            return;
          }
    
          if (result.declinedPermissions[0] === 'email') {
            const infoRequest = new GraphRequest(
              `/${userLogged?.userID}/permissions`,
              {httpMethod: 'DELETE'},
            );
            new GraphRequestManager().addRequest(infoRequest).start();
            Toast.show({
              type: 'info',
              visibilityTime: 13000,
              text1: 'Permissão necessária para continuar',
              text2:
                'Precisamos que a permissão de e-mail seja concedida por você, pois a usamos para criar a sua conta em nosso APP e liberar o acesso para todas as funcionalidades.',
            });
            return;
          }
    
          const data = await AccessToken.getCurrentAccessToken();
    
          if (!data) {
            throw new Error('Error ao recuperar o código de acesso');
          }
    
          const facebookCredential = auth.FacebookAuthProvider.credential(
            data.accessToken,
          );
    
          const response = await auth().signInWithCredential(facebookCredential);
    
          const photoUrl = (await Profile.getCurrentProfile()).imageURL.replace(
            'height=100&width=100',
            'height=800&width=800',
          );
    
          const newUser = {
            displayName: response.user.displayName,
            firstName: response.additionalUserInfo.profile.first_name,
            lastName: response.additionalUserInfo.profile.last_name,
            email: response.additionalUserInfo.profile.email,
            photoURL: photoUrl,
            isAnonymous: response.user.isAnonymous,
            uid: response.user.uid,
            providerId: response.additionalUserInfo.providerId,
            favorities: [],
          };
    
          setUser(newUser);
    
          await AsyncStorage.setItem(userStorageKey, JSON.stringify(newUser));
          const findDoc = (
            await firebase.firestore().collection('users').doc(newUser.uid).get()
          ).data();
    
          if (!findDoc) {
            await firebase
              .firestore()
              .collection('users')
              .doc(newUser.uid)
              .set(newUser);
          }
    
          return loadUserDataByFirestore();
        } catch (error) {
          captureError(error);
        } finally {
          setLoading(false);
        }
      }, []);
    

    Delete User Code:

      const deleteUserAuth = useCallback(async () => {
        const userLogged = auth().currentUser;
        const userFacebook = await Profile.getCurrentProfile();
        try {
          if (userLogged !== null) {
            if (userFacebook?.userID) {
              const infoRequest = new GraphRequest(
                `/${userFacebook?.userID}/permissions`,
                {httpMethod: 'DELETE'},
              );
              new GraphRequestManager().addRequest(infoRequest).start();
            }
    
            await userLogged.delete();
          }
        } catch (error) {
          captureError(error);
        }
      }, []);
    

    Package.json

    {
      "name": "baraokeskina",
      "version": "0.0.1",
      "private": true,
      "scripts": {
        "android": "npx react-native run-android",
        "ios": "npx react-native run-ios",
        "start": "npx react-native start --reset-cache",
        "test": "jest",
        "lint": "eslint . --ext .js,.jsx,.ts,.tsx",
        "clear": "cd android && ./gradlew clean",
        "apk": "cd android && ./gradlew assembleRelease",
        "bundle": "cd android && ./gradlew bundleRelease",
        "cp:prd": "appcenter codepush release-react -a kenhiro2/Baraoke-Skina-Android -d Production",
        "cp:stg": "appcenter codepush release-react -a kenhiro2/Baraoke-Skina-Android -d Staging"
      },
      "dependencies": {
        "@hookform/resolvers": "^2.8.8",
        "@nozbe/watermelondb": "^0.24.0",
        "@react-native-async-storage/async-storage": "^1.17.3",
        "@react-native-firebase/analytics": "^16.4.6",
        "@react-native-firebase/app": "^16.4.6",
        "@react-native-firebase/auth": "^16.4.6",
        "@react-native-firebase/firestore": "^16.4.6",
        "@react-native-firebase/in-app-messaging": "^16.4.6",
        "@react-native-firebase/messaging": "^16.4.6",
        "@react-native-firebase/perf": "^16.4.6",
        "@react-native-firebase/storage": "^16.4.6",
        "@react-native-google-signin/google-signin": "^7.2.2",
        "@react-navigation/bottom-tabs": "^6.3.1",
        "@react-navigation/drawer": "^6.4.1",
        "@react-navigation/native": "^6.0.10",
        "@react-navigation/native-stack": "^6.6.1",
        "@sentry/react-native": "^4.11.0",
        "axios": "^0.27.2",
        "date-fns": "^2.28.0",
        "lottie-react-native": "^5.0.1",
        "react": "18.1.0",
        "react-hook-form": "^7.30.0",
        "react-native": "0.70.6",
        "react-native-code-push": "^7.0.5",
        "react-native-fbsdk-next": "^11.0.1",
        "react-native-gesture-handler": "^2.4.0",
        "react-native-image-crop-picker": "^0.37.3",
        "react-native-linear-gradient": "^2.5.6",
        "react-native-modalize": "^2.0.13",
        "react-native-optimized-flatlist": "^1.0.4",
        "react-native-reanimated": "^2.8.0",
        "react-native-responsive-screen": "^1.4.2",
        "react-native-safe-area-context": "^4.2.4",
        "react-native-screens": "^3.13.1",
        "react-native-svg": "^12.3.0",
        "react-native-svg-transformer": "^1.0.0",
        "react-native-toast-message": "^2.1.5",
        "react-native-uuid": "^2.0.1",
        "react-native-vector-icons": "^9.1.0",
        "recyclerlistview": "^3.0.5",
        "styled-components": "^5.3.5",
        "yup": "^0.32.11"
      },
      "devDependencies": {
        "@babel/core": "^7.12.9",
        "@babel/plugin-proposal-decorators": "^7.17.9",
        "@babel/runtime": "^7.12.5",
        "@react-native-community/eslint-config": "^2.0.0",
        "@types/jest": "^26.0.23",
        "@types/react-native": "^0.67.3",
        "@types/react-native-vector-icons": "^6.4.10",
        "@types/react-test-renderer": "^17.0.1",
        "@types/react-window": "^1.8.5",
        "@types/styled-components-react-native": "^5.1.3",
        "@typescript-eslint/eslint-plugin": "^5.17.0",
        "@typescript-eslint/parser": "^5.17.0",
        "babel-jest": "^26.6.3",
        "eslint": "^7.32.0",
        "jest": "^26.6.3",
        "metro-react-native-babel-preset": "^0.67.0",
        "react-test-renderer": "17.0.2",
        "reactotron-react-native": "^5.0.1",
        "typescript": "^4.4.4"
      },
      "resolutions": {
        "@types/react": "^17"
      },
      "jest": {
        "preset": "react-native",
        "moduleFileExtensions": [
          "ts",
          "tsx",
          "js",
          "jsx",
          "json",
          "node"
        ]
      }
    }
    
    

    Environment

    System:
        OS: Linux 5.15 Ubuntu 20.04.5 LTS (Focal Fossa)
        CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
        Memory: 1.01 GB / 15.55 GB
        Shell: 5.0.17 - /bin/bash
      Binaries:
        Node: 14.19.0 - ~/.nvm/versions/node/v14.19.0/bin/node
        Yarn: 1.22.17 - ~/.nvm/versions/node/v14.19.0/bin/yarn
        npm: 6.14.16 - ~/.nvm/versions/node/v14.19.0/bin/npm
        Watchman: 20220306.015012.0 - /usr/local/bin/watchman
      SDKs:
        Android SDK: Not Found
      IDEs:
        Android Studio: Not Found
      Languages:
        Java: 11.0.17 - /usr/bin/javac
      npmPackages:
        @react-native-community/cli: Not Found
        react: 18.1.0 => 18.1.0 
        react-native: 0.70.6 => 0.70.6 
    
    opened by VithorCarlos 1
Releases(v11.1.0)
Owner
Marcos Bérgamo
Beer Lover and @nodejs developer
Marcos Bérgamo
With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any other file server

React Native In-App update With react-native-update-in-app library you can easily implement in-app updates in your React Native app using CDN or any o

Nepein Andrey 7 Dec 21, 2022
Minecraft configurable plugin , which sends messages the first time a player logs into the server or the next time they log in.

JoinMessages Minecraft configurable plugin , which sends messages the first time a player logs into the server or the next time they log in or leave.

ᴠᴀʟᴇɴᴛɪɴ ᴢʜᴇʟᴇᴠ 6 Aug 30, 2022
React native wrapper for Jitsi Meet SDK Library that rely on the native view (Activity / ViewController)

react-native-jitsi-meet-sdk React native wrapper for Jitsi Meet SDK Library. This Library implements the Jitsi SDK with a native activity on the Andro

null 7 May 2, 2022
An awesome native wheel picker component for React Native.

⛏️ react-native-picky An awesome native wheel picker component for react-native. Features Supports multiple columns ✅ Supports looping ✅ Native Androi

null 28 Dec 4, 2022
A React Native project starter with Typescript, a theme provider with hook to easy styling component, a folder architecture ready and some configs to keep a codebase clean.

React Native Boilerplate Folder structure : src ├── assets │   ├── audios │   ├── fonts │   ├── icons │   └── images ├── components │   ├── Layout.tsx

LazyRabbit 23 Sep 1, 2022
Lightweight React Native UI Components inspired on Vant

vant-react-native Install yarn add vant-react-native Or npm install vant-react-native Usage import React, { Component } from 'react'; import { View, T

洛竹 51 Sep 29, 2022
Admob for React Native with powerful hooks and components

React Native Admob ⚠️ Please note, this package is under active development, which means it may be not stable to apply on production. Please use this

null 128 Jan 6, 2023
React Native wrapper around Indy SDK Java and Objective-C wrappers.

React Native Indy SDK React Native Indy SDK wrapper. Installation with npm: $ npm install indy-sdk-react-native --save with Yarn: $ yarn add indy-sdk-

Hyperledger 21 Dec 5, 2022
Ship React Native .jsbundles compressed by Brotli algorithm.

Ship compressed JS bundles Warning: not yet available for Android. Sometimes you need a very small .app, for example if you are building an App Clip.

Ivan Moskalev 37 Nov 15, 2022
Prevent Screenshots in your React Native app when needed. 🦄

React Native Prevent Screenshots Prevent Screenshots in your React Native app when needed. ?? Installation First, you need to install the package usin

Ahmed Mahmoud 64 Oct 19, 2022
Using turborepo & react-native

Turborepo starter with NPM This is an official starter turborepo. What's inside? This turborepo uses NPM as a package manager. It includes the followi

Renan Machado 5 Feb 16, 2022
This is a Food Delivery Mobile Application. Build Using React Native

Ax Food Delivery Service This is a Food Delivery Mobile Application build using ?????????? ???????????? ?? Installation Clone this repository git clon

Mindula Dilthushan Manamperi 13 Jul 14, 2022
Project developed for MB Talk - App Center integration on React Native

App Center Setup Download APK Click here Requirements React Native CLI Yarn Sign Up on App Center and create a new App. How to use this repo Clone thi

André Angeloni 2 Oct 31, 2022
Lottie wrapper for React Native.

Lottie for React Native, iOS, and Android Lottie component for React Native (iOS and Android) Lottie is a mobile library for Android and iOS that pars

Lottie - React Native 15.6k Jan 7, 2023
Render After Effects animations natively on Android and iOS, Web, and React Native

Lottie for Android, iOS, React Native, Web, and Windows Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations expo

Airbnb 33.5k Jan 3, 2023
📹 Live stream RTMP Publisher for React Native

react-native-rtmp-publisher ?? Live stream RTMP publisher for React Native ⚠️ iOS on development Installation npm install react-native-rtmp-publisher

Ezran Bayantemur 55 Dec 12, 2022
Template to speed up your development in React Native projects.

React Native SpaceShip I created this template with the purpose of leaving the development environment already configured for use. ?? How to use it in

Lucas Augusto 3 Mar 23, 2022
This project is a simple messaging application made using React-Native framework, Gifted-Chat library and Firebase database

This project is a simple messaging application made using React-Native framework, Gifted-Chat library and Firebase database. The example that will be shown here focuses on the ability of two people to message each other in a chat room.

null 3 Jan 30, 2022
💾 Simple persisted state in react-native

React Native Use Persisted State Preview Introduce ?? Simple persisted state in react-native ?? Globally accessable like redux, recoil... ?? No loadin

Hyun 11 Aug 28, 2022