3

I installed the FBAudienceNetwork (version 4.26.0) with CocoaPods (version 1.3.1). I followed the official manual as published at https://developers.facebook.com/docs/audience-network/ios, but the Xcode still not recognized the framework.

Just to be clear - I opened the project from xcworkspace file.

enter image description here

I tried the following steps with no success:

  1. Install the framework manually, adding the ~/Documents/FacebookSDK path to Framework Search Path
  2. Make sure that the pods project compiled using Swift 4
  3. Added also FBSDKCoreKit (with Bolts) and FBSDKShareKit (both frameworks imported successfully)
  4. Clean the project, delete DerivedData and also clean the pods cache and reinstalling the pods

Nothing worked so far. Anyone faced the same issue and know the reason?

weizenberg
  • 302
  • 2
  • 13

6 Answers6

4

Fixed in v4.27.0

Another solution that uses latest SDK (until Facebook fixes this) is to add a line to your Objc bridging header:

#import <FBAudienceNetwork/FBAudienceNetwork.h>

Of course this assumes you are using a bridging header, and if you're not then you could add one but that defeats the point of using modules. Hopefully Facebook fixes this soon.

Andrew
  • 1,279
  • 2
  • 13
  • 19
3

I'm also seeing the same problem. I'm watching the Facebook bug report, but it's already been closed so I don't have high hopes of it being fixed anytime soon. Facebook suggested adding "$(SRCROOT)" to your Framework Search Paths as a work around, but it didn't work for me.

For now, I've manually locked my "FBAudienceNetwork" pod to version 4.25.0 with the following line in my Podfile:

pod 'FBAudienceNetwork', '4.25.0'
tylermilner
  • 434
  • 4
  • 7
2

Try this solution it will fix your issue. You need to rename FBAudienceNetwork.modulemap to module.modulemap in FBAudienceNetwork.framework/Modules folder. v4.26

2

From the audience network installation guide

enter image description here

Good luck

Ittai Oren
  • 53
  • 6
1

Following this post: https://developers.facebook.com/bugs/185968218614056/ and after downgrade to version 4.23 (supported by MoPub mediation as written here: https://github.com/mopub/mopub-ios-sdk/wiki/Integrating-Native-Third-Party-Ad-Networks) the integration is working (by adding the framework manually).

This is a bug in 4.26 version, so anyone that encourage the same issue, you have to wait for Facebook fixing this bug. I recommend to subscribe and follow the discussion I posted.

weizenberg
  • 302
  • 2
  • 13
0

It works when I'm using only the framework within the "static" folder.

Eran Talmor
  • 1,918
  • 1
  • 12
  • 6