Skip to content

Commit ed71fb1

Browse files
authored
Release 14.0.3 (#337)
* Bumped iOS and have first API working * Have first API working for Android * Now working with new APIs on both platforms * Fixed extraneous comma * Bumped version and added release notes * Package lock
1 parent eb5d78a commit ed71fb1

21 files changed

Lines changed: 187 additions & 69 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# Intercom for Cordova/PhoneGap
22

3+
## 14.0.3 (2024-12-11)
4+
5+
🐛 Bug Fixes
6+
* Solves a crash in carousels. (iOS)
7+
* Addressed issue where video input wasn’t available in a conversation. (iOS)
8+
* Fixes issue where first part in a conversation would fail to show as failed in the scenario where it didn’t send. (iOS)
9+
* Resolved some layout issues in the conversation screen for users with large font sizes enabled. (iOS)
10+
* Fixed the bug where users were unable to add a phone number in the attribute collector. (Android)
11+
* Fixed a crash caused by `IllegalArgumentException: y must be < bitmap.height()`. (Android)
12+
313
## 14.0.2 (2024-06-25)
414

515
🐛 Bug Fixes

Example/config.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
<allow-intent href="sms:*" />
1616
<allow-intent href="mailto:*" />
1717
<allow-intent href="geo:*" />
18+
<hook type="after_platform_add" src="hooks/iosDeploymentTarget.js" />
1819
<platform name="android">
1920
<allow-intent href="market:*" />
2021
<preference name="android-minSdkVersion" value="22" />
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const fs = require('fs');
2+
const path = require('path');
3+
4+
module.exports = function (context) {
5+
const platformRoot = path.join(context.opts.projectRoot, 'platforms/ios');
6+
const projectPbxproj = path.join(platformRoot, 'CordovaLib', 'CordovaLib.xcodeproj', 'project.pbxproj');
7+
8+
if (fs.existsSync(projectPbxproj)) {
9+
let contents = fs.readFileSync(projectPbxproj, 'utf8');
10+
11+
// Update deployment target
12+
contents = contents.replace(/IPHONEOS_DEPLOYMENT_TARGET = 11\.0;/g, 'IPHONEOS_DEPLOYMENT_TARGET = 15.0;');
13+
14+
fs.writeFileSync(projectPbxproj, contents, 'utf8');
15+
console.log('Updated CordovaLib deployment target to iOS 15.0');
16+
}
17+
};

Example/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
"cordova-plugin-intercom": {}
1212
}
1313
},
14-
"dependencies": {
15-
"cordova-android": "13.0.0",
16-
"cordova-ios": "^7.1.0"
17-
},
1814
"devDependencies": {
1915
"cordova-plugin-intercom": "file:../intercom-plugin"
16+
},
17+
"dependencies": {
18+
"cordova-android": "13.0.0",
19+
"cordova-ios": "7.1.1"
2020
}
2121
}

Example/www/css/index.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ body {
3232
padding:0px;
3333
text-transform:uppercase;
3434
width:100%;
35-
overflow: hidden;
35+
overflow: scroll;
3636
}
3737

3838
/* Portrait layout (default) */

Example/www/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<p><button id="help-center-data-api-fetch-btn">Fetch collections</button></p>
2525
<p><button id="help-center-data-api-fetch-content-btn">Fetch collection content</button></p>
2626
<p><button id="help-center-data-api-search-btn">Search help center</button></p>
27+
<p><button id="is-user-logged-in-btn">Check if user is logged in</button></p>
28+
<p><button id="fetch-logged-in-attributes-btn">Fetch logged in user attribtues</button></p>
2729
</div>
2830
<script type="text/javascript" src="cordova.js"></script>
2931
<script type="text/javascript" src="js/index.js"></script>

Example/www/js/index.js

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,27 @@ var app = {
124124
// Replace this with your own conversation Id
125125
var conversation = intercomContent.conversationWithConversationId('CONVERSATION_ID')
126126
intercom.presentContent(conversation);
127-
}, false);
127+
}, false);
128+
129+
document.getElementById("is-user-logged-in-btn").addEventListener("click", function(){
130+
var onSuccess = function(data) {
131+
console.log('User logged in status: ' + data);
132+
}
133+
var onError = function(code) {
134+
console.log('Failed to fetch logged in status :' + code);
135+
}
136+
intercom.isUserLoggedIn(onSuccess, onError);
137+
}, false);
138+
139+
document.getElementById("fetch-logged-in-attributes-btn").addEventListener("click", function(){
140+
var onSuccess = function(data) {
141+
console.log('Successfully fetched logged in attributes: ' + data);
142+
}
143+
var onError = function(code) {
144+
console.log('Failed to fetch logged in attributes: ' + code);
145+
}
146+
intercom.fetchLoggedInUserAttributes(onSuccess, onError);
147+
}, false);
128148
},
129149
// Update DOM on a Received Event
130150
receivedEvent: function(id) {

intercom-plugin/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

intercom-plugin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cordova-plugin-intercom",
3-
"version": "14.0.2",
3+
"version": "14.0.3",
44
"description": "Official Cordova plugin for Intercom",
55
"author": "Intercom",
66
"license": "MIT License",

intercom-plugin/plugin.xml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<engines>
1111
<engine name="cordova" version=">=12.0.0" />
1212
<engine name="cordova-android" version=">=13.0.0" />
13-
<engine name="cordova-ios" version="7.1.0" />
13+
<engine name="cordova-ios" version="7.1.1" />
1414
</engines>
1515

1616
<js-module name="Intercom" src="www/intercom.js">
@@ -40,9 +40,8 @@
4040
<source-file src="src/ios/ICMHelpCenterArticle+DictionaryConversion.m" />
4141
<source-file src="src/ios/ICMHelpCenterCollectionContent+DictionaryConversion.h" />
4242
<source-file src="src/ios/ICMHelpCenterCollectionContent+DictionaryConversion.m" />
43-
<source-file src="src/ios/ICMHelpCenterSection+DictionaryConversion.h" />
44-
<source-file src="src/ios/ICMHelpCenterSection+DictionaryConversion.m" />
45-
43+
<source-file src="src/ios/ICMUserAttributes+DictionaryConversion.h" />
44+
<source-file src="src/ios/ICMUserAttributes+DictionaryConversion.m" />
4645
<header-file src="src/ios/AppDelegate+IntercomPush.h" />
4746
<source-file src="src/ios/AppDelegate+IntercomPush.m" />
4847

@@ -69,7 +68,7 @@
6968
<source url="https://cdn.cocoapods.org/"/>
7069
</config>
7170
<pods use-frameworks="true">
72-
<pod name="Intercom" spec="~> 17.1.2" />
71+
<pod name="Intercom" spec="~> 18.2.1" />
7372
</pods>
7473
</podspec>
7574
</platform>
@@ -79,6 +78,7 @@
7978
<source-file src="src/android/HelpCenterCollectionModel.java" target-dir="src/io/intercom/android/sdk" />
8079
<source-file src="src/android/HelpCenterCollectionContentModel.java" target-dir="src/io/intercom/android/sdk" />
8180
<source-file src="src/android/HelpCenterCollectionSectionModel.java" target-dir="src/io/intercom/android/sdk" />
81+
<source-file src="src/android/RegistrationModel.java" target-dir="src/io/intercom/android/sdk" />
8282
<source-file src="src/android/CordovaHeaderInterceptor.java" target-dir="src/io/intercom/android/sdk" />
8383

8484
<framework src="src/android/intercom.gradle" custom="true" type="gradleReference" />

0 commit comments

Comments
 (0)