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 🙏

© 2025 – Pkg Stats / Ryan Hefner

kiot-cordova-plugin-tracking-transparency

v1.0.1

Published

Cordova plugin to use the App Tracking Transparency framework for iOS 14.5 and above.

Downloads

24

Readme

README

Cordova Plugin for App Tracking Transparency Framework

This framework allows to implement the App Tracking Transparency Framework for iOS 14.5. Also you can display a screen before asking the user for permission.

Installation

cordova plugin add cordova-plugin-tracking-transparency

Implementation

First you have to add a string in the app info.plist for NSUserTrackingUsageDescription. To do this, add following code in your config.xml and reinstall ios platform.

<edit-config file="*-Info.plist" mode="merge" target="NSUserTrackingUsageDescription">
            <string>ENTER YOUR TEXT HERE</string>
</edit-config>

The plugin consists of three functions. Next you see a declaration of the plugins api for typescript.

declare var window: {plugins: {
    impacTracking: {
        canRequestTracking: (callback: (result: boolean) => void) => void,
        trackingAvailable: (callback: (result: boolean) => void) => void
        requestTracking: (info: string | undefined, callback: (result: boolean) => void, errorCallback: (error: any) => void) => void
    }
}};

Now first you should check if tracking is available. If not you should check if it is possible to request tracking. This is not available for os below 14.5 or if the user disabled the tracking globally. If tracking is not available but can be requested perform the requestTracking method. The user gets now a popup displayed asking him to allow tracking.

Optional display Informations before asking

If you perform requestTracking you can optiobal add a info object that describes the screen displayed before the popup. The object should be stringified bevor adding to requestTracking.

private async request(info: TrackingRequestInfo | undefined): Promise<boolean> {
    const sub = new Subject<boolean>();
    window.plugins.impacTracking.requestTracking(JSON.stringify(info), (result) => {
        sub.next(result);
        sub.complete();
    }, (error) => {
        console.log(error);
        sub.next(false);
        sub.complete();
    });
    return sub.toPromise();
}    

Note that image can be a base64 image or a name of a SF-Symbol.

interface TrackingRequestInfo {
    primaryColor: string;
    secondaryColor: string;
    onPrimaryColor: string;
    onSecondaryColor: string;
    title: string;
    text?: string;
    subText: string;
    buttonTitle: string;
    reasons: TrackingRequestReason[];
}

interface TrackingRequestReason {
    text: string;
    image: string;
    tintImage: boolean;
}