getsentry / team-mobile

Meta issues for the Mobile team
4 stars 1 forks source link

Hybrid SDKs must import <Sentry/PrivateSentrySDKOnly.h> explicit #66

Closed brustolin closed 2 years ago

brustolin commented 2 years ago

Hybrids SDKs, when using PrivateSentrySDKOnly class, have to implicitly import <Sentry/PrivateSentrySDKOnly.h> alongside <Sentry/Sentry.h>.

We plan to remove PrivateSentrySDKOnly.h from the public header in the next major.

marandaneto commented 2 years ago

This affects all the platforms that ship the Cocoa SDK, such as Cordova, Capacitor, etc. cc @kahest since you are collaborating with some of those.

marandaneto commented 2 years ago

For Flutter since it uses Swift, we have to create a Module I guess. https://stackoverflow.com/questions/32149371/import-objective-c-framework-into-swift-framework-google-analytics-cocoapod

lucas-zimerman commented 2 years ago

@marandaneto It may also affect Maui? @brustolin Is there any Alpha/Beta version with this change?

brustolin commented 2 years ago

@lucas-zimerman Yes https://github.com/getsentry/sentry-cocoa/pull/2317

marandaneto commented 2 years ago

@brustolin I didn't find an easy way to do that on Flutter, maybe it requires specific tweaks because its Swift, or is there an easy way? See https://github.com/getsentry/team-mobile/issues/66#issuecomment-1296673374

brustolin commented 2 years ago

@marandaneto we need a different strategy for Flutter. We need this approved. But dont worry, I will do this for Flutter.

brustolin commented 2 years ago

@bitsandfoxes I believe Unity is already setup this way right? Nothing to do there.

brustolin commented 2 years ago

Hey @mattjohnsonpint. I believe this don't apply to Maui, can you confirm?

Since .NET references objc classes with an Attribute

[BaseType (typeof(NSObject), Name="PrivateSentrySDKOnly")]

You dont actually need to import a header explicit, is this correct?

brustolin commented 2 years ago

@marandaneto Is Cordova SDK dead? It is really outdated, it uses a Sentry cocoa version that didn't even have the PrivateSentrySDKOnly yet.

marandaneto commented 2 years ago

@marandaneto Is Cordova SDK dead? It is really outdated, it uses a Sentry cocoa version that didn't even have the PrivateSentrySDKOnly yet.

IDK the state of Cordova, maybe @kahest

kahest commented 2 years ago

We'll look into that, we should have the numbers. Also @brustolin can we close https://github.com/getsentry/sentry-cordova/issues/291 then?

brustolin commented 2 years ago

We'll look into that, we should have the numbers. Also @brustolin can we close getsentry/sentry-cordova#291 then?

Yes. When we update Cordova, we do it with this in mind.

mattjohnsonpint commented 2 years ago

You dont actually need to import a header explicit, is this correct?

Correct. The headers were only used when we generated the bindings initially. We should be fine, as long as the definitions don't change. If they do, then we can update manually.

brustolin commented 2 years ago

Migration complete!!