CDMA modulation syncronization
CDMA synchronisation is a deep topic.

A well designed CDMA code will have a noise-like autocorrelation, that is zero for all offsets other than the range +/- 1 chip, where the autocorrelation rises to 1.

So how do you find the code offset?

1) Brute force. There are codes that do this. You simply correlate, sequentially, with all possible offsets, and wait until you get a hit. This can take a long time.

2) Time assisted. The receiver knows about the transmitter's code offsets, and knows the exact time from another source (network sync, GPS, absolute with own reference, delta time since last fix, anyway somehow). This reduces the search time by many orders of magnitude, as there are only a few possible codes, and a restricted range of 'distance to base station time of flight' delays to to search over. If you are interested in IS-95 (Qualcomm) North American system http://users.ece.gatech.edu/yucel/is95.pdf it says in this presentation that it uses GPS to assist sync on the 15 bit M sequence spreading codes.

3) Composite code design. You can make a long code from several shorter sub-codes. This is used by the NASA deep space positioning system as an example. Each short code can be synchronised with a brute force search quite quickly. Then the long code position can be computed from the short positions, see 'chinese remainder theorem' for how this could work. This then gives a very tight estimate for where the long code is, and once acquired, it can stay in track.