how can I avoid app rejection due to it
You can't avoid it; they don't want your app on their store.
Topic:
Programming Languages
SubTopic:
Swift
Tags: