[펌] [Xcode] Set 'Always Embed Swift Standard Libraries' in PostProcess
Unity3D/iOS / 2022. 11. 17. 13:05
ITMS-90427을 처리하기 위해 확인해보니
Unity-iPhone의 Always Embed Swift Standard Libraries를 YES로 하고,
UnityFramework의 Always Embed Swift Standard Libraries를 NO로 하라고 한다.
빌드때마다 수동으로 하기는 그래서 Xcode PostProcessBuild로 처리하기로 함.
using System.IO;
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;
namespace Editor
{
public static class XcodeSwiftVersionPostProcess
{
[PostProcessBuild(999)]
public static void OnPostProcessBuild(BuildTarget buildTarget, string path)
{
if (buildTarget == BuildTarget.iOS)
{
ModifyFrameworks(path);
}
}
private static void ModifyFrameworks(string path)
{
string projPath = PBXProject.GetPBXProjectPath(path);
var project = new PBXProject();
project.ReadFromFile(projPath);
string mainTargetGuid = project.GetUnityMainTargetGuid();
foreach (var targetGuid in new[] { mainTargetGuid, project.GetUnityFrameworkTargetGuid() })
{
project.SetBuildProperty(targetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");
}
project.SetBuildProperty(mainTargetGuid, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "YES");
project.WriteToFile(projPath);
}
}
}
[출처] https://forum.unity.com/threads/2019-3-validation-on-upload-to-store-gives-unityframework-framework-contains-disallowed-file.751112/ - unity_Iu70XvRN7XIS4g의 댓글
반응형
'Unity3D > iOS' 카테고리의 다른 글
[빌드에러] (Xcode 14): Signing for "GoogleSignIn-GoogleSignIn" requires a development team. (0) | 2022.11.18 |
---|---|
[펌] PostProcessBuild에서 PodFile 수정 방법 (0) | 2022.11.18 |
[펌] ITMS-90427: Invalid Swift Support (0) | 2022.11.16 |
[펌] ERROR ITMS-90206: "Invalid Bundle. (0) | 2022.11.16 |
[링크] [iOS 앱스토어 리젝] 애플 로그인 텍스트 | 애플 로그인 디자인 가이드 (0) | 2022.11.09 |