XCode Bug: Missing signing identifier at Unity Framework

I am making an AR app and it builds just fine in Xcode but I can’t sign it on testflight. It gives me an error when I try to archive the app. The error states:

Missing signing identifier at “/var/folders/zx/27c5k9nd3c53_djxc628q8940000gn/T/XcodeDistPipeline.~~~CGHJcC/Root/Payload/my-unity.app/Frameworks/UnityFramework.framework/Frameworks/libswift_Concurrency.dylib”.

Failed to cloud sign “/var/folders/zx/27c5k9nd3c53_djxc628q8940000gn/T/XcodeDistPipeline.~~~CGHJcC/Root/Payload/my-unity.app/Frameworks/UnityFramework.framework/Frameworks/libswift_Concurrency.dylib”. Please file a bug report at https://feedbackassistant.apple.com.

I’ve tried just about everything but nothing works. The error started happening with the latest version of XCode I believe, because before it use to sign properly. Some of the packages I am using are ARSimulation, Firebase, EasySave and ARFoundation. Does anyone know a fix for this??

Thanks

Nevermind, I solved the problem. Apparently in Xcode 13+ there can’t be swift concurrency features without upgrading to iOS 15 or using a work around listed here:

Apple Clang Compiler Known Issues Apps built with Xcode 13 or Xcode 13.1 that make use of Swift Concurrency features (such as async/await), deploy to iOS prior to 15, tvOS prior to 15, or watchOS prior to 8, and have bitcode enabled may crash at launch with an error reporting that the libswift_Concurrency.dylib library was not loaded. (86349088) Workaround: Add -Wl,-weak-lswift_Concurrency -Wl,-rpath,/usr/lib/swift to Other Linker Flags in the app’s build settings.

Mine is a little bite different,

Missing signing identifier at “/var/folders/zw/j7vs9mm54j72xzct0gr71zdm0000gr/T/XcodeDistPipeline.~~~GnKMN3/Root/Payload/Hotel.app/Frameworks/UnityFramework.framework/libOVRLipSync.dylib”.

Failed to cloud sign “/var/folders/zw/j7vs9mm54j72xzct0gr71zdm0000gr/T/XcodeDistPipeline.~~~GnKMN3/Root/Payload/Hotel.app/Frameworks/UnityFramework.framework/libOVRLipSync.dylib”. Please file a bug report at https://feedbackassistant.apple.com.

Any Idea how to solve this?

Try setting the deployment min target to ios 15.

I solved in a weird way.

In xCode, go to general tab and in Target > UnityFramework > Frameworks and Libraries remove the AVFoundation.framework and add it again with the + sign…

No need to set min target to iOS 15

Now if you Archive again the package and try to submit the error is magically gone away.

24 Likes

Thanks, this worked

3 Likes

Hey Guys,

I’m trying to Archive an iOS build to the AppStore Connect and I get this warning, but the build is uploaded.

The app references non-public selectors in Payload/GAME.app/Frameworks/UnityFramework.framework/UnityFramework: applicationWillFinishLaunchingWithOptions:, didReceiveRemoteNotification:, loadPlugin

But when I run it on test flight, the game crashes after loading the Unity Splash Screen.

Any help is really appreciated.

This fixed it for me, thanks!!

Update:
I removed ad packages and installed unity mediation ads instead
then it kinda worked. but still wasn’t straightforward.
had to change binary to nill and some other stuff.

thank you , Hero

thank you

1 Like

It works on me. Thank you!!

Worked here, too… !

works for me, great! thank you.

After some testing I found that while the above method works, it’s not magic. The method above coincidentally works because Xcode somehow sets build setting for UnityFramework target ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to NO after removing and readding AVFoundation.

Also the method above actually removes AVFoundation that is for iPhoneOS and adding one that is for MacOS, thus never actually putting it back. So it could possibly cause issues for people who depends on AVFoundation on their projects (for most of us, the framework is included but probably not used, like myself).

So ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES should be NO but it is by default YES for now. I eventually made a postbuild script to set it to NO:

#if UNITY_IOS
using UnityEditor;
using UnityEditor.Callbacks;
using UnityEditor.iOS.Xcode;

namespace Editor
{
    /// <summary>
    /// Automatically disables ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES on iOS builds
    /// Reference : https://www.cxyzjd.com/article/qq534575060/114381877 no.49
    /// </summary>
    public static class IOSAlwaysEmbedSwiftStandardLibrariesDisabler
    {
        [PostProcessBuildAttribute(999)]
        public static void OnPostProcessBuild(BuildTarget buildTarget, string pathToBuildProject)
        {
            if (buildTarget != BuildTarget.iOS) return;
            string projectPath = pathToBuildProject + "/Unity-iPhone.xcodeproj/project.pbxproj";
            PBXProject pbxProject = new PBXProject();
            pbxProject.ReadFromFile(projectPath);

            //Disabling ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES Unity Framework target
            string target = pbxProject.GetUnityFrameworkTargetGuid();
            pbxProject.SetBuildProperty(target, "ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES", "NO");

            pbxProject.WriteToFile(projectPath);
         }
    }
}
#endif

Put this script into an Editor folder and it will work.

13 Likes

For me, this solution worked, after spending few hours :slight_smile:

2 Likes

It works, thanks

Any way to automate this?
I tried this code but it didn’t work:

 [PostProcessBuild]
    public static void OnPostProcessBuild(BuildTarget buildTarget, string pathToBuiltProject)
    {
        // https://discussions.unity.com/t/878094/5
        // workaround for error about AVFoundation when distributing app to testflight/app store after archicing
        if (buildTarget == BuildTarget.iOS)
        {
            string projectPath = PBXProject.GetPBXProjectPath(pathToBuiltProject);
            PBXProject project = new PBXProject();
            project.ReadFromString(File.ReadAllText(projectPath));
            //string target = project.TargetGuidByName("Unity-iPhone");
            string target = project.GetUnityMainTargetGuid();

            project.RemoveFrameworkFromProject(target, "AVFoundation.framework");
            project.AddFrameworkToProject(target, "AVFoundation.framework", false);
            File.WriteAllText(projectPath, project.WriteToString());
        }
    }

Thanks, works, I am minifying for fast forward users like me,

  • In xCode, go to General tab and in Target > UnityFramework > Frameworks and Libraries remove the AVFoundation.framework with the “-” (minus) sign
  • add it again with the + sign…
  • Done

Thank you