How to generate ipa file in Xcode 10

I am new to Xcode.i want to generate .ipa file for my ionic project, I have MacBook and Apple ID . how can I generate ipa file using Xcode 10. Is it necessary to enroll in apple developers account for $99 .

+1 on this topic. any solutions would be much appreciated