npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@chrobyte/appcenter

v5.0.0

Published

Capacitor Plugin for Microsoft's App Center SDK.

Downloads

4

Readme

Maintainers

| Maintainer | GitHub | Social | | -----------| -------| -------| | John Borges | johnborges | @johnborges |

Features

  • Adjusting the Log Level
  • Identify Users and Installations
  • Control SDK Services
  • Set Custom Properties

Install

npm install @capacitor-community/appcenter
npx cap sync

Usage

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)
  }

}

API

getInstallId()

getInstallId() => Promise<{ value: string; }>

Returns AppCenter unique installation identifier.

Returns: Promise<{ value: string; }>

Since: 0.0.1


setUserId(...)

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()

getSdkVersion() => Promise<{ value: string; }>

Get the version of the native App Center SDK

Returns: Promise<{ value: string; }>

Since: 0.0.1


isEnabled()

isEnabled() => Promise<{ value: boolean; }>

Check if App Center is enabled or not as a whole.

Returns: Promise<{ value: boolean; }>

Since: 0.0.1


setEnabled(...)

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(...)

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()

getLogLevel() => Promise<{ value: LogLevel; }>

Returns currently set LogLevel.

Returns: Promise<{ value: LogLevel; }>

Since: 0.2.0


setLogLevel(...)

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(...)

setNetworkRequestsAllowed(options?: { isAllowed: boolean; } | undefined) => Promise<void>

Set whether SDK can send network requests.

| Param | Type | | ------------- | ------------------------------------ | | options | { isAllowed: boolean; } |

Since: 0.6.0


isNetworkRequestsAllowed()

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(...)

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


Enums

LogLevel

| Members | Value | | ------------- | --------------- | | VERBOSE | 2 | | DEBUG | 3 | | INFO | 4 | | WARNING | 5 | | ERROR | 6 | | ASSERT | 7 | | NONE | 99 |