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

@bringg/react-native-bringg-driver-sdk

v1.14.6

Published

A React Native wrapper for the native (iOS and Android) Bringg driver SDKs (currently supporting the active customer use case)

Downloads

22

Readme

react-native-bringg-driver-sdk

A React Native wrapper for the native (iOS and Android) Bringg driver SDKs (currently supporting the active customer use case)

Installation

npm install @bringg/react-native-bringg-driver-sdk --save

or

yarn add @bringg/react-native-bringg-driver-sdk

iOS specific installation

  1. Change minimum iOS version to 12. This should be done in the Podfile and on the target in the project settings in Xcode.
  2. Add use_frameworks! to Podfile. When adding use_frameworks!, if you are using Flipper you will need to either disable it or change linking to static libraries. If you can not use use_frameworks! in your Podfile, please see item #6
  3. Perform a pod install
cd ios && pod install && cd ..
  1. Add capabilities and privacy usage description
  2. Set BUILD_LIBRARY_FOR_DISTRIBUTION for Pods required by the BringgDriverSDK
# All dependencies of the BringgDriverSDK needs to be built with the 'BUILD_LIBRARY_FOR_DISTRIBUTION' configuration set to 'YES'
BringgDriverSDKDependencies = [
  'Socket.IO-Client-Swift',
  'Starscream',
  'libPhoneNumber-iOS',
  'GzipSwift',
  'Alamofire',
  'XCGLogger',
  'RealmSwift',
  'ObjcExceptionBridging',
  'Kingfisher',
  'KeychainAccess',
  'DeviceKit'
]

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      if BringgDriverSDKDependencies.include? target.name
        config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
      end
    end
  end
end
  1. (Optional) If you can not use use_frameworks! in your Podfile, please add the following code to your Podfile to configure all Bringg dependencies as dynamic frameworks.
pre_install do |installer|
    Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
    installer.pod_targets.each do |pod|
      if BringgDriverSDKDependencies.include?(pod.name) 
        def pod.build_type
          Pod::BuildType.dynamic_framework
        end
      end          
    end
  end

Removing Flipper

  1. In the Podfile remove the following from your target
  add_flipper_pods!
  post_install do |installer|
    flipper_post_install(installer)
  end
  1. Remove initialization code of Flipper from AppDelegate.m.

Static library linking to keep Flipper and use_frameworks!

An example of how to keep Flipper working with use_frameworks! exists in /example/ios/Podfile

$static_framework = [
  'FlipperKit',
  'Flipper',
  'Flipper-Folly',
  'CocoaAsyncSocket',
  'ComponentKit',
  'Flipper-PeerTalk',
  'Flipper-RSocket',
  'YogaKit',
  'CocoaLibEvent',
  'openssl-ios-bitcode',
  'boost-for-react-native'
]

pre_install do |installer|
  Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {}
  installer.pod_targets.each do |pod|
    next unless $static_framework.include?(pod.name)

    def pod.build_type
      Pod::BuildType.static_library
    end
  end
end

Android project configuration

  1. Make sure to set the minSdkVersion to at least 21.
  2. Make sure your app meets Google Play's target API level requirements.

Running the example app

The example app has a basic implementation of expected use case flows. To run it, clone the repo and then do:

yarn #prepares the sdk for the example app

cd example
yarn

# for ios
cd ios && pod install && cd ..
yarn ios

# for android
yarn android

License

Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) More details

Troubleshooting

Build Issue with FBReactNativeSpec

A known issue with React NAtive dependecy. reference:

https://github.com/facebook/react-native/issues/31034

When you get this error:

error: Cycle in dependencies between targets 'BringgDriverSdkIosExample' and 'FBReactNativeSpec'; 
building could produce unreliable results.

On the example app, the solution is to go to the Pods/FBReactNativeSpec target in Xcode, and move the [CP-User] build script above the Headers.

Running with xcode 11.3.1 (iOS)

The Native iOS SDK is precompiled - when using a swift version that is not the latest, you will need to do another step in order to use a native SDK that was compiled with the same Swift version that you are using.

In podfile add to your application target the following pods:

  pod 'BringgDriverSDK', :git => 'https://github.com/bringg/Bringg-iOS-DriverSDK.git', :branch => '1.10.0-xcode-11.3.1'  
  pod 'BringgDriverSDKObjc', :git => 'https://github.com/bringg/Bringg-iOS-DriverSDK.git', :branch => '1.10.0-xcode-11.3.1'

You can see an example of this in /Example/ios/Podfile