All Projects → martincik → React Native Hockeyapp

martincik / React Native Hockeyapp

Licence: mit
HockeyApp integration for React Native with Android and iOS support

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Native Hockeyapp

Swiftloader
A simple and beautiful activity indicator written in Swift
Stars: ✭ 116 (-10.08%)
Mutual labels:  cocoapods
Touchdraw
A subclass of UIView which allows you to draw with your fingers.
Stars: ✭ 119 (-7.75%)
Mutual labels:  cocoapods
Croc
Swift emoji string parsing library
Stars: ✭ 124 (-3.88%)
Mutual labels:  cocoapods
Towebviewcontroller
A view controller class for iOS that allows users to view web pages directly within an app.
Stars: ✭ 1,500 (+1062.79%)
Mutual labels:  cocoapods
Swiftuiblurview
This view is also part of SwiftUIKit: https://github.com/danielsaidi/SwiftUIKit
Stars: ✭ 120 (-6.98%)
Mutual labels:  cocoapods
Rcalendarpicker
RCalendarPicker A date picker control, Calendar calendar control, select control, calendar, date selection, the clock selection control. 日历控件 ,日历选择控件,日历,日期选择,时钟选择控件
Stars: ✭ 121 (-6.2%)
Mutual labels:  cocoapods
Foundationextension
Foundation/Cocoa/UIKit extension kit. Reference document:
Stars: ✭ 115 (-10.85%)
Mutual labels:  cocoapods
Cloudkitgdpr
Framework for allowing users to manage data stored in iCloud
Stars: ✭ 126 (-2.33%)
Mutual labels:  cocoapods
Actionclosurable
Extensions which helps to convert objc-style target/action to swifty closures
Stars: ✭ 120 (-6.98%)
Mutual labels:  cocoapods
Adpuzzleanimation
Inspired by Fabric - Answers animation. Allows to "build" given view with pieces. Allows to "destroy" given view into pieces
Stars: ✭ 123 (-4.65%)
Mutual labels:  cocoapods
Swifty360player
iOS 360-degree video player streaming from an AVPlayer.
Stars: ✭ 118 (-8.53%)
Mutual labels:  cocoapods
Sqift
Powerful Swift wrapper for SQLite
Stars: ✭ 119 (-7.75%)
Mutual labels:  cocoapods
Tinynetworking
🌩 Simple HTTP network abstraction layer written in Swift
Stars: ✭ 122 (-5.43%)
Mutual labels:  cocoapods
Emspinnerbutton
UIButton sublcass with loading animation
Stars: ✭ 117 (-9.3%)
Mutual labels:  cocoapods
Luexpandabletableview
A subclass of UITableView with expandable and collapsible sections
Stars: ✭ 125 (-3.1%)
Mutual labels:  cocoapods
Rhythmbox
A Rhythm Box System for your iOS app written in Swift. 🎵
Stars: ✭ 116 (-10.08%)
Mutual labels:  cocoapods
Bettersegmentedcontrol
An easy to use, customizable replacement for UISegmentedControl & UISwitch.
Stars: ✭ 1,782 (+1281.4%)
Mutual labels:  cocoapods
Floatinglabeltextfieldswiftui
Floating Label TextField for SwiftUI. FloatingLabelTextFieldSwiftUI
Stars: ✭ 128 (-0.78%)
Mutual labels:  cocoapods
Ppnetworkhelper
AFNetworking 3.x 与YYCache封装
Stars: ✭ 1,586 (+1129.46%)
Mutual labels:  cocoapods
Vialersiplib
An Objective-c wrapper for PJSIP
Stars: ✭ 122 (-5.43%)
Mutual labels:  cocoapods

❗️ While I do not have the time to actively maintain RN-hockeyapp anymore, I am open to new maintainers taking the lead. If you would be interested, contact me at ladislav (at) benloop (dot) com. ❗️

react-native-hockeyapp

HockeyApp integration for React Native.

Requirements

  • iOS 7+
  • Android
  • React Native >0.17
  • CocoaPods

Installation

npm install react-native-hockeyapp --save

iOS

You will need:

CocoaPods (Setup)

Podfile

Add to your ios/Podfile:

pod "HockeySDK"

Run pod install

Open YourProject.xcworkspace

Add the RNHockeyApp library to your project

  • Drag-and-drop RNHockeyApp.xcodeproj from ./node_modules/react-native-hockeyapp/RNHockeyApp into your Project > Libraries.
  • Drag-and-drop libRNHockeyApp.a from Libraries/RNHockeyApp/Products into Linked Frameworks and Libraries

Changes to AppDelegate.m

If you wish to use Device UUID authentication or Web authentication, the following must be added to ios/AppDelegate.m

