0

Whenever I build my game for iOS, I need to remove GoogleMobileAds.framework and add it again with Add Files To ..., otherwise XCode complains that "module 'GoogleMobileAds' not found."

Does anyone have any idea how to get it to 'stick'? (I'm pretty new with XCode)

Micael
  • 6,950
  • 6
  • 25
  • 28

1 Answers1

2

You can add the framework automatically to the Xcode project after Unity generates it using the [PostBuildProcess] attribute in an Editor script. Place the script in Assets/Editor.

Here's an example for adding frameworks. Here's a plugin that seems to do the heavy lifting for you using a JSON file to specify the modifications.

[PostProcessBuild] // <- this is where the magic happens
public static void OnPostProcessBuild(BuildTarget target, string path) {
    // Do post-build processing here
}
Huacanacha
  • 1,151
  • 7
  • 9