Hi all,
I've been trying to integrate Facebook Audience Network into my Firemonkey app for ads and I'm getting a very strange error when linking for iOS.
I use the "fake loader" approach to linking the framework.
const
libFBSDKCoreKitBasics = 'FBSDKCoreKit-Basics.framework/FBSDKCoreKitBasics'; //required as it's a dependency for the FBAN library
libFBAudienceNetwork = 'FBAudienceNetwork-5.2.0.framework/FBAudienceNetwork';
function LibFBCoreKitBasics: Pointer; cdecl; external libFBSDKCoreKitBasics name 'OBJC_CLASS_$_FBSDKURLSessionTask';
function LibFBAN: Pointer; cdecl; external libFBAudienceNetwork name 'OBJC_CLASS_$_FBNativeAdView';
The error when I try to link, is this:
ld: file is universal (4 slices) but does not contain a(n) arm64 slice: ..\Libraries\FBAudienceNetwork-5.2.0.framework/FBAudienceNetwork for architecture arm64
I've Googled and the only reference to this kind of error is related to armv7 when trying to link frameworks into a 64bit app that only contain 32bit versions. So I try building a 32bit version of my app in Delphi and see:
ld: file is universal (4 slices) but does not contain a(n) armv7 slice: ..\Libraries\FBAudienceNetwork-5.2.0.framework/FBAudienceNetwork for architecture armv7
Which doesn't make any sense! It looks like the FBAudienceNetwork framework is essentially empty with neither 32 or 64bit code which can't be true as it's 1.7Mb and fresh from the official download page.
I've tried different versions of the framework but get the same error each time so I've ruled out a corrupted download.
I've tried linking through the "Linker Options" in the project settings instead but get the same errors.
Linking the FBSDKCoreKit libraries works using the same approach.
Does anyone have any ideas or know why I'm getting this error?
Thanks in advance!