Automate iOS setup of WebView
unobatbayar opened this issue · comments
Hello,
Sorry to bother again, we want to really use this package, however we use CI/CD server and we can't manually setup Xcode after building.
It possible to automate iOS setup process?
we really need to automate adding of GPMWebView.bundle to Copy Resources Bundle but had no luck in BuildProcessor scripts because on iOS the WebView buttons don't appear/
Hello. @unobatbayar.
Depending on the Unity version, it may be added or skipped, so it is difficult to apply in common.
Please refer to the Unity OnPostprocessBuild and PBXProject class to add a GPMWebView.bundle
to a specific Unity version.
If you have any questions, please feel free to contact us.
Thank you.
I understand, thank you
I got it!
In OnPostprocessBuild()
add
// Add linker
pbxProject.AddBuildProperty(appGuid, "OTHER_LDFLAGS", "-ObjC");
// Add bundle
var webViewBundleGuid = pbxProject.AddFile("Frameworks/GPM/WebView/Plugins/IOS/GPMWebView.bundle", "GPMWebView.bundle", PBXSourceTree.Build);
pbxProject.AddFileToBuild(appGuid, webViewBundleGuid);
Everything will be already added in Xcode 👍