ferdiu / react-native-connect-iq-mobile-sdk

This package provides a React Native wrapper around the Android and iOS Garmin Connect IQ Mobile SDKs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-native-connect-iq-mobile-sdk

This package provides a React Native wrapper around the Android and iOS Garmin Connect IQ Mobile SDKs

Installation

npm install react-native-connect-iq-mobile-sdk

Usage

Please see the example project for usage. It provides Android and iOS examples of all functionality in the SDK.

Also see the Garmin docs for background on the functionality.

iOS

https://developer.garmin.com/connect-iq/core-topics/mobile-sdk-for-ios/

Note the XCode project setup required, which is also required for using this in react native. Please see the iOS example.

In particular, you need to handle the openURL method in your AppDelegate

- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url options:(nonnull NSDictionary<UIApplicationOpenURLOptionsKey,id> *)options {
    NSString* sourceApp = options[UIApplicationOpenURLOptionsSourceApplicationKey];
    NSLog(@"Received URL from '%@': %@", sourceApp, url);

   RCTBridge *bridge = [RCTBridge currentBridge];

   ConnectIqMobileSdk * connectIqMobileSdk = [bridge moduleForName:@"ConnectIqMobileSdk"];

   return [connectIqMobileSdk handleOpenURL:url sourceApplication:sourceApp];
}

Android

https://developer.garmin.com/connect-iq/core-topics/mobile-sdk-for-android/

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT


Made with create-react-native-library

About

This package provides a React Native wrapper around the Android and iOS Garmin Connect IQ Mobile SDKs

License:MIT License


Languages

Language:Objective-C 39.3%Language:Java 22.7%Language:Objective-C++ 14.4%Language:TypeScript 12.4%Language:Ruby 4.6%Language:Monkey C 4.1%Language:JavaScript 2.3%Language:C 0.1%Language:Swift 0.1%