I've been told what works for baiting Bears will also work on pigs though we don't have pigs up here - yet.

Fermented corn is pretty effective which seems to differ from sour corn by the addition of 3-5 pounds of sugar to the corn/water mix. I fill a black 5 gallon bucket with corn to about 2" from the top. I'll add sugar to this then fill with water until the corn is covered. Stir well to mix in the sugar then top off with water and seal with tight fitting lid, preferably black also. Then let sit in an area that the sun can hit it for as long as possible each day. That gets the fermentation process working well. The amount of sugar used is determined by the length of time it is left in the sun and temperature. For at least 4 weeks and temps over 80 degrees 3 pounds will do. Shorter times and lower temps require more sugar.

A side benefit if hunting over this as bait is watching the smaller critters getting drunk. I've seen them falling down drunk and the best are those that become "mean drunks" and try fighting anything else that comes in. Like heavily intoxicated humans, their antics are mostly unsuccessful and often painful.

Powdered jello packets are also commonly used. Anything berry as well as chocolate and vanilla are attractive to bears. I'll empty and scatter the contents over popcorn to add bulk to the jello. For bears I'll open two sides of the packet and through it up into the trees to get greater scent dispersion. Flavors suck as lemon, lime, and butterscotch have been more effective as deterrents for me.