Skip to content

OWP iOS Docs

xyzgo edited this page Apr 9, 2019 · 2 revisions

Project Structure

Folder Corresponding content
Supporting Files Storing some resource configurations required by the project
Define Store pch files and some macro definitions and header files required by the project
Category Store some classifications required by the project
Base Store some of the base classes needed for the project
Modules Store Controller-Model-View
AppDelegate Store AppDelegate

How to build

  1. Clone the repository
$ git clone https://github.com/heweather/OpenWeatherPlus-iOS.git
  1. Install pods
$ cd HeFengWeather
$ pod install
  1. Set weather data

    3.1 Open HeFengWeather.xcworkspace with xcode.

    3.2 Go to the heweather to apply for the key.

    3.3 Replace /Define/CommonMacros/KAMapLocationAPPKey and /Define/CommonMacros/HeWeatherSDK_USERKey to appkey, userkey

    3.4 Set heweather SDK

    For free account

    HeConfigInstance.userType = USER_TYPE_FREE_USER
    

    For commercial account

    HeConfigInstance.userType = USER_TYPE_USER
    
  2. Set location service

    4.1 Go to the Amap to apply for the appkey.

    4.2 Replace /Define/CommonMacros/KAMapLocationAPPKey to appkey

Customized

Change the weather background image

  1. The naming rules for background image files are xxx100d or xxx100n
  • where xxx is the picture name prefix user can define it by himself
  • Number 100 is the weather condition code
  • d = day, n = night
  1. The weather background is in the /weatherState/Assets.xcassets

Change weather icon

  1. The weather icon naming rules are xxx100d or xxx100n
  • where xxx is the picture name prefix user can define it by himself
  • Number 100 is the weather condition code
  • d = day, n = night
  1. The weather icon is in the /weatherState/Assets.xcassets

Change APP LOGO

The APP logo is in the /homeImage/Assets.xcassets

Change APP ICON

Change App Icon in Assets.xcassets