{"id":49730,"date":"2024-10-23T20:55:55","date_gmt":"2024-10-23T20:55:55","guid":{"rendered":"https:\/\/www.applivery.com\/?post_type=docs&#038;p=49730"},"modified":"2024-10-23T21:04:04","modified_gmt":"2024-10-23T21:04:04","password":"","slug":"retrieve-the-code-requirement-for-an-app-on-macos","status":"publish","type":"docs","link":"https:\/\/www.applivery.com\/pt-br\/docs\/mobile-device-management\/apple-mdm\/macos\/retrieve-the-code-requirement-for-an-app-on-macos\/","title":{"rendered":"Retrieve the code requirement for an app on macOS"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"49730\" class=\"elementor elementor-49730\" data-elementor-post-type=\"docs\">\n\t\t\t\t<div class=\"elementor-element elementor-element-d586fdb e-con-full e-flex e-con e-parent\" data-id=\"d586fdb\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-a19b8a4 elementor-widget elementor-widget-text-editor\" data-id=\"a19b8a4\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p class=\"p1\">A <strong>code requirement<\/strong> is a constraint that must be satisfied for the code to be considered valid for a specific purpose. It outlines the conditions necessary for the system to evaluate the code\u2019s signature and determine whether the code can be trusted as secure. If the code does not meet these requirements during evaluation, the validation of the code signature will fail.<\/p><p class=\"p1\">You can include the code signature requirement and the bundle ID for an app to allow access to protected user data. Specifying the bundle ID and code requirement strengthens the security of the Privacy Preferences payload. You can retrieve the code signature requirement for the app by executing the <span class=\"s1\">codesign<\/span> commands.<\/p><p class=\"p1\">To find the code requirement of an app installed on the Mac, run the following command on the terminal:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-414ce11 elementor-widget elementor-widget-code-highlight\" data-id=\"414ce11\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>codesign -dr - \"path\/Bundle ID\"<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b4a2cc8 elementor-widget elementor-widget-text-editor\" data-id=\"b4a2cc8\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>For example:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ebd822b elementor-widget elementor-widget-code-highlight\" data-id=\"ebd822b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>codesign -dr - \/System\/Applications\/Maps.app<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6d4a3df elementor-widget elementor-widget-text-editor\" data-id=\"6d4a3df\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Replace the <code>path\/Bundle ID<\/code> with the path or Bundle Identifier of the app. You can find the code requirement starting after the text <code>designated =&gt;<\/code>.<\/p><p>Output example:<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-44e5a4e elementor-widget elementor-widget-code-highlight\" data-id=\"44e5a4e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>Executable=\/System\/Applications\/Maps.app\/Contents\/MacOS\/Maps\ndesignated => identifier \"com.apple.Maps\" and anchor apple\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5d55b0e elementor-alert-warning elementor-widget elementor-widget-alert\" data-id=\"5d55b0e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"alert.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-alert\" role=\"alert\">\n\n\t\t\t\t\t\t<span class=\"elementor-alert-title\">Note<\/span>\n\t\t\t\n\t\t\t\t\t\t<span class=\"elementor-alert-description\">It is advisable to manually validate the script execution on a system before performing a bulk action.<\/span>\n\t\t\t\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Use the codesign command to fetch the code requirements for an app installed on macOS devices.<\/p>\n","protected":false},"author":5,"featured_media":32390,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","inline_featured_image":false,"footnotes":""},"product":[315],"doc_category":[332],"doc_tag":[],"class_list":["post-49730","docs","type-docs","status-publish","format-standard","has-post-thumbnail","hentry","product-apple-mdm","doc_category-macos"],"aioseo_notices":[],"year_month":"2026-05","word_count":210,"total_views":"2838","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Karla Makowski","author_nicename":"karla-makowski","author_url":"https:\/\/www.applivery.com\/pt-br\/blog\/author\/karla-makowski\/"},"doc_category_info":[{"term_name":"macOS","term_url":"https:\/\/www.applivery.com\/docs\/mobile-device-management\/apple-mdm\/macos\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/49730","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/comments?post=49730"}],"version-history":[{"count":6,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/49730\/revisions"}],"predecessor-version":[{"id":49740,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/49730\/revisions\/49740"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media\/32390"}],"wp:attachment":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media?parent=49730"}],"wp:term":[{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/product?post=49730"},{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_category?post=49730"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_tag?post=49730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}