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

snappers-sdk

v0.3.5

Published

Snappers SDK cordova plugin

Downloads

5

Readme

Getting Started with the SnappersSDK plugin for Cordova (iOS)

Step 1: Instalation

  1. Add iOS platform to your project. note that it is crusual that you install ios platform version 5.0.0 or higher.
    From command line, in your project directory, run the following:

    cordova platform add [email protected]

    If you previously installed iOS platform, make sure that you update it to version 5.0.0 or higher as following:

    cordova platform update [email protected]
  2. Install SnappersSDK plugin. From the command line, in your project root directory, run the following:

    $ cordova plugin add snappers-sdk

Step 2: Obtain SDK token and secret codes and provide us with APNS certificate

Snappers identifies developers by their app's bundle id. To create a developer account and obtain the token and secret codes required by the SDK, drop us a message to [email protected], and include your app's bundle id.

Step 3: Configure App Settings

  1. In Xcode, from the target’s Build Settings tab, set Enable Bitcode option to ​ NO.
  2. In the target’s Capabilities tab, enable Push Notifications, Keychain Sharing and Background Modes.
  3. In the target’s Capabilities tab, under Background Modes, enable Location updates and Remote notifications.

Step 4: Add required keys to your info.plist file

Snappers requires the following keys to be addded to the info.plist file.
Cordova developers might see this file as {PROJECT-NAME}-info.plist

  • Privacy - Camera Usage Description : Add description
  • Privacy - Location When In Use Usage Description : Add description
  • Privacy - Location Always Usage Description : Add description
  • Privacy - Location Always and When In Use Usage Description : Add description
  • Privacy - Microphone Usage Description : Add description
  • Privacy - Photo Library Usage Description : Add description
  • App Transport Security Settings
    • Allow Arbitrary Loads : YES

Either add them manually one by one, or use the following instructions to add them collectively:

from the xCode project, in the Project Navigator, right click on Info.plist, and choose "Open as" → "Source Code" Paste the following snippet into your existing plist. just before the closing tags at the end of the file

.
.
.

<key>NSAppTransportSecurity</key>
<dict>
	<key>NSAllowsArbitraryLoads</key>
	<true/>
</dict>
<key>NSCameraUsageDescription</key>
<string>We require access in order to record and broadcast videos</string>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>We require access to your location in order to match relevant events for your location</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>We require access to your location  to find relevant events for you and to validate users content origin</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We require access to your location  to find relevant events for you and to validate users content origin</string>
<key>NSMicrophoneUsageDescription</key>
<string>We requires access to your microphone in order to record and broadcast videos</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>We require access to your photo library to allow you to upload prerecorded videos</string>   

.
.
.
</dict>
</plist>

Step 5: Facebook and Twitter authentication (Optional)

If you decide on using Snappers' Facebook or Twitter authentication, We'll require some additional keys in the info.plist file

  • URL types
    • item
      • URL Schemes
        • URL identifier : Facebook
        • item : fb1973807389602856
    • item
      • URL Schemes
        • URL identifier : Twitter
        • item : twitterkit-c8k1VkrIs7tHDuHkcc5kzLJAX

Either add them manually one by one, or use the following instructions to add them collectively:

from the xCode project, in the Project Navigator, right click on Info.plist, and click "Open as" → "Source Code" Paste the following snippet into your existing plist.

<key>CFBundleURLTypes</key>
    <array>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>fb1973807389602856</string>
            </array>
        </dict>
        <dict>
            <key>CFBundleURLSchemes</key>
            <array>
                <string>twitterkit-c8k1VkrIs7tHDuHkcc5kzLJAX</string>
            </array>
        </dict>
    </array>

Step 6: Add 'Strip architecture' script to avoid rejections when deploying to App Store.

from the xCode project, In the target’s Build Phases tab add a new script and paste in the following :

APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}"
find "$APP_PATH" -name 'SnappersSDK.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"

EXTRACTED_ARCHS=()

for ARCH in $ARCHS
do
echo "Extracting $ARCH from $FRAMEWORK_EXECUTABLE_NAME"
lipo -extract "$ARCH" "$FRAMEWORK_EXECUTABLE_PATH" -o "$FRAMEWORK_EXECUTABLE_PATH-$ARCH"
EXTRACTED_ARCHS+=("$FRAMEWORK_EXECUTABLE_PATH-$ARCH")
done

echo "Merging extracted architectures: ${ARCHS}"
lipo -o "$FRAMEWORK_EXECUTABLE_PATH-merged" -create "${EXTRACTED_ARCHS[@]}"
rm "${EXTRACTED_ARCHS[@]}"

echo "Replacing original executable with thinned version"
rm "$FRAMEWORK_EXECUTABLE_PATH"
mv "$FRAMEWORK_EXECUTABLE_PATH-merged" "$FRAMEWORK_EXECUTABLE_PATH"
done

Step 7: Notifications (Optional)

Snappers SDK works best when sending users invitations to broadcast via push notifications.
If you wish to use this feature, we will also need you to send us your apple push notification certificate, along with its password.

Step 8: Using Snappers API

You can continue to our step by step API tutorial
Or test SnappersSDK plugin using our Cordova demo app found here