Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 02 2016 16:31
    @chamons banned @IfErrThrowBrick_twitter
gonzobrains
@gonzobrains
@dalexsoto I am in a position now where I have to share a cloud mac with multiple developers. Is there a way I can install Xamarin.iOS and VS 2019 Mac in each developer's user application folder so as to isolate dev environments and avoid conflicts?
Alex Soto
@dalexsoto
Not that I am aware of
gonzobrains
@gonzobrains
would there still be problems with concurrent SSH connections? so far we are able to share the mac as long as only one developer connects at a time.
Alex Soto
@dalexsoto
About that please post your question on https://gitter.im/xamarin/VisualStudio
I am not sure about the answer to that one :smile:
juepiezhongren
@juepiezhongren
@dalexsoto hello, is there any progress for swiftui binding?
Chris Hamons
@chamons
There has not been much progress on that front, and give Xcode 12 just hit Beta 1 I suspect we’ll have our hands full w\ that for awhile
The general tool to bind swift has had significant progress though, but that isn’t SwiftUI specific (or targetted)
juepiezhongren
@juepiezhongren
i just wander if swiftui instance is simply stack allocated (i cant believe) or heap boxed
Damian Mehers
@DamianMehers
@chamons is there any way for me to use Swift in a WatchOS app that calls into my Xamarin .NET code? If I could drive from Swift but reuse my .NET code then I’d still be able to benefit from creating a NetStandard library that I can reuse across all my platforms which I currently do. The Embedinator 4000 project seems to have lost momentum ...
If you decide that SwiftUI can’t map effectively to .NET then an alternative would be to let me at least embed .NET code into a Swift/SwiftUI app and invoke it
Csaba8472
@Csaba8472
@chamons I'd like to know this too, I tried the other way, binded a swift library which contained swiftui views, it worked on iOS but didn't work on watchOS
David Ortinau
@davidortinau

working in Swift/SwiftUI and .NET in the same project is on our radar to be being further investigated, primarily for WidgetKit and App Clips. The same concepts could be applied to watchOS.

The Embeddinator experiment is one idea, but as you note it's not actively in development and is a complex solution. Another solution is to initially offer the build/bundling of the Swift artifact (the watch app for example) with the .NET app for iOS, and provide a communication solution for passing messages between them.

Chris Hamons
@chamons
I’ll be sure to poke you folks if/when we have news. Would either of you be interested in opening an issue at https://github.com/xamarin/xamarin-macios/issues/new with details on your specific use case (SwiftUI, swift-only extensions, etc)
Damian Mehers
@DamianMehers
@chamons I'll try to draft something and pass it by you to see if it would help as an issue. I suspect I'm an edge-case. But then a lot of people are, each just in their own way.
kiddailey
@kiddailey
Silly question and apologies in advance - I've found and fixed an issue that includes minor changes to both the root Xamarin.MaciOS repository and the Xamarin.MacDev submodule and trying to figure out how to handle submitting the pull request(s). I assume that I should issue one on MaciOS and one on MacDev and cross-reference them in the descriptions. Is this correct? Thanks!
Rolf Bjarne Kvinge
@rolfbjarne
first create one in the Xamarin.MacDev submodule
then create the one in xamarin-macios once the first one has been merged
kiddailey
@kiddailey
Awesome, thanks!
juepiezhongren
@juepiezhongren
@davidortinau , do u mean that "call from native to .net " abilities r in development? .net6?
Chris Hamons
@chamons
Hey @DamianMehers @Csaba8472 - Super early work suggests we can embed arbitrary iOS extensions (written in Swift) into a Xamarin.iOS main application
I’ve got a PR up suggesting a possible extension point
However, it would involve some other party (json file, web server, shared uidocument/cloudkit data) shoving the data between C# iOS app and Swift extension
I think using something like Embeddinator would be difficult to make work to the level of reliability needed here
I’m poking you both since you expressed interest and concerns
Damian Mehers
@DamianMehers

@chamons sounds like a clean workaround, but since my main Xamarin platform is WatchOS, I personally would need support there too ... from what you are saying would I be right in assuming that the extension and the main app could run at the same time, and you'd use a IPC mechanism to communicate?

