diff --git a/docs/building-apps/build-items.md b/docs/building-apps/build-items.md index 00c3ee78d894..ff18c071b9e6 100644 --- a/docs/building-apps/build-items.md +++ b/docs/building-apps/build-items.md @@ -309,6 +309,40 @@ the `CollectAppManifestsDependsOn` property: ``` +## 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 + + + +``` + +Example symbol to ignore: + +```xml + + + +``` + ### SkipCodesignItems An item group that specifies files or directories in the app bundle that should not be signed. diff --git a/docs/building-apps/build-properties.md b/docs/building-apps/build-properties.md index cd636080e46c..948ba4d53b89 100644 --- a/docs/building-apps/build-properties.md +++ b/docs/building-apps/build-properties.md @@ -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 - - - -``` - -Example symbol to ignore: - -```xml - - - -``` +See [ReferenceNativeSymbol](build-items.md#referencenativesymbols) ## RequireLinkWithAttributeForObjectiveCClassSearch