Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] XCT doesn't build in release mode for iOS - MediaSource/MediaCapturedEventArgs linking fails #367

Closed
Tommigun1980 opened this issue Oct 4, 2020 · 4 comments · Fixed by #370
Labels
bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.

Comments

@Tommigun1980
Copy link

Tommigun1980 commented Oct 4, 2020

Description

Xamarin.Forms 5-pre1 is announcing XCT as an upgrade path for certain features that were present in Xamarin.Forms 4. Unfortunately the following error happens when building release builds for iOS:

/Users/myname/Projects/myproject/MyApp.iOS/MTOUCH: Error MT2101: Can't resolve the reference 'Xamarin.Forms.MediaSource', referenced from the method 'System.Void Xamarin.CommunityToolkit.UI.Views.MediaCapturedEventArgs::.ctor(System.String,System.Byte[])' in 'Xamarin.Forms.Core, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null'. (MT2101) (MyApp.iOS)

I reported this issue at xamarin/Xamarin.Forms#12224 (comment) and was told that there's a pending pull request to fix this in XCT.

When will this pull request be merged and a new package released? As this blocks proper release builds until it is in I'd urge to ship one soon, as it also prevents proper testing of Xamarin.Forms 5 preview releases.

PS. I'm not using media source at all so it's not related to my code, should happen with a vanilla project.
PS 2. There is also an XCT AOT error that I think is related to this, which I reported here: #368.

Thanks.

Steps to Reproduce

  1. Add the latest XCT NuGet to a Xamarin.Forms 5 project.
  2. Build for iOS in release mode, with target set to "| iPhone" (don't use "| iPhoneSimulator").
  3. The above build error prevents the build from succeeding.

Expected Behavior

iOS release builds should finish successfully.

Actual Behavior

iOS release builds fail with the above error.

Basic Information

  • Version with issue: 1.0.0-pre3
  • IDE: VS For Mac 8.7.8 build 4F
  • Nuget Packages: Xamarin.Forms 5-pre1

Workaround

Project Options -> iOS Build -> Set 'Linker behaviour' to 'Don't link'.

@Tommigun1980 Tommigun1980 added bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged. labels Oct 4, 2020
@pictos
Copy link
Contributor

pictos commented Oct 4, 2020

I can confirm the issue

image

@Tommigun1980 Tommigun1980 changed the title [Bug] XCT doesn't build in release mode for iOS - MediaSource/MediaCapturedEventArgs [Bug] XCT doesn't build in release mode for iOS - MediaSource/MediaCapturedEventArgs linking fails Oct 4, 2020
@pictos
Copy link
Contributor

pictos commented Oct 4, 2020

I'm on it

@Tommigun1980
Copy link
Author

Tommigun1980 commented Oct 8, 2020

Hi guys. Any idea when #367, #368 and #393 will be in a release so that XCT is Xamarin.Forms 5 compatible? Considering that XCT is the upgrade path for Xamarin.Forms 5 I think this is something that should make its way into a release ASAP. Thanks.

@Tommigun1980
Copy link
Author

Tommigun1980 commented Oct 14, 2020

Hi. I tested XCT's latest bleeding edge version and I can confirm that this issue is fixed! Thanks a lot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working. Breaky break. s/unverified This issue needs verification/reproduction by a team member. PRs cannot be accepted/merged.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants