In the documentation for the example Live Caller ID server (https://swiftpackageindex.com/apple/live-caller-id-lookup-example/main/documentation/pirservice/testinginstructions) there is an example service-config.json. file shown (without thorough documentation).
That config file, and the whole of the instructions, center around there being two datasets of numbers: block and identity.
My question is - is it possible for more than one dataset to be specified i.e. for block1 and block2 to be specified?
The use case for this would be - suppose the Live Caller ID server has a set of numbers it has identified as being nuisance callers and so it lists these in the block section. However user A might want all these nuisance callers to be blocked but user B does not. Therefore the Live Caller ID extension on the handset would need to use a different dataset on the server so that user A's calls from a set of numbers is blocked, but user B's are not.
Note that I'm not suggesting that the Caller ID server should be capable of storing individual user's preferences. All that would be required would be two data sets: one where blocked content is none and and one where blocked content is some. Then a user/app could switch between them as indicated by the user.
Is that possible? If the database structure and service-config.json etc. is not configured to permit that, then could two different servers be set up to achieve this instead? i.e. so the server url specified in the app's extension can be set at run time and not at compile time?
It is not supported in the example service, but in general, one can route different requests to different datasets based on the "user tier". So this is still supported with one "service URL".
When a PIR request comes to a server: it has 3 fields that useful for routing to a different dataset.
- usecase name: this is pretty much fixed on device between identity and block.
- configurationHash: identifies what version of the configuration was used to construct the request. A service might choose to keep the previous version of the dataset available for a while, until all clients have had a chance to fetch the configuration for the new dataset.
- user tier: This can be used to provide different service. Like your example of blocking nuisance numbers or not. Another example how to use user tiers would be: provide names only vs provide names plus images.