mirror of
https://github.com/mixpanel/mixpanel-swift
synced 2026-04-21 21:47:33 +00:00
2312 lines
114 KiB
HTML
2312 lines
114 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<title>MixpanelInstance Class Reference</title>
|
|
<link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
|
|
<link rel="stylesheet" type="text/css" href="../css/highlight.css" />
|
|
<meta charset='utf-8'>
|
|
<script src="../js/jquery.min.js" defer></script>
|
|
<script src="../js/jazzy.js" defer></script>
|
|
|
|
</head>
|
|
<body>
|
|
<a name="//apple_ref/swift/Class/MixpanelInstance" class="dashAnchor"></a>
|
|
<a title="MixpanelInstance Class Reference"></a>
|
|
<header>
|
|
<div class="content-wrapper">
|
|
<p><a href="../index.html">Mixpanel 2.6.9 Docs</a> (91% documented)</p>
|
|
<p class="header-right"><a href="https://github.com/mixpanel/mixpanel-swift"><img src="../img/gh.png"/>View on GitHub</a></p>
|
|
</div>
|
|
</header>
|
|
<div class="content-wrapper">
|
|
<p id="breadcrumbs">
|
|
<a href="../index.html">Mixpanel Reference</a>
|
|
<img id="carat" src="../img/carat.png" />
|
|
MixpanelInstance Class Reference
|
|
</p>
|
|
</div>
|
|
<div class="content-wrapper">
|
|
<nav class="sidebar">
|
|
<ul class="nav-groups">
|
|
<li class="nav-group-name">
|
|
<a href="../Classes.html">Classes</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/Group.html">Group</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/Mixpanel.html">Mixpanel</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/MixpanelInstance.html">MixpanelInstance</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes/People.html">People</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Classes.html#/s:8Mixpanel10TweakStoreC">TweakStore</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Enums.html">Enumerations</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Enums/TweakViewDataType.html">TweakViewDataType</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Extensions.html">Extensions</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Array.html">Array</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Bool.html">Bool</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/CGFloat.html">CGFloat</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Date.html">Date</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Dictionary.html">Dictionary</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Double.html">Double</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Float.html">Float</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/Int.html">Int</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/NSNull.html">NSNull</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/String.html">String</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/UIColor.html">UIColor</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/UInt.html">UInt</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Extensions/URL.html">URL</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Functions.html">Functions</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Functions.html#/s:8Mixpanel2eeoiySbAA5TweakVyxG_AEtAA13TweakableTypeRzlF">==(_:_:)</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Functions.html#/s:8Mixpanel2eeoiySbAA8AnyTweakV_ADtF">==(_:_:)</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Protocols.html">Protocols</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/MixpanelDelegate.html">MixpanelDelegate</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/MixpanelType.html">MixpanelType</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/TweakClusterType.html">TweakClusterType</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/TweakLibraryType.html">TweakLibraryType</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Protocols/TweakableType.html">TweakableType</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Structs.html">Structures</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Structs/AnyTweak.html">AnyTweak</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Structs/MixpanelTweaks.html">MixpanelTweaks</a>
|
|
</li>
|
|
<li class="nav-group-task">
|
|
<a href="../Structs/Tweak.html">Tweak</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
<li class="nav-group-name">
|
|
<a href="../Typealiases.html">Type Aliases</a>
|
|
<ul class="nav-group-tasks">
|
|
<li class="nav-group-task">
|
|
<a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<article class="main-content">
|
|
<section>
|
|
<section class="section">
|
|
<h1>MixpanelInstance</h1>
|
|
<div class="declaration">
|
|
<div class="language">
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">MixpanelInstance</span> <span class="p">:</span> <span class="kt">CustomDebugStringConvertible</span><span class="p">,</span> <span class="kt">FlushDelegate</span><span class="p">,</span> <span class="kt">AEDelegate</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<p>The class that represents the Mixpanel Instance</p>
|
|
|
|
</section>
|
|
<section class="section task-group-section">
|
|
<div class="task-group">
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8delegateAA0A8Delegate_pSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/delegate" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8delegateAA0A8Delegate_pSgvp">delegate</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The a MixpanelDelegate object that gives control over Mixpanel network activity.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelDelegate.html">MixpanelDelegate</a></span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC10distinctIdSSvp"></a>
|
|
<a name="//apple_ref/swift/Property/distinctId" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC10distinctIdSSvp">distinctId</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>distinctId string that uniquely identifies the current user.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">distinctId</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC11anonymousIdSSSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/anonymousId" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC11anonymousIdSSSgvp">anonymousId</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>anonymousId string that uniquely identifies the device.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">anonymousId</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC6userIdSSSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/userId" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC6userIdSSSgvp">userId</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>userId string that identify is called with.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">userId</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC22hadPersistedDistinctIdSbSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/hadPersistedDistinctId" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC22hadPersistedDistinctIdSbSgvp">hadPersistedDistinctId</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>hadPersistedDistinctId is a boolean value which specifies that the stored distinct_id
|
|
already exists in persistence</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">hadPersistedDistinctId</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC5aliasSSSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/alias" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC5aliasSSSgvp">alias</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>alias string that uniquely identifies the current user.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">alias</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC6peopleAA6PeopleCSgvp"></a>
|
|
<a name="//apple_ref/swift/Property/people" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC6peopleAA6PeopleCSgvp">people</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Accessor to the Mixpanel People API object.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">people</span><span class="p">:</span> <span class="kt"><a href="../Classes/People.html">People</a></span><span class="o">!</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC28showNetworkActivityIndicatorSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/showNetworkActivityIndicator" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC28showNetworkActivityIndicatorSbvp">showNetworkActivityIndicator</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to show spinning network activity indicator when flushing
|
|
data to the Mixpanel servers. Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">showNetworkActivityIndicator</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC13flushIntervalSdvp"></a>
|
|
<a name="//apple_ref/swift/Property/flushInterval" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC13flushIntervalSdvp">flushInterval</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Flush timer’s interval.
|
|
Setting a flush interval of 0 will turn off the flush timer.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">flushInterval</span><span class="p">:</span> <span class="kt">Double</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC17flushOnBackgroundSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/flushOnBackground" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC17flushOnBackgroundSbvp">flushOnBackground</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Control whether the library should flush data to Mixpanel when the app
|
|
enters the background. Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">flushOnBackground</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC26useIPAddressForGeoLocationSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/useIPAddressForGeoLocation" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC26useIPAddressForGeoLocationSbvp">useIPAddressForGeoLocation</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to automatically send the client IP Address as part of
|
|
event tracking. With an IP address, the Mixpanel Dashboard will show you the users’ city.
|
|
Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">useIPAddressForGeoLocation</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC9serverURLSSvp"></a>
|
|
<a name="//apple_ref/swift/Property/serverURL" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC9serverURLSSvp">serverURL</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The base URL used for Mixpanel API requests.
|
|
Useful if you need to proxy Mixpanel requests. Defaults to
|
|
<a href="https://api.mixpanel.com">https://api.mixpanel.com</a>.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">serverURL</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:s28CustomDebugStringConvertibleP16debugDescriptionSSvp"></a>
|
|
<a name="//apple_ref/swift/Property/debugDescription" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:s28CustomDebugStringConvertibleP16debugDescriptionSSvp">debugDescription</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">debugDescription</span><span class="p">:</span> <span class="kt">String</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC14loggingEnabledSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/loggingEnabled" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC14loggingEnabledSbvp">loggingEnabled</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>This allows enabling or disabling of all Mixpanel logs at run time.</p>
|
|
<div class="aside aside-note">
|
|
<p class="aside-title">Note</p>
|
|
All logging is disabled by default. Usually, this is only required
|
|
if you are running in to issues with the SDK and you need support.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">loggingEnabled</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC4nameSSvp"></a>
|
|
<a name="//apple_ref/swift/Property/name" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC4nameSSvp">name</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>A unique identifier for this MixpanelInstance</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">public</span> <span class="k">let</span> <span class="nv">name</span><span class="p">:</span> <span class="kt">String</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC29enableVisualEditorForCodelessSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/enableVisualEditorForCodeless" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC29enableVisualEditorForCodelessSbvp">enableVisualEditorForCodeless</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to enable the visual editor for codeless on mixpanel.com
|
|
You will be unable to edit codeless events with this disabled, however previously
|
|
created codeless events will still be delivered.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">enableVisualEditorForCodeless</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC24checkForVariantsOnActiveSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/checkForVariantsOnActive" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC24checkForVariantsOnActiveSbvp">checkForVariantsOnActive</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to automatically check for A/B test variants for the
|
|
currently identified user when the application becomes active.
|
|
Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">checkForVariantsOnActive</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC28checkForNotificationOnActiveSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/checkForNotificationOnActive" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC28checkForNotificationOnActiveSbvp">checkForNotificationOnActive</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to automatically check for notifications for the
|
|
currently identified user when the application becomes active.
|
|
Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">checkForNotificationOnActive</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC24showNotificationOnActiveSbvp"></a>
|
|
<a name="//apple_ref/swift/Property/showNotificationOnActive" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC24showNotificationOnActiveSbvp">showNotificationOnActive</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Controls whether to automatically check for and show in-app notifications
|
|
for the currently identified user when the application becomes active.
|
|
Defaults to true.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">showNotificationOnActive</span><span class="p">:</span> <span class="kt">Bool</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC32miniNotificationPresentationTimeSdvp"></a>
|
|
<a name="//apple_ref/swift/Property/miniNotificationPresentationTime" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC32miniNotificationPresentationTimeSdvp">miniNotificationPresentationTime</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Determines the time, in seconds, that a mini notification will remain on
|
|
the screen before automatically hiding itself.
|
|
Defaults to 6 (seconds).</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">miniNotificationPresentationTime</span><span class="p">:</span> <span class="kt">Double</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC22minimumSessionDurations6UInt64Vvp"></a>
|
|
<a name="//apple_ref/swift/Property/minimumSessionDuration" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC22minimumSessionDurations6UInt64Vvp">minimumSessionDuration</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The minimum session duration (ms) that is tracked in automatic events.
|
|
The default value is 10000 (10 seconds).</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">minimumSessionDuration</span><span class="p">:</span> <span class="kt">UInt64</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC22maximumSessionDurations6UInt64Vvp"></a>
|
|
<a name="//apple_ref/swift/Property/maximumSessionDuration" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC22maximumSessionDurations6UInt64Vvp">maximumSessionDuration</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>The maximum session duration (ms) that is tracked in automatic events.
|
|
The default value is UINT64_MAX (no maximum session duration).</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="k">var</span> <span class="nv">maximumSessionDuration</span><span class="p">:</span> <span class="kt">UInt64</span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/Identity"></a>
|
|
<a name="//apple_ref/swift/Section/Identity" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/Identity"></a>
|
|
<h3 class="section-name"><p>Identity</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8identify10distinctId9usePeopleySS_SbtF"></a>
|
|
<a name="//apple_ref/swift/Method/identify(distinctId:usePeople:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8identify10distinctId9usePeopleySS_SbtF">identify(distinctId:usePeople:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Sets the distinct ID of the current user.</p>
|
|
|
|
<p>Mixpanel will choose a default distinct ID based on whether you are using the
|
|
AdSupport.framework or not.</p>
|
|
|
|
<p>If you are not using the AdSupport Framework (iAds), then we use the IFV String
|
|
(<code>UIDevice.current().identifierForVendor</code>) as the default distinct ID. This ID will
|
|
identify a user across all apps by the same vendor, but cannot be used to link the same
|
|
user across apps from different vendors. If we are unable to get the IFV, we will fall
|
|
back to generating a random persistent UUID</p>
|
|
|
|
<p>If you are showing iAds in your application, you are allowed use the iOS ID
|
|
for Advertising (IFA) to identify users. If you have this framework in your
|
|
app, Mixpanel will use the IFA as the default distinct ID. If you have
|
|
AdSupport installed but still don’t want to use the IFA, you can define the
|
|
<code>MIXPANEL_NO_IFA</code> flag in your <code>Active Compilation Conditions</code>
|
|
build settings, and Mixpanel will use the IFV as the default distinct ID.</p>
|
|
|
|
<p>If we are unable to get an IFA or IFV, we will fall back to generating a
|
|
random persistent UUID. If you want to always use a random persistent UUID
|
|
you can define the <code>MIXPANEL_RANDOM_DISTINCT_ID</code> preprocessor flag
|
|
in your build settings.</p>
|
|
|
|
<p>For tracking events, you do not need to call <code>identify:</code> if you
|
|
want to use the default. However,
|
|
<strong>Mixpanel People always requires an explicit call to <code>identify:</code>.</strong>
|
|
If calls are made to
|
|
<code>set:</code>, <code>increment</code> or other <code><a href="../Classes/People.html">People</a></code>
|
|
methods prior to calling <code>identify:</code>, then they are queued up and
|
|
flushed once <code>identify:</code> is called.</p>
|
|
|
|
<p>If you’d like to use the default distinct ID for Mixpanel People as well
|
|
(recommended), call <code>identify:</code> using the current distinct ID:
|
|
<code>mixpanelInstance.identify(mixpanelInstance.distinctId)</code>.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">identify</span><span class="p">(</span><span class="nv">distinctId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">usePeople</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>distinctId</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>string that uniquely identifies the current user</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>usePeople</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>boolean that controls whether or not to set the people distinctId to the event distinctId.
|
|
This should only be set to false if you wish to prevent people profile updates for that user.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC11createAlias_10distinctId9usePeopleySS_SSSbtF"></a>
|
|
<a name="//apple_ref/swift/Method/createAlias(_:distinctId:usePeople:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC11createAlias_10distinctId9usePeopleySS_SSSbtF">createAlias(_:distinctId:usePeople:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Creates a distinctId alias from alias to the current id.</p>
|
|
|
|
<p>This method is used to map an identifier called an alias to the existing Mixpanel
|
|
distinct id. This causes all events and people requests sent with the alias to be
|
|
mapped back to the original distinct id. The recommended usage pattern is to call
|
|
createAlias: and then identify: (with their new user ID)
|
|
when they log in the next time. This will keep your signup funnels working
|
|
correctly.
|
|
This makes the current id and ‘Alias’ interchangeable distinct ids.
|
|
Mixpanel.
|
|
mixpanelInstance.createAlias(“Alias”, mixpanelInstance.distinctId)</p>
|
|
<div class="aside aside-precondition">
|
|
<p class="aside-title">Precondition</p>
|
|
<p>You must call identify if you haven’t already
|
|
(e.g. when your app launches)</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">createAlias</span><span class="p">(</span><span class="n">_</span> <span class="nv">alias</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">distinctId</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">usePeople</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">true</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>alias</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>the new distinct id that should represent the original</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>distinctId</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>the old distinct id that alias will be mapped to</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>usePeople</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>boolean that controls whether or not to set the people distinctId to the event distinctId.
|
|
This should only be set to false if you wish to prevent people profile updates for that user.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC5resetyyF"></a>
|
|
<a name="//apple_ref/swift/Method/reset()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC5resetyyF">reset()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Clears all stored properties including the distinct Id.
|
|
Useful if your app’s user logs out.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">reset</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/Persistence"></a>
|
|
<a name="//apple_ref/swift/Section/Persistence" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/Persistence"></a>
|
|
<h3 class="section-name"><p>Persistence</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC7archiveyyF"></a>
|
|
<a name="//apple_ref/swift/Method/archive()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC7archiveyyF">archive()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Writes current project info including the distinct Id, super properties,
|
|
and pending event and People record queues to disk.</p>
|
|
|
|
<p>This state will be recovered when the app is launched again if the Mixpanel
|
|
library is initialized with the same project token.
|
|
The library listens for app state changes and handles
|
|
persisting data as needed.</p>
|
|
<div class="aside aside-important">
|
|
<p class="aside-title">Important</p>
|
|
You do not need to call this method.**
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">archive</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/"></a>
|
|
<a name="//apple_ref/swift/Method/archive()" class="dashAnchor"></a>
|
|
<a class="token" href="#/">archive()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Writes current project info including the distinct Id, super properties,
|
|
and pending event and People record queues to disk.</p>
|
|
|
|
<p>This state will be recovered when the app is launched again if the Mixpanel
|
|
library is initialized with the same project token.
|
|
The library listens for app state changes and handles
|
|
persisting data as needed.</p>
|
|
<div class="aside aside-important">
|
|
<p class="aside-title">Important</p>
|
|
You do not need to call this method.**
|
|
|
|
</div>
|
|
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/Flush"></a>
|
|
<a name="//apple_ref/swift/Section/Flush" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/Flush"></a>
|
|
<h3 class="section-name"><p>Flush</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC5flush10completionyyycSg_tF"></a>
|
|
<a name="//apple_ref/swift/Method/flush(completion:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC5flush10completionyyycSg_tF">flush(completion:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Uploads queued data to the Mixpanel server.</p>
|
|
|
|
<p>By default, queued data is flushed to the Mixpanel servers every minute (the
|
|
default for <code><a href="../Classes/MixpanelInstance.html#/s:8Mixpanel0A8InstanceC13flushIntervalSdvp">flushInterval</a></code>), and on background (since
|
|
<code><a href="../Classes/MixpanelInstance.html#/s:8Mixpanel0A8InstanceC17flushOnBackgroundSbvp">flushOnBackground</a></code> is on by default). You only need to call this
|
|
method manually if you want to force a flush at a particular moment.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">flush</span><span class="p">(</span><span class="nv">completion</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>completion</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>an optional completion handler for when the flush has completed.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/Track"></a>
|
|
<a name="//apple_ref/swift/Section/Track" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/Track"></a>
|
|
<h3 class="section-name"><p>Track</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC5track5event10propertiesySSSg_SDySSAA0A4Type_pGSgtF"></a>
|
|
<a name="//apple_ref/swift/Method/track(event:properties:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC5track5event10propertiesySSSg_SDySSAA0A4Type_pGSgtF">track(event:properties:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Tracks an event with properties.
|
|
Properties are optional and can be added only if needed.</p>
|
|
|
|
<p>Properties will allow you to segment your events in your Mixpanel reports.
|
|
Property keys must be String objects and the supported value types need to conform to MixpanelType.
|
|
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
|
|
If the event is being timed, the timer will stop and be added as a property.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">track</span><span class="p">(</span><span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>event</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>event name</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>properties</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>properties dictionary</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC15trackWithGroups5event10properties6groupsySSSg_SDySSAA0A4Type_pGSgAKtF"></a>
|
|
<a name="//apple_ref/swift/Method/trackWithGroups(event:properties:groups:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC15trackWithGroups5event10properties6groupsySSSg_SDySSAA0A4Type_pGSgAKtF">trackWithGroups(event:properties:groups:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Tracks an event with properties and to specific groups.
|
|
Properties and groups are optional and can be added only if needed.</p>
|
|
|
|
<p>Properties will allow you to segment your events in your Mixpanel reports.
|
|
Property and group keys must be String objects and the supported value types need to conform to MixpanelType.
|
|
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.
|
|
If the event is being timed, the timer will stop and be added as a property.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">trackWithGroups</span><span class="p">(</span><span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">?,</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">groups</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">?)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>event</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>event name</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>properties</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>properties dictionary</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groups</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>groups dictionary</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8getGroup8groupKey0E2IDAA0D0CSS_AA0A4Type_ptF"></a>
|
|
<a name="//apple_ref/swift/Method/getGroup(groupKey:groupID:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8getGroup8groupKey0E2IDAA0D0CSS_AA0A4Type_ptF">getGroup(groupKey:groupID:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Undocumented</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">getGroup</span><span class="p">(</span><span class="nv">groupKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">groupID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span> <span class="o">-></span> <span class="kt"><a href="../Classes/Group.html">Group</a></span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC4time5eventySS_tF"></a>
|
|
<a name="//apple_ref/swift/Method/time(event:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC4time5eventySS_tF">time(event:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Starts a timer that will be stopped and added as a property when a
|
|
corresponding event is tracked.</p>
|
|
|
|
<p>This method is intended to be used in advance of events that have
|
|
a duration. For example, if a developer were to track an “Image Upload” event
|
|
she might want to also know how long the upload took. Calling this method
|
|
before the upload code would implicitly cause the <code>track</code>
|
|
call to record its duration.</p>
|
|
<div class="aside aside-precondition">
|
|
<p class="aside-title">Precondition</p>
|
|
<p>// begin timing the image upload:
|
|
mixpanelInstance.time(event:“Image Upload”)
|
|
// upload the image:
|
|
self.uploadImageWithSuccessHandler() { _ in
|
|
// track the event
|
|
mixpanelInstance.track(“Image Upload”)
|
|
}</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">time</span><span class="p">(</span><span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>event</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>the event name to be timed</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC16eventElapsedTime0C0SdSS_tF"></a>
|
|
<a name="//apple_ref/swift/Method/eventElapsedTime(event:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC16eventElapsedTime0C0SdSS_tF">eventElapsedTime(event:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Retrieves the time elapsed for the named event since time(event:) was called.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">eventElapsedTime</span><span class="p">(</span><span class="nv">event</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Double</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>event</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>the name of the event to be tracked that was passed to time(event:)</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC16clearTimedEventsyyF"></a>
|
|
<a name="//apple_ref/swift/Method/clearTimedEvents()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC16clearTimedEventsyyF">clearTimedEvents()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Clears all current event timers.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">clearTimedEvents</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC22currentSuperPropertiesSDySSypGyF"></a>
|
|
<a name="//apple_ref/swift/Method/currentSuperProperties()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC22currentSuperPropertiesSDySSypGyF">currentSuperProperties()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Returns the currently set super properties.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">currentSuperProperties</span><span class="p">()</span> <span class="o">-></span> <span class="p">[</span><span class="kt">String</span> <span class="p">:</span> <span class="kt">Any</span><span class="p">]</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p>the current super properties</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC20clearSuperPropertiesyyF"></a>
|
|
<a name="//apple_ref/swift/Method/clearSuperProperties()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC20clearSuperPropertiesyyF">clearSuperProperties()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Clears all currently set super properties.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">clearSuperProperties</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC23registerSuperPropertiesyySDySSAA0A4Type_pGF"></a>
|
|
<a name="//apple_ref/swift/Method/registerSuperProperties(_:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC23registerSuperPropertiesyySDySSAA0A4Type_pGF">registerSuperProperties(_:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Registers super properties, overwriting ones that have already been set.</p>
|
|
|
|
<p>Super properties, once registered, are automatically sent as properties for
|
|
all event tracking calls. They save you having to maintain and add a common
|
|
set of properties to your events.
|
|
Property keys must be String objects and the supported value types need to conform to MixpanelType.
|
|
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">registerSuperProperties</span><span class="p">(</span><span class="n">_</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>properties</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>properties dictionary</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC27registerSuperPropertiesOnce_12defaultValueySDySSAA0A4Type_pG_AaF_pSgtF"></a>
|
|
<a name="//apple_ref/swift/Method/registerSuperPropertiesOnce(_:defaultValue:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC27registerSuperPropertiesOnce_12defaultValueySDySSAA0A4Type_pG_AaF_pSgtF">registerSuperPropertiesOnce(_:defaultValue:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Registers super properties without overwriting ones that have already been set,
|
|
unless the existing value is equal to defaultValue. defaultValue is optional.</p>
|
|
|
|
<p>Property keys must be String objects and the supported value types need to conform to MixpanelType.
|
|
MixpanelType can be either String, Int, UInt, Double, Float, Bool, [MixpanelType], [String: MixpanelType], Date, URL, or NSNull.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">registerSuperPropertiesOnce</span><span class="p">(</span><span class="n">_</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">,</span>
|
|
<span class="n">defaultValue</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>properties</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>properties dictionary</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>defaultValue</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>Optional. overwrite existing properties that have this value</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC23unregisterSuperPropertyyySSF"></a>
|
|
<a name="//apple_ref/swift/Method/unregisterSuperProperty(_:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC23unregisterSuperPropertyyySSF">unregisterSuperProperty(_:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Removes a previously registered super property.</p>
|
|
|
|
<p>As an alternative to clearing all properties, unregistering specific super
|
|
properties prevents them from being recorded on future events. This operation
|
|
does not affect the value of other super properties. Any property name that is
|
|
not registered is ignored.
|
|
Note that after removing a super property, events will show the attribute as
|
|
having the value <code>undefined</code> in Mixpanel until a new value is
|
|
registered.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">unregisterSuperProperty</span><span class="p">(</span><span class="n">_</span> <span class="nv">propertyName</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>propertyName</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>array of property name strings to remove</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8setGroup8groupKey0E2IDySS_AA0A4Type_ptF"></a>
|
|
<a name="//apple_ref/swift/Method/setGroup(groupKey:groupID:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8setGroup8groupKey0E2IDySS_AA0A4Type_ptF">setGroup(groupKey:groupID:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Convenience method to set a single group the user belongs to.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">setGroup</span><span class="p">(</span><span class="nv">groupKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">groupID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupKey</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The property name associated with this group type (must already have been set up).</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupID</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The group the user belongs to.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8setGroup8groupKey0E3IDsySS_SayAA0A4Type_pGtF"></a>
|
|
<a name="//apple_ref/swift/Method/setGroup(groupKey:groupIDs:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8setGroup8groupKey0E3IDsySS_SayAA0A4Type_pGtF">setGroup(groupKey:groupIDs:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Set the groups this user belongs to.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">setGroup</span><span class="p">(</span><span class="nv">groupKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">groupIDs</span><span class="p">:</span> <span class="p">[</span><span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">])</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupKey</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The property name associated with this group type (must already have been set up).</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupIDs</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The list of groups the user belongs to.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC8addGroup8groupKey0E2IDySS_AA0A4Type_ptF"></a>
|
|
<a name="//apple_ref/swift/Method/addGroup(groupKey:groupID:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC8addGroup8groupKey0E2IDySS_AA0A4Type_ptF">addGroup(groupKey:groupID:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Add a group to this user’s membership for a particular group key</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">addGroup</span><span class="p">(</span><span class="nv">groupKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">groupID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupKey</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The property name associated with this group type (must already have been set up).</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupID</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The new group the user belongs to.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC11removeGroup8groupKey0E2IDySS_AA0A4Type_ptF"></a>
|
|
<a name="//apple_ref/swift/Method/removeGroup(groupKey:groupID:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC11removeGroup8groupKey0E2IDySS_AA0A4Type_ptF">removeGroup(groupKey:groupID:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Remove a group from this user’s membership for a particular group key</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">removeGroup</span><span class="p">(</span><span class="nv">groupKey</span><span class="p">:</span> <span class="kt">String</span><span class="p">,</span> <span class="nv">groupID</span><span class="p">:</span> <span class="kt"><a href="../Protocols/MixpanelType.html">MixpanelType</a></span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupKey</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The property name associated with this group type (must already have been set up).</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>groupID</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The group value to remove.</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC14optOutTrackingyyF"></a>
|
|
<a name="//apple_ref/swift/Method/optOutTracking()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC14optOutTrackingyyF">optOutTracking()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Opt out tracking.</p>
|
|
|
|
<p>This method is used to opt out tracking. This causes all events and people request no longer
|
|
to be sent back to the Mixpanel server.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">optOutTracking</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC13optInTracking10distinctId10propertiesySSSg_SDySSAA0A4Type_pGSgtF"></a>
|
|
<a name="//apple_ref/swift/Method/optInTracking(distinctId:properties:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC13optInTracking10distinctId10propertiesySSSg_SDySSAA0A4Type_pGSgtF">optInTracking(distinctId:properties:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Opt in tracking.</p>
|
|
|
|
<p>Use this method to opt in an already opted out user from tracking. People updates and track calls will be
|
|
sent to Mixpanel after using this method.</p>
|
|
|
|
<p>This method will internally track an opt in event to your project.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">optInTracking</span><span class="p">(</span><span class="nv">distinctId</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">,</span> <span class="nv">properties</span><span class="p">:</span> <span class="kt"><a href="../Typealiases.html#/s:8Mixpanel10Propertiesa">Properties</a></span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>distintId</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>an optional string to use as the distinct ID for events</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>properties</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>an optional properties dictionary that could be passed to add properties to the opt-in event that is sent to Mixpanel</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC19hasOptedOutTrackingSbyF"></a>
|
|
<a name="//apple_ref/swift/Method/hasOptedOutTracking()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC19hasOptedOutTrackingSbyF">hasOptedOutTracking()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Returns if the current user has opted out tracking.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">hasOptedOutTracking</span><span class="p">()</span> <span class="o">-></span> <span class="kt">Bool</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Return Value</h4>
|
|
<p>the current super opted out tracking status</p>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/A/B%20Testing"></a>
|
|
<a name="//apple_ref/swift/Section/A/B Testing" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/A/B%20Testing"></a>
|
|
<h3 class="section-name"><p>A/B Testing</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC15joinExperiments8callbackyyycSg_tF"></a>
|
|
<a name="//apple_ref/swift/Method/joinExperiments(callback:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC15joinExperiments8callbackyyycSg_tF">joinExperiments(callback:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Join any experiments (A/B tests) that are available for the current user.</p>
|
|
|
|
<p>Mixpanel will check for A/B tests automatically when your app enters
|
|
the foreground. Call this method if you would like to to check for,
|
|
and join, any experiments are newly available for the current user.</p>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">joinExperiments</span><span class="p">(</span><span class="nv">callback</span><span class="p">:</span> <span class="p">(()</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>callback</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>Optional callback for after the experiments have been loaded and applied</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="task-group">
|
|
<div class="task-name-container">
|
|
<a name="/In%20App%20Notifications"></a>
|
|
<a name="//apple_ref/swift/Section/In App Notifications" class="dashAnchor"></a>
|
|
<div class="section-name-container">
|
|
<a class="section-name-link" href="#/In%20App%20Notifications"></a>
|
|
<h3 class="section-name"><p>In App Notifications</p>
|
|
</h3>
|
|
</div>
|
|
</div>
|
|
<ul>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC16showNotificationyyF"></a>
|
|
<a name="//apple_ref/swift/Method/showNotification()" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC16showNotificationyyF">showNotification()</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Shows a notification if one is available.</p>
|
|
<div class="aside aside-note">
|
|
<p class="aside-title">Note</p>
|
|
You do not need to call this method on the main thread.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">showNotification</span><span class="p">()</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC16showNotification4typeySS_tF"></a>
|
|
<a name="//apple_ref/swift/Method/showNotification(type:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC16showNotification4typeySS_tF">showNotification(type:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Shows a notification with the given type if one is available.</p>
|
|
<div class="aside aside-note">
|
|
<p class="aside-title">Note</p>
|
|
You do not need to call this method on the main thread.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">showNotification</span><span class="p">(</span><span class="nv">type</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>type</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The type of notification to show, either “mini” or “takeover”</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC16showNotification2IDySi_tF"></a>
|
|
<a name="//apple_ref/swift/Method/showNotification(ID:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC16showNotification2IDySi_tF">showNotification(ID:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Shows a notification with the given ID</p>
|
|
<div class="aside aside-note">
|
|
<p class="aside-title">Note</p>
|
|
You do not need to call this method on the main thread.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">showNotification</span><span class="p">(</span><span class="kt">ID</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<h4>Parameters</h4>
|
|
<table class="graybox">
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<code>
|
|
<em>ID</em>
|
|
</code>
|
|
</td>
|
|
<td>
|
|
<div>
|
|
<p>The notification ID you want to present</p>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
<li class="item">
|
|
<div>
|
|
<code>
|
|
<a name="/s:8Mixpanel0A8InstanceC24fetchNotificationPayload10completionyySDySSyXlGSgc_tF"></a>
|
|
<a name="//apple_ref/swift/Method/fetchNotificationPayload(completion:)" class="dashAnchor"></a>
|
|
<a class="token" href="#/s:8Mixpanel0A8InstanceC24fetchNotificationPayload10completionyySDySSyXlGSgc_tF">fetchNotificationPayload(completion:)</a>
|
|
</code>
|
|
</div>
|
|
<div class="height-container">
|
|
<div class="pointer-container"></div>
|
|
<section class="section">
|
|
<div class="pointer"></div>
|
|
<div class="abstract">
|
|
<p>Returns the payload of a notification if available</p>
|
|
<div class="aside aside-note">
|
|
<p class="aside-title">Note</p>
|
|
You do not need to call this method on the main thread.
|
|
|
|
</div>
|
|
|
|
</div>
|
|
<div class="declaration">
|
|
<h4>Declaration</h4>
|
|
<div class="language">
|
|
<p class="aside-title">Swift</p>
|
|
<pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">func</span> <span class="nf">fetchNotificationPayload</span><span class="p">(</span><span class="nv">completion</span><span class="p">:</span> <span class="kd">@escaping</span> <span class="p">([</span><span class="kt">String</span><span class="p">:</span> <span class="kt">AnyObject</span><span class="p">]?)</span> <span class="o">-></span> <span class="kt">Void</span><span class="p">)</span></code></pre>
|
|
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
</section>
|
|
</section>
|
|
<section id="footer">
|
|
<p>© 2020 <a class="link" href="http://mixpanel.com" target="_blank" rel="external">Mixpanel</a>. All rights reserved. (Last updated: 2020-01-10)</p>
|
|
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.0</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
|
</section>
|
|
</article>
|
|
</div>
|
|
</body>
|
|
</div>
|
|
</html>
|