Skip to content

Commit 1cd0873

Browse files
committed
feat: delete android folder
1 parent ffc1c3c commit 1cd0873

File tree

12 files changed

+28
-256
lines changed

12 files changed

+28
-256
lines changed

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,17 @@ export default function App() {
7373
const [state, setState] = React.useState<LatLng[]>();
7474
React.useEffect(() => {
7575
const getPoints = async () => {
76-
try {
77-
const points = await getAppleMapKitDirections(
78-
origin,
79-
destination,
80-
transitType
81-
);
82-
setState(points.coordinates);
83-
} catch (error) {
84-
console.log('error', error);
76+
if (Platform.OS === 'ios') {
77+
try {
78+
const points = await getAppleMapKitDirections(
79+
origin,
80+
destination,
81+
transitType
82+
);
83+
setState(points.coordinates);
84+
} catch (error) {
85+
console.log('error', error);
86+
}
8587
}
8688
};
8789
getPoints();

android/build.gradle

Lines changed: 0 additions & 138 deletions
This file was deleted.

android/gradle.properties

Lines changed: 0 additions & 5 deletions
This file was deleted.

android/src/main/AndroidManifest.xml

Lines changed: 0 additions & 4 deletions
This file was deleted.

android/src/main/java/com/applemapkitdirections/AppleMapkitDirectionsModule.java

Lines changed: 0 additions & 32 deletions
This file was deleted.

android/src/main/java/com/applemapkitdirections/AppleMapkitDirectionsPackage.java

Lines changed: 0 additions & 28 deletions
This file was deleted.

example/ios/Podfile.lock

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,7 @@ PODS:
302302
- React-jsinspector (0.70.5)
303303
- React-logger (0.70.5):
304304
- glog
305-
- react-native-apple-mapkit-directions (0.1.0):
306-
- React-Core
307-
- react-native-maps (1.3.2):
305+
- react-native-apple-mapkit-directions (1.1.2):
308306
- React-Core
309307
- React-perflogger (0.70.5)
310308
- React-RCTActionSheet (0.70.5):
@@ -425,7 +423,6 @@ DEPENDENCIES:
425423
- React-jsinspector (from `../node_modules/react-native/ReactCommon/jsinspector`)
426424
- React-logger (from `../node_modules/react-native/ReactCommon/logger`)
427425
- react-native-apple-mapkit-directions (from `../..`)
428-
- react-native-maps (from `../node_modules/react-native-maps`)
429426
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
430427
- React-RCTActionSheet (from `../node_modules/react-native/Libraries/ActionSheetIOS`)
431428
- React-RCTAnimation (from `../node_modules/react-native/Libraries/NativeAnimation`)
@@ -503,8 +500,6 @@ EXTERNAL SOURCES:
503500
:path: "../node_modules/react-native/ReactCommon/logger"
504501
react-native-apple-mapkit-directions:
505502
:path: "../.."
506-
react-native-maps:
507-
:path: "../node_modules/react-native-maps"
508503
React-perflogger:
509504
:path: "../node_modules/react-native/ReactCommon/reactperflogger"
510505
React-RCTActionSheet:
@@ -567,8 +562,7 @@ SPEC CHECKSUMS:
567562
React-jsiexecutor: 31564fa6912459921568e8b0e49024285a4d584b
568563
React-jsinspector: badd81696361249893a80477983e697aab3c1a34
569564
React-logger: fdda34dd285bdb0232e059b19d9606fa0ec3bb9c
570-
react-native-apple-mapkit-directions: 7eeaf4f5447b214e92db10bc619216abbd370279
571-
react-native-maps: 085f614cf14d3637b2048bb9752da5b1c27c2886
565+
react-native-apple-mapkit-directions: 04e14a2520fe7b3c986c6010bbe093bb0efe9606
572566
React-perflogger: e68d3795cf5d247a0379735cbac7309adf2fb931
573567
React-RCTActionSheet: 05452c3b281edb27850253db13ecd4c5a65bc247
574568
React-RCTAnimation: 578eebac706428e68466118e84aeacf3a282b4da

example/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
},
1111
"dependencies": {
1212
"react": "18.1.0",
13-
"react-native": "0.70.5",
14-
"react-native-maps": "^1.3.2"
13+
"react-native": "0.70.5"
1514
},
1615
"devDependencies": {
1716
"@babel/core": "^7.12.9",

example/src/App.tsx

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,13 @@
11
import * as React from 'react';
22

3-
import { StyleSheet } from 'react-native';
3+
import { Text, View } from 'react-native';
44
import {
55
getAppleMapKitDirections,
6+
LatLng,
67
MapKitTransit,
78
} from 'react-native-apple-mapkit-directions';
8-
import MapView, { LatLng, Polyline } from 'react-native-maps';
99

1010
export default function App() {
11-
const styles = StyleSheet.create({
12-
map: {
13-
...StyleSheet.absoluteFillObject,
14-
},
15-
});
1611
const origin = {
1712
latitude: 55.751244,
1813
longitude: 37.618423,
@@ -31,7 +26,7 @@ export default function App() {
3126
destination,
3227
transitType
3328
);
34-
setState(points.coordinates);
29+
setState(points?.coordinates);
3530
} catch (error) {
3631
console.log('error', error);
3732
}
@@ -41,8 +36,8 @@ export default function App() {
4136
}, []);
4237

4338
return (
44-
<MapView style={styles.map}>
45-
{state && <Polyline coordinates={state} />}
46-
</MapView>
39+
<View>
40+
<Text>{state}</Text>
41+
</View>
4742
);
4843
}

example/yarn.lock

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,11 +1032,6 @@
10321032
resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.24.51.tgz#645f33fe4e02defe26f2f5c0410e1c094eac7f5f"
10331033
integrity sha512-1P1OROm/rdubP5aFDSZQILU0vrLCJ4fvHt6EoqHEM+2D/G5MK3bIaymUKLit8Js9gbns5UyJnkP/TZROLw4tUA==
10341034

1035-
"@types/geojson@^7946.0.8":
1036-
version "7946.0.10"
1037-
resolved "https://registry.yarnpkg.com/@types/geojson/-/geojson-7946.0.10.tgz#6dfbf5ea17142f7f9a043809f1cd4c448cb68249"
1038-
integrity sha512-Nmh0K3iWQJzniTuPRcJn5hxXkfB1T1pgB89SBig5PlJQU5yocazeu4jATJlaA0GYFKWMqDdvYemoSnF2pXgLVA==
1039-
10401035
"@types/istanbul-lib-coverage@*", "@types/istanbul-lib-coverage@^2.0.0":
10411036
version "2.0.4"
10421037
resolved "https://registry.yarnpkg.com/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz#8467d4b3c087805d63580480890791277ce35c44"
@@ -3362,13 +3357,6 @@ react-native-gradle-plugin@^0.70.3:
33623357
resolved "https://registry.yarnpkg.com/react-native-gradle-plugin/-/react-native-gradle-plugin-0.70.3.tgz#cbcf0619cbfbddaa9128701aa2d7b4145f9c4fc8"
33633358
integrity sha512-oOanj84fJEXUg9FoEAQomA8ISG+DVIrTZ3qF7m69VQUJyOGYyDZmPqKcjvRku4KXlEH6hWO9i4ACLzNBh8gC0A==
33643359

3365-
react-native-maps@^1.3.2:
3366-
version "1.3.2"
3367-
resolved "https://registry.yarnpkg.com/react-native-maps/-/react-native-maps-1.3.2.tgz#8e30bfd9d934de02827253e5cde6c08a04f6356c"
3368-
integrity sha512-NB7HGRZOgxxXCWzrhIVucx/bsrEWANvk3DLci1ov4P9MQnEVQYQCCkTxsnaEvO191GeBOCRDyYn6jckqbfMtmg==
3369-
dependencies:
3370-
"@types/geojson" "^7946.0.8"
3371-
33723360
33733361
version "0.70.5"
33743362
resolved "https://registry.yarnpkg.com/react-native/-/react-native-0.70.5.tgz#f60540b21d338891086e0a834e331c124dd1f55c"

0 commit comments

Comments
 (0)