Skip to content

App Extension can not connect to local PIR service #116

@alvin-twofive

Description

@alvin-twofive

According to this document https://swiftpackageindex.com/apple/pir-service-example/main/documentation/pirservice/onboarding#How-to-test-without-private-relay
I found that it is possible to test the local PIR service without submitting it to Apple.
I tried it but it doesn't seem to work. My App extension can't connect to the local PIR service.

I tried calling refreshPIRParameters(forExtensionWithIdentifier:) to force update your dataset immediately.
And then in the Console.app I see the following error:

requestStatusForClientConfig:options:dispatchQueue:completionHandler: XPC request complete, status(0) error:Error Domain=CipherML.AuthenticationError Code=7 "failed to fetch token key" UserInfo={NSLocalizedDescription=failed to fetch token key}

I can confirm some settings below:

  • iOS version is 26
  • App Extension was enabled successfully. I checked by LiveCallerIDLookupManager.shared.status(forExtensionWithIdentifier: extensionName)
  • App Extension and PIR service are in the same network. My iPhone can resolve the domain name of the host running the PIR service.
  • userTierToken of LiveCallerIDLookupExtensionContext is correct. I use BBBB like example
  • Dataset is correct with bundle identifier replacement

{
"users": [
{
"tier": "tier1",
"tokens": ["AAAA"]
},
{
"tier": "tier2",
"tokens": ["BBBB", "CCCC"]
}
],
"usecases": [
{
"fileStem": "block",
"shardCount": 1,
"name": "com.myexample.block"
},
{
"fileStem": "identity",
"shardCount": 1,
"name": "com.myexample.identity"
}
]
}

Is there something I'm missing when setting up the local environment for the PIR service?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions