Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build with Facbeook iOS SDK v12 fails with 'FBSDKCoreKit/FBSDKSettings.h' file not found #308

Open
2 tasks done
taschik opened this issue Oct 13, 2021 · 20 comments
Open
2 tasks done

Comments

@taschik
Copy link

taschik commented Oct 13, 2021

Bug Report

Before opening

  • Did you try the latest release?
  • Did you look for existing issues?

Ad Modules

Platforms

iOS

Versions

  • Android:
  • iOS: 15
  • react-native-fbads: 7.0.5
  • react-native:0.65.1

Current Behaviour

Until this morning our release builds ran smoothly but re-running the same build that worked this morning fails with the following error:

/Users/user/actions-runner/_work/user-mobile/user-mobile/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m:10:9: 'FBSDKCoreKit/FBSDKSettings.h' file not found

#import <FBSDKCoreKit/FBSDKSettings.h>
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expected Behaviour
The build to run smooth again.

Steps to Reproduce
It happens on two different build servers independent of a branch to build.

Thanks so much for any idea what this could cause it all of a sudden.

@taschik
Copy link
Author

taschik commented Oct 13, 2021

Whoever runs into the same issue. This seems to be the solution. facebook/facebook-ios-sdk#1829

@taschik taschik closed this as completed Oct 13, 2021
@taschik taschik reopened this Nov 25, 2021
@taschik
Copy link
Author

taschik commented Nov 25, 2021

I am reopening this since the issue resurfaces when upgrading to Facebook iOS SDK v12. My current environment is:

    OS: macOS 12.0.1
    CPU: (12) x64 Intel(R) Core(TM) i9-8950HK CPU @ 2.90GHz
    Memory: 25.21 MB / 32.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 14.17.5 - ~/.nvm/versions/node/v14.17.5/bin/node
    Yarn: 1.22.17 - ~/.nvm/versions/node/v14.17.5/bin/yarn
    npm: 8.1.0 - ~/.nvm/versions/node/v14.17.5/bin/npm
    Watchman: 2021.06.07.00 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.11.2 - /usr/local/bin/pod
  SDKs:
    iOS SDK:
      Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0
    Android SDK:
      API Levels: 23, 26, 27, 28, 29
      Build Tools: 23.0.1, 25.0.0, 26.0.3, 27.0.3, 28.0.1, 28.0.2, 28.0.3
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6308749
    Xcode: 13.1/13A1030d - /usr/bin/xcodebuild
  Languages:
    Java: 1.8.0_221 - /usr/bin/javac
  npmPackages:
    @react-native-community/cli: Not Found
    react: 17.0.2 => 17.0.2
    react-native: 0.66.3 => 0.66.3
    react-native-macos: Not Found
  npmGlobalPackages:
    *react-native*: Not Found

My Podfile contains the following line:

  # Facebook
  pod 'FBSDKCoreKit', '~> 12.1'

Anyone that got v12 to work with react-native-fbads?

@taschik taschik changed the title Build suddenly fails with 'FBSDKCoreKit/FBSDKSettings.h' file not found Build with Facbeook iOS SDK v12 fails with 'FBSDKCoreKit/FBSDKSettings.h' file not found Nov 25, 2021
@Kweiza
Copy link

Kweiza commented Dec 26, 2021

same here

@foush
Copy link

foush commented Jan 4, 2022

I'm also running into this- any workarounds found? Does downgrading to 11.2.1 work?

@Kweiza
Copy link

Kweiza commented Jan 4, 2022

I solved this problem.

try install 'react-native-fbsdk'

yarn add react-native-fbsdk

And if you see an error message "The SDK version in the ad request is no longer supported for new apps. Please upgrade to the latest version of the SDK", edit sdk version in react-native-fbads/android/app/build.gradle

I made a PR for this. you can see at sdk version error fixed

@giftsets
Copy link

same issue

@sumesh1993
Copy link

Did anyone find a solution ?

@yousafConovo
Copy link

Has anyone found a solution?

@moa-os
Copy link

moa-os commented May 19, 2022

have tried every possible soultion , still the same problem

@ishuuwag
Copy link

Did anyone find a solution? Facing the same problem. Below is my environment:
System:
OS: macOS 12.4
CPU: (8) arm64 Apple M1 Pro
Memory: 515.66 MB / 16.00 GB
Shell: 5.8.1 - /bin/zsh
Binaries:
Node: 16.13.0 - /var/folders/s8/1ksn76j94d16j6gj6rxjwzzh0000gn/T/yarn--1655071958562-0.7801873311428125/node
Yarn: 1.22.17 - /var/folders/s8/1ksn76j94d16j6gj6rxjwzzh0000gn/T/yarn--1655071958562-0.7801873311428125/yarn
npm: 8.1.0 - /usr/local/bin/npm
Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.11.2 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5
Android SDK:
API Levels: 27, 28, 29, 30, 31, 32
Build Tools: 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.2, 31.0.0, 32.1.0
System Images: android-29 | Intel x86 Atom_64, android-31 | Google APIs ARM 64 v8a
Android NDK: Not Found
IDEs:
Android Studio: 2020.3 AI-203.7717.56.2031.7784292
Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild
Languages:
Java: Not Found
Python: Not Found
npmPackages:
@react-native-community/cli: ^4.7.0 => 4.14.0
react: 16.11.0 => 16.11.0
react-native: ^0.62.2 => 0.62.2
npmGlobalPackages:
react-native: Not Found

@lloydllim
Copy link

