【发布时间】:2015-11-29 01:16:55
【问题描述】:
每当我为 iOS 构建游戏时,我都需要删除 GoogleMobileAds.framework 并使用 Add Files To ... 再次添加它,否则 XCode 会抱怨“未找到模块 'GoogleMobileAds'。”
有没有人知道如何让它“粘”起来? (我对 XCode 很陌生)
【问题讨论】:
每当我为 iOS 构建游戏时,我都需要删除 GoogleMobileAds.framework 并使用 Add Files To ... 再次添加它,否则 XCode 会抱怨“未找到模块 'GoogleMobileAds'。”
有没有人知道如何让它“粘”起来? (我对 XCode 很陌生)
【问题讨论】:
在 Unity 使用编辑器脚本中的[PostBuildProcess] attribute 生成框架后,您可以将框架自动添加到 Xcode 项目中。将脚本放在 Assets/Editor 中。
这是example for adding frameworks。这是a plugin,它似乎为您使用 JSON 文件指定修改完成了繁重的工作。
[PostProcessBuild] // <- this is where the magic happens
public static void OnPostProcessBuild(BuildTarget target, string path) {
// Do post-build processing here
}
【讨论】: