Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@homee/react-native-mapbox-navigation
Advanced tools
Smart Mapbox turn-by-turn routing based on real-time traffic for React Native.
Smart Mapbox turn-by-turn routing based on real-time traffic for React Native. A navigation UI ready to drop into your application.
Before installing the SDK, you will need to gather the appropriate credentials. The SDK requires two pieces of sensitive information from your Mapbox account. If you don't have a Mapbox account: sign up and navigate to your Account page. You'll need:
Downloads:Read
scope.Downloads:Read
scope is checked.npm install @homee/react-native-mapbox-navigation
Read the iOS specific instructions below before running pod install
.
Make sure your react native project has an Objective-C bridging header for swift. If you don't have a bridging header you can follow these steps here below in the dropdown.
After you create the Swift file, you should be prompted to choose if you want to configure an Objective-C Bridging Header. Select “Create Bridging Header”.
This file is usually named YourProject-Bridging-Header.h. Don’t change this name manually, because Xcode configures the project with this exact filename.
Place your secret token in a .netrc
file in your home directory that contains this:
machine api.mapbox.com
login mapbox
password <INSERT SECRET TOKEN>
Place your public token in your project's Info.plist
and and add a MGLMapboxAccessToken
key whose value is your public access token.
Now you are ready to install the cocoapod:
cd ios && pod install
If you are experiencing a "multiple commands produce" build error in your Xcode project then you will need to add this entry below to the top of your ios podfile:
install! 'cocoapods', :disable_input_output_paths => true
For more information you can read the docs provided by Mapbox.
Place your secret token in your android app's top level gradle.properties
file:
MAPBOX_DOWNLOADS_TOKEN=SECRET_TOKEN_HERE
Open up your project-level build.gradle
file. Declare the Mapbox Downloads API's releases/maven
endpoint in the repositories
block.
allprojects {
repositories {
maven {
url 'https://api.mapbox.com/downloads/v2/releases/maven'
authentication {
basic(BasicAuthentication)
}
credentials {
// Do not change the username below.
// This should always be `mapbox` (not your username).
username = "mapbox"
// Use the secret token you stored in gradle.properties as the password
password = project.properties['MAPBOX_DOWNLOADS_TOKEN'] ?: ""
}
}
}
}
Place your public token in your project's android/app/src/main/AndroidManifest.xml
<meta-data android:name="MAPBOX_ACCESS_TOKEN"
android:value="PUBLIC_TOKEN_HERE" />
For more information you can read the docs provided by Mapbox.
import * as React from 'react';
import { StyleSheet, View } from 'react-native';
import MapboxNavigation from 'react-native-mapbox-navigation';
export const SomeComponent = () => {
return (
<View style={styles.flexIt}>
<MapboxNavigation
origin={[-97.760288, 30.273566]}
destination={[-97.918842, 30.494466]}
shouldSimulateRoute={true}
onProgressChange={(event) => {
const { latitude, longitude } = event.nativeEvent;
}}
onError={(event) => {
const { message } = event.nativeEvent;
}}
style={styles.flexIt}
/>
</View>
);
};
const styles = StyleSheet.create({
flexIt: {
flex: 1,
},
});
MapboxNavigation
Propsorigin
(Required)Array that contains the longitude and latitude for the starting point.
[$longitude, $latitude]
destination
(Required)Array that contains the longitude and latitude for the destination point.
[$longitude, $latitude]
shouldSimulateRoute
Boolean that controls route simulation. Set this as true
to auto navigate which is useful for testing or demo purposes. Defaults to false
.
onProgressChange
Function that is called frequently during route navigation. It receives latitude
and longitude
as parameters that represent the current location during navigation.
onError
Function that is called whenever an error occurs. It receives a message
parameter that describes the error that occurred.
Contributions are very welcome. Please check out the contributing document.
This project is MIT licensed.
FAQs
Smart Mapbox turn-by-turn routing based on real-time traffic for React Native.
The npm package @homee/react-native-mapbox-navigation receives a total of 9 weekly downloads. As such, @homee/react-native-mapbox-navigation popularity was classified as not popular.
We found that @homee/react-native-mapbox-navigation demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.