Skip to content

Commit

Permalink
Added sample app
Browse files Browse the repository at this point in the history
  • Loading branch information
jtreanor committed May 13, 2015
1 parent 1f92322 commit a081480
Show file tree
Hide file tree
Showing 25 changed files with 811 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .gitignore
@@ -0,0 +1,11 @@
#CocoaPods
Pods/
Podfile.lock

#Xcode
Build/
xcuserdata/
*.xcworkspace

#OSX
.DS_Store
11 changes: 11 additions & 0 deletions README.md
Expand Up @@ -21,6 +21,17 @@ Add the Intercom pod into your Podfile and run a `pod install` or `pod update`.

If you get errors, check out our [Troubleshooting section here](http://docs.intercom.io/Install-on-your-mobile-product/installing-intercom-for-ios#troubleshooting-tips).

##Sample app

To use the sample app:

1. Go to the `Sample` directory and run `pod install`.
2. Set your iOS API key and App ID at the top of `ITCAppDelegate.m`, here:
```
#define INTERCOM_APP_ID @"YOUR_APP_ID"
#define INTERCOM_API_KEY @"YOUR_API_KEY"
```
3. Build and run.

##How should I use Intercom for iOS in my app?
Broadly speaking, there are three types of apps that Intercom for iOS will work in.
Expand Down
3 changes: 3 additions & 0 deletions Sample/Podfile
@@ -0,0 +1,3 @@
source 'https://github.com/CocoaPods/Specs.git'

pod 'Intercom'
357 changes: 357 additions & 0 deletions Sample/Sample.xcodeproj/project.pbxproj
@@ -0,0 +1,357 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
1A0F1E0E1B034B7100DA78D2 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F1E0D1B034B7100DA78D2 /* main.m */; };
1A0F1E111B034B7100DA78D2 /* ITCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F1E101B034B7100DA78D2 /* ITCAppDelegate.m */; };
1A0F1E141B034B7100DA78D2 /* ITCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1A0F1E131B034B7100DA78D2 /* ITCViewController.m */; };
1A0F1E171B034B7100DA78D2 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 1A0F1E151B034B7100DA78D2 /* Main.storyboard */; };
1A0F1E191B034B7100DA78D2 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 1A0F1E181B034B7100DA78D2 /* Images.xcassets */; };
41B7C7F5B6A2B7BBFB150C42 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 98C43708C680E2477FAD146C /* libPods.a */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1A0F1E081B034B7100DA78D2 /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; };
1A0F1E0C1B034B7100DA78D2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
1A0F1E0D1B034B7100DA78D2 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
1A0F1E0F1B034B7100DA78D2 /* ITCAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ITCAppDelegate.h; sourceTree = "<group>"; };
1A0F1E101B034B7100DA78D2 /* ITCAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ITCAppDelegate.m; sourceTree = "<group>"; };
1A0F1E121B034B7100DA78D2 /* ITCViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ITCViewController.h; sourceTree = "<group>"; };
1A0F1E131B034B7100DA78D2 /* ITCViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ITCViewController.m; sourceTree = "<group>"; };
1A0F1E161B034B7100DA78D2 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
1A0F1E181B034B7100DA78D2 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = "<group>"; };
85430A3E591C9A403636B060 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = "<group>"; };
8C6C505514D1683341C821E8 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
98C43708C680E2477FAD146C /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
1A0F1E051B034B7100DA78D2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
41B7C7F5B6A2B7BBFB150C42 /* libPods.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
1A0F1DFF1B034B7100DA78D2 = {
isa = PBXGroup;
children = (
1A0F1E0A1B034B7100DA78D2 /* Sample */,
1A0F1E091B034B7100DA78D2 /* Products */,
99A634D8FD9561D82582548A /* Pods */,
D34511F59F27AF5F3DE9174F /* Frameworks */,
);
sourceTree = "<group>";
};
1A0F1E091B034B7100DA78D2 /* Products */ = {
isa = PBXGroup;
children = (
1A0F1E081B034B7100DA78D2 /* Sample.app */,
);
name = Products;
sourceTree = "<group>";
};
1A0F1E0A1B034B7100DA78D2 /* Sample */ = {
isa = PBXGroup;
children = (
1A0F1E0F1B034B7100DA78D2 /* ITCAppDelegate.h */,
1A0F1E101B034B7100DA78D2 /* ITCAppDelegate.m */,
1A0F1E121B034B7100DA78D2 /* ITCViewController.h */,
1A0F1E131B034B7100DA78D2 /* ITCViewController.m */,
1A0F1E151B034B7100DA78D2 /* Main.storyboard */,
1A0F1E181B034B7100DA78D2 /* Images.xcassets */,
1A0F1E0B1B034B7100DA78D2 /* Supporting Files */,
);
path = Sample;
sourceTree = "<group>";
};
1A0F1E0B1B034B7100DA78D2 /* Supporting Files */ = {
isa = PBXGroup;
children = (
1A0F1E0C1B034B7100DA78D2 /* Info.plist */,
1A0F1E0D1B034B7100DA78D2 /* main.m */,
);
name = "Supporting Files";
sourceTree = "<group>";
};
99A634D8FD9561D82582548A /* Pods */ = {
isa = PBXGroup;
children = (
85430A3E591C9A403636B060 /* Pods.debug.xcconfig */,
8C6C505514D1683341C821E8 /* Pods.release.xcconfig */,
);
name = Pods;
sourceTree = "<group>";
};
D34511F59F27AF5F3DE9174F /* Frameworks */ = {
isa = PBXGroup;
children = (
98C43708C680E2477FAD146C /* libPods.a */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
1A0F1E071B034B7100DA78D2 /* Sample */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1A0F1E2B1B034B7100DA78D2 /* Build configuration list for PBXNativeTarget "Sample" */;
buildPhases = (
9EFCFC36D71F6292341B4961 /* Check Pods Manifest.lock */,
1A0F1E041B034B7100DA78D2 /* Sources */,
1A0F1E051B034B7100DA78D2 /* Frameworks */,
1A0F1E061B034B7100DA78D2 /* Resources */,
C013679E94F860BABB90640E /* Copy Pods Resources */,
);
buildRules = (
);
dependencies = (
);
name = Sample;
productName = Sample;
productReference = 1A0F1E081B034B7100DA78D2 /* Sample.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
1A0F1E001B034B7100DA78D2 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0630;
ORGANIZATIONNAME = Intercom;
TargetAttributes = {
1A0F1E071B034B7100DA78D2 = {
CreatedOnToolsVersion = 6.3.1;
};
};
};
buildConfigurationList = 1A0F1E031B034B7100DA78D2 /* Build configuration list for PBXProject "Sample" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 1A0F1DFF1B034B7100DA78D2;
productRefGroup = 1A0F1E091B034B7100DA78D2 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
1A0F1E071B034B7100DA78D2 /* Sample */,
);
};
/* End PBXProject section */

/* Begin PBXResourcesBuildPhase section */
1A0F1E061B034B7100DA78D2 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1A0F1E171B034B7100DA78D2 /* Main.storyboard in Resources */,
1A0F1E191B034B7100DA78D2 /* Images.xcassets in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
9EFCFC36D71F6292341B4961 /* Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Check Pods Manifest.lock";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
C013679E94F860BABB90640E /* Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Copy Pods Resources";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
1A0F1E041B034B7100DA78D2 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1A0F1E141B034B7100DA78D2 /* ITCViewController.m in Sources */,
1A0F1E111B034B7100DA78D2 /* ITCAppDelegate.m in Sources */,
1A0F1E0E1B034B7100DA78D2 /* main.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin PBXVariantGroup section */
1A0F1E151B034B7100DA78D2 /* Main.storyboard */ = {
isa = PBXVariantGroup;
children = (
1A0F1E161B034B7100DA78D2 /* Base */,
);
name = Main.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */

/* Begin XCBuildConfiguration section */
1A0F1E291B034B7100DA78D2 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_SYMBOLS_PRIVATE_EXTERN = NO;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
};
name = Debug;
};
1A0F1E2A1B034B7100DA78D2 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.3;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
};
name = Release;
};
1A0F1E2C1B034B7100DA78D2 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 85430A3E591C9A403636B060 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = Sample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
1A0F1E2D1B034B7100DA78D2 /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 8C6C505514D1683341C821E8 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
INFOPLIST_FILE = Sample/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
1A0F1E031B034B7100DA78D2 /* Build configuration list for PBXProject "Sample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1A0F1E291B034B7100DA78D2 /* Debug */,
1A0F1E2A1B034B7100DA78D2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1A0F1E2B1B034B7100DA78D2 /* Build configuration list for PBXNativeTarget "Sample" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1A0F1E2C1B034B7100DA78D2 /* Debug */,
1A0F1E2D1B034B7100DA78D2 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 1A0F1E001B034B7100DA78D2 /* Project object */;
}

0 comments on commit a081480

Please sign in to comment.