Skip to content

Commit cc2d563

Browse files
authored
Example App Update (#178)
* Example App Update - Remove the dependency on Cocoapods - Modified the Framework search path to include Intercom.framework - Updated new app icons for iOS 10 - Updated storyboard XIB for smaller devices * - Removed unneeded son files * - Updated Swift example app to Swift 3.0 - Added photo library permission - Updated Swift example app with new icons and update storyboard file * Update README.md * Update README.md * - New Readme for example project * Update README.md * Update README.md
1 parent 6b62ebc commit cc2d563

File tree

24 files changed

+253
-340
lines changed

24 files changed

+253
-340
lines changed

Examples/README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
![Intercom](Sample-ObjC/Sample-ObjC/Images.xcassets/Intercom-logo-github.imageset/Intercom_logo-github.png)
2+
3+
The example apps provide a basic demo of Intercom's iOS SDK. Further details on the SDK's API can be found [here](https://github.com/intercom/intercom-ios/blob/master/Intercom.framework/Headers/Intercom.h)
4+
5+
##Objective C
6+
1. Go to **/Sample-ObjC** and open **Sample-ObjC.xcodeproj**
7+
2. Set your iOS **API key** and **App ID** at the top of `ITCAppDelegate.m`
8+
3. Build and Run 🎉
9+
10+
##Swift
11+
1. Go to **/Sample-Swift** and open **Sample-Swift.xcodeproj**
12+
2. Set your iOS **API key** and **App ID** at the top of `AppDelegate.swift`
13+
3. Build and Run 🙌

Examples/Sample-ObjC/Podfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

Examples/Sample-ObjC/Sample-ObjC.xcodeproj/project.pbxproj

Lines changed: 30 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
objects = {
88

99
/* Begin PBXBuildFile section */
10-
7FFE87D531949188F84D7E83 /* Pods_Sample_ObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DB9625B0214E0E1BE5F1552E /* Pods_Sample_ObjC.framework */; };
10+
AD5AAA2A1D92A70F00557FDA /* Intercom.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AD5AAA291D92A70F00557FDA /* Intercom.framework */; };
11+
AD5AAA2B1D92A70F00557FDA /* Intercom.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = AD5AAA291D92A70F00557FDA /* Intercom.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
1112
ADEBAAA81D3F6D2A0016C6EC /* ITCAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = ADEBAAA11D3F6D2A0016C6EC /* ITCAppDelegate.m */; };
1213
ADEBAAA91D3F6D2A0016C6EC /* ITCViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = ADEBAAA31D3F6D2A0016C6EC /* ITCViewController.m */; };
1314
ADEBAAAA1D3F6D2A0016C6EC /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = ADEBAAA41D3F6D2A0016C6EC /* main.m */; };
@@ -16,9 +17,23 @@
1617
ADEBAAB11D3F6D4B0016C6EC /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = ADEBAAAE1D3F6D4B0016C6EC /* Main.storyboard */; };
1718
/* End PBXBuildFile section */
1819

