Heads up! We're sunsetting this forum to streamline our community space.

join us on Discord for support, updates, and all things Snap AR! See you there!
Sign up for our live Camera Kit office hour on July 17 @ 9:30am (PT) / 4:30pm (GMT)

Custom lenses not appearing in app

Roy
Roy Posts: 29 🔥

I've got CameraKit integrated into my iOS app - am able to load the sample lenses and record a video.


I've then followed documentation and published my first lense!


There is a specific part there about lense visibility:


https://docs.snap.com/snap-kit/camera-kit/getting-lenses-into-camera-kit#lens-visibility-settings


I initially tried creating a lense and selecting the Do not publish to Snapchat option. However, after I added it to a new lense group, it did not appear as one of the available lenses once I included the newly added lense group to the app.


I then tried creating another lense, this time I did publish it - and after approval, the same thing. The new lense group was also added to the app, but the lense itself did not appear.


To further troubleshoot, I included some sample lenses that are provied by snap as a part of the same lense group - those do appear in the app, however my custom made lenses do not for some reason.


I setup the CameraController just like as in the example, accept with my group ids:

let cameraViewController = SnapCameraViewController(cameraKit: cameraKit, captureSession: captureSession, repoGroups: [Constants.supercreatorBaseGroupId, Constants.kevinsBasegroupId])



Am i missing something here? How can I get the lenses I created and added into the app?

Tagged:

Best Answers

  • Ankit Baphna
    Ankit Baphna Posts: 12 👻
    #2 Answer ✓

    Thanks @Roy for posting your questions. This is one of the common issues that developers face and reason for that being the incompatibility between newer versions of the Lens Studio with older Camera Kit SDK versions. This section of the doc - Lens Studio compatibility - will help you decide which Lens Studio and\or SDK version you should choose while developing. As a rule of thumb, you should not upgrade the Lens Studio version until you want to use the new features which are only available in newer versions of Lens Studio; and should always try using the latest version of Camera Kit SDK. I hope this gives you more clarity.

    Having said that we are constantly working on making this easier for developers to develop and test with the right versions. We have added a “Min SDK Version” column against each Lens on the Camera Kit Portal. We are developing a feature to test a Lens in your application directly from Lens Studio, instead of Snapchat as the only option; and few more improvements.

    If you are using compatible versions of SDK and Lens Studio but still not seeing the Lens in your app then please provide following information for us to debug further:

    Thanks!
    Camera Kit team

  • Roy
    Roy Posts: 29 🔥
    #3 Answer ✓

    This was my issue! Working on downgrading Lens Studio now (struggling with finding where I can download older version though).

    Thanks Ankit

    @Ankit Baphna said:
    Thanks @Roy for posting your questions. This is one of the common issues that developers face and reason for that being the incompatibility between newer versions of the Lens Studio with older Camera Kit SDK versions. This section of the doc - Lens Studio compatibility - will help you decide which Lens Studio and\or SDK version you should choose while developing. As a rule of thumb, you should not upgrade the Lens Studio version until you want to use the new features which are only available in newer versions of Lens Studio; and should always try using the latest version of Camera Kit SDK. I hope this gives you more clarity.

    Having said that we are constantly working on making this easier for developers to develop and test with the right versions. We have added a “Min SDK Version” column against each Lens on the Camera Kit Portal. We are developing a feature to test a Lens in your application directly from Lens Studio, instead of Snapchat as the only option; and few more improvements.

    If you are using compatible versions of SDK and Lens Studio but still not seeing the Lens in your app then please provide following information for us to debug further:

    Thanks!
    Camera Kit team

Answers

  • Roy
    Roy Posts: 29 🔥

    Update #1:

    I was able to add new lenses via a "User Profile" source, to test out and see if it would work. I added a lense to the same Lense group which has been loaded into the app, and surprise - this new lense DOES appear.

    Perhaps there needs to be some approval as a "lense developer" to have your lenses used by other users? What else could be preventing me from seeing the lenses I made, loaded in the camera kit sdk?

  • Roy
    Roy Posts: 29 🔥

    Update #2:

    I then added another Lens from the same developer, however this time - this newly added lens DID not appear via app.

    So now I've thoroughly troubleshot this issue and it appears to be Lens-related, not Lens group or Lens developer.

    Help!

  • stevenxu
    stevenxu Posts: 612 👻

    Update 08/01
    There is now the ability to download older versions of Lens Studio if needed.

    Visit: https://ar.snap.com/older-versions

  • Pico Alta
    Pico Alta Posts: 22 🔥

    I am also having issues with custom lenses not showing up in lens groups. The test lenses are appearing in the groups.

    Info

    SnapKit Release 1.19.2
    Lens Studio 4.40.0
    Android build environment

    What is interesting is that in the dashboard's Lens Groups the 'Min SDK Version' of the custom lens is 'Unknown', probably indicating that it is incompatible?

    Going to test other versions of Lens Studio today to see if that fixes the issue.

  • Roy
    Roy Posts: 29 🔥

    @Pico Alta to save you time - my issue was the the lens was published by a version of Lens Studio which was not yet supported by the CameraKit sdk being used in the application.

    As noted, there is a delay sometime between lens studio release and camera kit release. LMK if that helps!

  • Pico Alta
    Pico Alta Posts: 22 🔥

    @Roy Thanks for your response! I cannot find seem to find what is the latest supported version of Lens Studio for Snapkit release 1.19.2. Is it somewhere in the docs? Lens studio 4.19 is working for me when I directly upload the baseball cap template. Going to try some more versions later

  • Pico Alta
    Pico Alta Posts: 22 🔥

    Ok I just found the lens studio support list in the changelog. That took me a long time :')

  • stevenxu
    stevenxu Posts: 612 👻

    Thanks for sharing @Roy

    @Pico Alta Sorry it took so long :( Noted to make it easier to find in our docs and will make a forum FAQ post about it for future devs.

    Here's a link to see the Camera Kit x Lens Studio support list:
    https://docs.snap.com/camera-kit/guides/quick-start/build-manage-ar-content/lens-studio-compatibility#camera-kit-version-parity

  • Pico Alta
    Pico Alta Posts: 22 🔥

    Thanks for your reply @stevenxu . I think most developers will look in the readme file first (at least I was looking there). If the latest supported lens studio could be mentioned in there that would be great!

  • stevenxu
    stevenxu Posts: 612 👻

    @Pico Alta AH! Noted. Will share this as a feedback item for our eng and PM. thank you!

Categories