I've been all-in on Xamarin since 2012, but I'm looking seriously to moving to Swift/SwiftUI on Apple platforms because I can't do some things such as SwiftUI/complications on WatchOS. I was recently taken aback when I found I could not use RealityKit with Xamarin at one of my consulting clients (I'd created a scene in Reality Composer and wanted to export it as a .reality file and use it from Xamarin). I know I am not typical because WatchOS is where 90% of my app sales are (Android, Tizen, WearOS, UWP, xBox and MacOS are the other platforms I support, using Xamarin and a NetStandard library to share almost all my code https://www.youtube.com/watch?v=TOaJ1R4eLSw

There are other factors - when I started, C# was so far ahead of Objective C that it was a no-brainer. Swift is definitely behind C# (IMO - e.g async/await), but not too far behind. I'm also worried that Microsoft won't be able to track new APIs/technologies that are exposed purely in Swift/SwiftUI - I can't rely on doing everything from C# that can be done natively - I used to push that when selling Xamarin a few years back.

I'm not saying Microsoft would be wrong to stop updating support for WatchOS, I'm just an unintended casualty, and I can live with that. Swift/SwiftUI would be "as well as" .NET/C# not "instead of"

Damian Mehers
@DamianMehers
I've just checked out your pull request - I'd assumed (incorrectly) that you were allowing a C# extension to be embedded in a Swift iOS app, so that I could re-use my C# business logic from a Swift app, meaning I could do all the Swift/SwiftUI stuff in my main app, but still re-use a C# library/business logic/engine.
Damian Mehers
@DamianMehers
I thought there might be a generic extension type that I had not come across that just contained code.
Chris Hamons
@chamons
Yes, this PR is a first step in making of “hybrid” app bundles, where the main app is in C# but you can extend it with Swift extensions for the areas we don’t have support yet
Embedding C# into other languages is part of what the Embeddinator I referenced does (https://github.com/mono/Embeddinator-4000), but it turns out that problem is exceptionally difficult to get right
Right now ^ has a lot of sharp edges and isn’t a good general solution for the common use case
Which is why my example used json serialization instead of directly calling C# logic
You can imagine a backend web server or iCloud (UIDocument, etc) as another path of shoveling data between main and extension
Csaba8472
@Csaba8472
hi @chamons, I think as long as xamarin doesn't wrap swiftui like it wraps uikit, we'll go with hybrids solutions like you did. Tried to run the project and it seems with this approach I can create a standalone watch app or widget or etc within the main xamarin project and with c# embedding I could reuse .net libs. Checked embeddinator but it seems it's not ready for this use case: "Support for watchOS will be available in a future release and will be very similar to iOS/tvOS."
Csaba8472
@Csaba8472
BTW thank you for the PR!
Chris Hamons
@chamons
watchOS is always hard due to bitcode.
Csaba8472
@Csaba8472
yep, what confuses me is, I can add watchos extension to a xamarin project and I can also create "standalone" tvos project(mentioned tvos only because bitcode must be enabled like in a watchos project), but can't create standalone watchos project. I'm not sure whether it is too difficult to do that or just not on the roadmap. I have a client who recently started xamarin projects and one of the main reason they've chosen xamarin is, that it supports smartwatches(especially watchos), what was definitely true 2 years ago, but today I can't really confirm that.
Damian Mehers
@DamianMehers
@spouliot gave a talk last year where he explained that on Apple TV the bitcode can simply wrap the native code, whereas on WatchOS it can’t. It is a really good talk https://youtu.be/hVYcscby13k
Damian Mehers
@DamianMehers
This is a link to the tvOS section: https://youtu.be/hVYcscby13k?t=1770
Sebastien Pouliot
@spouliot
@DamianMehers you’re welcome :)
Csaba8472
@Csaba8472
thank you, wasn't aware of that
honkmother
@honkmother
i know this is a dev channel but i am getting desperate
NSFileManager.DefaultManager.SetAttributes works, sets the attributes
and then immediately segfaults
any ideas why?
Chris Hamons
@chamons
Posting the crash log might help people guess better.
honkmother
@honkmother
Crash log is non-figuratively: "SegFault: 11"
No exceptions, no real errors.
I couldn't get lldb to run under dotnet for some reason.