Skip to content

Commit

Permalink
Release 3.0.15 (#105)
Browse files Browse the repository at this point in the history
- Updated Intercom for iOS to [3.0.17](https://github.com/intercom/intercom-ios/releases/tag/3.0.17).
  • Loading branch information
Br1an-Boyle authored and DaleCantwell committed Oct 20, 2016
1 parent ab71eef commit c575b74
Show file tree
Hide file tree
Showing 8 changed files with 75 additions and 71 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Intercom for Cordova/PhoneGap

## 3.0.15 (2016-10-19)

* Updated Intercom for iOS to [3.0.17](https://github.com/intercom/intercom-ios/releases/tag/3.0.17).

## 3.0.14 (2016-10-18)

* Updated Intercom for iOS to [3.0.16](https://github.com/intercom/intercom-ios/releases/tag/3.0.16).
Expand Down Expand Up @@ -38,7 +42,7 @@
* Fixed [#71](https://github.com/intercom/intercom-cordova/issues/71).
* Updated Intercom for Android to [3.0.3](https://github.com/intercom/intercom-android/releases/tag/3.0.3).
* Updated Intercom for iOS to [3.0.10](https://github.com/intercom/intercom-ios/releases/tag/3.0.10).

## 3.0.6 (2016-08-10)

* Fixed [#67](https://github.com/intercom/intercom-cordova/issues/66).
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ To install the plugin in your Cordova app, run the following:

To add the plugin to your PhoneGap app, add the following to your `config.xml`:

<plugin name="cordova-plugin-intercom" version="~3.0.14" />
<plugin name="cordova-plugin-intercom" version="~3.0.15" />

## Configuring Intercom

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cordova-plugin-intercom",
"version": "3.0.14",
"version": "3.0.15",
"description": "Official Cordova/PhoneGap plugin for Intercom",
"cordova": {
"id": "cordova-plugin-intercom",
Expand Down
2 changes: 1 addition & 1 deletion plugin.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-plugin-intercom" version="3.0.14" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<plugin id="cordova-plugin-intercom" version="3.0.15" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>Intercom</name>
<author>Intercom</author>
<license>MIT License</license>
Expand Down
4 changes: 2 additions & 2 deletions src/android/IntercomBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public class IntercomBridge extends CordovaPlugin {
private void setUpIntercom() {
try {
Context context = IntercomBridge.this.cordova.getActivity().getApplicationContext();
CordovaHeaderInterceptor.setCordovaVersion(context, "3.0.14");

CordovaHeaderInterceptor.setCordovaVersion(context, "3.0.15");

switch (IntercomPushManager.getInstalledModuleType()) {
case GCM: {
Expand Down
116 changes: 58 additions & 58 deletions src/ios/Intercom.framework/Versions/A/Headers/Intercom.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// Intercom.h
// Intercom for iOS - Version 3.0.16
// Intercom for iOS - Version 3.0.17
//
// Created by Intercom on 8/01/2015.
// Copyright (c) 2014 Intercom. All rights reserved.
Expand All @@ -10,7 +10,7 @@
#import <UIKit/UIKit.h>

#if __IPHONE_OS_VERSION_MIN_REQUIRED < __IPHONE_8_0
#error This version (3.0.16) of Intercom for iOS supports iOS 8.0 upwards.
#error This version (3.0.17) of Intercom for iOS supports iOS 8.0 upwards.
#endif

NS_ASSUME_NONNULL_BEGIN
Expand All @@ -25,57 +25,57 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/**
Intercom is your direct line of communication to every user, right inside your app. Intercom’s in-app messages
are up to 10 times more effective than email too! Send the right messages, to the right users, at exactly the right time.
## How do I track my users?
In order to see your users in Intercom's user list, you must first register them via your iOS application. If you have a
place in your application where you become aware of the user's identity such as a log in view controller, call one of the
following depending on the information you have available for that user:
If you have both a unique user identifier and an email for your users::
[Intercom registerUserWithUserId:@"123456" email:@"joe@example.com"];
If you only have a unique identifier for your users:
[Intercom registerUserWithUserId:@"123456"];
Finally, if you only have an email address for your users:
[Intercom registerUserWithEmail:@"joe@example.com"];
## Can I track unidentified users?
Yes, absolutely. If you have an application that doesn't require users to log in, you can call:
[Intercom registerUnidentifiedUser];
If the user subsequently logs in or you learn additional information about them (e.g. get an email address),
calling any of the other user registration methods will update that user's identity in Intercom and contain
all user data tracked previously.
## How do push notifications work?
Intercom for iOS enables your users to receive push notifications for new messages. Simply call:
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)deviceToken {
[Intercom setDeviceToken:deviceToken];
}
in your `didRegisterForRemoteNotificationsWithDeviceToken:` method once you have registered your app for
push notifications with the `UIApplicationDelegate`.
When your app receives a push notification Intercom for iOS checks to see if it is an Intercom push notification
and opens the message. You do not need to implement any additional code in order to launch the message window.
To do this we [safely swizzle](http://blog.newrelic.com/2014/04/16/right-way-to-swizzle/) the public methods
in `UIApplicationDelegate` that handle receiving push notifications. We do not use any private APIs to do this.
## More information
Full documentation is available [here](https://docs.intercom.io/install-on-your-product-or-site/quick-install/install-intercom-on-your-ios-app) and please contact
us directly via Intercom for any support or questions you may have.
*/
@interface Intercom : NSObject

Expand All @@ -85,7 +85,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*!
Initialize Intercom with your iOS API key and App ID. This will allow your app to connect with Intercom.
This is best done in the application delegate's didFinishLaunchingWithOptions: method.
@param apiKey The iOS API key found on the API Key settings page.
@param appId The App ID of your Intercom app.
*/
Expand All @@ -99,7 +99,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
user can't impersonate another. In Secure Mode Intercom for iOS will sign all requests going to the Intercom servers
with tokens. It requires your mobile application to have its own server which authenticates the app's users,
and which can store a secret. More information on secure mode can be found [here](http://docs.intercom.io/Install-on-your-mobile-product/enabling-secure-mode-in-intercom-for-ios)
@note This should be called before any user registration takes place.
@param hmac A HMAC digest of data.
@param data A piece of user data.
Expand All @@ -113,9 +113,9 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
If you call registerUnidentifiedUser, all activity will be tracked anonymously. If you choose to subsequently
identify that user, all that anonymous activity will be merged into the identified user. This means that you
will no longer see the anonymous user in Intercom, but rather the identified one.
We recommend this is called from within the application delegate's didFinishLaunchingWithOptions: method.
@note You must call one of the user registration methods in order to start communicating with Intercom.
*/
+ (void)registerUnidentifiedUser;
Expand All @@ -128,12 +128,12 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
address, or both. By supplying information like this Intercom provides richer user profiles for your users.
This is a userId, supplied by you (e.g. from an existing web service for your product) to represent your
user in Intercom, once set it cannot be changed.
If you are putting Intercom for iOS into an app that has persisted an authentication token or equivalent
so your users don't have to log in repeatedly (like most apps) then we advise putting the user registration
call in the `didBecomeActive:` method in your application delegate. This won't have any negative impact if
you also add it to your authentication success method elsewhere in your app.
@param userId A unique identifier for your user.
@param email Your user's email address.
@note You must call one of the user registration methods in order to start communicating with Intercom.
Expand All @@ -142,15 +142,15 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){

/*!
Register a user just with their userId.
@param userId A unique identifier for your user.
@note You must call one of the user registration methods in order to start communicating with Intercom.
*/
+ (void)registerUserWithUserId:(NSString *)userId;

/*!
Register a user with just their email address.
@param email Your user's email address.
@note You must call one of the user registration methods in order to start communicating with Intercom.
*/
Expand All @@ -160,7 +160,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*! @name Resetting user data */
//=========================================================================================================
/*!
reset is used to reset all local caches and user data Intercom has created. Reset will also close any active
reset is used to reset all local caches and user data Intercom has created. Reset will also close any active
UI that is on screen. Use this at a time when you wish to log a user out of your app or change a user.
Once called, Intercom for iOS will no longer communicate with Intercom until a further registration is made.
*/
Expand All @@ -173,69 +173,69 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
You can send any data you like to Intercom. Typically our customers see a lot of value in sending data that
relates to customer development, such as price plan, value of purchases, etc. Once these have been sent to
Intercom you can then apply filters based on these attributes.
A detailed list of the fields you can use to [update a user is available here](https://developers.intercom.io/reference/#user-model )
Attributes such as the user email or name can be updated by calling
[Intercom updateUserWithAttributes:@{
@"email" : @"admin@intercom.io",
@"name" : @"Admin Name"
}];
Custom user attributes can be created and modified by passing a custom_attributes dictionary
You do not have to create attributes in Intercom beforehand. If one hasn't been seen before, it will be
created for you automatically.
[Intercom updateUserWithAttributes:@{
@"custom_attributes": @{
@"paid_subscriber" : @YES,
@"monthly_spend": @155.5,
@"team_mates": @3
}
}];
You can also set company data via this call by submitting an attribute dictionary like
[Intercom updateUserWithAttributes:@{
@"companies": @[ @{
@"name" : @"My Company",
@"id" : @"abcd1234"
}
]}];
id is a required field for adding or modifying a company. A detailed description of the
[company model is available here](https://developers.intercom.io/reference/#companies-and--users)
@param attributes This is a dictionary containing key/value pairs for multiple attributes.
@note Attributes may be either a `string`, `integer`, `double`, `unix timestamp` or `bool`.
*/
+ (void)updateUserWithAttributes:(NSDictionary *)attributes;

/*!
Log an event with a given name.
You can log events in Intercom based on user actions in your app. Events are different
to custom user attributes in that events are information on what Users did and when they
did it, whereas custom user attributes represent the User's current state as seen in their
profile. See details about Events [here](https://developers.intercom.io/reference/#events)
@param name The name of the event that it is going to be logged.
*/
+ (void)logEventWithName:(NSString *)name;

/*!
Metadata Objects support a few simple types that Intercom can present on your behalf, see the
[Intercom API docs](https://developers.intercom.io/reference/#event-metadata-types)
[Intercom logEventWithName:@"ordered_item" metaData:@{
@"order_date": @1392036272,
@"stripe_invoice": @"inv_3434343434",
@"order_number": @{
@"value": @"3434-3434",
@"url": @"https://example.org/orders/3434-3434"
}];
@param name The name of the event you wish to track.
@param metaData contains simple types to present to Intercom
*/
Expand All @@ -247,7 +247,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){

/*!
Present the Intercom Messenger
Opens the Intercom messenger to automatically to the best place for your users.
*/
+ (void)presentMessenger;
Expand All @@ -271,10 +271,10 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*! @name Working with push notifications */
//=========================================================================================================
/*!
Set the device token for push notifications. Once the device token is set, the methods for receiving push
Set the device token for push notifications. Once the device token is set, the methods for receiving push
notifications are safely swizzled so ones sent from Intercom can be intercepted. When a push notification from
Intercom is received, Intercom for iOS will automatically launch the message from the notification.
@param deviceToken The device token provided in the `didRegisterForRemoteNotificationsWithDeviceToken` method.
*/
+ (void)setDeviceToken:(NSData *)deviceToken;
Expand All @@ -286,7 +286,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*!
This method allows you to set a fixed bottom padding for in app messages and the launcher.
It is useful if your app has a tab bar or similar UI at the bottom of your window.
@param bottomPadding The size of the bottom padding in points.
*/
+ (void)setBottomPadding:(CGFloat)bottomPadding;
Expand All @@ -298,19 +298,19 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*!
Use this to hide all incoming Intercom messages and message previews in the parts of your app where you do
not wish to interrupt users, for example Camera views, parts of a game or other scenarios.
By default, all in app messages will be visible.
@param visible A boolean indicating if in app messages should be visible.
*/
+ (void)setInAppMessagesVisible:(BOOL)visible;

/*!
Use this to show the Intercom launcher selectively within your app. If you choose to display the launcher,
you may want to hide it on some screens where screen space is critical (e.g. parts of a game).
By default, the launcher is hidden.
@param visible A boolean indicating if the launcher should be visible.
*/
+ (void)setLauncherVisible:(BOOL)visible;
Expand All @@ -328,7 +328,7 @@ typedef NS_ENUM(NSUInteger, ICMPreviewPosition){
/*!
This method provides the current number of unread conversations.
This is useful if you want to display a badge counter on the button where you launch Intercom.
@return The number of unread conversations.
*/
+ (NSUInteger)unreadConversationCount;
Expand All @@ -353,7 +353,7 @@ UIKIT_EXTERN NSString *const IntercomUnreadConversationCountDidChangeNotificatio
//=========================================================================================================

/*!
If you wish to change your status bar's style or visibility while an Intercom notification may be on
If you wish to change your status bar's style or visibility while an Intercom notification may be on
screen, call this method so that Intercom's window can reflect these changes accordingly.
*/
+ (void)setNeedsStatusBarAppearanceUpdate;
Expand Down Expand Up @@ -383,12 +383,12 @@ UIKIT_EXTERN NSString *const IntercomUnreadConversationCountDidChangeNotificatio
/*!
These are notifications thrown by Intercom for iOS when the Intercom window is displayed and hidden or when
a new conversation has been started. These notifications are fired only when there is a change in the state
of Intercom's UI: when a user receives a message for instance, willShow and didShow notifications will be
fired accordingly when the Intercom Notification (chat head) is presented.
of Intercom's UI: when a user receives a message for instance, willShow and didShow notifications will be
fired accordingly when the Intercom Notification (chat head) is presented.
Once the user taps on the chat head, the message is presented in your app. It will be presented covering
the entire screen, but no notifications will be thrown here as Intercom has already been visible.
In the case of a new conversation this notification may be used to prompt users to enable push notifications.
*/

Expand Down
Binary file modified src/ios/Intercom.framework/Versions/A/Intercom
Binary file not shown.
Loading

0 comments on commit c575b74

Please sign in to comment.