microsoft / clarity-apps

Repo for distributing Clarity Apps packages
MIT License
46 stars 2 forks source link

Missing SwiftUI support #49

Closed TomaszLizer closed 3 months ago

TomaszLizer commented 4 months ago

I have started testing Clarity iOS SDK from the perspective of migration from other similar tool. First thing I noticed is that there is no SwiftUI support yet. Given app I am working on is built on mixed UIKit/SwiftUI environment it is crucial for us to have such support or at least predictable behaviour. I was not able to find exact details on what does missing SwiftUI support mean, however my initial testing and observations shows few things:

Is there any expected timeframe in which SwiftUI support will be added? Could you provide documentation on how SDK is treating SwiftUI before official support is added? Is it potentially unsafe to use Clarity iOS SDK with SwiftUI code (eg potential crashes, memory corruptions, etc)?

nouranmaher86 commented 3 months ago

Hello @TomaszLizer SwiftUI will be supported in the next couple of weeks, and we will announce the release once ready so stay tuned!

nouranmaher86 commented 3 months ago

Hi @TomaszLizer SwiftUI is officially released in version 2.0.0. You would Need to set the enableSwiftUI_Experimental in your SDK code. https://learn.microsoft.com/en-us/clarity/mobile-sdk/sdk-changelog#ios-sdk-changelog

TomaszLizer commented 3 months ago

@nouranmaher86 @ibradwan Can you share some additional details on what does it mean that SwiftUI support is experimental? Are there any potential stability issues? Our current app relies heavily on SwiftUI so in order to consider Clarity iOS SDK for production environment we would need to either get official support or know something more about that :) Thanks in advance

ibradwan commented 3 months ago

Okay so given that we've recently introduced SwiftUI support, we encourage people to run some tests locally and make sure nothing is wrong before pushing to production. This is just a safety mechanism until more & more apps enable the SwiftUI support. Moving forward, the flag will be removed in one of the major releases. A note worth mentioning here is that SwiftUI support logic shares most of the logic with the UIKit support logic, and the UIKit logic has been tested and is currently being used by many apps and users.