facebook-sdk-for-unity icon indicating copy to clipboard operation
facebook-sdk-for-unity copied to clipboard

No such module 'FBSDKCoreKit' error when building for iOS with updated sdk version of 15 or 16

Open EpsilonD3lta opened this issue 1 year ago • 16 comments

Checklist

Environment

  • Unity Editor Version: 2021.3.17f1
  • Unity SDK Version: 16.0.0 (but also 15.0.0)
  • Installation Platform & Verison: iOS
  • xCode version: 13.4.1, 14.0.0, 14.1.0, 14.2.0, 14.3.0

Goals

Build Unity project for iOS

Expected Results

Build without errors

Actual Results

Unity projects exports, but xCode build fails. Getting error: "No such module 'FBSDKCoreKit'"

The error probably comes from FBSDKTournamentUpdater.swift file, but my knowledge of xCode and Apple related development is limited.

Version 14 of Facebook SDK works fine

Steps to Reproduce

Add FacebookSDK v16 to Unity project with Unity editor version 2021.3.17f1 and try to build.

EpsilonD3lta avatar Mar 31 '23 14:03 EpsilonD3lta

Hello, For me updating cocoa pods to 1.12.0 helped with this.

MartinVavrek avatar Apr 14 '23 06:04 MartinVavrek

Hello, For me updating cocoa pods to 1.12.0 helped with this.

This did not work for me

EpsilonD3lta avatar Apr 17 '23 14:04 EpsilonD3lta

This also did not work for me https://github.com/SpaceGoGames/facebook-sdk-for-unity/commit/c0a239dad3face61a163a9d89d88d34340447b6a The specified subfolder does not exist in Pods folder in my case

I tried to build an empty project with only FB SDK and I got the same error on versions 15 and 16

EpsilonD3lta avatar Apr 17 '23 15:04 EpsilonD3lta

Hi, How about check this?

https://stackoverflow.com/questions/29500227/getting-error-no-such-module-using-xcode-but-the-framework-is-there

In my case. This is the cause.

thoon-kim avatar Apr 18 '23 08:04 thoon-kim

@EpsilonD3lta you might need to adapt the change a bit. The idea is to add the pods framework to be embedded. The correct fix would be resolving the dependencies using the Swift Package Manager.

I have a fix un the works to extend the EDM4U to support SPM dependencies, using those it did not require any changes to the xCode project at all.

moritz-wundke avatar Apr 21 '23 09:04 moritz-wundke

@thoon-kim @moritz-wundke thank for the replies. The problem with v16 was the minimum iOS version which was set to 12 in my project. I noticed that in the FB SDK v16 update instructions was to set min iOS to 15.2 which resolved the issue (but I still cannot build - I have another problem with AdMob SDK for once). However I do not know what was the problem with FB SDK v15 since there is not iOS min version compatibility change. I am not going to investigate it though, it's finally working and I have lost a lot of time with it already.

EpsilonD3lta avatar Apr 21 '23 09:04 EpsilonD3lta

@EpsilonD3lta we use 12 as min SDK though

moritz-wundke avatar Apr 21 '23 11:04 moritz-wundke

I solved the problem by using xcworkspace file to open the project instead of xcodeproj

panghu-00 avatar Apr 25 '23 12:04 panghu-00

@panghu-00 We already use xcworkspace and it was not working anayway. @moritz-wundke interesting, not sure what to make of it. To be honest I don't know first thing about iOS development, swift, objective-c, cocoapods or mac/xcode environment. I just kind of hope that Unity will solve all the details for me, which works most of the time. However, this year, the updates seem to be broken - FB SDK, xCode 14 (unity cloud build does not work for me with this xcode version), various issues with new admob versions.

So for now I will stay on the working and stable versions, since debugging with my limited knowledge leads to nowhere and consumes a lot of time. I will try the next iteration of the sdk versions.

EpsilonD3lta avatar Apr 25 '23 12:04 EpsilonD3lta

@EpsilonD3lta mobile dev is a challenge, specially when adding a lot third party components that all come with their own quirks.

Just keep in mind that from April 25 you are required to submit using xCode 14 https://developer.apple.com/news/?id=jd9wcyov.

moritz-wundke avatar Apr 26 '23 08:04 moritz-wundke

@moritz-wundke I can still build locally (backup) with xCode 14 with old SDK versions, just the cloud build pipeline is broken with the xCode 14...

EpsilonD3lta avatar Apr 26 '23 09:04 EpsilonD3lta

We're having this build error too in facebook 16.0.1

uchar avatar Aug 16 '23 10:08 uchar

Hello, making the following steps made it work:

  1. update cocoa pods to the latest version
  2. rm -Rf Pods
  3. install pods

ms22whs avatar Nov 12 '23 09:11 ms22whs

Hello, making the following steps made it work:

  1. update cocoa pods to the latest version
  2. rm -Rf Pods
  3. install pods

How is it working for you, what version of sdk are you using?

DarshanSahay avatar Nov 21 '23 12:11 DarshanSahay

I resolved this issue by adding the facebook sdk package from the following url 'https://github.com/facebook/facebook-ios-sdk', search the package using url and download it, it will automatically set all the references. 👯

shive1807 avatar Jan 10 '24 07:01 shive1807

I solved this via this video to install cocoa-of on my M1: https://www.youtube.com/watch?v=zdv9qE4j-VU

...and not use the FB developer account on the iPhone. I used my wife's FB account and it worked except that the app needs to be live to finish the authentication, which mine was not.

zip99 avatar Feb 26 '24 09:02 zip99