I just tried to type in taipei in iOS but it didn't return any correct prediction. After my investigation, I found that it is taibei, not taipei, to get the correct pinyin result.
However, now I wonder why it is called taipei. 台 is tai like 台风 and 北 is bei like 北美洲. So why is it called taipei? I think in traditional chiese it should also be typed in as taibei...