Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions docs/building-apps/build-items.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,40 @@ the `CollectAppManifestsDependsOn` property:
</Target>
```

## ReferenceNativeSymbol

The item group `ReferenceNativeSymbol` can be used to specify how we should
handle a given native symbol: either ignore it, or ask the native linker to
keep it (by passing the symbol as `-u ...` or in a symbol file to the native
linker).

There are two supported types of metadata:

* `SymbolType`: either `ObjectiveCClass`, `Function` or `Field`. Used to
compute the complete native name of a symbol (for instance, the native
symbol for the Objective-C class `MyClass` is `_OBJC_CLASS_$_MyClass`,
while for a function `MyFunction` it's just `_MyFunction`.
* `SymbolMode`: either `Ignore` or not set. `Ignore` means to not pass the given
symbol to the native linker, the default is to do so.

`SymbolType` is required, while `SymbolMode` isn't.

Example symbol to keep:

```xml
<ItemGroup>
<ReferenceNativeSymbol Include="MyClass" SymbolType="ObjectiveCClass" />
</ItemGroup>
```

Example symbol to ignore:

```xml
<ItemGroup>
<ReferenceNativeSymbol Include="MyClass" SymbolType="ObjectiveCClass" SymbolMode="Ignore" />
</ItemGroup>
```

### SkipCodesignItems

An item group that specifies files or directories in the app bundle that should not be signed.
Expand Down
32 changes: 1 addition & 31 deletions docs/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -1079,37 +1079,7 @@ Only applicable to macOS and Mac Catalyst apps.

## ReferenceNativeSymbol

The item group `ReferenceNativeSymbol` can be used to specify how we should
handle a given native symbol: either ignore it, or ask the native linker to
keep it (by passing the symbol as `-u ...` or in a symbol file to the native
linker).

There are two supported types of metadata:

* `SymbolType`: either `ObjectiveCClass`, `Function` or `Field`. Used to
compute the complete native name of a symbol (for instance, the native
symbol for the Objective-C class `MyClass` is `_OBJC_CLASS_$_MyClass`,
while for a function `MyFunction` it's just `_MyFunction`.
* `SymbolMode`: either `Ignore` or not set. `Ignore` means to not pass the given
symbol to the native linker, the default is to do so.

`SymbolType` is required, while `SymbolMode` isn't.

Example symbol to keep:

```xml
<ItemGroup>
<ReferenceNativeSymbol Include="MyClass" SymbolType="ObjectiveCClass" />
</ItemGroup>
```

Example symbol to ignore:

```xml
<ItemGroup>
<ReferenceNativeSymbol Include="MyClass" SymbolType="ObjectiveCClass" SymbolMode="Ignore" />
</ItemGroup>
```
See [ReferenceNativeSymbol](build-items.md#referencenativesymbols)
Copy link

Copilot AI Dec 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The anchor reference should be #referencenativesymbol (singular) to match the heading in build-items.md which is ## ReferenceNativeSymbol. Markdown anchors are lowercase versions of the heading text, and the heading uses the singular form.

Suggested change
See [ReferenceNativeSymbol](build-items.md#referencenativesymbols)
See [ReferenceNativeSymbol](build-items.md#referencenativesymbol)

Copilot uses AI. Check for mistakes.

## RequireLinkWithAttributeForObjectiveCClassSearch

Expand Down
Loading