Skip to content

Objective-C API improvements #219

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

Merged
merged 15 commits into from
Apr 25, 2023
Merged

Objective-C API improvements #219

merged 15 commits into from
Apr 25, 2023

Conversation

bsneed
Copy link
Contributor

@bsneed bsneed commented Apr 24, 2023

  • Make it such that ObjC can create / use enrichment plugins.
  • Make Swift->ObjC mapping more 1 to 1.
  • Documentation for SEGConfiguration and Configuration.
  • Simplify event modification on the ObjC side.
  • Add necessary tests; update existing.

@@ -13,6 +13,9 @@ import Foundation
public class ObjCConfiguration: NSObject {
internal var configuration: Configuration

/// Sets a reference to your application. This can be useful in instances
/// where referring back to your application is necessary, such as within plugins
/// or async code. The default value is `nil`.
@objc
public var application: Any? {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any chance this should be a WEAK reference?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, good call.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, not necessary. it's a pass through and is already held weak.

case let e as GroupEvent:
return ObjCGroupEvent(event: e)
case let e as AliasEvent:
return ObjCAliasEvent(event: e)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a page event that could go here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not yet.

@bsneed bsneed merged commit 6eb8192 into main Apr 25, 2023
@bsneed bsneed deleted the bsneed/objc_2 branch April 25, 2023 21:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants