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

@seermedical/cordova-plugin-minew-trackerkit

v2.0.1

Published

A Cordova plugin for communicating with the minew trackerkit

Downloads

9

Readme

Minew-TrackerKit

Installation

cordova plugin add https://github.com/seermedical/cordova-plugin-minew-trackerkit.git

A Cordova plugin on iOS and Android to communicate with the Minew TrackerKit Framework

Plugin development environment: https://github.com/seermedical/seer-beacon-tracker

Plugin structure

  • central manager
  • central array of buttons that can be easily identified and accessed by all functions

Buttons

  • address: mac address (unique ID)
  • name: could be null
  • model: F4S or Finder or null
  • RSSI: received signal strength
  • battery: int between 0-100 for battery level
  • distance: near, mid, far (currently only available on iOS)
  • status: connected, disconnected, connecting, failed

Plugin functions

startScan(success, failure)

  • locate buttons and add to central array
  • success - receieves buttons when they are found
  • failure - currently only applies to android (no permission)

TODO

  • should accept scanTime (and stopScan after elapsed time)
  • put in fail callbakc

stopScan(success, failure)

  • stop currently running scan

find(address, success, failure)

  • look for previously bound beacon address and connect
  • success - callback on connection
  • failure - callback if connection fails

TODO

  • functions are working as intended via a workaround but the internal code was not working as expected from the Minew SDK. Need to followup with Minew.

connect(address, success, failure)

  • connect to a button for mac address
  • success - callback on connection
  • failure - callback if connection fails

disconnect(address, success, failure)

  • remove button for mac address
  • success - called on success
  • success - called on failure

subscribeToClick(address, success, failure)

  • listen to beacon click
  • success - gets called every click
  • failure - gets called if it fails to subscribe

subscribeToStatus(address, success, failure)

  • listen to beacon connection status
  • success - gets called on reconnection
  • failure - gets called on disconnection

iOS Quirks

  • you need to strip architectures from the connected MTTrackit framework before it will upload to the app store.

This script should be added as a run script to XCode (see this answer). To add run script in XCode go to project target, select 'Build Phases' tab, choose Editor -> Add Build Phase -> Add Run Script Build Phase, Click on the newly created Run Script, copy in the following code:

echo "Target architectures: $ARCHS"

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"

find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK
do
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable)
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME"
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")

FRAMEWORK_TMP_PATH="$FRAMEWORK_EXECUTABLE_PATH-tmp"

# remove simulator's archs if location is not simulator's directory
case "${TARGET_BUILD_DIR}" in
*"iphonesimulator")
    echo "No need to remove archs"
    ;;
*)
    if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "i386") ; then
    lipo -output "$FRAMEWORK_TMP_PATH" -remove "i386" "$FRAMEWORK_EXECUTABLE_PATH"
    echo "i386 architecture removed"
    rm "$FRAMEWORK_EXECUTABLE_PATH"
    mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
    fi
    if $(lipo "$FRAMEWORK_EXECUTABLE_PATH" -verify_arch "x86_64") ; then
    lipo -output "$FRAMEWORK_TMP_PATH" -remove "x86_64" "$FRAMEWORK_EXECUTABLE_PATH"
    echo "x86_64 architecture removed"
    rm "$FRAMEWORK_EXECUTABLE_PATH"
    mv "$FRAMEWORK_TMP_PATH" "$FRAMEWORK_EXECUTABLE_PATH"
    fi
    ;;
esac

echo "Completed for executable $FRAMEWORK_EXECUTABLE_PATH"
echo $(lipo -info "$FRAMEWORK_EXECUTABLE_PATH")

done

Android Quirks

  • permissions - don't start scanning straight away. The user needs to grant location access first.

Minew Resources

General Resources