Skip to content

Commit 1429e66

Browse files
authored
iOS 17 updates (#131)
* Removed deprecated methods and added fix to podfile for Xcode 15 * Updated to Intercom 16.0.1 for iOS
1 parent 320657a commit 1429e66

5 files changed

Lines changed: 27 additions & 132 deletions

File tree

example/ios/IntercomReactNativeExample.xcodeproj/project.pbxproj

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,8 @@
166166
7D95B165267240E3008096E0 /* Frameworks */,
167167
7D95B167267240E3008096E0 /* Resources */,
168168
7D95B16A267240E3008096E0 /* Bundle React Native code and images */,
169-
2E290AEE444BD7895C572BEF /* [CP] Embed Pods Frameworks */,
170169
AD4381D24626F6203C6978AC /* [CP] Copy Pods Resources */,
170+
AA5BB63B02167C167F5286EE /* [CP] Embed Pods Frameworks */,
171171
);
172172
buildRules = (
173173
);
@@ -250,23 +250,6 @@
250250
shellPath = /bin/sh;
251251
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport ENTRY_FILE=index.tsx\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
252252
};
253-
2E290AEE444BD7895C572BEF /* [CP] Embed Pods Frameworks */ = {
254-
isa = PBXShellScriptBuildPhase;
255-
buildActionMask = 2147483647;
256-
files = (
257-
);
258-
inputFileListPaths = (
259-
"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks-${CONFIGURATION}-input-files.xcfilelist",
260-
);
261-
name = "[CP] Embed Pods Frameworks";
262-
outputFileListPaths = (
263-
"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks-${CONFIGURATION}-output-files.xcfilelist",
264-
);
265-
runOnlyForDeploymentPostprocessing = 0;
266-
shellPath = /bin/sh;
267-
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks.sh\"\n";
268-
showEnvVarsInLog = 0;
269-
};
270253
4F0A6FC082772762E3E4C96C /* [CP] Check Pods Manifest.lock */ = {
271254
isa = PBXShellScriptBuildPhase;
272255
buildActionMask = 2147483647;
@@ -344,6 +327,23 @@
344327
shellPath = /bin/sh;
345328
shellScript = "set -e\n\nexport NODE_BINARY=node\nexport ENTRY_FILE=index.tsx\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
346329
};
330+
AA5BB63B02167C167F5286EE /* [CP] Embed Pods Frameworks */ = {
331+
isa = PBXShellScriptBuildPhase;
332+
buildActionMask = 2147483647;
333+
files = (
334+
);
335+
inputFileListPaths = (
336+
"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks-${CONFIGURATION}-input-files.xcfilelist",
337+
);
338+
name = "[CP] Embed Pods Frameworks";
339+
outputFileListPaths = (
340+
"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks-${CONFIGURATION}-output-files.xcfilelist",
341+
);
342+
runOnlyForDeploymentPostprocessing = 0;
343+
shellPath = /bin/sh;
344+
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-IntercomReactNativeExampleUI/Pods-IntercomReactNativeExampleUI-frameworks.sh\"\n";
345+
showEnvVarsInLog = 0;
346+
};
347347
AD4381D24626F6203C6978AC /* [CP] Copy Pods Resources */ = {
348348
isa = PBXShellScriptBuildPhase;
349349
buildActionMask = 2147483647;

example/ios/Podfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ target 'IntercomReactNativeExample' do
4444
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
4545
end
4646
config.build_settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
47+
config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] ||= ['$(inherited)', '_LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION']
4748
end
4849
end
4950

example/ios/Podfile.lock

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ PODS:
7373
- FlipperKit/FlipperKitNetworkPlugin
7474
- fmt (6.2.1)
7575
- glog (0.3.5)
76-
- Intercom (15.2.0)
77-
- intercom-react-native (5.3.0):
78-
- Intercom (~> 15.2.0)
76+
- Intercom (16.0.1)
77+
- intercom-react-native (5.3.1):
78+
- Intercom (~> 16.0.1)
7979
- React-Core
8080
- libevent (2.1.12)
8181
- OpenSSL-Universal (1.1.1100)
@@ -533,8 +533,8 @@ SPEC CHECKSUMS:
533533
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
534534
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
535535
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
536-
Intercom: c849529af6a2b1926e57251382c3c09d4aad625a
537-
intercom-react-native: 2a6925bca18d8484483c2f8fb8b48b59ef1c7952
536+
Intercom: 62fe4d94519fba99f17df3f7a0c62dc7dbcb7b02
537+
intercom-react-native: bfa2ea64fba2b38f3b0c48afe020b05ac0007cb3
538538
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
539539
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
540540
RCT-Folly: 0080d0a6ebf2577475bda044aa59e2ca1f909cda
@@ -569,6 +569,6 @@ SPEC CHECKSUMS:
569569
Yoga: dc109b79db907f0f589fc423e991b09ec42d2295
570570
YogaKit: f782866e155069a2cca2517aafea43200b01fd5a
571571

572-
PODFILE CHECKSUM: 9f0fd08562d3218b07861937dd89c963bff7aaa8
572+
PODFILE CHECKSUM: a7cafffdaddc0dfe4e20cc0d2b857d47f9bcf58b
573573

574-
COCOAPODS: 1.12.1
574+
COCOAPODS: 1.11.3

intercom-react-native.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ Pod::Spec.new do |s|
1717
s.resource_bundles = { 'IntercomFramework' => ['ios/assets/*'] }
1818

1919
s.dependency "React-Core"
20-
s.dependency "Intercom", '~> 15.2.0'
20+
s.dependency "Intercom", '~> 16.0.1'
2121
end

src/index.tsx

