2

How can I solve a naming conflict between e.g. a local User object and the same object name in the StreamVideo SDK?

Regular imports can lead to problems with existing project files that have the same names. Also, there can be a conflict with the StreamVideo class as it's the same name as the package itself.

Stefan Blos
  • 172
  • 7

1 Answers1

3

Create a typealias in a separate file with the custom name (in this case StreamUser) that you want to give the object:

import struct StreamVideo.User

typealias StreamUser = StreamVideo.User

This works for all other naming conflicts that might occur as well.

Stefan Blos
  • 172
  • 7