From dbe55c1f90b16b11bd75baea1f75d03918209d16 Mon Sep 17 00:00:00 2001 From: Googler Date: Fri, 24 Jun 2016 21:07:16 +0000 Subject: Update build encyclopedia documentation to make clear that entitlements are not supported on the Simulator out of the box yet. -- MOS_MIGRATED_REVID=125814847 --- .../build/lib/rules/objc/ObjcRuleClasses.java | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'src/main/java/com/google/devtools') diff --git a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java index db34c77f8e..e6feaae099 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java +++ b/src/main/java/com/google/devtools/build/lib/rules/objc/ObjcRuleClasses.java @@ -1016,6 +1016,29 @@ public class ObjcRuleClasses { bundle id and $(AppIdentifierPrefix) with the value of the ApplicationIdentifierPrefix key from this target's provisioning profile (or the default provisioning profile, if none is specified). +

+ Bazel does not currently support adding entitlements to simulator builds. This + means that if you rely on behavior which must be specified in entitlements (like App + Groups) it will only work on a device. You can work around this by inlining the + entitlements into your binary. e.g. +


+          #if TARGET_OS_SIMULATOR
+          __asm(".section __TEXT,__entitlements");
+          __asm(".ascii \""
+          "<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\n"
+          "<!DOCTYPE plist PUBLIC \\\"-//Apple//DTD PLIST 1.0//EN\\\" "
+              "\\\"http://www.apple.com/DTDs/PropertyList-1.0.dtd\\\">"
+           "<plist version=\\\"1.0\\\">"
+          "<dict>"
+          "<key>com.apple.security.application-groups</key>"
+          "<array>"
+          "<string>group.com.your.company</string>"
+          "</array>"
+          "</dict>"
+          "</plist>"
+          "\"
+          #endif
+        
*/ .add(attr(ENTITLEMENTS_ATTR, LABEL).allowedFileTypes(ENTITLEMENTS_TYPE)) .add( -- cgit v1.2.3