Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only.

    Please, do not make any changes to your username or email addresses at during this transition time.

    It's still possible to reply to existing private message conversations during the migration, but any new replies you post will be missing after the main migration is complete. We'll do our best to migrate these messages in a follow-up step.

    On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live.

    Read our full announcement for more information and let us know if you have any questions.

'FBSDKCoreKit/FBSDKCoreKit.h' file not found

Discussion in 'Editor & General Support' started by lxgee, Jul 10, 2021.

  1. lxgee


    Jun 3, 2021
    Hi Guys,

    I'm quite stuck on an issue. I've found many threads with different solutions but none are working for me.

    I'm building in unity on windows, then transferring the build to a mac to build to iPhone. It was all working fine until i added facebook sdk which works fine in my unity editor but the Xcode build no longer works.

    I've tried:
    - installing the pod file that comes with the unity build (once it's on my mac).
    - adding info.plist snippet from facebook dev portal
    - manually adding the fbsdk packages to the frameworks folders in my project
    - making sure I open the .xcworkspace file after installing pods
    - many different combinations of editing the framework search paths
    and some other suggestions I came across, but none worked

    Is there something I need to do in unity before building for iOS? or any other solutions?

    Many thanks, image below - this is in the file:

    Maxim_AO likes this.
  2. lxgee


    Jun 3, 2021
    finally solved this after two days of searching and trying things. If you're working on windows/unity and then transferring your build to mac/xcode to build and having this problem with facebook sdk try:

    In unity:
    - Assets > Play Services Resolver > iOS Resolver Settings
    - Make sure everything is ticked, and in the dropdown select "Add cocoapods to the xcode project (important). by default its set to workspace not project (this was the issue for mine).
    - Build your project

    On Mac:
    - install pod then open the "workspace" that's generated and build from there.

    hopefully this saves someone some time.
  3. Valhalaru


    Feb 3, 2016
    Xcode with Facebook and iOS working - Step By Step

    After much frustration I got my Iphone game building just fine. Following a combination of Ixgee's solution, and other solutions.

    Fixes - FBSDKCoreKit.h not found and other related issues

    * I'm using Unity and Facebook SDK v11

    1. Unity -> ExternalDependencyManager -> IOS Resolver Settings - make it build to a Xcode project and make sure all the checkboxes are checked.

    2. MacOS -> move project to Mac. In Terminal in the project directory do the ‘sudo chmod +x’

    2.5 Make sure you have cocoa pods installed. In Terminal type ‘sudo gem install cocoapods’

    3. MacOS->Podfile - the pod file in your project should look like this for Facebook SDK 11

    Code (CSharp):
    1. source ''
    2. platform :ios, '11.0'
    4. target 'UnityFramework' do
    5.   pod 'FBSDKCoreKit', '~> 11.1.0', :modular_headers => true
    6.   pod 'FBSDKCoreKit_Basics', '~> 11.1.0'
    7.   pod 'FBSDKGamingServicesKit', '~> 11.1.0'
    8.   pod 'FBSDKLoginKit', '~> 11.1.0'
    9.   pod 'FBSDKShareKit', '~> 11.1.0'
    10. end
    11. target 'Unity-iPhone' do
    12. end
    13. use_frameworks! :linkage => :static
    14. use_frameworks!
    4. [Only needs to be done once. If your Mac processor uses an ARM processor (like the M1)]] Terminal -> Type ‘sudo arch -x86_64 gem install ffi’

    Solution from - [super helpful!]

    5. [If your Mac processor uses an ARM processor (like the M1)] Terminal -> ‘arch -x86_64 pod install’


    [If your Mac processor uses an x86 processor (like an Intel)] Terminal -> ‘pod install’

    6. Once the Pod Install is successful, double click the newly created ‘Unity-iPhone.xcworkspace’ in your project directory to open the workspace in Xcode.

    7. Xcode->The folder option -> Unity-IPhone-> under Projects select ‘UnityFramework’-> select ‘Build Phases’ then drag the ‘> Headers’ above the ‘> Compile Sources’

    -Full details here (

    8. Xcode -> In the Unity-phone - Build Settings -> Set - ALWAYS EMBED SWIFT STANDARD LIBRARIES: YES

    In the UnityFramework - Build Settings -> Set - ALWAYS EMBED SWIFT STANDARD LIBRARIES: NO

    Source -

    9. VOILA! It builds to your iPhone with Facebook SDK Dependencies good to go on iOS!!!

    Gillissie’s Similar steps -

    From -

    Update: After some fussing around, I was able to make this work. I had to do things that I've never had to do in the past, so I'm not sure why it's so different now.

    0. Make sure you have cocoapods installed. At the terminal, type "sudo gem install cocoapods"

    1. Build for iOS from Unity, which creates a Unity-iPhone.xcodeproj project file and a podfile.

    2. Open podfile in a text editor, and add use_frameworks! on a line right after "target". My podfile ended up looking like this:

    Code (CSharp):
    1. target 'Unity-iPhone' do
    3.   use_frameworks!
    5.   pod 'FBSDKCoreKit', '~> 6.2'
    7.   pod 'FBSDKGamingServicesKit', '~> 6.2'
    9.   pod 'FBSDKLoginKit', '~> 6.2'
    11.   pod 'FBSDKShareKit', '~> 6.2'
    13. end
    3. Open terminal at the path of the xcodeproj and podfile files.

    4. In terminal, type "pod install". This will create a Unity-iPhone.xcworkspace file.

    5. Open the workspace by double-clicking it.

    6. Set all the Unity-iPhone target settings you need in the Unity-iPhone project that's in that workspace (such as adding frameworks, etc)

    7. Choose a device, and build.

    Notes: Without the "use_frameworks!" added to the podfile, the xcworkspace will not let you see all of the Unity-iPhone project targets and schemes. I don't understand the technical stuff about that, but that's what I discovered.
    Last edited: Jun 10, 2022
    Eco-Editor, HdnAyoub and Maxim_AO like this.
  4. Eco-Editor


    Jun 29, 2016
    For those who already have cocoapods installed, and just need to generate the .xcworkspace file:
    1. Open terminal at the build location.
    1. Ensure CocoaPods installed, by running pod --version
    2. Generate .xcworkspace file, by running pod install
    3. Build in xcode

    This will download new dependencies for the Pods and generate the .xcworkspace file.