React Native FBSDK version mixed up for iOS and Android

I have a problem with the version of the FBSDK package on iOS and Android.

For Android, if I used the latest version 0.6.0, there is an error:

  • What went wrong: Execution completed for task ': app: processDebugResources'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: process command '/Users/admin/Library/Android/sdk/build-tools/26.0.0/aapt' completed with non-zero output value 1

Now, to figure this out, I need to downgrade to 0.5.0, which works fine.

However, on iOS, using version 0.5.0, I get an error message:

FBSDKCoreKit / FBSDKCoreKit.h not found

So, I need to raise it to 0.6 to figure out what works. I do not know how to align this version. Any advice is greatly appreciated.

0
source share
1 answer

Finally, after understanding, I cloned the latest version 0.6.1 and modified the code so that it could work on RN0.43.3 on both Android and ios.

Here are the steps:

  • After cloning / installing the latest version, go to node_modules / react-native-fbsdk / js .

  • Open these files: FBLikeView.js, FBLoginButton.js, FBMessageDialog.js, FBSendButton.js, FBShareButton.js.

  • Change import PropTypes from 'prop-types'; on import React, { PropTypes } from 'react';

  • In response to changing the internal import of ViewPropTypes to View .

  • Change ...ViewPropTypes, to ...View.propTypes,

  • Save the changes and do it.

Note. You must do this in all 5 files that you have opened.

So far this works fine at my end.

This solves the problem:

'LikeView' does not have propType 'RCTFBLikeView.onLayout' of its own type 'boolean' unless you change this

0
source

Source: https://habr.com/ru/post/1268146/


All Articles