Skip to content

Commit 6f60c90

Browse files
authored
Add convenience access to the writekey in use. (#303)
1 parent 813b657 commit 6f60c90

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Sources/Segment/Analytics.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,11 @@ extension Analytics {
141141
}
142142
}
143143

144+
/// Returns the writekey in use for this instance.
145+
public var writeKey: String {
146+
return configuration.values.writeKey
147+
}
148+
144149
/// Returns the anonymousId currently in use.
145150
public var anonymousId: String {
146151
if let userInfo: UserInfo = store.currentState() {

0 commit comments

Comments
 (0)