Customize city selection

更新时间:
复制 MD 格式

This topic describes how to customize city selection when integrating mPaaS with an iOS client.

You can customize city selection during iOS integration.

Note

This feature is available only for baseline version 10.1.68.27 or later.

Custom city list file

All cities

  1. Create a city list file that ends with .txt. The file must use the following format:

    • Field 1: adcode.

    • Field 2: City name.

    • Field 3: The city name in Pinyin. This is used to configure the list of initial letters on the right.

  2. Set the path for the custom city list. The file path is a relative path to the bundle, such as BeeCityPicker.bundle/citiesWithCounty.text. The SDK automatically reads this file.

    [BeeCityPickerAdapter sharedInstance].customHotCityTextFile = @"BeeCityPicker.bundle/citiesWithCounty.text";

Hot cities

  1. Create a city list file for hot cities. The file format is the same as for All cities.

  2. Set the path for the custom hot city list.

    [BeeCityPickerAdapter sharedInstance].customHotCityTextFile = @"BeeCityPicker.bundle/hotCities.text";

Custom city list in a Mini Program

For more information about how to customize the city list in a Mini Program, see Select a city.