Skip to content
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

Add bindings for ActivityKit #17038

Open
thisisthekap opened this issue Dec 14, 2022 · 22 comments
Open

Add bindings for ActivityKit #17038

thisisthekap opened this issue Dec 14, 2022 · 22 comments
Labels
missing-api-bindings requires-swift An issue that requires swift support to fix
Milestone

Comments

@thisisthekap
Copy link

thisisthekap commented Dec 14, 2022

With iOS 16.1, the new Dynamic Island available on iPhone 14 Pro and iPhone 14 Pro Max become accessible using ActivityKit (https://developer.apple.com/documentation/activitykit).

Therefore, supporting iOS 16.1 in Xamarin.iOS is very much appreciated.

@beeradmoore
Copy link

iOS 16.1 requires Xcode 14.1 (via xcodereleases).
Xamarin.iOS support for Xcode 14.1 is on its way as per @dalexsoto closing the Xcode 14.1 meta issue.

Not sure where it is, has not shown up in my updater yet. But it should be soon I guess.

As for ActivityKit, I don't see it on the binding page for Xcode 14.1 or 14.2. Not sure if I am looking at it wrong or if it isn't in the pipeline yet. I do see WidgetKit in there though, is ActivityKit a part of WidgetKit?

@thisisthekap
Copy link
Author

@beeradmoore Thanks for pointing out! ActivityKit is in fact a separate framework, and not include to WidgetKit (just related for some use cases). I edited the description accordingly.

So basically this issue should be called "ActivityKit binding missing"?

@beeradmoore
Copy link

I think it probably should be renamed, but it could be best to see if the binding does exist in the upcoming Xamarin.iOS 16.1 release.

Or at least testing the pre-release in the first comment of that thread to see if it actually is missing.

@beeradmoore
Copy link

beeradmoore commented Dec 18, 2022

Xamarin.iOS 16.1.1.27 is now available through the Visual Studio for Mac updater.

EDIT: Does not look like ActivityKit made the cut. I tried to find Activity and ActivityState but intellisense couldn't find it. using ActivityKit; also had no results.

EDIT 2: Looking at this, does not appear Xamarin will get it due to the lack of support for SwiftUI. I don't know enough to know if that is the underlying issue or if it can be resolved.

@amirvenus
Copy link

I think the other issue is that I cannot currently deploy to a physical Apple TV device using the latest stable Xamarin.iOS installation. Simulators work fine though on Xcode 14.2 and tvOS 16.1.

However, when I run mlaunch:

warning HE0003: Could not load the framework 'DVTDeveloperModeHelper' (path: /Applications/Xcode.app/Contents/SharedFrameworks/DVTDeveloperModeHelper.framework/DVTDeveloperModeHelper): not found.

And this probably causes the deployment to get stuck indefinitely with this message:

Please connect the device 'LivingRoom'...

Even though IT IS CONNECTED via Xcode and I can deploy a native swift tvOS app just fine.

@beeradmoore
Copy link

@amirvenus can you file a new issue with as much information about that as possible as it isn't directly related to this issue and won't get any visibility buried in the comments.

@amirvenus
Copy link

I have done that, @beeradmoore

#17132

@rolfbjarne
Copy link
Member

Support for iOS 16.1 in Xamarin.iOS was release some time ago: https://github.com/xamarin/xamarin-macios/releases/tag/xamarin-ios-16.1.1.28

@beeradmoore
Copy link

@rolfbjarne , user was trying to use ActivityKit which still appears missing from the bindings. Was that overlooked or is it not possible because of SwiftUI shenanigans?

@rolfbjarne
Copy link
Member

@beeradmoore thanks for pointing that out, I got carried away by the title.

It seems ActivityKit is only available using Swift, and not Objective-C, which means we're unfortunately not able to create bindings at this moment.

As of today, the only way to use a swift library is via a proxy library, the general idea is described here learn.microsoft.com/en-us/xamarin/ios/platform/binding-swift basically you would need to expose the ActivityKit Apis you need via a Swift glue layer that exposes the method via the swift bridge header and then creating a C# binding project for this.

@rolfbjarne rolfbjarne reopened this Jan 20, 2023
@rolfbjarne rolfbjarne changed the title Can we expect iOS 16.1 support for Xamarin.iOS? Add bindings for ActivityKit Jan 20, 2023
@rolfbjarne rolfbjarne added this to the Future milestone Jan 20, 2023
@rolfbjarne rolfbjarne added requires-swift An issue that requires swift support to fix missing-api-bindings labels Jan 20, 2023
@beeradmoore
Copy link

Would having all bridging libraries already built/bound in a Xamarin.iOS/netX-ios be a possibility in the future?

@rolfbjarne
Copy link
Member

@beeradmoore The plan is for us to eventually provide these bindings, but it's a lot of work, so I'm not sure when that might be.

@AgustinBonilla
Copy link

Hi @rolfbjarne , Is there any news about the ActivityKit binding for Xamarin.iOS? I need it to add Live Activities to my Xamarin Forms app.

@rolfbjarne
Copy link
Member

Hi @rolfbjarne , Is there any news about the ActivityKit binding for Xamarin.iOS? I need it to add Live Activities to my Xamarin Forms app.

No news yet, and we won't get anything until at least .NET 9 (we've started looking into this internally, so maybe we'll have something for .NET 9, but no promises whatsoever).

@alfonsinmoi
Copy link

Hello @rolfbjarne , it is a very interesting update for new applications since it gives the user a real-time visualization of something that is happening with the app closed. It would be very interesting for tracking, delivery, fitness applications, etc.

Thank you for the effort you make.

@kimdohyung1
Copy link

Hello @rolfbjarne , it would be nice to be able to use ActivityKit in my Xamarin.iOS project. Do you know when the timeline is for .NET9?

@rolfbjarne
Copy link
Member

@kimdohyung1 no timeline yet.

Note that it's still don't know if we'll have anything swift-related for .NET 9, much less a specific framework, and we probably won't know more until maybe summer next year.

@rjspencer91
Copy link

Hello @rolfbjarne, as it is now summer next year, any update on ActivityKit bindings in .net-ios?

@kimdohyung1 no timeline yet.

Note that it's still don't know if we'll have anything swift-related for .NET 9, much less a specific framework, and we probably won't know more until maybe summer next year.

@rolfbjarne
Copy link
Member

Hello @rolfbjarne, as it is now summer next year, any update on ActivityKit bindings in .net-ios?

@kimdohyung1 no timeline yet.
Note that it's still don't know if we'll have anything swift-related for .NET 9, much less a specific framework, and we probably won't know more until maybe summer next year.

It won't happen in the .NET 9 time frame. Work is continuing though, so hopefully we'll be able to have something for .NET 10 next year.

@clarky07
Copy link

clarky07 commented Dec 4, 2024

Hello @rolfbjarne, as it is now summer next year, any update on ActivityKit bindings in .net-ios?

@kimdohyung1 no timeline yet.
Note that it's still don't know if we'll have anything swift-related for .NET 9, much less a specific framework, and we probably won't know more until maybe summer next year.

It won't happen in the .NET 9 time frame. Work is continuing though, so hopefully we'll be able to have something for .NET 10 next year.

is there anything swift related in .net 9? any kinda of workaround to get to live activities or is it just wait til next year?

@dalexsoto
Copy link
Member

@clarky07 you can follow up the progress on anything swift here dotnet/runtime#95638 so feel free to track that issue that said the plan is to have a preview of some bindings for swift for .NET 10 in a very preview stage so having full support I think is still some time away. You can add your 👍 and suggestions to the issue

@clarky07
Copy link

clarky07 commented Dec 5, 2024

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing-api-bindings requires-swift An issue that requires swift support to fix
Projects
None yet
Development

No branches or pull requests

10 participants