Skip to main content
Answered

In SwiftUI App where can I call Intercom.setAPIKey?

  • April 17, 2024
  • 1 reply
  • 49 views

Forum|alt.badge.img

The documentation and sample app show Intercom.setAPIKey being called from a Scene delegate.  I would prefer not to configure that for my SwiftUI App if I don’t have to.  In addition, we normally do not compile keys like this into our App, instead preferring to fetch them from the server.

Are there any restrictions on when I call Intercom.setAPIKey? Does it have to be called on the main thread? Do I have to call setAPIKey from the Scene delegate?  Can I wait to call it until after the user has logged in and communicated with our server to fetch the API key as long as I don’t call any other Intercom calls before that?

 

Thanks,

Tom

 

Best answer by bernice

Hi @Tom Wagner 👋  There should be no restrictions, as long as it is done before you initialise Intercom.

View original
Did this topic help you find an answer to your question?

1 reply

bernice
Intercom Team
Forum|alt.badge.img+5
  • Intercom Team
  • 230 replies
  • Answer
  • April 23, 2024

Hi @Tom Wagner 👋  There should be no restrictions, as long as it is done before you initialise Intercom.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings