Closed Jeehut closed 4 months ago
Please note that I found a for
parameter and also a floatValue
parameter on the send
function. I renamed for
to customUserID
to be consistent with the configurations defaultUserIdentifier
(which could be renamed to defaultUserID
in the future). The floatValue
didn't change. But I found that the order was like this:
It's more common to place parameters used more often at the front though and ones that are usually skipped to fall back to the default values at the end. So I changed the order as follows (basically switched 2 and 4):
To still provide fix-its for most cases, I added a copy of the function which only takes the Signal Name and Parameters and made sure it's favored over the function with more parameters if only 2 are provided. Otherwise, Xcode is unable to apply fix-its when the order of parameters change, but I think fix-its can be really useful to save time in migration.
I just updated this with a few bug fixes from my full setup testing. Biggest change is the addition of a new TelemetryDeck
target which was needed so import TelemetryDeck
works. I basically added an empty target which just imports the stuff from TelemetryClient
so existing users with already-written code don’t get affected and everything continues to work.
Seems like the linter is failing but from the error message it's not something introduced in this PR
@winsmith I think it's related to the upgrade to Swift 5.9 to properly support the visionOS platform in the Package manifest. That requires Xcode 15, and the CI has Xcode 14.
@winsmith I just adjusted the CI configuration and fixed all tests and more. Here's all I did:
--strict
option with an Ubuntu-based one that does have the --strict
option, so warnings lead to fails of the CI (what's the point of the lint step if warnings are ignored?)TelemetryClient-Package
as the auto-generated TelemetryClient
scheme does not have a test target (anymore)Please take another look.
This is a follow-up on #149 with the branch renamed to
grand-rename
and the decisions from https://github.com/TelemetryDeck/docs/pull/85 applied. This includes the changes from #149:In addition, I have renamed
TelemetryManager.send("A", with: ["a": "b"])
toTelemetryDeck.signal("A", parameters: ["a": "b"])
as well asTelemetryManager.initialize
toTelemetryDeck.initialize
as per https://github.com/TelemetryDeck/docs/pull/85#discussion_r1589092178.