{"componentChunkName":"component---src-templates-markdown-template-jsx","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/iOS/","result":{"data":{"pageMetadata":{"title":"iOS","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/iOS/","sourceCode":null,"metadataParent":{"title":"SDKs","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/","sourceCode":null,"hasVersionPicker":null,"metadataChildren":[{"title":"SDKs Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/introduction/","order":6.1,"label":null},{"title":"React Native","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/react-native/","order":6.2,"label":null},{"title":"iOS","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/iOS/","order":6.3,"label":null},{"title":"Android","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/android/","order":6.4,"label":null},{"title":"Java","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/java/","order":6.4,"label":null},{"title":"JavaScript","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/javascript/","order":6.5,"label":null},{"title":"Python","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/python/","order":6.6,"label":null},{"title":"Object API","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/object-api/","order":6.7,"label":null}],"metadataParent":{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/developer-docs/introduction/","order":1,"label":null},{"title":"Integrations","path":"/guides/analytics/analytics-deprecated/developer-docs/integrations/","order":4,"label":null},{"title":"Data Warehouses and Data Lakes","path":"/guides/analytics/analytics-deprecated/developer-docs/data-warehouses-lakes/","order":5,"label":null},{"title":"APIs","path":"/guides/analytics/analytics-deprecated/developer-docs/apis/","order":6,"label":null},{"title":"SDKs","path":"/guides/analytics/analytics-deprecated/developer-docs/sdks/","order":6,"label":null},{"title":"Developer Basics","path":"/guides/analytics/analytics-deprecated/developer-docs/developer-basics/","order":7,"label":null}],"metadataParent":{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/analytics-deprecated/introduction/","order":1.1,"label":null},{"title":"Developer Docs","path":"/guides/analytics/analytics-deprecated/developer-docs/","order":4,"label":null},{"title":"Identity Providers","path":"/guides/analytics/analytics-deprecated/identity-providers/","order":null,"label":null},{"title":"Settings","path":"/guides/analytics/analytics-deprecated/settings/","order":null,"label":null}],"metadataParent":{"title":"Analytics","path":"/guides/analytics/","metadataChildren":[{"title":"Introduction","path":"/guides/analytics/introduction/","order":1,"label":null},{"title":"Core Analytics (Beta)","path":"/guides/analytics/core-analytics/","order":1.1,"label":null},{"title":"Analytics Free Trial","path":"/guides/analytics/analytics-free-trial/","order":2,"label":null},{"title":"Setup","path":"/guides/analytics/setup/","order":3,"label":null},{"title":"Settings","path":"/guides/analytics/settings/","order":4,"label":null},{"title":"Analytics Data Manager","path":"/guides/analytics/data-manager/","order":5,"label":null},{"title":"Analyses","path":"/guides/analytics/analyses/","order":6,"label":null},{"title":"Query Builder","path":"/guides/analytics/query-builder/","order":6,"label":null},{"title":"User Aliasing","path":"/guides/analytics/user-aliasing/","order":7,"label":null},{"title":"Dashboards","path":"/guides/analytics/dashboards/","order":8,"label":null},{"title":"Analytics Resources","path":"/guides/analytics/resources/","order":10,"label":null},{"title":"User Segments","path":"/guides/analytics/user-segments/","order":10,"label":null},{"title":"Tutorials","path":"/guides/analytics/tutorials/","order":11,"label":null},{"title":"APIs","path":"/guides/analytics/apis/","order":12,"label":null},{"title":"Analytics (Deprecated)","path":"/guides/analytics/analytics-deprecated/","order":13,"label":null}],"metadataParent":{"title":"Guides","path":"/guides/","metadataChildren":[{"title":"Platform Overview","path":"/guides/platform-overview/","order":0.5,"label":null},{"title":"Getting Started","path":"/guides/getting-started/","order":1,"label":null},{"title":"mParticle Agent","path":"/guides/mparticle-agent/","order":1.5,"label":null},{"title":"Oversight","path":"/guides/oversight/","order":2,"label":null},{"title":"Data Platform","path":"/guides/data-platform/","order":3,"label":null},{"title":"Data Warehouse","path":"/guides/data-warehouse/","order":4,"label":null},{"title":"Customer 360","path":"/guides/customer-360/","order":5,"label":null},{"title":"Analytics","path":"/guides/analytics/","order":6,"label":null},{"title":"Audiences","path":"/guides/audiences/","order":7,"label":null},{"title":"Settings","path":"/guides/settings/","order":8,"label":null},{"title":"Troubleshooting mParticle","path":"/guides/troubleshooting/","order":10,"label":null},{"title":"Default Service Limits","path":"/guides/default-service-limits/","order":11,"label":null},{"title":"Glossary","path":"/guides/glossary/","order":12,"label":null}]}}}}}},"markdownRemark":{"html":"<aside class=\"warning\">\n<strong>Analytics Sunset</strong><br />\nWe began sunsetting mParticle Analytics on October 1, 2026. As a result, the features and workflows described on this page may no longer be available. This documentation is retained for reference. If you have questions about how this change affects your account, contact your mParticle account representative.\n</aside>\n<h2 id=\"objective-c\" style=\"position:relative;\"><a href=\"#objective-c\" aria-label=\"objective c permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Objective-C</h2>\n<p>After downloading the client, drop the Analytics project files into a Group in your app. To start using it, specify your Analytics API key by calling Indicative’s launch: method in the didFinishLaunchingWithOptions: method of your app delegate:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">[Indicative launch:@&quot;Your-API-Key-goes-here&quot;];</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>To record an event, simply call the record: method, passing in the name of your event. For example:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">[Indicative record:@&quot;Registration&quot;];</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>To record an event with properties call the record:withProperties: method, like so:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">[Indicative record:@&quot;Registration&quot; withProperties:@{\n    @&quot;Gender&quot;: @&quot;Male&quot;,\n    @&quot;Age&quot;: @&quot;23&quot;\n}];</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span><span></span></span></pre></div>\n<p>The record: and record:withProperties: methods add an event object to a queue. Every 60 seconds, the events on this queue will be asynchronously sent to our servers via HTTP POST requests. If debug mode is enabled via the debug BOOL in Indicative.m, the status code and body of our response will be outputted to your device’s logs.</p>\n<p>To specify the user who performs an event, call the identifyUser method, passing in the user’s unique identifier. If you choose to not identify the user, Analytics will automatically generate an identifier for the user based on their device’s MAC address.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">[Indicative identifyUser:@&quot;TestUser123&quot;];</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<h2 id=\"swift\" style=\"position:relative;\"><a href=\"#swift\" aria-label=\"swift permalink\" class=\"anchor before\"><svg width=\"16px\" height=\"17px\" viewBox=\"0 0 16 17\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n                <g id=\"Symbols\" stroke=\"none\" stroke-width=\"1\" fill=\"none\" fill-rule=\"evenodd\">\n                    <g id=\"Icon/Link\" fill=\"#98A0A3\" fill-rule=\"nonzero\">\n                        <g id=\"link\">\n                            <path d=\"M9.5,12.4 C9.6,12.4 9.7,12.4 9.9,12.4 C9.8,12.5 9.8,12.5 9.7,12.6 L7.5,14.8 C5.8,16.5 3,16.5 1.3,14.8 C-0.4,13.1 -0.4,10.3 1.3,8.6 L3.5,6.4 C3.6,6.3 3.6,6.3 3.7,6.2 C5,5 6.9,4.8 8.4,5.5 C8.8,5.7 9.3,6 9.6,6.4 C10,6.7 10.2,7.2 10.5,7.6 C10.2,7.9 9.9,8 9.5,8 C9.4,8 9.2,8 9.1,7.9 C8.9,7.5 8.5,7.2 8.1,6.9 C7,6.2 5.5,6.4 4.5,7.3 L3.8,8 L2.3,9.5 C1.2,10.6 1.2,12.5 2.3,13.6 C3.4,14.7 5.3,14.7 6.4,13.6 L7.9,12.1 C8.4,12.3 8.9,12.4 9.5,12.4 Z M14.7,1.3 C13,-0.4 10.2,-0.4 8.5,1.3 L6.3,3.5 C6.2,3.6 6.2,3.6 6.1,3.7 C6.7,3.7 7.4,3.7 8,3.9 L9.5,2.4 C10.6,1.3 12.5,1.3 13.6,2.4 C14.7,3.5 14.7,5.4 13.6,6.5 L12.1,8 L11.4,8.7 C10.4,9.7 8.9,9.8 7.8,9.1 C7.4,8.9 7.1,8.5 6.8,8.1 C6.7,8.1 6.5,8 6.4,8 C6,8 5.6,8.2 5.4,8.4 C5.6,8.8 5.9,9.3 6.3,9.6 C6.6,10 7.1,10.2 7.5,10.5 C9,11.2 10.9,11 12.3,9.8 C12.4,9.7 12.4,9.7 12.5,9.6 L14.7,7.4 C16.4,5.7 16.4,3 14.7,1.3 Z\" id=\"Shape\"></path>\n                        </g>\n                    </g>\n                </g>\n            </svg></a>Swift</h2>\n<p>Analytics’ iOS SDK is written in Objective-C and is compatible with Swift files. To learn more about importing Objective-C into Swift, please see Apple’s documentation <a href=\"https://developer.apple.com/documentation/swift/imported_c_and_objective-c_apis/importing_objective-c_into_swift\">here</a>.</p>\n<p>After downloading the client, drop the Indicative project files into a Group in your app. To start using it, specify your Analytics API key by calling Indicative’s launch method in the didFinishLaunchingWithOptions method of your app delegate:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.launch(&quot;Your-API-Key-goes-here&quot;)</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>To record an event, simply call the record method, passing in the name of your event. For example:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.record(&quot;Registration&quot;)</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>\n<p>To record an event with properties call the record withProperties method, like so:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.record(&quot;Registration&quot;, withProperties: [    &quot;Gender&quot;: &quot;Male&quot;,\n    &quot;Age&quot;: &quot;23&quot;\n])</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span><span></span><span></span></span></pre></div>\n<p>The record and record withProperties methods add an event object to a queue. Every 60 seconds, the events on this queue will be asynchronously sent to our servers via HTTP POST requests. If debug mode is enabled via the debug BOOL in Indicative.m, the status code and body of our response will be outputted to your device’s logs.</p>\n<p>To specify the user who performs an event, call the identifyUser method, passing in the user’s unique identifier. If you choose to not identify the user, Analytics will automatically generate an identifier for the user based on their device’s MAC address.</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre style=\"counter-reset: linenumber NaN\" class=\"language-text line-numbers\"><code class=\"language-text\">Indicative.identifyUser(&quot;TestUser123&quot;)</code><span aria-hidden=\"true\" class=\"line-numbers-rows\" style=\"white-space: normal; width: auto; left: 0;\"><span></span></span></pre></div>","frontmatter":{"title":"iOS","order":6.3,"seoTitle":null,"seoDescription":null},"parent":{"__typename":"File","modifiedTime":"October 12, 2026"}}},"pageContext":{"slug":"/guides/analytics/analytics-deprecated/developer-docs/sdks/iOS/"}},"staticQueryHashes":["2950460867"]}