-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
fix: Throw an error if the SDK isn't init in 5 seconds #73
Conversation
Codecov Report
@@ Coverage Diff @@
## main #73 +/- ##
==========================================
- Coverage 90.63% 90.55% -0.09%
==========================================
Files 169 169
Lines 15072 15085 +13
==========================================
- Hits 13661 13660 -1
- Misses 1411 1425 +14
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
@@ -203,7 +203,8 @@ | |||
} | |||
|
|||
// swiftlint:disable:next cyclomatic_complexity | |||
internal static func getHeaders(options: API.Options) async -> [String: String] { | |||
internal static func getHeaders(options: API.Options) async throws -> [String: String] { |
Check warning
Code scanning / Tailor (reported by Codacy)
Function should have at least one blank line after it
An example application that demonstrates how to convert from the Objective-C SDK to the Swift SDK can be found at [ParseMigrateKeychain](https://github.com/netreconlab/ParseMigrateKeychain). Specifically, look at [ContentViewModel.swift](https://github.com/netreconlab/ParseMigrateKeychain/blob/main/ParseMigrateKeychain/ContentViewModel.swift) for code examples. The basic steps are below: | ||
1. See the [discussion](https://github.com/netreconlab/Parse-Swift/discussions/74) to learn how to migrate from Parse-Swift<sup>OG</sup> 4.15.0+ to 5.1.1+ | ||
1. See the [discussion](https://github.com/netreconlab/Parse-Swift/discussions/70) to learn how to migrate from the [Parse-Swift](https://github.com/parse-community/Parse-Swift) | ||
1. See the [discussion](https://github.com/netreconlab/Parse-Swift/discussions/71) to learn how to migrate from the [Parse-SDK-iOS-OSX](https://github.com/parse-community/Parse-SDK-iOS-OSX) |
Check notice
Code scanning / Remark-lint (reported by Codacy)
Warn when the list item marker values of ordered lists violate a given
|
||
An example application that demonstrates how to convert from the Objective-C SDK to the Swift SDK can be found at [ParseMigrateKeychain](https://github.com/netreconlab/ParseMigrateKeychain). Specifically, look at [ContentViewModel.swift](https://github.com/netreconlab/ParseMigrateKeychain/blob/main/ParseMigrateKeychain/ContentViewModel.swift) for code examples. The basic steps are below: | ||
1. See the [discussion](https://github.com/netreconlab/Parse-Swift/discussions/74) to learn how to migrate from Parse-Swift<sup>OG</sup> 4.15.0+ to 5.1.1+ | ||
1. See the [discussion](https://github.com/netreconlab/Parse-Swift/discussions/70) to learn how to migrate from the [Parse-Swift](https://github.com/parse-community/Parse-Swift) |
Check notice
Code scanning / Remark-lint (reported by Codacy)
Warn when the list item marker values of ordered lists violate a given
New Pull Request Checklist
Issue Description
If the developer starts using the Swift SDK, but never never initializes it, running tasks can run in an infinite loop.
Approach
Throw an error if a task is started an runs for 5 seconds when the Swift SDK is never initialized.
TODOs before merging