Lines changed: 0 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,6 @@ import {
77

88
const { IntercomModule, IntercomEventEmitter } = NativeModules;
99

10-
/**
11-
* @deprecated Please use `UserAttributes` instead.
12-
*/
13-
export type Registration = Partial<{
14-
email: string;
15-
userId: string;
16-
}>;
17-
1810
export enum Visibility {
1911
GONE = 'GONE',
2012
VISIBLE = 'VISIBLE',
@@ -47,8 +39,6 @@ export const IntercomEvents = {
4739

4840
type EventType =
4941
| 'IntercomUnreadConversationCountDidChangeNotification'
50-
| 'IntercomHelpCenterDidShowNotification'
51-
| 'IntercomHelpCenterDidHideNotification'
5242
| 'IntercomWindowDidHideNotification'
5343
| 'IntercomWindowDidShowNotification';
5444

@@ -59,21 +49,6 @@ export type MetaData = {
5949
[key: string]: any;
6050
};
6151

62-
/**
63-
* @deprecated Please use `UserAttributes` instead.
64-
*/
65-
export type UpdateUserParamList = {
66-
companies?: Company[];
67-
customAttributes?: CustomAttributes;
68-
email?: string;
69-
languageOverride?: string;
70-
name?: string;
71-
phone?: string;
72-
signedUpAt?: number;
73-
unsubscribedFromEmails?: boolean;
74-
userId?: string;
75-
};
76-
7752
export type UserAttributes = {
7853
companies?: Company[];
7954
customAttributes?: CustomAttributes;
@@ -310,61 +285,6 @@ export type IntercomType = {
310285
event: EventType,
311286
callback: (response: { count?: number; visible: boolean }) => void
312287
) => EmitterSubscription;
313-
314-
//////////////////////////////////////////////////////////////////////
315-
// Depreacted functions. These will be removed in a future release. //
316-
//////////////////////////////////////////////////////////////////////
317-
318-
/**
319-
* @deprecated `registerIdentifiedUser` is deprecated and will be removed in a future release. Use `loginUserWithUserAttributes` instead.
320-
*/
321-
registerIdentifiedUser(params: Registration): Promise<boolean>;
322-
323-
/**
324-
* @deprecated `registerUnidentifiedUser` is deprecated and will be removed in a future release. Use `loginUnidentifiedUserWithSuccess` instead.
325-
*/
326-
registerUnidentifiedUser(): Promise<boolean>;
327-
328-
/**
329-
* @deprecated `updateUser` is deprecated and will be removed in a future release. Use `updateUser` instead.
330-
*/
331-
updateUser(params: UpdateUserParamList): Promise<boolean>;
332-
333-
/**
334-
* @deprecated `displayMessenger` is deprecated and will be removed in a future release. Use `present` instead.
335-
*/
336-
displayMessenger(): Promise<boolean>;
337-
338-
/**
339-
* @deprecated `displayHelpCenter` is deprecated and will be removed in a future release. Use `presentSpace` instead.
340-
*/
341-
displayHelpCenter(): Promise<boolean>;
342-
343-
/**
344-
* @deprecated `displayMessageComposer` is deprecated and will be removed in a future release. Use `presentMessageComposer` instead.
345-
* @see presentMessageComposer for details
346-
*/
347-
displayMessageComposer(initialMessage?: string): Promise<boolean>;
348-
349-
/**
350-
* @deprecated `displayArticle` is deprecated and will be removed in a future release. Use `presentContent` instead.
351-
*/
352-
displayArticle(articleId: string): Promise<boolean>;
353-
354-
/**
355-
* @deprecated `displayCarousel` is deprecated and will be removed in a future release. Use `presentContent` instead.
356-
*/
357-
displayCarousel(carouselId: string): Promise<boolean>;
358-
359-
/**
360-
* @deprecated `displaySurvey` is deprecated and will be removed in a future release. Use `presentContent` instead.
361-
*/
362-
displaySurvey(surveyId: string): Promise<boolean>;
363-
364-
/**
365-
* @deprecated `displayHelpCenterCollections` is deprecated and will be removed in a future release. Use `presentContent` instead.
366-
*/
367-
displayHelpCenterCollections(collections?: string[]): Promise<boolean>;
368288
};
369289

370290
const Intercom: IntercomType = {
@@ -425,32 +345,6 @@ const Intercom: IntercomType = {
425345
};
426346
return listener;
427347
},
428-
429-
/**
430-
* @depreacted methods
431-
*/
432-
registerIdentifiedUser: (registrationParams) =>
433-
IntercomModule.loginUserWithUserAttributes(registrationParams),
434-
registerUnidentifiedUser: () => IntercomModule.loginUnidentifiedUser(),
435-
displayMessenger: () => IntercomModule.presentIntercom(),
436-
displayHelpCenter: () =>
437-
IntercomModule.presentIntercomSpace(Space.helpCenter),
438-
displayMessageComposer: (initialMessage = undefined) =>
439-
IntercomModule.presentMessageComposer(initialMessage),
440-
displayArticle: (articleId: string) =>
441-
IntercomModule.presentContent(
442-
IntercomContent.articleWithArticleId(articleId)
443-
),
444-
displayCarousel: (carouselId: string) =>
445-
IntercomModule.presentContent(
446-
IntercomContent.carouselWithCarouselId(carouselId)
447-
),
448-
displaySurvey: (surveyId: string) =>
449-
IntercomModule.presentContent(IntercomContent.surveyWithSurveyId(surveyId)),
450-
displayHelpCenterCollections: (collections = [] as string[]) =>
451-
IntercomModule.presentContent(
452-
IntercomContent.helpCenterCollectionsWithIds(collections)
453-
),
454348
};
455349

456350
export default Intercom;

0 commit comments

Comments
 (0)