An extremely light Intercom MacOS Framework for sending events and tracking users.
- Create a new app at https://developers.intercom.com.
- Go to Configure -> Authentication.
- Copy your token
Before using your token make sure you tick off all the permissions you don't need. Most apps would only need Write users and companies
and Write events
permissions. If by accident you leak a token with read permissions this could mean your whole user base gets leaked.
- Add
github "marvelapp/Intercom-MacOS"
to your Cartfile. - Run carthage update.
- Go to your Xcode project's "General" settings. Drag
marvelapp/Intercom-MacOS.framework
fromCarthage/Build/macOS
to the "Embedded Binaries" section. Make sure “Copy items if needed” is selected and click Finish.
import Intercom
Intercom.shared.setup(accessToken: "YOUR TOKEN")
let event = IntercomEvent(eventName: "invited-friend", userId: "314159", metaData: nil)
Intercom.shared.events.submit(event, completion: nil)
Soon