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??
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.
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.
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.
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.
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.
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.