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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crowdfarming/marketing-cloud

v1.1.0

Published

Capacitor plugin for the Salesforce Marketing Cloud MobilePush SDK

Readme

@crowdfarming/marketing-cloud

Capacitor plugin for the Salesforce Marketing Cloud MobilePush SDK (iOS + Android).

v1.0.0 replaces the old Cordova plugin (@crowdfarming/cordova-plugin-marketingcloudsdk). Works with both CocoaPods and Swift Package Manager on iOS.

Install

npm install @crowdfarming/marketing-cloud
npx cap sync

Configuration

iOS

The SDK is initialized on plugin load from capacitor.config.ts:

plugins: {
  MarketingCloud: {
    appId: '...',
    accessToken: '...',
    serverUrl: 'https://xxxx.device.marketingcloudapis.com/',
    analyticsEnabled: true,
    delayRegistrationUntilContactKeyIsSet: true
  }
}

The APNs device token must be forwarded to the SDK from the app's AppDelegate:

func application(_ application: UIApplication, didRegisterForRemoteNotificationsWithDeviceToken deviceToken: Data) {
    SFMCSdk.mp.setDeviceToken(deviceToken)
}

Android

The SDK is initialized before Application.onCreate by a ContentProvider that reads the Cordova-style preferences from res/xml/config.xml, generated by Capacitor from capacitor.config.ts:

cordova: {
  preferences: {
    "com.salesforce.marketingcloud.app_id": "...",
    "com.salesforce.marketingcloud.access_token": "...",
    "com.salesforce.marketingcloud.tenant_specific_endpoint": "https://xxxx.device.marketingcloudapis.com/",
    "com.salesforce.marketingcloud.notification_small_icon": "ic_notification",
    "com.salesforce.marketingcloud.analytics": "true",
    "com.salesforce.marketingcloud.delay_registration_until_contact_key_is_set": "true"
  }
}

The consuming app must add the Salesforce Maven repository to its root android/build.gradle:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven { url = "https://salesforce-marketingcloud.github.io/MarketingCloudSDK-Android/repository" }
    }
}

API

import { MarketingCloud } from '@crowdfarming/marketing-cloud';

await MarketingCloud.isInitialized();          // { initialized: boolean }
await MarketingCloud.setContactKey({ contactKey: 'SF_CONTACT_ID' });
await MarketingCloud.setAttribute({ key: 'brand', value: 'CROWDFARMING' });
await MarketingCloud.getSystemToken();         // { token: string }
await MarketingCloud.enableLogging();          // verbose native SDK logs (QA)
await MarketingCloud.logSdkState();            // dumps SDK state to device log

Only the surface used by cf-shell-app is exposed. The rest of the MobilePush SDK (tags, analytics toggles, events…) can be added on demand.