I solved this problem with the help of if condition. I added this line at the top of file
#if !(os(iOS) && (arch(i386) || arch(arm)))
and at the end of file
#endif
This piece of code solved my problem, and now I am able to build my app for the TestFlight.
I could not understand what does this if condition means. If anyone can explain this condition then my answer will be more helpful for all of them whose are facing this problem.
Topic:
Programming Languages
SubTopic:
Swift
Tags: