Skip to content

Commit ea418ef

Browse files
committed
feat(config): ios.NativeSource option
1 parent 57f8f1b commit ea418ef

File tree

1 file changed

+57
-0
lines changed

1 file changed

+57
-0
lines changed

content/configuration/nativescript.md

+57
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,63 @@ ios: {
392392
}
393393
```
394394

395+
### ios.NativeSource
396+
397+
::: tip
398+
399+
NativeSource config option is available in `[email protected]` or newer.
400+
401+
:::
402+
403+
```ts
404+
ios.NativeSource: Array<{
405+
name: string;
406+
path: string;
407+
}>
408+
```
409+
410+
Include any native source code from anywhere in the project (or workspace). Glob patterns are fully supported.
411+
412+
#### Example
413+
414+
- Include any `.swift` files anywhere within the project `src` directory:
415+
416+
```ts
417+
// ...
418+
ios: {
419+
NativeSource: [
420+
{
421+
name: 'ProjectPlatformSrc',
422+
path: './src/**/*.swift'
423+
}
424+
],
425+
}
426+
```
427+
428+
This will create a file reference folder named `ProjectPlatformSrc` within the generated Xcode project containing any .swift files found anywhere within the project `src` directory.
429+
430+
- Include any `.swift` files anywhere within the project `src` directory, including any (Swift, Obj-C impl/headers, as well as any module.modulemap files) within a workspace `packages` or `libs` dir:
431+
432+
```ts
433+
// ...
434+
ios: {
435+
NativeSource: [
436+
{
437+
name: 'ProjectPlatformSrc',
438+
path: './src/**/*.swift'
439+
},
440+
{
441+
name: 'Auth',
442+
path: '../../packages/**/*.{swift,m,h,modulemap}'
443+
},
444+
{
445+
name: 'Purchasing',
446+
path: '../../libs/**/*.{swift,m,h,modulemap}'
447+
}
448+
],
449+
}
450+
```
451+
395452
## Hooks Configuration Reference
396453

397454
```ts

0 commit comments

Comments
 (0)