Has anyone found a solution on this ? I got the same problem

@lloydllim
Copy link

lloydllim commented Jul 7, 2022

facebook/facebook-ios-sdk#1829

Hi there, is the problem still persist your side ? It has been 2 days still there's no solution into it . I have searched through everywhere I even tried using the Facebook iOS SDK but still didn't work. Downgrading to v11 downwards is not an option since there is a minimum version that FB sets and it fails during pod install. Hoping you could give me feedback , Thank you very much

@ishuuwag
Copy link

Has anyone found a solution on this ? I got the same problem

Still facing the same problem

@isinha-onefc
Copy link

isinha-onefc commented Sep 27, 2022

Facing this problem too.

"react-native-fbads": "^7.1.0",
"react-native-fbsdk-next": "^10.1.0",

FBSDKCoreKit (14.1.0)

How do I get my build to succeed?

@mhNirob
Copy link

mhNirob commented Nov 13, 2022

I am having the same problem. Getting this same error while running on iOS.

"react-native-fbads": "^7.1.0",
"react-native-fbsdk-next": "^11.0.1",

    - FBSDKCoreKit (~> 15.0.0)

DId anybody able to solve this issue? What should I do to resolve this issue?

@beqramo
Copy link

beqramo commented Nov 28, 2022

Hi guys,
After spending tons of time I was finally able to build and run the app.
here is a patch file that I made:

diff --git a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
index 7ba2cee..56120ef 100644
--- a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
+++ b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
@@ -13,6 +13,9 @@ Pod::Spec.new do |s|
   s.platform      = :ios, '7.0'
   s.dependency      'React'
   s.dependency      'FBAudienceNetwork'
+  s.dependency      'FBSDKCoreKit'
+  s.dependency      'FBSDKCoreKit_Basics'
+  s.dependency      'FBSDKGamingServicesKit'
 
   s.source_files  = 'ios/**/*.{h,m}'
 end
\ No newline at end of file
diff --git a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
index 56bb991..ee49228 100644
--- a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
+++ b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
@@ -126,7 +126,7 @@ - (void)setBridge:(RCTBridge *)bridge
 
 RCT_EXPORT_METHOD(setAdvertiserIDCollectionEnabled:(BOOL)enabled)
 {
-    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
+//    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
 }
 
 

@isinha-onefc
Copy link

Hi guys, After spending tons of time I was finally able to build and run the app. here is a patch file that I made:

diff --git a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
index 7ba2cee..56120ef 100644
--- a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
+++ b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
@@ -13,6 +13,9 @@ Pod::Spec.new do |s|
   s.platform      = :ios, '7.0'
   s.dependency      'React'
   s.dependency      'FBAudienceNetwork'
+  s.dependency      'FBSDKCoreKit'
+  s.dependency      'FBSDKCoreKit_Basics'
+  s.dependency      'FBSDKGamingServicesKit'
 
   s.source_files  = 'ios/**/*.{h,m}'
 end
\ No newline at end of file
diff --git a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
index 56bb991..ee49228 100644
--- a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
+++ b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
@@ -126,7 +126,7 @@ - (void)setBridge:(RCTBridge *)bridge
 
 RCT_EXPORT_METHOD(setAdvertiserIDCollectionEnabled:(BOOL)enabled)
 {
-    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
+//    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
 }
 
 

@beqramo do we have to use something like patch-package to add these changes?

@beqramo
Copy link

beqramo commented Dec 6, 2022

you can, and don't forget to change package.json too like this:

  "main": "src/index",
  "typings": "src/index.d.ts",

as it has problems on finding files.
have in mind patch-package doesn't work on package.json. for that if you want you need to fork this repo and make changes on your repo

vedranp added a commit to vedranp/react-native-fbads that referenced this issue Jun 28, 2023
vedranp added a commit to vedranp/react-native-fbads that referenced this issue Jun 28, 2023
@Jamal-Ud-Din-hub
Copy link

Jamal-Ud-Din-hub commented Aug 28, 2024

Hi guys, After spending tons of time I was finally able to build and run the app. here is a patch file that I made:

diff --git a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
index 7ba2cee..56120ef 100644
--- a/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
+++ b/node_modules/react-native-fbads/ReactNativeAdsFacebook.podspec
@@ -13,6 +13,9 @@ Pod::Spec.new do |s|
   s.platform      = :ios, '7.0'
   s.dependency      'React'
   s.dependency      'FBAudienceNetwork'
+  s.dependency      'FBSDKCoreKit'
+  s.dependency      'FBSDKCoreKit_Basics'
+  s.dependency      'FBSDKGamingServicesKit'
 
   s.source_files  = 'ios/**/*.{h,m}'
 end
\ No newline at end of file
diff --git a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
index 56bb991..ee49228 100644
--- a/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
+++ b/node_modules/react-native-fbads/ios/ReactNativeAdsFacebook/EXAdSettingsManager.m
@@ -126,7 +126,7 @@ - (void)setBridge:(RCTBridge *)bridge
 
 RCT_EXPORT_METHOD(setAdvertiserIDCollectionEnabled:(BOOL)enabled)
 {
-    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
+//    [FBSDKSettings setAdvertiserIDCollectionEnabled:enabled];
 }
 
 

Not working for me

I am using

"react-native-fbads": "^7.1.1",
"react-native-fbsdk-next": "^13.0.0",

@alihasan21987
Copy link

"react-native-fbads": "^7.1.1",
"react-native-fbsdk-next": "^13.0.0",

I am using these version & still getting error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests