-
Notifications
You must be signed in to change notification settings - Fork 515
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Frameworks duplication in iOS extension (plugin) prevents app to be published #17679
Comments
I can confirm the issue. Can you try adding this workaround to the extension project, and see if it fixes the issue for you? <Target Name="RemoveFrameworks" AfterTargets="_ComputeFrameworkFilesToPublish" BeforeTargets="_CopyDirectoriesToBundle">
<ItemGroup>
<_DirectoriesToPublish Remove="@(_FilteredFrameworkToPublish)" />
</ItemGroup>
</Target>
<Target Name="SetRPath" AfterTargets="_ComputeVariables" BeforeTargets="_LinkNativeExecutable">
<PropertyGroup>
<_EmbeddedFrameworksRPath>@executable_path/../../Frameworks</_EmbeddedFrameworksRPath>
</PropertyGroup>
</Target> The workaround makes the extension project not copy the frameworks into the appex, and then tells the extension executable to look in the parent app container for any frameworks. Note that this workaround will only work as long as the main app already contains the frameworks the extension needs (which seems to be the case for your project). |
@rolfbjarne This workaround completely solves our problem. Thank you very much |
Any fix for #17876 will also fix this issue. |
Fixes xamarin#17876. Put any frameworks in app extensions in the Frameworks directory in the containing app bundle. This saves a lot of space if the same framework is used in both an app extension and the containing project (or multiple app extensions). Fixes xamarin#17876. Fixes xamarin#17679.
Steps to Reproduce
Expected Behavior
The ipa archive is being prepared without duplicate frameworks and freely uploaded to 'TestFlight'
Actual Behavior
The ipa archive is being prepared with duplicate frameworks and upload to 'TestFlight' is rejected
Environment
Version information
Detailes
We have an iOS app that includes an iOS Share Extension to allow users to share their content.
The application was originally created to use Mono, but we recently migrated it at .NET 7 and faced a problem.
When we try to upload our *.ipa file to the App Store Connect, this service rejects our build and reports the following errors in response:
Asset validation failed (90685) CFBundleIdentifier Collision.
There is more than one bundle with the CFBundleIdentifier value 'com.microsoft.libSkiaSharp' under the iOS application 'ILive.iOS.app'.
(ID: 3c47ce8f-71a4-4a3e-8ed1-51da406918f2)
Asset validation failed (90206) Invalid Bundle.
The bundle at 'ILive.iOS.app/PlugIns/ILive.iOS.Share.appex' contains disallowed file 'Frameworks'.
(ID: b8190f6a-8561-4e90-b4b7-57314bc327e8)
Asset validation failed (90685) CFBundleIdentifier Collision.
There is more than one bundle with the CFBundleIdentifier value 'org.videolan.DynamicMobileVLCKit' under the iOS application 'ILive.iOS.app'.
(ID: 9b1f36f5-0649-41da-87f5-bce1217deac5)
Asset validation failed (90685) CFBundleIdentifier Collision.
There is more than one bundle with the CFBundleIdentifier value 'com.microsoft.libHarfBuzzSharp' under the iOS application 'ILive.iOS.app'.
(ID: 7cd6eaa1-63c2-47ea-aac5-a761b65309fa)
Asset validation failed (90205) Invalid Bundle.
The bundle at 'ILive.iOS.app/PlugIns/ILive.iOS.Share.appex' contains disallowed nested bundles. (ID: f00fb3b2-a5d8-4e63-bebd-a32593d53d62)
In the screenshots you can see the changes that occurred after the migration.
The old option. The application built for Mono has the following structure (see screenshots). There are no problems with such build.
The new option. The application built for .NET 7 has the following structure (see screenshots). There are a problem with frameworks duplication in 'ILive.iOS.Share.appex'.
The 'DynamicMobileVLCKit' framework is not directly used in 'iLive.iOS.Share', but it connects transitively. And if you don't connect nuget packages 'LibVLCSharp' and 'VideoLAN.LibVLC.iOS', then the project will simply not be assembled. These nuget packages are useless for this project, but required to build 'ILive.iOS.Share'.
The application in both cases (Mono and .NET 7) is normally builds, deploys to the device and works.
But in the second case, it cannot be published.
We can change the structure of our application and get rid of 'DynamicMobileVLCKit' framework in 'ILive.iOS.Share', but we will not be able to get rid of 'com.microsoft.libSkiaSharp'.
How do we solve this problem?
The text was updated successfully, but these errors were encountered: