bazelbuild / bazelbuild/rules_apple

iOS 13 simulator test bundle entitlements requirements

Open
#508 6 comments 0 reactions 0 assignees View on GitHub
P2 type: bug
Dominant language
Starlark
Stars
593
Forks
334
Avg merge
16h 48m
Merged PRs (30d)
9

Description

When using some API such as the shared keychain API you need entitlements in your app's binary that define the shared keychain groups you could access. If you hit this code in tests, previously with iOS <13 they would be fine and wouldn't cause an error. When running on an iOS 13 simulator you get the kErrSecMissingEntitlement error but on iOS 12.2 we get a errSecItemNotFound status instead (which makes sense for our clean simulator use case).

This seems to be because the test bundle has no entitlements. When running with xcodebuild, it produces a test bundle that contains the `__TEXT,__entitlements` section that has the keychain groups setup correctly (I have no idea where it gets this configuration from)

I've filed FB6799645 about this but this might be an intentional change, in which case we might have to support entitlements for test bundles. The alternative is using a test host app which has the correct entitlements.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.