From a45ca6fa2bbbfe5bc56c1ca5f9c2b008488e13ce Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Tue, 21 Jan 2025 21:02:24 -0800 Subject: [PATCH 01/12] feat(ios): support disabling metal validation --- docs/ios.metalAPIValidation.md | 15 +++++++++++++++ example/app.json | 3 +++ example/ios/Podfile.lock | 6 +++--- .../xcschemes/ReactTestApp.xcscheme | 1 + ios/test_app.rb | 17 ++++++++++++++++- schema.json | 5 +++++ scripts/internal/generate-schema.mts | 1 + scripts/schema.mjs | 5 +++++ scripts/types.ts | 1 + 9 files changed, 50 insertions(+), 4 deletions(-) create mode 100644 docs/ios.metalAPIValidation.md diff --git a/docs/ios.metalAPIValidation.md b/docs/ios.metalAPIValidation.md new file mode 100644 index 000000000..aeeaaa107 --- /dev/null +++ b/docs/ios.metalAPIValidation.md @@ -0,0 +1,15 @@ +The API Validation layer checks for code that calls the Metal API incorrectly, +including errors in creating resources, encoding Metal commands, and performing +other common tasks. + +> **_NOTE:_** The API Validation layer has a small, but measureable, impact on +> CPU performance. + +By default, a `PrivacyInfo.xcprivacy` is on, + +For more details, read Apple's documentation on +[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/). + +
+History +
diff --git a/example/app.json b/example/app.json index 3b8992eac..9e588ce9d 100644 --- a/example/app.json +++ b/example/app.json @@ -13,6 +13,9 @@ "presentationStyle": "modal" } ], + "ios": { + "metalAPIValidation": true + }, "resources": { "android": [ "dist/res", diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index a32b5425b..97ee28534 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1712,11 +1712,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 - DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 + DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 Example-Tests: fc629729804712c34ae6c28b9fc1c45619f6636d FBLazyVector: 430e10366de01d1e3d57374500b1b150fe482e6d fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 - glog: 69ef571f3de08433d766d614c73a9838a06bf7eb + glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1 RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b @@ -1780,4 +1780,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: c9e179d1d59e47eaa6fef9316a7e039dbb9b0c0b -COCOAPODS: 1.14.3 +COCOAPODS: 1.15.2 diff --git a/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme b/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme index 7c9e2d31b..7308237cc 100644 --- a/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme +++ b/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme @@ -59,6 +59,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/ios/test_app.rb b/ios/test_app.rb index e44c48592..5b3b8a20e 100644 --- a/ios/test_app.rb +++ b/ios/test_app.rb @@ -160,12 +160,27 @@ def make_project!(xcodeproj, project_root, target_platform, options) FileUtils.mkdir_p(destination) FileUtils.cp_r(xcodeproj_src, destination) name, display_name, version, single_app = app_config(project_root) + xcschemes_path = File.join(xcodeproj_dst, 'xcshareddata', 'xcschemes') + + # Read "metalAPIValidation from the app config and apply it to the xcscheme" + metal_api_validation = platform_config('metalAPIValidation', project_root, target_platform) + puts "metalAPIValidation: #{metal_api_validation}" + + if metal_api_validation + xcscheme = File.join(xcschemes_path, "ReactTestApp.xcscheme") + puts "xcscheme: #{xcscheme}" + xcscheme_content = File.read(xcscheme) + new_content = xcscheme_content.gsub(/^\s*enableGPUValidationMode\s*=\s*"1"\s*$/, '') + puts "new_content: #{new_content}" + File.write(xcscheme, new_content) + end + unless name.nil? - xcschemes_path = File.join(xcodeproj_dst, 'xcshareddata', 'xcschemes') FileUtils.cp(File.join(xcschemes_path, 'ReactTestApp.xcscheme'), File.join(xcschemes_path, "#{name}.xcscheme")) end + # Link source files %w[ReactTestApp ReactTestAppTests ReactTestAppUITests].each do |file| FileUtils.ln_sf(project_path(file, target_platform), destination) diff --git a/schema.json b/schema.json index d66715185..05719433c 100644 --- a/schema.json +++ b/schema.json @@ -84,6 +84,11 @@ "markdownDescription": "Sets the\ndevelopment\nteam that the app should be assigned to.\n\nThis is the same as setting `DEVELOPMENT_TEAM` in Xcode.\n\n
\nHistory\n\n- [[0.9.7](https://github.com/microsoft/react-native-test-app/releases/tag/0.9.7)]\n Added\n\n
", "type": "string" }, + "metalAPIValidation": { + "description": "Whether to enable Metal API validation.", + "markdownDescription":"Whether to enable Metal API validation.", + "type": "boolean" + }, "privacyManifest": { "description": "The privacy manifest is a property list that records the information regarding the types of data collected and the required reasons APIs your app or third-party SDK use.", "markdownDescription": "The privacy manifest is a property list that records the information regarding\nthe types of data collected and the required reasons APIs your app or\nthird-party SDK use.\n\n- The types of data collected by your app or third-party SDK must be provided on\n all platforms.\n- The required reasons APIs your app or third-party SDK uses must be provided on\n iOS, iPadOS, tvOS, visionOS, and watchOS.\n\nBy default, a `PrivacyInfo.xcprivacy` is always generated with the following\nvalues:\n\n\n```json\n{\n \"NSPrivacyTracking\": false,\n \"NSPrivacyTrackingDomains\": [],\n \"NSPrivacyCollectedDataTypes\": [],\n \"NSPrivacyAccessedAPITypes\": [\n {\n \"NSPrivacyAccessedAPIType\":\n \"NSPrivacyAccessedAPICategoryFileTimestamp\",\n \"NSPrivacyAccessedAPITypeReasons\": [\"C617.1\"]\n },\n {\n \"NSPrivacyAccessedAPIType\":\n \"NSPrivacyAccessedAPICategorySystemBootTime\",\n \"NSPrivacyAccessedAPITypeReasons\": [\"35F9.1\"]\n },\n {\n \"NSPrivacyAccessedAPIType\":\n \"NSPrivacyAccessedAPICategoryUserDefaults\",\n \"NSPrivacyAccessedAPITypeReasons\": [\"CA92.1\"]\n }\n ]\n}\n```\n\n\nFor more details, read Apple's documentation on\n[Privacy manifest files](https://developer.apple.com/documentation/bundleresources/privacy_manifest_files).\n\n
\nHistory\n\n- [[3.6.0](https://github.com/microsoft/react-native-test-app/releases/tag/3.6.0)]\n Added\n\n
", diff --git a/scripts/internal/generate-schema.mts b/scripts/internal/generate-schema.mts index 5ba3b64f2..deb9cc298 100644 --- a/scripts/internal/generate-schema.mts +++ b/scripts/internal/generate-schema.mts @@ -52,6 +52,7 @@ export async function readDocumentation(): Promise> { "ios.icons", "ios.icons.primaryIcon", "ios.icons.alternateIcons", + "ios.metalAPIValidation", "ios.privacyManifest", "macos.applicationCategoryType", "macos.humanReadableCopyright", diff --git a/scripts/schema.mjs b/scripts/schema.mjs index 497d55dfc..9c11c1863 100644 --- a/scripts/schema.mjs +++ b/scripts/schema.mjs @@ -93,6 +93,11 @@ export function generateSchema(docs = {}) { markdownDescription: docs["ios.developmentTeam"], type: "string", }, + metalAPIValidation: { + description: extractBrief(docs["ios.metalAPIValidation"]), + markdownDescription: docs["ios.metalAPIValidation"], + type: "boolean", + }, privacyManifest: { description: extractBrief(docs["ios.privacyManifest"]), markdownDescription: docs["ios.privacyManifest"], diff --git a/scripts/types.ts b/scripts/types.ts index e8e155da4..1a76ba260 100644 --- a/scripts/types.ts +++ b/scripts/types.ts @@ -217,6 +217,7 @@ export type Docs = { "ios.icons": string; "ios.icons.primaryIcon": string; "ios.icons.alternateIcons": string; + "ios.metalAPIValidation": string; "ios.privacyManifest": string; "macos.applicationCategoryType": string; "macos.humanReadableCopyright": string; From d9b5a1a02fd54ea1d2fba736937659c7ecd9b4a2 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sat, 25 Jan 2025 21:09:57 -0800 Subject: [PATCH 02/12] Extract to separate method --- ios/test_app.rb | 20 +------------------- ios/xcode.rb | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 19 deletions(-) diff --git a/ios/test_app.rb b/ios/test_app.rb index 5b3b8a20e..026768b8a 100644 --- a/ios/test_app.rb +++ b/ios/test_app.rb @@ -161,25 +161,7 @@ def make_project!(xcodeproj, project_root, target_platform, options) FileUtils.cp_r(xcodeproj_src, destination) name, display_name, version, single_app = app_config(project_root) xcschemes_path = File.join(xcodeproj_dst, 'xcshareddata', 'xcschemes') - - # Read "metalAPIValidation from the app config and apply it to the xcscheme" - metal_api_validation = platform_config('metalAPIValidation', project_root, target_platform) - puts "metalAPIValidation: #{metal_api_validation}" - - if metal_api_validation - xcscheme = File.join(xcschemes_path, "ReactTestApp.xcscheme") - puts "xcscheme: #{xcscheme}" - xcscheme_content = File.read(xcscheme) - new_content = xcscheme_content.gsub(/^\s*enableGPUValidationMode\s*=\s*"1"\s*$/, '') - puts "new_content: #{new_content}" - File.write(xcscheme, new_content) - end - - unless name.nil? - FileUtils.cp(File.join(xcschemes_path, 'ReactTestApp.xcscheme'), - File.join(xcschemes_path, "#{name}.xcscheme")) - end - + configure_xcschemes!(xcschemes_path, project_root, target_platform, name) # Link source files %w[ReactTestApp ReactTestAppTests ReactTestAppUITests].each do |file| diff --git a/ios/xcode.rb b/ios/xcode.rb index 9bdea3b97..d8a1fc6e1 100644 --- a/ios/xcode.rb +++ b/ios/xcode.rb @@ -20,3 +20,22 @@ def override_build_settings!(build_settings, overrides) build_settings[setting] = value end end + +def configure_xcschemes!(xcschemes_path, project_root, target_platform, name) + xcscheme = File.join(xcschemes_path, "ReactTestApp.xcscheme") + metal_api_validation = platform_config('metalAPIValidation', project_root, target_platform) + + # Oddly enough, to disable Metal API validation, we need to remove the `enableGPUValidationMode` key from the xcscheme file. + # A default Xcode project does not have this key, so lets follow that pattern and only add it if it is enabled. + if metal_api_validation.nil? || metal_api_validation == true + xcscheme_content = File.read(xcscheme) + new_content = xcscheme_content.gsub(/^\s*enableGPUValidationMode\s*=\s*"1"\s*$/, '') + File.write(xcscheme, new_content) + return + end + + # Make a copy of the ReactTestApp.xcscheme file with the app name for convenience. + unless name.nil? + FileUtils.cp(xcscheme, File.join(xcschemes_path, "#{name}.xcscheme")) + end +end \ No newline at end of file From 3bb46c18820b81f9c0a0bcfe69d064151e1e6746 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sat, 25 Jan 2025 21:41:07 -0800 Subject: [PATCH 03/12] Use REXML instead, default back to no key in xcheme, aka, enabled --- example/app.json | 3 --- example/ios/Podfile.lock | 4 ++-- .../xcschemes/ReactTestApp.xcscheme | 1 - ios/xcode.rb | 18 ++++++++++++------ 4 files changed, 14 insertions(+), 12 deletions(-) diff --git a/example/app.json b/example/app.json index 9e588ce9d..3b8992eac 100644 --- a/example/app.json +++ b/example/app.json @@ -13,9 +13,6 @@ "presentationStyle": "modal" } ], - "ios": { - "metalAPIValidation": true - }, "resources": { "android": [ "dist/res", diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 97ee28534..e8c534622 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1712,11 +1712,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: 4cb898d0bf20404aab1850c656dcea009429d6c1 - DoubleConversion: fea03f2699887d960129cc54bba7e52542b6f953 + DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5 Example-Tests: fc629729804712c34ae6c28b9fc1c45619f6636d FBLazyVector: 430e10366de01d1e3d57374500b1b150fe482e6d fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120 - glog: c5d68082e772fa1c511173d6b30a9de2c05a69a2 + glog: 69ef571f3de08433d766d614c73a9838a06bf7eb RCT-Folly: 4464f4d875961fce86008d45f4ecf6cef6de0740 RCTDeprecation: 726d24248aeab6d7180dac71a936bbca6a994ed1 RCTRequired: a94e7febda6db0345d207e854323c37e3a31d93b diff --git a/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme b/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme index 7308237cc..7c9e2d31b 100644 --- a/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme +++ b/ios/ReactTestApp.xcodeproj/xcshareddata/xcschemes/ReactTestApp.xcscheme @@ -59,7 +59,6 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" - enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/ios/xcode.rb b/ios/xcode.rb index d8a1fc6e1..cefc2db15 100644 --- a/ios/xcode.rb +++ b/ios/xcode.rb @@ -1,3 +1,6 @@ +require 'rexml/document' +require 'rexml/xpath' + IPHONEOS_DEPLOYMENT_TARGET = 'IPHONEOS_DEPLOYMENT_TARGET'.freeze MACOSX_DEPLOYMENT_TARGET = 'MACOSX_DEPLOYMENT_TARGET'.freeze XROS_DEPLOYMENT_TARGET = 'XROS_DEPLOYMENT_TARGET'.freeze @@ -25,13 +28,16 @@ def configure_xcschemes!(xcschemes_path, project_root, target_platform, name) xcscheme = File.join(xcschemes_path, "ReactTestApp.xcscheme") metal_api_validation = platform_config('metalAPIValidation', project_root, target_platform) - # Oddly enough, to disable Metal API validation, we need to remove the `enableGPUValidationMode` key from the xcscheme file. - # A default Xcode project does not have this key, so lets follow that pattern and only add it if it is enabled. - if metal_api_validation.nil? || metal_api_validation == true + + # Oddly enough, to disable Metal API validation, we need to add `enableGPUValidationMode = "1"` to the xcscheme Launch Action. + if metal_api_validation == false xcscheme_content = File.read(xcscheme) - new_content = xcscheme_content.gsub(/^\s*enableGPUValidationMode\s*=\s*"1"\s*$/, '') - File.write(xcscheme, new_content) - return + doc = REXML::Document.new(xcscheme_content) + doc.root.elements['LaunchAction'].attributes['enableGPUValidationMode'] = '1' + + File.open(xcscheme, 'w') do |file| + doc.write(file) + end end # Make a copy of the ReactTestApp.xcscheme file with the app name for convenience. From 1138eca5e4ea66edbcfd7a0bcb2c7c8e0ecea36f Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sat, 25 Jan 2025 22:10:44 -0800 Subject: [PATCH 04/12] Remove unused 'rexml/xpath' require statement --- ios/xcode.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/ios/xcode.rb b/ios/xcode.rb index cefc2db15..fac404d0e 100644 --- a/ios/xcode.rb +++ b/ios/xcode.rb @@ -1,5 +1,4 @@ require 'rexml/document' -require 'rexml/xpath' IPHONEOS_DEPLOYMENT_TARGET = 'IPHONEOS_DEPLOYMENT_TARGET'.freeze MACOSX_DEPLOYMENT_TARGET = 'MACOSX_DEPLOYMENT_TARGET'.freeze From 65717c4bb07155d74691b9a0662bd365175df2bd Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sat, 25 Jan 2025 22:43:09 -0800 Subject: [PATCH 05/12] update schema --- schema.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/schema.json b/schema.json index 05719433c..eb57b9b97 100644 --- a/schema.json +++ b/schema.json @@ -85,8 +85,8 @@ "type": "string" }, "metalAPIValidation": { - "description": "Whether to enable Metal API validation.", - "markdownDescription":"Whether to enable Metal API validation.", + "description": "The API Validation layer checks for code that calls the Metal API incorrectly, including errors in creating resources, encoding Metal commands, and performing other common tasks.", + "markdownDescription": "The API Validation layer checks for code that calls the Metal API incorrectly,\nincluding errors in creating resources, encoding Metal commands, and performing\nother common tasks.\n\n> **_NOTE:_** The API Validation layer has a small, but measureable, impact on\n> CPU performance.\n\nBy default, a `PrivacyInfo.xcprivacy` is on,\n\nFor more details, read Apple's documentation on\n[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/).\n\n
\nHistory\n
", "type": "boolean" }, "privacyManifest": { From b651cdd1dd8c47841d4ac49fbf596f43c4e9331f Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Sat, 25 Jan 2025 22:49:24 -0800 Subject: [PATCH 06/12] yarn lint:rb --- ios/xcode.rb | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ios/xcode.rb b/ios/xcode.rb index fac404d0e..96e2c1440 100644 --- a/ios/xcode.rb +++ b/ios/xcode.rb @@ -24,11 +24,11 @@ def override_build_settings!(build_settings, overrides) end def configure_xcschemes!(xcschemes_path, project_root, target_platform, name) - xcscheme = File.join(xcschemes_path, "ReactTestApp.xcscheme") + xcscheme = File.join(xcschemes_path, 'ReactTestApp.xcscheme') metal_api_validation = platform_config('metalAPIValidation', project_root, target_platform) - - # Oddly enough, to disable Metal API validation, we need to add `enableGPUValidationMode = "1"` to the xcscheme Launch Action. + # Oddly enough, to disable Metal API validation, we need to add `enableGPUValidationMode = "1"` + # to the xcscheme Launch Action. if metal_api_validation == false xcscheme_content = File.read(xcscheme) doc = REXML::Document.new(xcscheme_content) @@ -39,8 +39,8 @@ def configure_xcschemes!(xcschemes_path, project_root, target_platform, name) end end + return if name.nil? + # Make a copy of the ReactTestApp.xcscheme file with the app name for convenience. - unless name.nil? - FileUtils.cp(xcscheme, File.join(xcschemes_path, "#{name}.xcscheme")) - end -end \ No newline at end of file + FileUtils.cp(xcscheme, File.join(xcschemes_path, "#{name}.xcscheme")) +end From 6d3f522c9e398fde57a0f2e53079d657fd360e35 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 27 Jan 2025 05:26:49 -0800 Subject: [PATCH 07/12] Update xcode.rb Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com> --- ios/xcode.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/xcode.rb b/ios/xcode.rb index 96e2c1440..bf4bd6194 100644 --- a/ios/xcode.rb +++ b/ios/xcode.rb @@ -35,7 +35,7 @@ def configure_xcschemes!(xcschemes_path, project_root, target_platform, name) doc.root.elements['LaunchAction'].attributes['enableGPUValidationMode'] = '1' File.open(xcscheme, 'w') do |file| - doc.write(file) + doc.write(file, 3) end end From fe3e6b84491cfc926fedca780decad88eb08e392 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 27 Jan 2025 05:26:57 -0800 Subject: [PATCH 08/12] Update ios.metalAPIValidation.md Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com> --- docs/ios.metalAPIValidation.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/ios.metalAPIValidation.md b/docs/ios.metalAPIValidation.md index aeeaaa107..963644176 100644 --- a/docs/ios.metalAPIValidation.md +++ b/docs/ios.metalAPIValidation.md @@ -12,4 +12,7 @@ For more details, read Apple's documentation on
History + +- [[4.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/4.1.0)] + Added
From ccb8ccd69b68c4f0d56e544290f21f7647563391 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 27 Jan 2025 06:45:05 -0800 Subject: [PATCH 09/12] Update ios.metalAPIValidation.md Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com> --- docs/ios.metalAPIValidation.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/ios.metalAPIValidation.md b/docs/ios.metalAPIValidation.md index 963644176..bf9630662 100644 --- a/docs/ios.metalAPIValidation.md +++ b/docs/ios.metalAPIValidation.md @@ -15,4 +15,5 @@ For more details, read Apple's documentation on - [[4.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/4.1.0)] Added + From b60e9e15cc0edcb31f3e1d34228716646efb42b3 Mon Sep 17 00:00:00 2001 From: Saad Najmi Date: Mon, 27 Jan 2025 08:02:47 -0800 Subject: [PATCH 10/12] f --- docs/ios.metalAPIValidation.md | 2 -- schema.json | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/docs/ios.metalAPIValidation.md b/docs/ios.metalAPIValidation.md index bf9630662..fe9595e5b 100644 --- a/docs/ios.metalAPIValidation.md +++ b/docs/ios.metalAPIValidation.md @@ -5,8 +5,6 @@ other common tasks. > **_NOTE:_** The API Validation layer has a small, but measureable, impact on > CPU performance. -By default, a `PrivacyInfo.xcprivacy` is on, - For more details, read Apple's documentation on [Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/). diff --git a/schema.json b/schema.json index eb57b9b97..5d3b98767 100644 --- a/schema.json +++ b/schema.json @@ -86,7 +86,7 @@ }, "metalAPIValidation": { "description": "The API Validation layer checks for code that calls the Metal API incorrectly, including errors in creating resources, encoding Metal commands, and performing other common tasks.", - "markdownDescription": "The API Validation layer checks for code that calls the Metal API incorrectly,\nincluding errors in creating resources, encoding Metal commands, and performing\nother common tasks.\n\n> **_NOTE:_** The API Validation layer has a small, but measureable, impact on\n> CPU performance.\n\nBy default, a `PrivacyInfo.xcprivacy` is on,\n\nFor more details, read Apple's documentation on\n[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/).\n\n
\nHistory\n
", + "markdownDescription": "The API Validation layer checks for code that calls the Metal API incorrectly,\nincluding errors in creating resources, encoding Metal commands, and performing\nother common tasks.\n\n> **_NOTE:_** The API Validation layer has a small, but measureable, impact on\n> CPU performance.\n\nFor more details, read Apple's documentation on\n[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/).\n\n
\nHistory\n\n- [[4.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/4.1.0)]\n Added\n\n
", "type": "boolean" }, "privacyManifest": { From f017744b7c3b1e6952ca211fe150e080f09c18c3 Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:02:31 +0100 Subject: [PATCH 11/12] Format docs --- docs/ios.metalAPIValidation.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/ios.metalAPIValidation.md b/docs/ios.metalAPIValidation.md index fe9595e5b..ee1eea393 100644 --- a/docs/ios.metalAPIValidation.md +++ b/docs/ios.metalAPIValidation.md @@ -2,8 +2,10 @@ The API Validation layer checks for code that calls the Metal API incorrectly, including errors in creating resources, encoding Metal commands, and performing other common tasks. -> **_NOTE:_** The API Validation layer has a small, but measureable, impact on -> CPU performance. +> [!NOTE] +> +> The API validation layer has a small, but measureable, impact on CPU +> performance. For more details, read Apple's documentation on [Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/). From b81a4125b20ee7ae427b69b311f49c236065c55f Mon Sep 17 00:00:00 2001 From: Tommy Nguyen <4123478+tido64@users.noreply.github.com> Date: Tue, 28 Jan 2025 10:03:46 +0100 Subject: [PATCH 12/12] Apply suggestions from code review --- schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schema.json b/schema.json index 5d3b98767..07dca2a6b 100644 --- a/schema.json +++ b/schema.json @@ -86,7 +86,7 @@ }, "metalAPIValidation": { "description": "The API Validation layer checks for code that calls the Metal API incorrectly, including errors in creating resources, encoding Metal commands, and performing other common tasks.", - "markdownDescription": "The API Validation layer checks for code that calls the Metal API incorrectly,\nincluding errors in creating resources, encoding Metal commands, and performing\nother common tasks.\n\n> **_NOTE:_** The API Validation layer has a small, but measureable, impact on\n> CPU performance.\n\nFor more details, read Apple's documentation on\n[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/).\n\n
\nHistory\n\n- [[4.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/4.1.0)]\n Added\n\n
", + "markdownDescription": "The API Validation layer checks for code that calls the Metal API incorrectly,\nincluding errors in creating resources, encoding Metal commands, and performing\nother common tasks.\n\n> [!NOTE]\n>\n> The API validation layer has a small, but measureable, impact on CPU\n> performance.\n\nFor more details, read Apple's documentation on\n[Validating your app’s Metal API usage](https://developer.apple.com/documentation/xcode/validating-your-apps-metal-api-usage/).\n\n
\nHistory\n\n- [[4.1.0](https://github.com/microsoft/react-native-test-app/releases/tag/4.1.0)]\n Added\n\n
", "type": "boolean" }, "privacyManifest": {