#import "RNHockeyApp.h"

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation {
  if( [[BITHockeyManager sharedHockeyManager].authenticator handleOpenURL:url
                                                        sourceApplication:sourceApplication
                                                               annotation:annotation]) {
    return YES;
  }

  /* Your own custom URL handlers */

  return NO;
}

You also need to add RNHockeyApp to Build Settings > Search Paths > Header Search Paths as a recursive search path, adding the following to both Debug and Release and ensuring recursive is selected (double click each line as opposed to editing it as text, and you'll see the dropdowns):

$(SRCROOT)/../node_modules/react-native-hockeyapp/RNHockeyApp

Android (React Native >= 0.29)

Google project configuration

  • In android/setting.gradle
...
include ':react-native-hockeyapp', ':app'
project(':react-native-hockeyapp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-hockeyapp/android')
  • In android/build.gradle
...
repositories {
    jcenter()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.3.1'
    classpath 'net.hockeyapp.android:HockeySDK:4.1.0' // <--- add this
}
  • In android/app/build.gradle
apply plugin: "com.android.application"
...
dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:0.29.+"
    compile project(":react-native-hockeyapp") // <--- add this
}
  • Manifest file
<application ..>
    <activity android:name="net.hockeyapp.android.UpdateActivity" />
    <activity android:name="net.hockeyapp.android.FeedbackActivity" />
</application>
  • Register Module (in MainApplication.java)
import com.slowpath.hockeyapp.RNHockeyAppModule; // <--- import
import com.slowpath.hockeyapp.RNHockeyAppPackage;  // <--- import

public class MainApplication extends Application implements ReactApplication {
  ......

  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new RNHockeyAppPackage(MainApplication.this), // <------ add this line to yout MainApplication class
      new MainReactPackage());
  }

  ......

}

Android (React Native 0.17 - 0.28) - Only react-native-hockeyapp:0.4.2 or less

Google project configuration

  • In android/setting.gradle
...
include ':react-native-hockeyapp', ':app'
project(':react-native-hockeyapp').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-hockeyapp/android')
  • In android/build.gradle
...
repositories {
    jcenter()
    mavenCentral()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.3.1'
    classpath 'net.hockeyapp.android:HockeySDK:4.1.2' // <--- add this
}
  • In android/app/build.gradle
apply plugin: "com.android.application"
...
dependencies {
    compile fileTree(dir: "libs", include: ["*.jar"])
    compile "com.android.support:appcompat-v7:23.0.1"
    compile "com.facebook.react:react-native:0.17.+"
    compile project(":react-native-hockeyapp") // <--- add this
}
  • Manifest file
<application ..>
    <activity android:name="net.hockeyapp.android.UpdateActivity" />
    <activity android:name="net.hockeyapp.android.FeedbackActivity" />
</application>
  • Register Module (in MainActivity.java)
import com.slowpath.hockeyapp.RNHockeyAppModule; // <--- import
import com.slowpath.hockeyapp.RNHockeyAppPackage;  // <--- import

public class MainActivity extends ReactActivity {
  ......

  @Override
  protected List<ReactPackage> getPackages() {
    return Arrays.<ReactPackage>asList(
      new RNHockeyAppPackage(this), // <------ add this line to yout MainActivity class
      new MainReactPackage());
  }

  ......

}

Usage

From your JS files for both iOS and Android:

var HockeyApp = require('react-native-hockeyapp');

componentWillMount() {
    HockeyApp.configure(HOCKEY_APP_ID, true);
}

componentDidMount() {
    HockeyApp.start();
    HockeyApp.checkForUpdate(); // optional
}

You have available these methods:

HockeyApp.configure(HockeyAppId: string, autoSendCrashReports: boolean = true, authenticationType: AuthenticationType = AuthenticationType.Anonymous, appSecret: string = '', ignoreDefaultHandler: string = false); // Configure the settings
HockeyApp.start(); // Start the HockeyApp integration
HockeyApp.checkForUpdate(); // Check if there's new version and if so trigger update
HockeyApp.feedback(); // Ask user for feedback.
HockeyApp.addMetadata(metadata: object); // Add metadata to crash report.  The argument must be an object with key-value pairs.
HockeyApp.generateTestCrash(); // Generate test crash. Only works in no-debug mode.

The following authentication methods are available:

  1. AuthenticationType.Anonymous - Anonymous Authentication
  2. AuthenticationType.EmailSecret - HockeyApp email & App Secret
  3. AuthenticationType.EmailPassword - HockeyApp email & password
  4. AuthenticationType.DeviceUUID - HockeyApp registered device UUID
  5. AuthenticationType.Web - HockeyApp Web Auth (iOS only)

Contributions

See https://github.com/slowpath/react-native-hockeyapp/graphs/contributors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].