expo-sms 11.1.0 → 11.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/android/build.gradle +4 -4
- package/build/SMS.d.ts +1 -1
- package/build/SMS.js +1 -1
- package/build/SMS.js.map +1 -1
- package/package.json +2 -2
- package/src/SMS.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 11.2.0 — 2023-02-03
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- On Android bump `compileSdkVersion` and `targetSdkVersion` to `33`. ([#20721](https://github.com/expo/expo/pull/20721) by [@lukmccall](https://github.com/lukmccall))
|
|
18
|
+
|
|
13
19
|
## 11.1.0 — 2022-12-30
|
|
14
20
|
|
|
15
21
|
### 🎉 New features
|
package/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ apply plugin: 'kotlin-android'
|
|
|
3
3
|
apply plugin: 'maven-publish'
|
|
4
4
|
|
|
5
5
|
group = 'host.exp.exponent'
|
|
6
|
-
version = '11.
|
|
6
|
+
version = '11.2.0'
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
9
9
|
def expoModulesCorePlugin = new File(project(":expo-modules-core").projectDir.absolutePath, "ExpoModulesCorePlugin.gradle")
|
|
@@ -59,7 +59,7 @@ afterEvaluate {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
android {
|
|
62
|
-
compileSdkVersion safeExtGet("compileSdkVersion",
|
|
62
|
+
compileSdkVersion safeExtGet("compileSdkVersion", 33)
|
|
63
63
|
|
|
64
64
|
compileOptions {
|
|
65
65
|
sourceCompatibility JavaVersion.VERSION_11
|
|
@@ -72,9 +72,9 @@ android {
|
|
|
72
72
|
|
|
73
73
|
defaultConfig {
|
|
74
74
|
minSdkVersion safeExtGet("minSdkVersion", 21)
|
|
75
|
-
targetSdkVersion safeExtGet("targetSdkVersion",
|
|
75
|
+
targetSdkVersion safeExtGet("targetSdkVersion", 33)
|
|
76
76
|
versionCode 28
|
|
77
|
-
versionName "11.
|
|
77
|
+
versionName "11.2.0"
|
|
78
78
|
}
|
|
79
79
|
lintOptions {
|
|
80
80
|
abortOnError false
|
package/build/SMS.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export { SMSAttachment, SMSResponse, SMSOptions };
|
|
|
14
14
|
* - If the status of the SMS message cannot be determined: `{ result: 'unknown' }`.
|
|
15
15
|
*
|
|
16
16
|
* Android does not provide information about the status of the SMS message, so on Android devices
|
|
17
|
-
* the Promise will always resolve with { result: 'unknown' }
|
|
17
|
+
* the Promise will always resolve with `{ result: 'unknown' }`.
|
|
18
18
|
*
|
|
19
19
|
* > Note: The only feedback collected by this module is whether any message has been sent. That
|
|
20
20
|
* means we do not check actual content of message nor recipients list.
|
package/build/SMS.js
CHANGED
|
@@ -29,7 +29,7 @@ function processAttachments(attachments) {
|
|
|
29
29
|
* - If the status of the SMS message cannot be determined: `{ result: 'unknown' }`.
|
|
30
30
|
*
|
|
31
31
|
* Android does not provide information about the status of the SMS message, so on Android devices
|
|
32
|
-
* the Promise will always resolve with { result: 'unknown' }
|
|
32
|
+
* the Promise will always resolve with `{ result: 'unknown' }`.
|
|
33
33
|
*
|
|
34
34
|
* > Note: The only feedback collected by this module is whether any message has been sent. That
|
|
35
35
|
* means we do not check actual content of message nor recipients list.
|
package/build/SMS.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SMS.js","sourceRoot":"","sources":["../src/SMS.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,OAAO,MAAM,WAAW,CAAC;AAKhC,SAAS,kBAAkB,CACzB,WAAwD;IAExD,IAAI,CAAC,WAAW,EAAE;QAChB,O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,CAAC,CAAC;AACrE,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC","sourcesContent":["/* eslint-disable no-unused-expressions */\nimport { UnavailabilityError, Platform } from 'expo-modules-core';\n\nimport ExpoSMS from './ExpoSMS';\nimport { SMSAttachment, SMSResponse, SMSOptions } from './SMS.types';\n\nexport { SMSAttachment, SMSResponse, SMSOptions };\n\nfunction processAttachments(\n attachments: SMSAttachment | SMSAttachment[] | undefined\n): SMSAttachment[] | null {\n if (!attachments) {\n return null;\n }\n attachments = Array.isArray(attachments) ? attachments : [attachments];\n if (Platform.OS === 'android' && attachments.length > 1) {\n if (__DEV__) {\n console.warn('Android only supports a single attachment. The first array item is used.');\n }\n attachments = attachments.slice(0, 1);\n }\n return attachments;\n}\n\n// @needsAudit\n/**\n * Opens the default UI/app for sending SMS messages with prefilled addresses and message.\n *\n * @param addresses An array of addresses (phone numbers) or single address passed as strings. Those\n * would appear as recipients of the prepared message.\n * @param message Message to be sent.\n * @param options A `SMSOptions` object defining additional SMS configuration options.\n *\n * @return Returns a Promise that fulfils with the SMS action is invoked by the user, with corresponding result:\n * - If the user cancelled the SMS sending process: `{ result: 'cancelled' }`.\n * - If the user has sent/scheduled message for sending: `{ result: 'sent' }`.\n * - If the status of the SMS message cannot be determined: `{ result: 'unknown' }`.\n *\n * Android does not provide information about the status of the SMS message, so on Android devices\n * the Promise will always resolve with { result: 'unknown' }
|
|
1
|
+
{"version":3,"file":"SMS.js","sourceRoot":"","sources":["../src/SMS.ts"],"names":[],"mappings":"AAAA,0CAA0C;AAC1C,OAAO,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElE,OAAO,OAAO,MAAM,WAAW,CAAC;AAKhC,SAAS,kBAAkB,CACzB,WAAwD;IAExD,IAAI,CAAC,WAAW,EAAE;QAChB,OAA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AAC,CAAC;AACrE,CAAC;AAED,cAAc;AACd;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,KAAK,UAAU,gBAAgB;IACpC,OAAO,OAAO,CAAC,gBAAgB,EAAE,CAAC;AACpC,CAAC","sourcesContent":["/* eslint-disable no-unused-expressions */\nimport { UnavailabilityError, Platform } from 'expo-modules-core';\n\nimport ExpoSMS from './ExpoSMS';\nimport { SMSAttachment, SMSResponse, SMSOptions } from './SMS.types';\n\nexport { SMSAttachment, SMSResponse, SMSOptions };\n\nfunction processAttachments(\n attachments: SMSAttachment | SMSAttachment[] | undefined\n): SMSAttachment[] | null {\n if (!attachments) {\n return null;\n }\n attachments = Array.isArray(attachments) ? attachments : [attachments];\n if (Platform.OS === 'android' && attachments.length > 1) {\n if (__DEV__) {\n console.warn('Android only supports a single attachment. The first array item is used.');\n }\n attachments = attachments.slice(0, 1);\n }\n return attachments;\n}\n\n// @needsAudit\n/**\n * Opens the default UI/app for sending SMS messages with prefilled addresses and message.\n *\n * @param addresses An array of addresses (phone numbers) or single address passed as strings. Those\n * would appear as recipients of the prepared message.\n * @param message Message to be sent.\n * @param options A `SMSOptions` object defining additional SMS configuration options.\n *\n * @return Returns a Promise that fulfils with the SMS action is invoked by the user, with corresponding result:\n * - If the user cancelled the SMS sending process: `{ result: 'cancelled' }`.\n * - If the user has sent/scheduled message for sending: `{ result: 'sent' }`.\n * - If the status of the SMS message cannot be determined: `{ result: 'unknown' }`.\n *\n * Android does not provide information about the status of the SMS message, so on Android devices\n * the Promise will always resolve with `{ result: 'unknown' }`.\n *\n * > Note: The only feedback collected by this module is whether any message has been sent. That\n * means we do not check actual content of message nor recipients list.\n *\n * @example\n * ```ts\n * const { result } = await SMS.sendSMSAsync(\n * ['0123456789', '9876543210'],\n * 'My sample HelloWorld message',\n * {\n * attachments: {\n * uri: 'path/myfile.png',\n * mimeType: 'image/png',\n * filename: 'myfile.png',\n * },\n * }\n * );\n * ```\n */\nexport async function sendSMSAsync(\n addresses: string | string[],\n message: string,\n options?: SMSOptions\n): Promise<SMSResponse> {\n if (!ExpoSMS.sendSMSAsync) {\n throw new UnavailabilityError('expo-sms', 'sendSMSAsync');\n }\n const finalAddresses = Array.isArray(addresses) ? addresses : [addresses];\n finalAddresses.forEach((address) => {\n if (address === null || address === undefined) {\n throw new TypeError('undefined or null address');\n }\n });\n const finalOptions = {\n ...options,\n } as SMSOptions;\n if (options?.attachments) {\n finalOptions.attachments = processAttachments(options?.attachments) || undefined;\n }\n return ExpoSMS.sendSMSAsync(finalAddresses, message, finalOptions);\n}\n\n// @needsAudit\n/**\n * Determines whether SMS is available. Always returns `false` in the iOS simulator, and in browser.\n *\n * @return Returns a promise that fulfils with a `boolean`, indicating whether SMS is available on this device.\n *\n * @example\n * ```ts\n * const isAvailable = await SMS.isAvailableAsync();\n * if (isAvailable) {\n * // do your SMS stuff here\n * } else {\n * // misfortune... there's no SMS available on this device\n * }\n * ```\n */\nexport async function isAvailableAsync(): Promise<boolean> {\n return ExpoSMS.isAvailableAsync();\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-sms",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.2.0",
|
|
4
4
|
"description": "Provides access to the system's UI/app for sending SMS messages.",
|
|
5
5
|
"main": "build/SMS.js",
|
|
6
6
|
"types": "build/SMS.d.ts",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"peerDependencies": {
|
|
41
41
|
"expo": "*"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "1815e2eaad8c753588c7b1eb74420174a28e01f4"
|
|
44
44
|
}
|
package/src/SMS.ts
CHANGED
|
@@ -37,7 +37,7 @@ function processAttachments(
|
|
|
37
37
|
* - If the status of the SMS message cannot be determined: `{ result: 'unknown' }`.
|
|
38
38
|
*
|
|
39
39
|
* Android does not provide information about the status of the SMS message, so on Android devices
|
|
40
|
-
* the Promise will always resolve with { result: 'unknown' }
|
|
40
|
+
* the Promise will always resolve with `{ result: 'unknown' }`.
|
|
41
41
|
*
|
|
42
42
|
* > Note: The only feedback collected by this module is whether any message has been sent. That
|
|
43
43
|
* means we do not check actual content of message nor recipients list.
|