Skip to content

Commit cbbc560

Browse files
committed
Fix imports using workaround (see plugin-seed issue: NativeScript/plugin-seed#13)
1 parent 017bb04 commit cbbc560

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

Diff for: apps/demo-react/src/app.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Do not place any code after the application has been started as it will not
1919
be executed on iOS.
2020
*/
2121

22-
/* BEGIN NOTE TO SELF: How I got expo.modules.permissions (though apparently none of its constituen Kotlin files) to compile for Android.
22+
/* BEGIN NOTE TO SELF: How I got expo.modules.permissions (though apparently none of its constituent Kotlin files) to compile for Android.
2323
* I used @nativescript-community/expo-permissions for the Android implementation
2424
* and @nativescript-community/expo-permissions-nativescript-plugin + expo-permissions to provide both the iOS implementation and
2525
* cross-platform TS implementation.

Diff for: apps/demo-react/src/components/ContactsScreen.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import type { ItemEventData } from "@nativescript/core";
66
import { ListView } from "react-nativescript";
77
import { Dialogs } from "@nativescript/core";
88
import { createStyleSheet } from "../util/createStyleSheet";
9+
import { isAvailableAsync, getPermissionsAsync, requestPermissionsAsync, addContactAsync, ContactTypes, getContactsAsync, Fields, ContactResponse, PermissionResponse } from "@nativescript-community/expo-contacts-nativescript-plugin";
910

1011
type ContactsScreenProps = {
1112
route: RouteProp<MainStackParamList, "contacts">,

Diff for: packages/expo-contacts-nativescript-plugin/Contacts.ts renamed to packages/expo-contacts-nativescript-plugin/index.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
/**
2+
* I'd prefer this file to be called Contacts.ts, as in the expo-contacts package itself, but the nx workspace
3+
* seems to override my "main" field to "index.js" and my "typings" field to "index.d.ts" upon build.
4+
* @see https://github.com/expo/expo/blob/master/packages/expo-contacts/src/Contacts.ts
5+
*/
16
import { UnavailabilityError } from "@nativescript-community/expo-nativescript-adapter";
27
import { isIOS } from "@nativescript/core";
38
import { PermissionResponse, PermissionStatus } from 'unimodules-permissions-interface';

Diff for: packages/expo-contacts-nativescript-plugin/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "@nativescript-community/expo-contacts-nativescript-plugin",
33
"version": "1.0.0",
44
"description": "Expo Contacts, adapted for NativeScript.",
5-
"main": "Contacts",
6-
"typings": "Contacts.d.ts",
5+
"main": "index.js",
6+
"typings": "index.d.ts",
77
"nativescript": {
88
"platforms": {
99
"ios": "7.0.6",

0 commit comments

Comments
 (0)