-
Notifications
You must be signed in to change notification settings - Fork 223
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
Make SDK API more Swift-friendly #2201
Conversation
* Changes in core module headers * Make properties of class * Make property out of enabled; Add swift class name * Change logLevel to property * Rearrange methods (to keep properties together) * Fix format * Add swift-friendly names * Add property for logUrl * Address PR feedbacks * Add swift-friendly overloads * Change swift signatures * Convert the sets methods to properties. * Reverted setCustomProperties changes * Remove setters definition from properties Co-authored-by: Anastasia Kubova <v-ankubo@microsoft.com> Co-authored-by: Dima <v-dmkira@microsoft.com>
* Swiftify class names in Distribute module * Swiftify methods in Distribute module * Swiftify some properties * [Distribute] Convert public setters to properties * Remove redundant NS_SWIFT_NAME * Addressed PR notes Co-authored-by: Ivan Matkov <v-ivmatk@microsoft.com>
* Changes in core module headers * Make properties of class * Make property out of enabled; Add swift class name * Change logLevel to property * Rearrange methods (to keep properties together) * Fix format * Add swift-friendly names * Add property for logUrl * Add swifty names to Crashes module * Address PR feedbacks * Add swift-friendly overloads * Add missing changes * Resolve feedbacks * Formatting the property * Fix naming * Resolve feedbacks * Fix test Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com>
* Changes in core module headers * Make properties of class * Make property out of enabled; Add swift class name * Change logLevel to property * Rearrange methods (to keep properties together) * Fix format * Add swift-friendly names * Swiftify Analytics module * Swiftify setters in Analytics * Remove setters definition from properties Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com> Co-authored-by: Anastasia Kubova <v-ankubo@microsoft.com>
Co-authored-by: Ivan Matkov <v-ivmatk@microsoft.com>
* Update iOS apps Co-authored-by: Anastasia Kubova <v-ankubo@microsoft.com> Co-authored-by: Dmitriy Kirakosyan <v-dmkira@microsoft.com> Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com> * Update macOS apps Co-authored-by: Anastasia Kubova <v-ankubo@microsoft.com> Co-authored-by: Dmitriy Kirakosyan <v-dmkira@microsoft.com> Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com> * Update tvOS apps Co-authored-by: Anastasia Kubova <v-ankubo@microsoft.com> Co-authored-by: Dmitriy Kirakosyan <v-dmkira@microsoft.com> Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com> * Update comments in test apps * Update some used API for core and crashes modules Co-authored-by: Dmitriy Kirakosyan <v-dmkira@microsoft.com> Co-authored-by: Dmitrii Chichuk <v-dmchic@microsoft.com>
This comment has been minimized.
This comment has been minimized.
AppCenter/AppCenter/Internals/Context/Device/MSACDeviceTracker.h
Outdated
Show resolved
Hide resolved
# Conflicts: # Sasquatch/SasquatchSwift/AppCenterDelegateSwift.swift # Sasquatch/SasquatchSwift/AppDelegate.swift # SasquatchMac/SasquatchMacSwift/AppCenterDelegateSwift.swift # SasquatchMac/SasquatchMacSwift/AppDelegate.swift
e9fa4bc
to
3d1db5f
Compare
* Fixed property typo and removed redundant setter * Added getCrashHandlerSetupDelegate back and marked deprecated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming is not easy thanks for looking at this :). I'll take another look couldn't get to the end.
AppCenter/AppCenter/Internals/Context/Device/MSACDeviceTracker.m
Outdated
Show resolved
Hide resolved
AppCenter/AppCenter/Internals/Context/Device/MSACDeviceTracker.m
Outdated
Show resolved
Hide resolved
AppCenter/AppCenter/Internals/Ingestion/MSACIngestionProtocol.h
Outdated
Show resolved
Hide resolved
Co-authored-by: Clement Polet <clpolet@microsoft.com>
Regarding the delegates, I think swift api already looks fine. Eg:
Resolves to swift as
Here is the place in swift code https://github.com/microsoft/appcenter-sdk-apple/blob/develop/Sasquatch/SasquatchSwift/AppDelegate.swift#L217 Do you think there still should be some additional swiftify changes applied? |
Sasquatch/SasquatchSwift-Extension/ExtensionViewController.swift
Outdated
Show resolved
Hide resolved
This one should be fine but have you checked them all? I saw one yesterday that explicitly labeled |
Co-authored-by: Ivan Matkov <v-ivmatk@microsoft.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One thing, probably the last :). error
or withError
somehow is always explicitly labeled (e.g. NSApplicationdelegate, NSURLSessionDelegate)
Reverted the previous state for these methods, coz swift default conversion did it correctly. The only method that didn't translate automatically was Also removed warning in sasquatch apps. And converted MSACLogHandler and MSACLogMessageProvider to the short versions for swift. |
|
||
NS_ASSUME_NONNULL_END | ||
|
||
@end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move before NS_ASSUME_NONNULL_END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Things to consider before you submit the PR:
CHANGELOG.md
been updated?[ ] Did you add unit tests?[ ] Did you check UI tests on the sample app? They are not executed on CI.Description
Updates SDK Swift API to make it more swifty.
NOTE: I's a breaking change!
Related PRs or issues
AB#83267