facebook / facebook-sdk-for-unity

The facebook sdk for unity.
https://developers.facebook.com/docs/unity
Other
493 stars 257 forks source link

IOS cloud build fails under 2019.2 + 7.18.0 / 7.17.2 #358

Open VergilUa opened 5 years ago

VergilUa commented 5 years ago

Checklist

Environment

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

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
VergilUa commented 5 years ago

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

` <?xml version="1.0" encoding="utf-8"?>

`

DizzyJump commented 4 years ago

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

andersemil commented 4 years ago

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

You, sir, are a hero. Thank you.

digitalalcohol commented 4 years ago

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

digitalalcohol commented 4 years ago

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)

koprivajakub commented 4 years ago

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.

thekiwicoder0 commented 4 years ago

Thank you! Switching to 5.8.0 fixed it.

Nesh108 commented 4 years ago

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...

yaKashif commented 4 years ago

@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

Nesh108 commented 4 years ago

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