Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@falconeta/capacitor-plugin-idfa
Advanced tools
Get native IDFA or Advertising ID from iOS or Android device.
Capacitor provides a native mobile runtime and API layer for web apps. It allows mobile frontend frameworks (such as Ionic Framework) to access native device features.
The Advertising Identifier (IDFA on iOS, AAID on Android) is a device-specific, unique, resettable ID for advertising that allows ddevelopers and marketers to track activity for advertising purposes.
This npm module allows any mobile application that uses Capacitor to access the Advertising ID, following the OS specific definition and user permissions.
The module output in the javascript framework is the following:
interface AdvertisingInfoResponse {
id: string; // the Advertising ID (or null if not defined/permitted)
isAdTrackingLimited: boolean; // the user defined permission to track
}
In version 2.0 we switched to Capacitor 3.0 and there are breaking changes, so if you are on Capacitor 2.x don't upgrade or just use version 1.x
Note: the web version always returns null
npm install @sparkfabrik/capacitor-plugin-idfa
or
yarn add @sparkfabrik/capacitor-plugin-idfa
Nothing to add
In info.plist
make sure to add a description for the user permission request:
<key>NSUserTrackingUsageDescription</key>
<string>...</string>
import {
Idfa,
AdvertisingInfoResponse,
} from '@sparkfabrik/capacitor-plugin-idfa';
// Get advertising id.
Idfa.getAdvertisingInfo()
.then((response: AdvertisingInfoResponse) => {
if (response.isAdTrackingLimited === true) {
console.error('Ads tracking not allowed by user.');
}
console.log(response.id);
})
.catch((err: Error) => {
console.error(err);
});
FAQs
Get native IDFA or Advertising ID from iOS or Android device.
The npm package @falconeta/capacitor-plugin-idfa receives a total of 4 weekly downloads. As such, @falconeta/capacitor-plugin-idfa popularity was classified as not popular.
We found that @falconeta/capacitor-plugin-idfa demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.