@jadamsbit/react-native-mapbox-navigation 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitattributes +1 -0
- package/CONTRIBUTING.md +11 -0
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/android/.gradle/7.3.3/checksums/checksums.lock +0 -0
- package/android/.gradle/7.3.3/checksums/md5-checksums.bin +0 -0
- package/android/.gradle/7.3.3/checksums/sha1-checksums.bin +0 -0
- package/android/.gradle/7.3.3/dependencies-accessors/dependencies-accessors.lock +0 -0
- package/android/.gradle/7.3.3/dependencies-accessors/gc.properties +0 -0
- package/android/.gradle/7.3.3/executionHistory/executionHistory.lock +0 -0
- package/android/.gradle/7.3.3/fileChanges/last-build.bin +0 -0
- package/android/.gradle/7.3.3/fileHashes/fileHashes.lock +0 -0
- package/android/.gradle/7.3.3/gc.properties +0 -0
- package/android/.gradle/buildOutputCleanup/buildOutputCleanup.lock +0 -0
- package/android/.gradle/buildOutputCleanup/cache.properties +2 -0
- package/android/.gradle/vcs-1/gc.properties +0 -0
- package/android/README.md +14 -0
- package/android/build.gradle +99 -0
- package/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/android/gradle.properties +4 -0
- package/android/gradlew +244 -0
- package/android/gradlew.bat +92 -0
- package/android/src/main/AndroidManifest.xml +4 -0
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationManager.kt +122 -0
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationPackage.kt +16 -0
- package/android/src/main/java/com/jadamsbit/mapboxnavigation/MapboxNavigationView.kt +794 -0
- package/android/src/main/res/layout/navigation_view.xml +84 -0
- package/android/src/main/res/values/styles.xml +15 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +12 -0
- package/dist/typings.d.ts +40 -0
- package/dist/typings.js +1 -0
- package/example/.buckconfig +6 -0
- package/example/.eslintrc.js +4 -0
- package/example/.flowconfig +65 -0
- package/example/.prettierrc.js +7 -0
- package/example/.watchmanconfig +1 -0
- package/example/App.js +51 -0
- package/example/Gemfile +6 -0
- package/example/Gemfile.lock +100 -0
- package/example/NavigationComponent.js +56 -0
- package/example/__tests__/App-test.js +14 -0
- package/example/_bundle/config +2 -0
- package/example/_ruby-version +1 -0
- package/example/android/.gradle/8.2/checksums/checksums.lock +0 -0
- package/example/android/.gradle/8.2/fileChanges/last-build.bin +0 -0
- package/example/android/.gradle/8.2/fileHashes/fileHashes.lock +0 -0
- package/example/android/.gradle/8.2/gc.properties +0 -0
- package/example/android/.gradle/vcs-1/gc.properties +0 -0
- package/example/android/app/_BUCK +55 -0
- package/example/android/app/build.gradle +232 -0
- package/example/android/app/build_defs.bzl +19 -0
- package/example/android/app/debug.keystore +0 -0
- package/example/android/app/proguard-rules.pro +10 -0
- package/example/android/app/src/debug/AndroidManifest.xml +13 -0
- package/example/android/app/src/debug/java/com/basicapp/ReactNativeFlipper.java +72 -0
- package/example/android/app/src/main/AndroidManifest.xml +30 -0
- package/example/android/app/src/main/java/com/basicapp/MainActivity.java +15 -0
- package/example/android/app/src/main/java/com/basicapp/MainApplication.java +81 -0
- package/example/android/app/src/main/res/drawable/rn_edit_text_material.xml +36 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/example/android/app/src/main/res/values/strings.xml +3 -0
- package/example/android/app/src/main/res/values/styles.xml +9 -0
- package/example/android/build.gradle +55 -0
- package/example/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/example/android/gradle/wrapper/gradle-wrapper.properties +5 -0
- package/example/android/gradle.properties +35 -0
- package/example/android/gradlew +185 -0
- package/example/android/gradlew.bat +89 -0
- package/example/android/settings.gradle +6 -0
- package/example/app.json +4 -0
- package/example/babel.config.js +24 -0
- package/example/index.js +9 -0
- package/example/ios/BasicApp/AppDelegate.h +8 -0
- package/example/ios/BasicApp/AppDelegate.m +62 -0
- package/example/ios/BasicApp/Images.xcassets/AppIcon.appiconset/Contents.json +38 -0
- package/example/ios/BasicApp/Images.xcassets/Contents.json +6 -0
- package/example/ios/BasicApp/Info.plist +62 -0
- package/example/ios/BasicApp/LaunchScreen.storyboard +47 -0
- package/example/ios/BasicApp/main.m +9 -0
- package/example/ios/BasicApp-Bridging-Header.h +4 -0
- package/example/ios/BasicApp.xcodeproj/project.pbxproj +690 -0
- package/example/ios/BasicApp.xcodeproj/xcshareddata/xcschemes/BasicApp.xcscheme +88 -0
- package/example/ios/BasicApp.xcworkspace/contents.xcworkspacedata +10 -0
- package/example/ios/BasicApp.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/example/ios/BasicAppTests/BasicAppTests.m +65 -0
- package/example/ios/BasicAppTests/Info.plist +24 -0
- package/example/ios/BridgeHeader.swift +8 -0
- package/example/ios/Podfile +44 -0
- package/example/ios/Podfile.lock +473 -0
- package/example/metro.config.js +45 -0
- package/example/package.json +31 -0
- package/img/bridging-header.png +0 -0
- package/img/build-setting-linking.png +0 -0
- package/img/build-setting-path.png +0 -0
- package/ios/MapboxNavigation-Bridging-Header.h +3 -0
- package/ios/MapboxNavigation.xcodeproj/project.pbxproj +290 -0
- package/ios/MapboxNavigation.xcworkspace/contents.xcworkspacedata +7 -0
- package/ios/MapboxNavigation.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
- package/ios/MapboxNavigationManager.m +20 -0
- package/ios/MapboxNavigationManager.swift +10 -0
- package/ios/MapboxNavigationView.swift +163 -0
- package/package.json +33 -0
- package/react-native-mapbox-navigation.podspec +51 -0
- package/src/index.tsx +21 -0
- package/src/typings.ts +43 -0
- package/tsconfig.json +14 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<Scheme
|
|
3
|
+
LastUpgradeVersion = "1210"
|
|
4
|
+
version = "1.3">
|
|
5
|
+
<BuildAction
|
|
6
|
+
parallelizeBuildables = "YES"
|
|
7
|
+
buildImplicitDependencies = "YES">
|
|
8
|
+
<BuildActionEntries>
|
|
9
|
+
<BuildActionEntry
|
|
10
|
+
buildForTesting = "YES"
|
|
11
|
+
buildForRunning = "YES"
|
|
12
|
+
buildForProfiling = "YES"
|
|
13
|
+
buildForArchiving = "YES"
|
|
14
|
+
buildForAnalyzing = "YES">
|
|
15
|
+
<BuildableReference
|
|
16
|
+
BuildableIdentifier = "primary"
|
|
17
|
+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
18
|
+
BuildableName = "BasicApp.app"
|
|
19
|
+
BlueprintName = "BasicApp"
|
|
20
|
+
ReferencedContainer = "container:BasicApp.xcodeproj">
|
|
21
|
+
</BuildableReference>
|
|
22
|
+
</BuildActionEntry>
|
|
23
|
+
</BuildActionEntries>
|
|
24
|
+
</BuildAction>
|
|
25
|
+
<TestAction
|
|
26
|
+
buildConfiguration = "Debug"
|
|
27
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
28
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
29
|
+
shouldUseLaunchSchemeArgsEnv = "YES">
|
|
30
|
+
<Testables>
|
|
31
|
+
<TestableReference
|
|
32
|
+
skipped = "NO">
|
|
33
|
+
<BuildableReference
|
|
34
|
+
BuildableIdentifier = "primary"
|
|
35
|
+
BlueprintIdentifier = "00E356ED1AD99517003FC87E"
|
|
36
|
+
BuildableName = "BasicAppTests.xctest"
|
|
37
|
+
BlueprintName = "BasicAppTests"
|
|
38
|
+
ReferencedContainer = "container:BasicApp.xcodeproj">
|
|
39
|
+
</BuildableReference>
|
|
40
|
+
</TestableReference>
|
|
41
|
+
</Testables>
|
|
42
|
+
</TestAction>
|
|
43
|
+
<LaunchAction
|
|
44
|
+
buildConfiguration = "Debug"
|
|
45
|
+
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
|
46
|
+
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
|
47
|
+
launchStyle = "0"
|
|
48
|
+
useCustomWorkingDirectory = "NO"
|
|
49
|
+
ignoresPersistentStateOnLaunch = "NO"
|
|
50
|
+
debugDocumentVersioning = "YES"
|
|
51
|
+
debugServiceExtension = "internal"
|
|
52
|
+
allowLocationSimulation = "YES">
|
|
53
|
+
<BuildableProductRunnable
|
|
54
|
+
runnableDebuggingMode = "0">
|
|
55
|
+
<BuildableReference
|
|
56
|
+
BuildableIdentifier = "primary"
|
|
57
|
+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
58
|
+
BuildableName = "BasicApp.app"
|
|
59
|
+
BlueprintName = "BasicApp"
|
|
60
|
+
ReferencedContainer = "container:BasicApp.xcodeproj">
|
|
61
|
+
</BuildableReference>
|
|
62
|
+
</BuildableProductRunnable>
|
|
63
|
+
</LaunchAction>
|
|
64
|
+
<ProfileAction
|
|
65
|
+
buildConfiguration = "Release"
|
|
66
|
+
shouldUseLaunchSchemeArgsEnv = "YES"
|
|
67
|
+
savedToolIdentifier = ""
|
|
68
|
+
useCustomWorkingDirectory = "NO"
|
|
69
|
+
debugDocumentVersioning = "YES">
|
|
70
|
+
<BuildableProductRunnable
|
|
71
|
+
runnableDebuggingMode = "0">
|
|
72
|
+
<BuildableReference
|
|
73
|
+
BuildableIdentifier = "primary"
|
|
74
|
+
BlueprintIdentifier = "13B07F861A680F5B00A75B9A"
|
|
75
|
+
BuildableName = "BasicApp.app"
|
|
76
|
+
BlueprintName = "BasicApp"
|
|
77
|
+
ReferencedContainer = "container:BasicApp.xcodeproj">
|
|
78
|
+
</BuildableReference>
|
|
79
|
+
</BuildableProductRunnable>
|
|
80
|
+
</ProfileAction>
|
|
81
|
+
<AnalyzeAction
|
|
82
|
+
buildConfiguration = "Debug">
|
|
83
|
+
</AnalyzeAction>
|
|
84
|
+
<ArchiveAction
|
|
85
|
+
buildConfiguration = "Release"
|
|
86
|
+
revealArchiveInOrganizer = "YES">
|
|
87
|
+
</ArchiveAction>
|
|
88
|
+
</Scheme>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#import <UIKit/UIKit.h>
|
|
2
|
+
#import <XCTest/XCTest.h>
|
|
3
|
+
|
|
4
|
+
#import <React/RCTLog.h>
|
|
5
|
+
#import <React/RCTRootView.h>
|
|
6
|
+
|
|
7
|
+
#define TIMEOUT_SECONDS 600
|
|
8
|
+
#define TEXT_TO_LOOK_FOR @"Welcome to React"
|
|
9
|
+
|
|
10
|
+
@interface BasicAppTests : XCTestCase
|
|
11
|
+
|
|
12
|
+
@end
|
|
13
|
+
|
|
14
|
+
@implementation BasicAppTests
|
|
15
|
+
|
|
16
|
+
- (BOOL)findSubviewInView:(UIView *)view matching:(BOOL(^)(UIView *view))test
|
|
17
|
+
{
|
|
18
|
+
if (test(view)) {
|
|
19
|
+
return YES;
|
|
20
|
+
}
|
|
21
|
+
for (UIView *subview in [view subviews]) {
|
|
22
|
+
if ([self findSubviewInView:subview matching:test]) {
|
|
23
|
+
return YES;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
return NO;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
- (void)testRendersWelcomeScreen
|
|
30
|
+
{
|
|
31
|
+
UIViewController *vc = [[[RCTSharedApplication() delegate] window] rootViewController];
|
|
32
|
+
NSDate *date = [NSDate dateWithTimeIntervalSinceNow:TIMEOUT_SECONDS];
|
|
33
|
+
BOOL foundElement = NO;
|
|
34
|
+
|
|
35
|
+
__block NSString *redboxError = nil;
|
|
36
|
+
#ifdef DEBUG
|
|
37
|
+
RCTSetLogFunction(^(RCTLogLevel level, RCTLogSource source, NSString *fileName, NSNumber *lineNumber, NSString *message) {
|
|
38
|
+
if (level >= RCTLogLevelError) {
|
|
39
|
+
redboxError = message;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
#endif
|
|
43
|
+
|
|
44
|
+
while ([date timeIntervalSinceNow] > 0 && !foundElement && !redboxError) {
|
|
45
|
+
[[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
46
|
+
[[NSRunLoop mainRunLoop] runMode:NSRunLoopCommonModes beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
|
|
47
|
+
|
|
48
|
+
foundElement = [self findSubviewInView:vc.view matching:^BOOL(UIView *view) {
|
|
49
|
+
if ([view.accessibilityLabel isEqualToString:TEXT_TO_LOOK_FOR]) {
|
|
50
|
+
return YES;
|
|
51
|
+
}
|
|
52
|
+
return NO;
|
|
53
|
+
}];
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
#ifdef DEBUG
|
|
57
|
+
RCTSetLogFunction(RCTDefaultLogFunction);
|
|
58
|
+
#endif
|
|
59
|
+
|
|
60
|
+
XCTAssertNil(redboxError, @"RedBox error: %@", redboxError);
|
|
61
|
+
XCTAssertTrue(foundElement, @"Couldn't find element with text '%@' in %d seconds", TEXT_TO_LOOK_FOR, TIMEOUT_SECONDS);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
@end
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
3
|
+
<plist version="1.0">
|
|
4
|
+
<dict>
|
|
5
|
+
<key>CFBundleDevelopmentRegion</key>
|
|
6
|
+
<string>en</string>
|
|
7
|
+
<key>CFBundleExecutable</key>
|
|
8
|
+
<string>$(EXECUTABLE_NAME)</string>
|
|
9
|
+
<key>CFBundleIdentifier</key>
|
|
10
|
+
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
|
11
|
+
<key>CFBundleInfoDictionaryVersion</key>
|
|
12
|
+
<string>6.0</string>
|
|
13
|
+
<key>CFBundleName</key>
|
|
14
|
+
<string>$(PRODUCT_NAME)</string>
|
|
15
|
+
<key>CFBundlePackageType</key>
|
|
16
|
+
<string>BNDL</string>
|
|
17
|
+
<key>CFBundleShortVersionString</key>
|
|
18
|
+
<string>1.0</string>
|
|
19
|
+
<key>CFBundleSignature</key>
|
|
20
|
+
<string>????</string>
|
|
21
|
+
<key>CFBundleVersion</key>
|
|
22
|
+
<string>1</string>
|
|
23
|
+
</dict>
|
|
24
|
+
</plist>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
require_relative '../node_modules/react-native/scripts/react_native_pods'
|
|
2
|
+
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'
|
|
3
|
+
|
|
4
|
+
platform :ios, '11.0'
|
|
5
|
+
install! 'cocoapods', :disable_input_output_paths => true
|
|
6
|
+
|
|
7
|
+
target 'BasicApp' do
|
|
8
|
+
config = use_native_modules!
|
|
9
|
+
pod 'react-native-mapbox-navigation', :path => '../../', :inhibit_warnings => false
|
|
10
|
+
$ReactNativeMapboxGLIOSVersion = '~> 8.5.0'
|
|
11
|
+
|
|
12
|
+
use_react_native!(
|
|
13
|
+
:path => config[:reactNativePath],
|
|
14
|
+
# to enable hermes on iOS, change `false` to `true` and then install pods
|
|
15
|
+
:hermes_enabled => false
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
pre_install do |installer|
|
|
19
|
+
$RNMBNAV.pre_install(installer)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
target 'BasicAppTests' do
|
|
23
|
+
inherit! :complete
|
|
24
|
+
# Pods for testing
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Enables Flipper.
|
|
28
|
+
#
|
|
29
|
+
# Note that if you have use_frameworks! enabled, Flipper will not work and
|
|
30
|
+
# you should disable the next line.
|
|
31
|
+
# use_flipper!()
|
|
32
|
+
|
|
33
|
+
post_install do |installer|
|
|
34
|
+
react_native_post_install(installer)
|
|
35
|
+
__apply_Xcode_12_5_M1_post_install_workaround(installer)
|
|
36
|
+
installer.pods_project.targets.each do |t|
|
|
37
|
+
t.build_configurations.each do |bc|
|
|
38
|
+
bc.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '11.0'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
# $RNMBNAV.post_install(installer)
|
|
42
|
+
$RNMBNAV.pre_install(installer)
|
|
43
|
+
end
|
|
44
|
+
end
|