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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ws1-react-native-sdk

v25.10.2

Published

The Workspace ONE SDK for React Native allows you to integrate the Workspace ONE SDKs for iOS and Android into your React Native applications.

Readme

ws1-react-native-sdk

Use this document to install the Omnissa Workspace One SDK Plugin for React-Native. The plugin helps enterprise app developers add enterprise- grade security, conditional access, and compliance capabilities to mobile applications.

Supported Components

This plugin works with the listed component versions.

  • React Native version as 0.81.5 with new arch as enabled
  • Workspace ONE UEM Console 2402+ (may need to be higher depending on specific features)
  • Android 7.0+ (for Android SDK component) / API level 26 OR above / Android Studio with the Gradle Android Build System (Gradle) 8.2.2+ or later / Workspace ONE Intelligent Hub for Android version 25.02 or later
  • iOS & iPadOS 16+ or later (for iOS SDK component) / Xcode 16+ or later

Initial Setup

Please find the Prerequisites for using the React Native SDK

Package installation

$ npm install ws1-react-native-sdk --save

Mostly automatic installation

$ react-native link ws1-react-native-sdk

  • Sample Project can now be found in node_modules as WS1ReactNativeSampleApp

Additional Setup

iOS

Add following code in AppDelegate

-(BOOL)application:(UIApplication *)app openURL:(NSURL *)url options:(NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options
{
  //Add following code for posting Notification for URL
  NSNotification *info = [[NSNotification alloc]initWithName:@"UIApplicationOpenURLOptionsSourceApplicationKey" object:url userInfo:options];
  [[NSNotificationCenter defaultCenter] postNotification:info];
  
  return YES;
}

Swift equivalent

  func application(
    _ app: UIApplication,
    open url: URL,
    options: [UIApplication.OpenURLOptionsKey: Any] = [:]
  ) -> Bool {
    // Post notification for URL open event
    let notification = Notification(
      name: Notification.Name("UIApplicationOpenURLOptionsSourceApplicationKey"),
      object: url,
      userInfo: options
    )
    NotificationCenter.default.post(notification)
    return true
  }

Update info.plist source with below URLSchemeTypes pass your app url scheme , it should be unique for an app .

 	<array>
		<dict>
			<key>CFBundleURLSchemes</key>
			<array>
				<string>ws1react</string>
			</array>
		</dict>
	</array>
	 
	<key>LSApplicationQueriesSchemes</key>
	<array>
		<string>wsonesdk</string>
		<string>awws1enroll</string>
		<string>airwatch</string>
	</array>

Update pod file with $WSRN.post_install(installer) in post_install command

  post_install do |installer|
      $WSRN.post_install(installer)
    # https://github.com/facebook/react-native/blob/main/packages/react-native/scripts/react_native_pods.rb#L197-L202
    react_native_post_install(
      installer,
      config[:reactNativePath],
      :mac_catalyst_enabled => false,
      # :ccache_enabled => true
    )
  end 

Android

  1. Add the library files location to the application build configuration
    repositories {
    //Old implementation
    // flatDir {
    //     dirs "$rootDir/../node_modules/ws1-sdk-react-native/android/libs"
    // }
    //Change to new Maven URL
    jcenter()
    maven {
        url = uri("https://maven.pkg.github.com/euc-releases/Android-WorkspaceONE-SDK/")
        credentials {
            /** In gradle.properties file of root project folder, add github.user=GITHUB_USERNAME  & github.token=GITHUB_ACCESS_TOKEN **/
            username = project.findProperty("github.user") ?: System.getenv("USERNAME")
            password = project.findProperty("github.token") ?: System.getenv("TOKEN")
        }
    }
    maven {
        url = uri("https://maven.pkg.github.com/euc-releases/ws1-intelligencesdk-sdk-android/")
        credentials {
            /** In gradle.properties file of root project folder, add github.user=GITHUB_USERNAME  & github.token=GITHUB_ACCESS_TOKEN **/
            username = project.findProperty("github.user") ?:System.getenv("USERNAME")
            password = project.findProperty("github.token") ?:System.getenv("TOKEN")
        }
    }
    }
  1. Enable core library desugaring in app/build.gradle
android {
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_17
        targetCompatibility JavaVersion.VERSION_17
        coreLibraryDesugaringEnabled true
    }
}

dependencies {
    // The version of react-native is set by the React Native Gradle Plugin
   
    coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'
}

