I have 2 boars who went through adolescence together with 0 issues. They are snugly and bonded and loving.
There's another pair who tolerate one another, but don't fight.
And then there's the reason I have 2 separate cages. Oliver (who is so bonded to Henry in the first example) and CJ (who just tolerates Fred in the second) will kill one another on sight.
I have read about people here having to separate their sow and their boar! It will just depend on each pig.
I held off trying to introduce until after the bigger cage was made, and not only did it ease the conflict (again, Dottie and Mollie were already cage mates for about 3 months before this), but it also allowed Mollie to become a little more bold and friendly towards us.
But yes, if opposite sex, someone needs to be fixed before introduction. Some rescues will fix all potential adoptees so that's something to look into. Adopt from somewhere, don't buy, and don't forget to quarantine unless it's been done already at a rescue.