Skip to content

Commit

Permalink
feat(ios): added intercom ios sdk source for manual linking
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0trpietruszewski authored and pi0trpietruszewski committed Jun 9, 2021
1 parent 9249bff commit 3ab98ca
Show file tree
Hide file tree
Showing 389 changed files with 5,150 additions and 0 deletions.
42 changes: 42 additions & 0 deletions ios/Intercom.xcframework/Info.plist
@@ -0,0 +1,42 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AvailableLibraries</key>
<array>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_i386_x86_64-simulator</string>
<key>LibraryPath</key>
<string>Intercom.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>i386</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_armv7</string>
<key>LibraryPath</key>
<string>Intercom.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>armv7</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
<string>XFWK</string>
<key>XCFrameworkFormatVersion</key>
<string>1.0</string>
</dict>
</plist>
Binary file not shown.
@@ -0,0 +1,87 @@
//
// ICMCompany.h
//
// Created by Intercom on 17/01/2017.
// Copyright (c) 2017 Intercom. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
* The ICMCompany object is used for adding companies to users in Intercom.
* All of the default attributes you can modify are available as properties on ICMCompany.
* This is an example of how to create an ICMCompany object to update default attributes.
*
* ICMCompany *company = [ICMCompany new];
* company.companyId = @"12345";
* company.name = @"TestCorp";
*
* You can also add custom attributes to your company.
*
* ICMCompany *company = [ICMCompany new];
* company.companyId = @"12345";
* company.name = @"TestCorp";
* company.customAttributes = @{@"employee_count" : @200};
*
*/
@interface ICMCompany : NSObject

/**
The ID of the company.
@note This property is required
*/
@property (nonatomic, copy, nullable) NSString *companyId;

/**
The name of the company.
*/
@property (nonatomic, copy, nullable) NSString *name;

/**
The created at date for this company.
*/
@property (nonatomic, strong, nullable) NSDate *createdAt;

/**
The monthly spend of the company.
*/
@property (nonatomic, strong, nullable) NSNumber *monthlySpend;

/**
The plan of the company.
*/
@property (nonatomic, copy, nullable) NSString *plan;

/**
Custom attributes for this user.
@note Each key must be an NSString and each value must be of type NSString, NSNumber or NSNull.
*/
@property (nonatomic, strong, nullable) NSDictionary<NSString *, id> *customAttributes;

/**
Gives you a null value to apply to string attributes.
@return the value to set on string attributes which you wish to be null
*/
+ (nonnull NSString *)nullStringAttribute;

/**
Gives you a null value to apply to number attributes.
@return the value to set on number attributes which you wish to be null
*/
+ (nonnull NSNumber *)nullNumberAttribute;

/**
Gives you a null value to apply to date attributes.
@return the value to set on date attributes which you wish to be null
*/
+ (nonnull NSDate *)nullDateAttribute;

/**
A dictionary representation for the company.
*/
- (nonnull NSDictionary<NSString *, id> *)attributes;

@end
@@ -0,0 +1,104 @@
//
// ICMUserAttributes.h
//
// Created by Intercom on 17/01/2017.
// Copyright (c) 2017 Intercom. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <Intercom/ICMCompany.h>

/**
The ICMUserAttributes object is used for updating a user in Intercom.
All of the default attributes you can modify are available as properties on ICMUserAttributes.
This is an example of how to create an ICMUserAttributes object to update default attributes
ICMUserAttributes *userAttributes = [ICMUserAttributes new];
userAttributes.userId = @"12345";
userAttributes.email = @"test@email.com";
userAttributes.name = @"Andy";
You can also add custom attributes to your user:
ICMUserAttributes *userAttributes = [ICMUserAttributes new];
userAttributes.userId = @"12345";
userAttributes.email = @"test@email.com";
userAttributes.customAttributes = @{@"items_in_cart" : @8};
*/
@interface ICMUserAttributes : NSObject

/**
The email for this user.
*/
@property (nonatomic, copy, nullable) NSString *email;

/**
The user ID for this user.
*/
@property (nonatomic, copy, nullable) NSString *userId;

/**
The name of this user.
*/
@property (nonatomic, copy, nullable) NSString *name;

/**
The phone number of this user.
*/
@property (nonatomic, copy, nullable) NSString *phone;

/**
The language override code for this user.
@note languageOverride must be a valid language code. For more information see [here](https://docs.intercom.com/configure-intercom-for-your-product-or-site/customize-the-intercom-messenger/localize-intercom-to-work-with-multiple-languages ).
*/
@property (nonatomic, copy, nullable) NSString *languageOverride;

/**
The signed up date for this user.
*/
@property (nonatomic, strong, nullable) NSDate *signedUpAt;

/**
A boolean indicating if the user has unsubscribed from emails.
*/
@property (nonatomic, assign) BOOL unsubscribedFromEmails;

/**
The companies for this user.
*/
@property (nonatomic, strong, nullable) NSArray<ICMCompany *> *companies;

/**
Custom attributes for this user.
@note Each key must be an NSString and each value must be of type NSString, NSNumber or NSNull.
*/
@property (nonatomic, strong, nullable) NSDictionary<NSString *, id> *customAttributes;

/**
Gives you a null value to apply to string attributes.
@return the value to set on string attributes which you wish to be null
*/
+ (nonnull NSString *)nullStringAttribute;

/**
Gives you a null value to apply to number attributes.
@return the value to set on number attributes which you wish to be null
*/
+ (nonnull NSNumber *)nullNumberAttribute;

/**
Gives you a null value to apply to date attributes.
@return the value to set on date attributes which you wish to be null
*/
+ (nonnull NSDate *)nullDateAttribute;

/**
A dictionary representation for the user attributes.
*/
- (nonnull NSDictionary<NSString *, id> *)attributes;

@end

0 comments on commit 3ab98ca

Please sign in to comment.