-
-
Notifications
You must be signed in to change notification settings - Fork 259
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
Upgrade to Uno 3.x, minor control changes required #167
Conversation
Hi, Thanks for the PR! It seems the CI is complaining about this:
Does this mean we can only support 1 version of Uno within one package? |
a558265
to
9992320
Compare
I had a heck of a time getting it to build (just the library in general). I even got some of these similar errors. Eventually to get it to build I was using android 9 and unloaded virtually all the projects other than UWP and android. After going through a slew of changes I tried reverting as much as I could to get it to still work. I did find now I missed the IOS add so that should fix a few of the errors. I also got the DisplayRequest errors, which I fixed by making it public rather than internal. As that was all libvlc code I couldn't figure out why that would be a new error. The assembly was properly marked as friend as well. I reverted it back to internal at the end and rebuilt and it was fine. I am not sure if it just happens when there is not a successful build or if I am missing something. Looking at the other errors it is likely relating to some of the templating child fetching that macos seems to catch but android doesn't oddly. I will go through the theming and see. The View is no longer directly assigned as a child so may need to alter how they are grabbing the VideoView. Otherwise I can see about installing the android 8 sdk to see if that is an issue, or it could also be IOS related (as the windows does the cross building). In theory the VideoView.Android should only be compiled in for android and ios for ios right? As the cross compile errors seem odd. I could further gate them with platform #ifdefs but I didn't do so as I figured each was only used for its specific case. |
Sorry to hear that. Have you followed our contribution guide and had a look at what the CI does and how it is setup? This can be helpful to have the solution building quicker.
Yes.
|
@@ -262,7 +262,7 @@ | |||
AutomationProperties.AccessibilityView="Raw"> | |||
<ToolTipService.ToolTip> | |||
<ToolTip x:Name="ThumbnailTooltip"> | |||
<ContentPresenter Content="{Binding}" /> | |||
<ContentControl Content="{Binding}" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you sure about this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not 100% yet, but essentially ContentPresenter should be grabbing the content based on the source item by default. ContentControl should be used when actually setting content from what I can find. Will test this to validate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other option would be to create an uno 2.x legacy package or new uno 3 package, but in theory as the upgrade to uno 3 shouldn't be too big for users that may just be the logistically simpler option. I will test the playback controls and further theme issues this weekend hopefully. From what I read that was the correct direction to be going for the sort of binding done. As for build issues I am a big fan of docker and CI setup scripts and the failures I am sure are my own. A bit busy with work so only had so much time to see if I could fix this (just using libvlc for a side project). I will try and look at it in more detail to see if there is anything I could think to add that might help other users (some of it is just opaque error messaging from the build system so not much to do about that). I think the solution itself is logistically complex with all the platforms so likely i will RTFM and just see if I can put some more warnings or help for what some errors may actually mean. |
Yes, but I don't think it is worth the overhead with packaging, given how few users we seem to have on Uno.
So am I, but I use it for libvlc (https://code.videolan.org/videolan/docker-images), not libvlcsharp (though it has been planned https://code.videolan.org/videolan/LibVLCSharp/-/issues/91).
You need all the proper SDKs (Xamarin, netcore, desktop, etc.). Aside from this, the great MSBuildSdkExtras that we use for multi targeting should do the job (it is pulled automagically from the csproj). |
9992320
to
2fdaac2
Compare
Don't merge this in yet (if you ever would) still want to test some of the templating things. The error was due to not updating to Android 9 as Uno requires (this may also stop you from merging). |
Ok. Yes, I intend to merge your contribution :-) You can only test UWP and Android, right? Let me know and I'll check iOS. |
2fdaac2
to
51dc1d9
Compare
Feel free to let me know when this is ready @mitchcapper |
@mfkl @mitchcapper Can this be reopened and finalized please? It would be very beneficial to bring support for latest versions of Uno Platform. Happy to help if needed 👍 |
@MartinZikmund : Feel free to open your own PR to finish the job, I guess :) |
@MartinZikmund I would be more than happy to help you look at this. We are going to need support for libvlc with Uno and Android later this year (Q3/Q4 timeline). I am more than happy to donate my time as well as some developers on my team to get this working. |
Good to hear, feel free to join the Discord server if you need anything and to synchronize your work 😉 |
51dc1d9
to
6037453
Compare
NOTE! This is not yet ready for merge the templating I am still testing and playing with. From my original PR here are the changes: |
Yes please, I'd like to stick to 8.1 for now if possible. |
If anyone is still interested to take this up, much appreciated. Will allow us to remove a new needed workaround 00952b6 |
6037453
to
96e4417
Compare
So I can't test this as I upgraded VS and ran into a bug, it seems the autobuild system may be hitting that same bug with the latest vs tools.
|
See 00952b6 :) |
I'll have a look this week. |
src/LibVLCSharp.Uno/VideoView.iOS.cs
Outdated
@@ -14,7 +14,7 @@ public partial class VideoView : VideoViewWrapper<Platforms.iOS.VideoView> | |||
protected override Platforms.iOS.VideoView CreateUnderlyingVideoView() | |||
{ | |||
var underlyingVideoView = new Platforms.iOS.VideoView(); | |||
Border!.Child = underlyingVideoView; | |||
Border!.AddSubview( underlyingVideoView); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unnecessary extra space
@@ -3,7 +3,7 @@ | |||
<PropertyGroup> | |||
<Title>LibVLCSharp.Uno</Title> | |||
<Summary>Uno integration for LibVLCSharp</Summary> | |||
<TargetFrameworks>Xamarin.iOS10;MonoAndroid81</TargetFrameworks> | |||
<TargetFrameworks>Xamarin.iOS10;MonoAndroid10.0</TargetFrameworks> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uno 3 requires MonoAndroid10.0
minimum?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK well as not an android developer I didn't fully understand what their requirement was when they moved to android 29 as the min SDK version. Yes MonoAndroid10/API 29 is the minimum for uno, however the "minSdkVersion" for android is Android 5 or API 21 (per: https://platform.uno/docs/articles/getting-started/requirements.html).
Revisiting the earlier discussion if the target sdk does not effect the device minimum do we want to upgrade all projects to 10/11 as only effecting what sdk the user compiling has?
Interestingly the minSdkVersion is not possible to set on any android library only on the final project. so we only set minSdkVersion on
samples/Uno/LibVLCSharp.Uno.Sample.Droid
samples/Uno/Sample.MediaPlayerElement/Sample.MediaPlayerElement.Droid
I will change these to 21, but really any user won't actually know the minSdkVersion.
Google actually requires any app updates or new app submissions to target v29 (again no minimum though). Starting in august that is v30 for new apps and november v30 for existing. Uno does support MonoAndroid11 right now but you could wait a few months to make the sdk change there.
It is funny without the ability to specify a minSdkVersion on a lib the app will just crash if it is run on too low of a device when that api is used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Revisiting the earlier discussion if the target sdk does not effect the device minimum do we want to upgrade all projects to 10/11 as only effecting what sdk the user compiling has?
Samples I don't mind. LibVLCSharp.Uno can target MonoAndroid10. But older non-Uno apps may still use MonoAndroid81 so we should keep it on LibVLCSharp.csproj IMHO.
Ha! I saw you added that but as I was updating everything to 3.x I didn't even check what it was referencing. Clearly yes the same issue. As I can also repro locally I will make sure to use the latest uno builds and see if it still happens and post to them otherwise. |
9418ddf
to
b11554c
Compare
One side perk is now it is on 3.8.6 for uno. |
b11554c
to
451075d
Compare
Updated my system to try to repro the failure from CI, but I can't repro locally, builds fine here.
Seems to be a recent tooling issue. Should try this work around xamarin/xamarin-android#5764 (comment) |
...Sample.MediaPlayerElement/Sample.MediaPlayerElement.iOS/Sample.MediaPlayerElement.iOS.csproj
Outdated
Show resolved
Hide resolved
451075d
to
3542307
Compare
Should that be in aWindow referenced or I would assume the android csproj that is failing. |
I'd have guessed the AWindow bindings project. Though the implications of that workaround could be critical
Anyway, I tried it in my fork and the build times out https://videolan.visualstudio.com/73ec5719-cee8-4da9-937a-9d8a3993d7f5/_apis/build/builds/4436/logs/28. I cannot reproduce this build failure locally, everything builds fine. |
Closing for inactivity. Feel free to reopen! |
|
Now there is a 4.x Uno stable version.. |
Closing for inactivity. |
Switched to Uno 3.x. Using an Uno 2.x control in an Uno 3.x project can cause odd crash exceptions. Officially they say 3.x is soruce compat with 2.x so people shouldn't have an issue upgrading but clearly there can be minor differences.
Issues Resolved
fixes #375
API Changes
None
Platforms Affected
Core
Behavioral/Visual Changes
This moves users to uno 3.x so while there are no libvlcsharp changes there are some minor upgrade notes:
https://github.com/unoplatform/uno/blob/master/doc/articles/migrating-from-previous-releases.md
One tooltip had to migrate from content presenter to content control however I don't believe it should cause an issue. This is due to CP now allowing to have a content property bound to a non template item.
Before/After Screenshots
No UI changes.
Testing Procedure
Tested Android and UWP no ios device.
PR Checklist
relevant links: