Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@capacitor-community/appcenter
Advanced tools
@capacitor-community/appcenter
Capacitor Plugin for Microsoft's Visual Studio App Center SDK. Contains additional helper APIs suitable for some projects.
Maintainer | GitHub | Social |
---|---|---|
John Borges | johnborges | @johnborges |
npm install @capacitor-community/appcenter
npx cap sync
import AppCenter from '@capacitor-community/appcenter';
const appCenterInfo = async () => {
try {
const { value: sdkEnabled } = await AppCenter.isEnabled()
const { value: installId } = await AppCenter.getInstallId()
const { value: sdkVersion } = await AppCenter.getSdkVersion()
const { value: logLevel } = await AppCenter.getLogLevel()
console.debug(sdkEnabled);
console.debug(installId);
console.debug(sdkVersion);
console.debug(logLevel);
}
catch (error) {
console.error(error)
}
}
getInstallId()
setUserId(...)
getSdkVersion()
isEnabled()
setEnabled(...)
setCustomProperties(...)
getLogLevel()
setLogLevel(...)
setNetworkRequestsAllowed(...)
isNetworkRequestsAllowed()
setCountryCode(...)
getInstallId() => Promise<{ value: string; }>
Returns AppCenter unique installation identifier.
Returns: Promise<{ value: string; }>
Since: 0.0.1
setUserId(options: { userId: string; }) => Promise<void>
Set a user ID that's used to augment crash reports.
Param | Type | Description |
---|---|---|
options | { userId: string; } | Ex. "your-user-id" |
Since: 0.0.1
getSdkVersion() => Promise<{ value: string; }>
Get the version of the native App Center SDK
Returns: Promise<{ value: string; }>
Since: 0.0.1
isEnabled() => Promise<{ value: boolean; }>
Check if App Center is enabled or not as a whole.
Returns: Promise<{ value: boolean; }>
Since: 0.0.1
setEnabled(options: { enabled: boolean; }) => Promise<void>
Toggle all App Center services at runtime. When disabled, the SDK won't forward any information to App Center.
Param | Type |
---|---|
options | { enabled: boolean; } |
Since: 0.7.0
setCustomProperties(options: { properties: CustomProperties; }) => Promise<void>
App Center allows you to define custom properties as key value pairs in your app. You may use custom properties for various purposes. For instance, you can use custom properties to segment your users, and then send push notifications to a specific audience.
Param | Type |
---|---|
options | { properties: CustomProperties; } |
Since: 2.0.0
getLogLevel() => Promise<{ value: LogLevel; }>
Returns currently set LogLevel.
Returns: Promise<{ value: LogLevel; }>
Since: 0.2.0
setLogLevel(options: { logLevel: LogLevel; }) => Promise<void>
You can control the amount of log messages that show up from App Center in the console. Log messages show in the console on iOS and LogCat on Android.
By default, it's set to Assert for the App Store environment and Warning otherwise. To have as many log messages as possible, use Verbose.
Note: setLogLevel
API can't increase logging for app startup code, before JavaScript is loaded.
Param | Type |
---|---|
options | { logLevel: LogLevel; } |
Since: 0.2.0
setNetworkRequestsAllowed(options?: { isAllowed: boolean; } | undefined) => Promise<void>
Set whether SDK can send network requests.
Param | Type |
---|---|
options | { isAllowed: boolean; } |
Since: 0.6.0
isNetworkRequestsAllowed() => Promise<{ value: boolean; }>
Check whether sending data in the App Center SDK is allowed or not.
Returns: Promise<{ value: boolean; }>
Since: 0.6.0
setCountryCode(options: { countryCode: string; }) => Promise<void>
Set the two-letter ISO country code. Android only
Param | Type | Description |
---|---|---|
options | { countryCode: string; } | the two-letter ISO country code. See <code>https://www.iso.org/obp/ui/#search</code> for more information. |
Since: 2.0.0
Members | Value |
---|---|
VERBOSE | 2 |
DEBUG | 3 |
INFO | 4 |
WARNING | 5 |
ERROR | 6 |
ASSERT | 7 |
NONE | 99 |
FAQs
Capacitor Plugin for Microsoft's App Center SDK.
We found that @capacitor-community/appcenter demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 42 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.