Are there general methods for determining if an IC is soon to become obsolete (by the manufacturer)?
Manufacturer's life-cycle statements
Most manufacturers have a section on their datasheets giving the status of the part. For example TI classify their parts as:
PREVIEW: Device has been announced but is not in production. Samples may or may not be available.
ACTIVE: Product device recommended for new designs.
NRND: Not recommended for new designs. Device is in production to support existing customers, but TI does not recommend using this part in a new design.
LIFEBUY: TI has announced that the device will be discontinued, and a lifetime-buy period is in effect.
OBSOLETE: TI has discontinued the production of the device.
So you would look for an active device, not any of the other categories. Other manufacturers use other systems, but they are generally similarly easy to understand.
Choosing among active parts
There's rarely any way of telling when a device is going to move from 'active' to one of the other classes. A very profitable part will never move, whereas, a part which is developed and then doesn't sell well, might get discontinued very quickly. But there are some extra things you can do if you want to make extra sure the part will remain available
Talk to the manufacturer. Maybe they'll tell you that the part might be moving to NRND in a couple of months. Or maybe they won't, because they aren't ready to publicly announce it, or because the sales guy you're talking too simply isn't in on the discussions about what to discontinue. If you're a big customer, you're more likely to get a good answer. If you're a very big customer, they might promise to keep making if you keep buying.
Buy a popular product. Manufacturers don't discontinue chips which are bringing in lots of money. If it's selling well, it'll be available for a while. Either that, or a drop-in replacement will appear. Look for chips which all the distributors have lots of stock of, or that are general "go-to" chips for a certain type.
Consider second sourcing. Some chips are made by more than one manufacturer, e.g. LM317 voltage regulators. Prefer that chip over something more esoteric, and if TI stop making them (unlikley!) you can buy them from ON or Linear instead.
Consider replacement beforehand. Maybe you want chip X, and it's available in package A, B or C. Chip X is a bit niche, and might get discontinued, and chip Y would do the job, but costs more. Chip Y comes in package B, C or D, and the C package is pin-compatible with chip X package C. So design around package C, buy chip X, and keep chip Y as a backup plan.
Unless you have a good relationship with the vendors FAE (Usually means volumes in the tens to hundreds of thousands of parts per year), there is no really good way of telling, beyond the NRND flags and such like.
Use single source, non jellybean parts reluctantly, and note that some vendors are much worse then others for 'long lead time' (Which can be at least as much of a problem as obsolete), Maxim, looking at you....
If designing in things like audio codecs, pick one using a standard interface at standard rates, I2S @ 48K is a much easier ADC to replace then something weird at 11.25KHz with built in AGC and eq, even if it does add a few external jellybean bits to the BOM.
Automotive qualified parts are actually usually a good bet for long term availability because the car manufacturers tend to write contracts that are like that, and have the volumes (And Lawyers!) to make them stick.
Inductors can be a particular long 'lead time issue', no idea why, but try to come up with a footprint that will work for at least two, preferably three parts from different vendors.
Before finalizing the component make sure
- As @Bort said check with the manufacture website, or ask them about the product availability
- Make a search does the same device is manufactured by multiple vendors, so that we can be assured we will have alternate sources
- Check if the new technology is trending used by the device, which will make it obsolete in near future, make a trade-off using the latest