facebook-sdk-for-unity
facebook-sdk-for-unity copied to clipboard
No such module 'FBSDKCoreKit' error when building for iOS with updated sdk version of 15 or 16
Checklist
- [x] I've updated to the latest released version of the SDK
- [x] I've searched for existing GitHub issues
- [ ] I've looked for existing answers on Stack Overflow, the Facebook Developer Community Forum and the Facebook Developers Group
- [ ] I've read the Code of Conduct
- [ ] This issue is not security related and can safely be disclosed publicly on GitHub
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.
Hello, For me updating cocoa pods to 1.12.0 helped with this.
Hello, For me updating cocoa pods to 1.12.0 helped with this.
This did not work for me
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
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.
@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.
@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 we use 12 as min SDK though
I solved the problem by using xcworkspace file to open the project instead of xcodeproj
@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 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 I can still build locally (backup) with xCode 14 with old SDK versions, just the cloud build pipeline is broken with the xCode 14...
We're having this build error too in facebook 16.0.1
Hello, making the following steps made it work:
- update cocoa pods to the latest version
- rm -Rf Pods
- install pods
Hello, making the following steps made it work:
- update cocoa pods to the latest version
- rm -Rf Pods
- install pods
How is it working for you, what version of sdk are you using?
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. 👯
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.