This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

udid-fetcher
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

udid-fetcher

udid-fetcher is an ExpressJS middleware for retrieving iOS device information such as:

  • UDID
  • Model
  • iOS Version
  • etc.

Install

Add to your project:

$ yarn add udid-fetcher

Usage

import express from 'express';
import UDIDFetcher from 'udid-fetcher';

let app = express();
let port = process.env.PORT;

app.get('/', (req, res) => {
	return res.send('visit /enroll to fetch UDID.');
});

app.use(
	'/',
	new UDIDFetcher({
		name: 'Profile Name',
		description: 'Profile Description',
		identifier: 'com.example.udid_fetcher',
		organization: 'Developer Name',
		apiURL: `https://example.com/`,
		query: {
			id: 'foobar',
		},
		done: (req, res) => {
			console.log(req.query.id); // "foobar"
			console.log(req.device); // The recieved device is found in req.device.
			return res.redirect('/');
		},
	}).router,
);

app.listen(port, () => {
	console.log(`Live at port ${port}`);
});

Note: You are required to have a callback URL that is secure (https).

Build from source

$ git clone https://github.com/itss0n1c/udid-fetcher.git
$ cd udid-fetcher/
$ yarn run build

Testing

Make sure to have a .env file with the content below:

API_URL=https://example.com
PORT=5000

Then run:

$ yarn run dev

Readme

Keywords

none

Package Sidebar

Install

npm i udid-fetcher

Weekly Downloads

13

Version

1.1.1

License

MIT

Unpacked Size

3.28 MB

Total Files

16

Last publish

Collaborators

  • s0n1c