Skip to content

Commit

Permalink
💥 Remove the properties parameter from anonymous function
Browse files Browse the repository at this point in the history
  • Loading branch information
iujames authored and mmaatttt committed Apr 11, 2023
1 parent 0e06c58 commit bab9caf
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
11 changes: 9 additions & 2 deletions Sources/AppcuesKit/Appcues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,15 @@ public class Appcues: NSObject {
/// the `identify` call. This will cause the SDK to begin tracking activity and checking for
/// qualified content.
@objc
public func anonymous(properties: [String: Any]? = nil) {
identify(isAnonymous: true, userID: "anon:\(config.anonymousIDFactory())", properties: properties)
public func anonymous() {
identify(isAnonymous: true, userID: "anon:\(config.anonymousIDFactory())", properties: nil)
}

/// This function has been removed. Calling the anonymous function with a properties parameter
/// is no longer supported. A call to `anonymous()` with no parameters should be used instead.
@available(*, unavailable, message: "properties are no longer supported for anonymous users.")
public func anonymous(properties: [String: Any]?) {
// removed
}

/// Clears out the current user in this session. Can be used when the user logs out of your application.
Expand Down
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/AppcuesKit.docc/Debugging.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ If an experience fails to show, the debugger will note it with "Content Omitted"

The Recent Events section of the debugger shows the list of all events that have passed through the Appcues SDK, with the most recent events at the top of the list. The list of events can be filtered by type by selecting the Filter icon in the header row and selecting an event type.

Session and Experience events are automatically tracked by the SDK. Screen (``Appcues/screen(title:properties:)`` or ``Appcues/trackScreens()``), Custom (``Appcues/track(name:properties:)``), User Profile (``Appcues/identify(userID:properties:)`` or ``Appcues/anonymous(properties:)``), and Group (``Appcues/group(groupID:properties:)``) events are tracked by your app calling the Appcues SDK.
Session and Experience events are automatically tracked by the SDK. Screen (``Appcues/screen(title:properties:)`` or ``Appcues/trackScreens()``), Custom (``Appcues/track(name:properties:)``), User Profile (``Appcues/identify(userID:properties:)`` or ``Appcues/anonymous()``), and Group (``Appcues/group(groupID:properties:)``) events are tracked by your app calling the Appcues SDK.

Tap an event row to see the details of that event including all the properties associated with it.
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/AppcuesKit.docc/Extensions/Appcues.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

- <doc:Identifying>
- ``Appcues/identify(userID:properties:)``
- ``Appcues/anonymous(properties:)``
- ``Appcues/anonymous()``
- ``Appcues/group(groupID:properties:)``
- ``Appcues/reset()``

Expand Down
2 changes: 1 addition & 1 deletion Sources/AppcuesKit/AppcuesKit.docc/Identifying.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ This signature will be used in an Authorization header on network requests from

## Identifying Anonymous Users

``Appcues/anonymous(properties:)``
``Appcues/anonymous()``

The format of anonymous IDs can customized with ``Appcues/Config/anonymousIDFactory(_:)``. Anonymous IDs will always be prefixed with `anon:` by the SDK.

0 comments on commit bab9caf

Please sign in to comment.