Facebook-sdk-for-unity: IOS cloud build fails under 2019.2 + 7.18.0 / 7.17.2

Created on 26 Nov 2019  ยท  10Comments  ยท  Source: facebook/facebook-sdk-for-unity

Checklist

Environment

Describe your dev environment here, giving as many details as possible. If you have them, make sure to include:

  • Unity Editor Version: 2019.2.x latest (Cloud -> 2019.2.12f1)
  • Unity SDK Version: 7.18.0, 7.17.2
  • Installation Platform & Verison: [iOS] version 9.0+

Goals

What do you want to achieve?
Build to the IOS platform

Expected Results

What do you expect to happen?
Successful cloud build

Actual Results

What actually happened? Can you provide a stack trace?

Cloud build fails with the following errors:

/BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:238:3: cannot create __weak reference in file using manual reference counting
647: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:243:3: cannot create __weak reference in file using manual reference counting
648: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:397:3: cannot create __weak reference in file using manual reference counting
649: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:402:3: cannot create __weak reference in file using manual reference counting
650: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:407:3: cannot create __weak reference in file using manual reference counting
651: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:412:3: cannot create __weak reference in file using manual reference counting
652: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:417:3: cannot create __weak reference in file using manual reference counting
653: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:422:3: cannot create __weak reference in file using manual reference counting
654: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:503:3: cannot create __weak reference in file using manual reference counting
655: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:508:3: cannot create __weak reference in file using manual reference counting
656: โŒ; /BUILD_PATH/x/temp20191126-5230-5weq4v/Pods/FBSDKCoreKit/FBSDKCoreKit/FBSDKCoreKit/Internal_NoARC/FBSDKDynamicFrameworkLoader.m:513:3: cannot create __weak reference in file using manual reference counting

Steps to Reproduce

What are the steps necessary to reproduce this issue?

  1. Create an empty project on 2019.2+
  2. Add FB SDK 7.18.0 or 7.17.2
  3. Push to the cloud & try to build for an IOS
bug

Most helpful comment

Fix -> update versions to 5.8 in the dependencies.xml (Located at Assets -> Facebook SDK -> Plugins -> Editor):

<?xml version="1.0" encoding="utf-8"?> <dependencies> <androidPackages> <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" /> <androidPackage spec="com.facebook.android:facebook-core:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-applinks:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-login:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-share:[5,6)" /> </androidPackages> <iosPods> <iosPod name="Bolts" version="~> 1.7" /> <iosPod name="FBSDKCoreKit" version="5.8" /> <iosPod name="FBSDKLoginKit" version="5.8" /> <iosPod name="FBSDKShareKit" version="5.8" /> </iosPods> </dependencies>

All 10 comments

Fix -> update versions to 5.8 in the dependencies.xml (Located at Assets -> Facebook SDK -> Plugins -> Editor):

<?xml version="1.0" encoding="utf-8"?> <dependencies> <androidPackages> <androidPackage spec="com.parse.bolts:bolts-android:1.4.0" /> <androidPackage spec="com.facebook.android:facebook-core:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-applinks:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-login:[5,6)" /> <androidPackage spec="com.facebook.android:facebook-share:[5,6)" /> </androidPackages> <iosPods> <iosPod name="Bolts" version="~> 1.7" /> <iosPod name="FBSDKCoreKit" version="5.8" /> <iosPod name="FBSDKLoginKit" version="5.8" /> <iosPod name="FBSDKShareKit" version="5.8" /> </iosPods> </dependencies>

Thanks to VergilUa. His solution safe me a lot of time

Fix -> update versions to 5.8 in the dependencies.xml (Located at Assets -> Facebook SDK -> Plugins -> Editor):

You, sir, are a hero. Thank you.

This fix does not work here, in a completely blank project with 7.18.0

In XCode there is still an error:

Library not found for -lFBSDKCoreKit

Facebook SDK actually has been failing on iOS and XCode since 7.17.0

7.18.0
Library not found for -lFBSDKCoreKit

7.17.0 - 7.17.2
Library not found for -IBolts

Who at Facebook tests their work? Anyone???

(Dependency editing did not solve it either โ€” this should not be necessary with proper software engineering practices)

I do have the build working with following versions:
Facebook SDK for Unity 7.18.0
Unity: 2019.4.15f1
XCode: 11.3

But my problem was in the Unity Cloud Build. Where I did get the very same error. My fix was to change (lock) the version of the iOS pod to 5.8.0

In Assets/FacebookSDK/Plugins/Editor/Dependencies.xml lock the FBSDK version to 5.8.0.

<?xml version="1.0" encoding="utf-8"?>
<dependencies>
    <iosPods>
        <iosPod name="FBSDKCoreKit" version="5.8.0" />
        <iosPod name="FBSDKLoginKit" version="5.8.0" />
        <iosPod name="FBSDKShareKit" version="5.8.0" />
    </iosPods>
</dependencies>

Is there an intention to fix the problem? Although it seems like a problem of Unity Cloud Build platform itself.

Thank you! Switching to 5.8.0 fixed it.

I had the same problem with 7.19.2 and putting it to 5.8.0 didn't work for me because of FBSDKGamingServicesKit.

I tried removing it and now I am building. Any tips would be greatly appreciated!

EDIT: Same happened with 7.17.2. Trying more versions...

@Nesh108 Did you find solution?
I am facing FBSDKGamingServicesKit.h not found issue. The framework doesn't even exists in the FacebookSDK. Using 7.21

My only "solution" was to stick to version 7.13.0 and that's it :(

Was this page helpful?
0 / 5 - 0 ratings

Related issues

alchemyincarnate picture alchemyincarnate  ยท  4Comments

Shaitan1805 picture Shaitan1805  ยท  6Comments

manofspirit picture manofspirit  ยท  6Comments

JuGGerNaunT picture JuGGerNaunT  ยท  3Comments

pvalium picture pvalium  ยท  6Comments