// Force jetbrains annotation 23.0.0
configurations.all {
    resolutionStrategy {
        exclude group:'com.intellij' , module:'annotations'
        force 'org.jetbrains:annotations:23.0.0'
    }
}
  1. Modify AndroidManifest.xml for Main Launcher
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
            android:launchMode="singleTask"
            android:windowSoftInputMode="adjustResize">

        </activity>
        <activity
            android:name="com.airwatch.login.ui.activity.SDKSplashActivity" android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" /> 
            </intent-filter>
        </activity>
  1. Update your Main Activity
import com.workspaceonesdk.WorkspaceOneSdkActivity

class MainActivity : WorkspaceOneSdkActivity() {

    /**
     * Returns the name of the main component registered from JavaScript. This is used to schedule
     * rendering of the component.
     */
    override fun getMainComponentName(): String = "WS1ReactNativeSampleApp"
}

  1. Add SDKEventImpl.java
import android.content.Context;
import android.os.Bundle;
import android.util.Log;
import org.koin.core.component.KoinComponent;
import com.airwatch.sdk.profile.AnchorAppStatus;
import com.airwatch.sdk.profile.ApplicationProfile;
import com.airwatch.sdk.shareddevice.ClearReasonCode;
import com.airwatch.event.WS1AnchorEvents;
import org.koin.core.Koin;
import org.koin.core.component.KoinComponent;
import org.koin.mp.KoinPlatformTools;

public class SDKEventImpl implements WS1AnchorEvents, KoinComponent {
    @Override
    public void onApplicationConfigurationChange(Bundle bundle, Context context) {

    }

    @Override
    public void onApplicationProfileReceived(Context context, String s, ApplicationProfile applicationProfile) {
        Log.d("SDK Init","onApplicationProfileReceived");
    }

    @Override
    public void onClearAppDataCommandReceived(Context context, ClearReasonCode clearReasonCode) {
        Log.d("SDK Init","onClearAppDataCommandReceived");

    }

    @Override
    public void onAnchorAppStatusReceived(Context context, AnchorAppStatus anchorAppStatus) {

    }

    @Override
    public void onAnchorAppUpgrade(Context context, boolean b) {

    }

    @Override
    public Koin getKoin() {
        return KoinPlatformTools.INSTANCE.defaultContext().get();
    }
}
  1. Update your Android Application subclass as follows
    • Declare that the class implements the WorkspaceOneSDKApplication interface.
    • Move the code from the body of your onCreate method, if any, to an override of the AWSDKApplication onPostCreate method.
    • Override the AWSDKApplication getMainActivityIntent() method to return an Intent for the application’s main Activity.
    • Override the following Android Application methods:
      • attachBaseContext
import com.workspaceonesdk.WorkspaceOneSdkApplication
import com.facebook.react.soloader.OpenSourceMergedSoMapping
public class MainApplication extends WorkspaceOneSdkApplication implements ReactApplication {

    // Application-specific overrides : Comment onCreate() out and move the code to onPostCreate()
    
    //  override public fun onCreate() {
    //    super.onCreate()
    //  }

    // Application-specific overrides : Copy all the code from onCreate() to onPostCreate()

    override fun onPostCreate() {
        super.onPostCreate()
        val preferences: SharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(applicationContext)
        preferences.edit().putString("debug_http_host", "localhost:8088").apply()
        SoLoader.init(this, OpenSourceMergedSoMapping)
        initializeFlipper(this, reactNativeHost.reactInstanceManager)
        load()
    }

    override fun getMainActivityIntent(): Intent =
    Intent(applicationContext, MainActivity::class.java)

    override fun getEventHandler(): WS1AnchorEvents = SDKEventImpl()
    
    
}

Feature Description

Initialization of the SDK adds the listed features to your application, depending on the configurations set in the SDK profile in the Workspace One UEM Console.

  • Application level passcode
  • Single sign on
  • Data loss prevention
    • Disable Screenshot (Android only)
    • Restrict open-in for documents, web links, and email to approved applications only Restrict copy/paste (SDK provides flag value)
    • Restrict access to app when device is offline
    • Branding of AirWatch splash screens when SDK application is launched on device

Feature Implementation

Please follow document at implementation.

Release Notes

  • Updated Version of WorkspaceOne SDKs(25.8.0 for iOS and 25.02.4 for Android)

Workspace One SDK Documentation

For further details about the Workspace One SDK, navigate to Workspace-ONE-SDK and select the required platform, SDK version and Workspace ONE UEM console version.

License

Workspace One License

Open Source Link

Workspace One Open Source Link

Questions and Feedback

For any questions/feedback or to report an issue, please reach out to Omnissa Customer Connect