Remote Service Module Error on iOS

Blake Posts: 2

I have implemented an API that communicates between a Lens and an iOS app as specified here. It seems that everything should be set up correctly - I tested the API locally with a Javascript debug script and the Lens functioned as expected. However, the Lens does not seem to be communicating with my iOS app. When debugging the app I receive the following error:

RemoteServiceModule: Wrong api visibility 100 0

This error is then followed by "a server with the specified hostname could not be found" when I attempt to respond to the API request. I checked the hostname and path, and they both match with what is in the iOS app. Any idea what could be causing this issue? I should mention - the hostname is not currently set up to run on my own server. I was expecting the app and the Lens to communicate strictly locally through the device. Is this not possible? All of the examples on the link above point to third-party APIs, such as the Alpaca API, that are hosted on a server.

For reference I have followed the example iOS code on Github to set up this API communication. An example of the iOS code that starts the Camera Kit session can be found below:


let dataProviderComponent = DataProviderComponent(deviceMotion: nil, userData: nil, lensHint: nil, location: nil, mediaPicker: nil, remoteApiServiceProviders: [ExampleRemoteApiServiceProvider()])

    input: input,
    arInput: arInput,
    cameraPosition: cameraPosition,
    videoOrientation: videoOrientation,
    dataProvider: dataProviderComponent,
    hintDelegate: nil,
    textInputContextProvider: nil,
    agreementsPresentationContextProvider: nil)


"ExampleRemoteApiServiceProvider" is a LensRemoteApiServiceProvider object that contains the correct API spec ID for my custom remote API. The rest of the code follows the Github example to a tee. Any help on this issue would be greatly appreciated. Let me know if I can provide any additional information.


  • stevenxu
    stevenxu Posts: 542 👻

    @Blake thanks for posting on the forum.

    Remote Service Module is meant for communicating between Lens and the app itself.

    I've created a ticket (5131) for our eng to investigate this issue and respond here when they get a chance.