20+
/* Begin PBXCopyFilesBuildPhase section */
21+
AD5AAA251D92897000557FDA /* Embed Frameworks */ = {
22+
isa = PBXCopyFilesBuildPhase;
23+
buildActionMask = 2147483647;
24+
dstPath = "";
25+
dstSubfolderSpec = 10;
26+
files = (
27+
AD5AAA2B1D92A70F00557FDA /* Intercom.framework in Embed Frameworks */,
28+
);
29+
name = "Embed Frameworks";
30+
runOnlyForDeploymentPostprocessing = 0;
31+
};
32+
/* End PBXCopyFilesBuildPhase section */
33+
1934
/* Begin PBXFileReference section */
2035
1A0F1E081B034B7100DA78D2 /* Sample-ObjC.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Sample-ObjC.app"; sourceTree = BUILT_PRODUCTS_DIR; };
21-
93B30CF1F49E31502D31CCE0 /* Pods-Sample-ObjC.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample-ObjC.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample-ObjC/Pods-Sample-ObjC.release.xcconfig"; sourceTree = "<group>"; };
36+
AD5AAA291D92A70F00557FDA /* Intercom.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Intercom.framework; path = ../../Intercom.framework; sourceTree = "<group>"; };
2237
ADEBAA9F1D3F6D2A0016C6EC /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = "Sample-ObjC/Info.plist"; sourceTree = SOURCE_ROOT; };
2338
ADEBAAA01D3F6D2A0016C6EC /* ITCAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ITCAppDelegate.h; path = "Sample-ObjC/ITCAppDelegate.h"; sourceTree = SOURCE_ROOT; };
2439
ADEBAAA11D3F6D2A0016C6EC /* ITCAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ITCAppDelegate.m; path = "Sample-ObjC/ITCAppDelegate.m"; sourceTree = SOURCE_ROOT; };
@@ -28,16 +43,14 @@
2843
ADEBAAA51D3F6D2A0016C6EC /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = "Sample-ObjC/Images.xcassets"; sourceTree = SOURCE_ROOT; };
2944
ADEBAAAD1D3F6D4B0016C6EC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "Sample-ObjC/Base.lproj/LaunchScreen.storyboard"; sourceTree = SOURCE_ROOT; };
3045
ADEBAAAF1D3F6D4B0016C6EC /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = "Sample-ObjC/Base.lproj/Main.storyboard"; sourceTree = SOURCE_ROOT; };
31-
DB9625B0214E0E1BE5F1552E /* Pods_Sample_ObjC.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Sample_ObjC.framework; sourceTree = BUILT_PRODUCTS_DIR; };
32-
FE3CBCA0488546702F927E83 /* Pods-Sample-ObjC.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample-ObjC.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample-ObjC/Pods-Sample-ObjC.debug.xcconfig"; sourceTree = "<group>"; };
3346
/* End PBXFileReference section */
3447

3548
/* Begin PBXFrameworksBuildPhase section */
3649
1A0F1E051B034B7100DA78D2 /* Frameworks */ = {
3750
isa = PBXFrameworksBuildPhase;
3851
buildActionMask = 2147483647;
3952
files = (
40-
7FFE87D531949188F84D7E83 /* Pods_Sample_ObjC.framework in Frameworks */,
53+
AD5AAA2A1D92A70F00557FDA /* Intercom.framework in Frameworks */,
4154
);
4255
runOnlyForDeploymentPostprocessing = 0;
4356
};
@@ -47,10 +60,9 @@
4760
1A0F1DFF1B034B7100DA78D2 = {
4861
isa = PBXGroup;
4962
children = (
63+
AD5AAA291D92A70F00557FDA /* Intercom.framework */,
5064
1A0F1E0A1B034B7100DA78D2 /* Sample-ObjC */,
5165
1A0F1E091B034B7100DA78D2 /* Products */,
52-
8AB311C50424F61D5208A751 /* Pods */,
53-
8782EEBF19893CF795EF2789 /* Frameworks */,
5466
);
5567
sourceTree = "<group>";
5668
};
@@ -87,36 +99,17 @@
8799
name = "Supporting Files";
88100
sourceTree = "<group>";
89101
};
90-
8782EEBF19893CF795EF2789 /* Frameworks */ = {
91-
isa = PBXGroup;
92-
children = (
93-
DB9625B0214E0E1BE5F1552E /* Pods_Sample_ObjC.framework */,
94-
);
95-
name = Frameworks;
96-
sourceTree = "<group>";
97-
};
98-
8AB311C50424F61D5208A751 /* Pods */ = {
99-
isa = PBXGroup;
100-
children = (
101-
FE3CBCA0488546702F927E83 /* Pods-Sample-ObjC.debug.xcconfig */,
102-
93B30CF1F49E31502D31CCE0 /* Pods-Sample-ObjC.release.xcconfig */,
103-
);
104-
name = Pods;
105-
sourceTree = "<group>";
106-
};
107102
/* End PBXGroup section */
108103

109104
/* Begin PBXNativeTarget section */
110105
1A0F1E071B034B7100DA78D2 /* Sample-ObjC */ = {
111106
isa = PBXNativeTarget;
112107
buildConfigurationList = 1A0F1E2B1B034B7100DA78D2 /* Build configuration list for PBXNativeTarget "Sample-ObjC" */;
113108
buildPhases = (
114-
AAC3A5E6BE30B1D6E335A900 /* [CP] Check Pods Manifest.lock */,
115109
1A0F1E041B034B7100DA78D2 /* Sources */,
116110
1A0F1E051B034B7100DA78D2 /* Frameworks */,
117111
1A0F1E061B034B7100DA78D2 /* Resources */,
118-
65D3AFB590F309B9B1EBD7B9 /* [CP] Embed Pods Frameworks */,
119-
D232BD6A19D4FF0F08125917 /* [CP] Copy Pods Resources */,
112+
AD5AAA251D92897000557FDA /* Embed Frameworks */,
120113
);
121114
buildRules = (
122115
);
@@ -172,54 +165,6 @@
172165
};
173166
/* End PBXResourcesBuildPhase section */
174167

175-
/* Begin PBXShellScriptBuildPhase section */
176-
65D3AFB590F309B9B1EBD7B9 /* [CP] Embed Pods Frameworks */ = {
177-
isa = PBXShellScriptBuildPhase;
178-
buildActionMask = 2147483647;
179-
files = (
180-
);
181-
inputPaths = (
182-
);
183-
name = "[CP] Embed Pods Frameworks";
184-
outputPaths = (
185-
);
186-
runOnlyForDeploymentPostprocessing = 0;
187-
shellPath = /bin/sh;
188-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample-ObjC/Pods-Sample-ObjC-frameworks.sh\"\n";
189-
showEnvVarsInLog = 0;
190-
};
191-
AAC3A5E6BE30B1D6E335A900 /* [CP] Check Pods Manifest.lock */ = {
192-
isa = PBXShellScriptBuildPhase;
193-
buildActionMask = 2147483647;
194-
files = (
195-
);
196-
inputPaths = (
197-
);
198-
name = "[CP] Check Pods Manifest.lock";
199-
outputPaths = (
200-
);
201-
runOnlyForDeploymentPostprocessing = 0;
202-
shellPath = /bin/sh;
203-
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";
204-
showEnvVarsInLog = 0;
205-
};
206-
D232BD6A19D4FF0F08125917 /* [CP] Copy Pods Resources */ = {
207-
isa = PBXShellScriptBuildPhase;
208-
buildActionMask = 2147483647;
209-
files = (
210-
);
211-
inputPaths = (
212-
);
213-
name = "[CP] Copy Pods Resources";
214-
outputPaths = (
215-
);
216-
runOnlyForDeploymentPostprocessing = 0;
217-
shellPath = /bin/sh;
218-
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample-ObjC/Pods-Sample-ObjC-resources.sh\"\n";
219-
showEnvVarsInLog = 0;
220-
};
221-
/* End PBXShellScriptBuildPhase section */
222-
223168
/* Begin PBXSourcesBuildPhase section */
224169
1A0F1E041B034B7100DA78D2 /* Sources */ = {
225170
isa = PBXSourcesBuildPhase;
@@ -336,11 +281,15 @@
336281
};
337282
1A0F1E2C1B034B7100DA78D2 /* Debug */ = {
338283
isa = XCBuildConfiguration;
339-
baseConfigurationReference = FE3CBCA0488546702F927E83 /* Pods-Sample-ObjC.debug.xcconfig */;
340284
buildSettings = {
341285
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
342286
CODE_SIGN_IDENTITY = "iPhone Developer";
343287
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
288+
FRAMEWORK_SEARCH_PATHS = (
289+
"$(inherited)",
290+
"$(PROJECT_DIR)",
291+
"$(PROJECT_DIR)/../../",
292+
);
344293
INFOPLIST_FILE = "$(SRCROOT)/Sample-ObjC/Info.plist";
345294
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
346295
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
@@ -353,11 +302,15 @@
353302
};
354303
1A0F1E2D1B034B7100DA78D2 /* Release */ = {
355304
isa = XCBuildConfiguration;
356-
baseConfigurationReference = 93B30CF1F49E31502D31CCE0 /* Pods-Sample-ObjC.release.xcconfig */;
357305
buildSettings = {
358306
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
359307
CODE_SIGN_IDENTITY = "iPhone Distribution";
360308
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution";
309+
FRAMEWORK_SEARCH_PATHS = (
310+
"$(inherited)",
311+
"$(PROJECT_DIR)",
312+
"$(PROJECT_DIR)/../../",
313+
);
361314
INFOPLIST_FILE = "$(SRCROOT)/Sample-ObjC/Info.plist";
362315
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
363316
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";

0 commit comments

Comments
 (0)