Facebook-sdk-for-unity: Facebook SDK v7.16.0 Codeless API cause build error on Android

Created on 7 Jun 2019  ·  27Comments  ·  Source: facebook/facebook-sdk-for-unity

Codeless API link to iOS function even the target platform is Android cause build error

public class CodelessCrawler : MonoBehaviour
{
        [DllImport ("__Internal")]
        private static extern void IOSFBSendViewHierarchy (string tree);
...

Most helpful comment

I wish Facebook would test their Unity SDKs more thoroughly :(
Upgrading and integrating SDKs in Unity is painful enough as it is, understanding what failed and why can be such a time-waster.

All 27 comments

Same here, Unity 2019.1.5f1.

Building with IL2CPP leads to the following build-errors:

/Users/MobileMonstersGmbH/Documents/Projects/Unity/FacebookSDK/Temp/StagingArea/Il2Cpp/il2cppOutput/Facebook.Unity.cpp:20388: error: undefined reference to 'IOSFBSendViewHierarchy'
/Users/MobileMonstersGmbH/Documents/Projects/Unity/FacebookSDK/Temp/StagingArea/Il2Cpp/il2cppOutput/Facebook.Unity.cpp:20388: error: undefined reference to 'IOSFBSendViewHierarchy'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)

Same here, Unity 2018.4.0f1.

Same problem with Unity 2018.4.1f1, reverted back to 7.15.1, hopefully this is resolved soon

Same here. I use Unity 2017.4.27LTS
I try to build Android version but in IL2CPP pass I got errors for undefined iOS methods:

C:\Prj3\game\Library\il2cpp_android_armeabi-v7a\il2cpp_cache\A0920E93F78CB3A161117F87F66D3A3A.o: In function CodelessCrawler_IOSFBSendViewHierarchy_m2725653782': C:\Prj3\game\Temp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity_0.cpp:22332: undefined reference toIOSFBSendViewHierarchy'
C:\Prj3\gameTemp\StagingArea\Il2Cpp\il2cppOutput/Bulk_Facebook.Unity_0.cpp:22332: undefined reference to `IOSFBSendViewHierarchy'

Same here, Unity 2018.2.20f1.

I'm dealing with it too on Unity 2019.1.4f1. Please does anybody have an answer to this?

I finally got it to build by downgrading to 7.15.1, seems like it's the only way to get it to work right with Facebook's SDK.

I finally got it to build by downgrading to 7.15.1, seems like it's the only way to get it to work right with Facebook's SDK.

They have a bug in the new class CodelessCrawler so unless you don't use the plain sdk source code within your project and fix this bug on your own you have to use the 7.15.1 until they've fixed this bug and released a new version.

try
`#if UNITY_IOS
[DllImport("__Internal")]

endif`

I wish Facebook would test their Unity SDKs more thoroughly :(
Upgrading and integrating SDKs in Unity is painful enough as it is, understanding what failed and why can be such a time-waster.

Unity 2019.1.6f1. same

Some one solved it in pull request!!!

https://github.com/facebook/facebook-sdk-for-unity/pull/251

every time same. i think no one is testing new SDK just some mechanical play Tests and thats all. FIX IT ! ! ! or remove warning from dashboard that forces us to upgrade to V5.0 API

every time same. i think no one is testing new SDK just some mechanical play Tests and thats all. FIX IT ! ! ! or remove warning from dashboard that forces us to upgrade to V5.0 API

agree with that.

Removed SDK bc I didn't want to deal with it

same here, too many bugs for v7.16.0, hope they have a fix soon

Dont you guys even build before releasing. What a shame , that too for something that adds very little value to the game we build !

Passed 2 weeks already. I humbly think this critical bug alone, should trigger a quick hotfix.

Any movement here? This plus AndroidX is wrecking my day.

Same here , Unity 2018.2.20f1

New version up since two days, should work now.

Hi all, v7.16.1 should work now.

Yeah, it work.

Experienced il2cpp error with v7.17.0. Something like couldn't run the file.

Reverted to v7.16.1 and it works fine and I'm able to build. FB must have re-busted it -__-

updated from to latest version on ios as i have google admob plugin somehow it sends me some crazy error :D thanks FB <3 when to old version works like a charm :D

Any solution ?

Was this page helpful?
0 / 5 - 0 ratings