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

inbrain-surveys-legacy

v1.0.10

Published

Survey library to monetize your mobile app, provided by inBrain.ai (for Legacy build System, XCode 11.2.1)

Downloads

7

Readme

InBrain Surveys

[Legacy] Survey library to monetize your mobile app, provided by inBrain.ai

Requirements

This SDK is targeted to the following tools:

  • XCode 11.2.1 with the Legacy Build System
  • Swift 5
  • React Native >=0.59.9

If you are using newer versions of these tools, please refer to the 'inbrain-surveys' npm package.

Installation

Install and link the module:

$ npm install inbrain-surveys-legacy --save

$ react-native link inbrain-surveys

Extra steps iOS

Visit your app’s Target in the Project Settings and Choose the General tab. Scroll down until you hit the Embedded Binaries section…

  1. Press ‘+’, Add Other...
  2. Select the InBrainSurveys_SDK_Legacy.framework in your project nodes_modules/inbrain-surveys-legacy/ios/Frameworks folder and select 'Embed and Sign'
  3. Search for Framework Search Paths in your Target and add a recursive entry $(SRCROOT)/../node_modules/inbrain-surveys-legacy
  4. Confirm

Configure your info.plist as specified here

Add jitpack repository you your gradle configuration android/build.gradle > allprojects > repositories maven { // Inbrain url 'https://jitpack.io' }`

Usage

import inbrain from 'inbrain-surveys-legacy';

Available functions:

Initialise the SDK

inbrain.init(clientId: string, secretId: string, options?: InitOptions)
  • clientId: The client ID obtained from your account manager (NOT USED ON iOS, use info.plist instead)
  • clientSecret: The client secret obtained from your account manager.
  • options: [Optional] Options. Possible optional options:
    • title: The surveys view title
    • navbarColor: The surveys view navigation barcolor (hexadecimal string color, e.g #ff0000)
    • sessionUid: The session uid obtained from your account manager.
    • userId: The user identifier (usually an email)
    • dataPoints: Dictionnary containing data points. e.g: { gender: "male", age: "25"}

Show the surveys webview

inbrain.showSurveys()

Get the rewards

inbrain.getRewards() (Useful for server less app)

Confirm a list of rewards

inbrain.confirmRewards(rewards: InBrainReward[]) (Useful for server less app)
  • rewards: List of rewards to confirm

On webview dismissed

inbrain.setOnCloseListener(callback: () => void) 
  • callback: callback to perform when it happens

On webview dismissed from page

inbrain.setOnCloseListenerFromPage(callback: () => void) 
  • callback: callback to perform when it happens

Development

To install and build locally, pull the repository. Run

npm install 
npm run build 
npm run start 

You can alternatively run 'npm run watch' instead of 'npm run build' if you want live reload.

Troubleshoots

[BUILD TIME] 'InBrainSurveys_SDK_Legacy/InBrainSurveys_SDK_Legacy-Swift.h' file not found

This problem usually happens if the framework is not set in the Embedded Binaries. See above for set up. Clean and build the project after changes.

[BUILD TIME] framework not found InBrainSurveys_SDK_Legacy

This problem usually happens if the 'Framework Search Path' is not set correctly or the framework is not Embedded with the app. See above for set up. Clean and build the project after changes.

[RUNTIME] Library not loaded: @rpath/libswiftCore.dylib

This problem can happen if your project doesn't have the Swift standard libraries included. Set the 'Always Embed Swift Standard Libraries' to yes in your target to fix it. Clean and build the project after changes. This problem also consistently appears when usinx XCode10

[RUNTIME] Application crashing without obvious reasons

This problem can happen if you didn't configure the info.plist correctly. See above for set up. Clean and build the project after changes.