Open FrankdenUijl opened 2 years ago
I use automated setup.
Are there any editor scripts that call "SetBuildProperty" with "OTHER_LDFLAGS" parameter in the entirety of the project?
We have the following:
project.SetBuildProperty(targetGUID, "ARCHS", "arm64");
(Only gets called when UNITY_IOS && PLATFORM_OCULUS, not this build)
proj.SetBuildProperty (targetGUID, "IPHONEOS_DEPLOYMENT_TARGET", "9.0");
we change the IPHONEOS_DEPLOYMENT_TARGET to 11 (in another script) before it goes into the xcode. I just removed that line of code.
And ofcours:
It just feels like my -framework
additions are either removed by some other post-processing script or ignored by Xcode for unknown reasons because I can see a variety of unknown symbols that come from all of these frameworks. You can try adding those frameworks via PBXProject.AddFrameworkToProject, if you wish. You should then comment out my AddBuildProperty lines.
Hmm, like this?
Debug.Log("NGPostProcessBuild OnPostprocessBuild");
// Minimum supported iOS version on Unity 2018.1 and later is 8.0
#if !UNITY_2018_1_OR_NEWER
if( !Settings.Instance.MinimumiOSTarget8OrAbove )
{
pbxProject.AddBuildProperty( targetGUID, "OTHER_LDFLAGS", "-weak_framework Photos" );
pbxProject.AddBuildProperty( targetGUID, "OTHER_LDFLAGS", "-weak_framework PhotosUI" );
pbxProject.AddBuildProperty( targetGUID, "OTHER_LDFLAGS", "-framework AssetsLibrary" );
pbxProject.AddBuildProperty( targetGUID, "OTHER_LDFLAGS", "-framework MobileCoreServices" );
pbxProject.AddBuildProperty( targetGUID, "OTHER_LDFLAGS", "-framework ImageIO" );
}
else
#endif
{
pbxProject.AddFrameworkToProject( targetGUID, "PhotosUI.framework", true );
pbxProject.AddFrameworkToProject( targetGUID, "Photos.framework", false );
pbxProject.AddFrameworkToProject( targetGUID, "MobileCoreServices.framework", false );
pbxProject.AddFrameworkToProject( targetGUID, "ImageIO.framework", false );
}
//pbxProject.RemoveFrameworkFromProject( targetGUID, "Photos.framework" );
Yeah that looks fine to me.
Oke, thanks! I will let you know if it works.
Hmm, I just checked same error.
The strange thing is that the OnPostprocessBuild does not get called at all.. I dont see the NGPostProcessBuild OnPostprocessBuild
in the log on Unity Cloud Build. (I added that log before building)
That explain the error. Do you have any idea why?
Is it possible that Settings.Instance.AutomatedSetup returns false on Cloud Build? Does deleting #if UNITY_IOS allow OnPostprocessBuild to be called?
I have just tested that it runs fine locally. Also found out that none of my "OnPostprocessBuild" methods are being called in Unity Cloud Build.
But none of the logs shows up in UCB.
I have reported this to Unity.
How about you throw an exception there and see if it breaks the cloud build? It's so that we can eliminate the possibility of PostProcessBuild logs intentionally being omitted from Cloud Build by Unity (for unknown reasons).
Nope, no exception, error or warning.
Yeah, seems like a UCB issue then.
I have fixed it by calling your method via a Post-export method.
Seems like this issue is only in m project.
I'm curious, how did you figure out that this issue is only in your project?
I run an old commit via UCB, it had your package in it (an older version) and other postprocessbuild methods. All of the post methods where invoked correctly. I only updated your package after I saw that UCB failed.
So something in my newer commits prevents post processing methods in UCB.
Did you possibly add a class named PostProcessBuildAttribute which has overridden Unity's own attribute?
The only strange way of invoking OnPostprocessBuild.
But the package is excluded in our project.
Do you think I should investigate this?
I don't think you should investigate that ~ symbol. If you type PostProcessBuild and hover your cursor over it, make sure that it shows the namespace as UnityEditor.Callbacks.PostProcessBuildAttribute
. Otherwise you have a conflicting custom PostProcessBuildAttribute. If the namespace is correct, I don't know how you can investigate this issue :D
Unable make a iOS build in Unity Cloud Build
I have the following issue in Unity Cloud Build:
craytive-technologies-bv-baselinez-ios-baselinez-dev-40-BaselineZ-Dev-Unity-iPhone.log
Reproduction steps
Include the package, run it in Unity Cloud Build