Contains a demo project utilizing the AerisWeather SDK for iOS to help you get started with using our library.
The AerisWeather SDK for iOS allows a developer to quickly and easily add weather content and functionality to their iOS applications quickly and easily without having to code anything themselves. It utilizes the AerisWeather API and Aeris Maps Platform (AMP) backends for weather data and imagery and makes integrating your application with your AerisWeather account considerably easier and more efficient.
The AerisWeather SDK is broken up into multiple modules, allowing you to only include the components you need. However, some of the components have dependencies on one or more of the others as it simple builds upon them.
We have a migration guide available to help you transition to version 3.0 of the SDK if you’re projects are already using 2.0.
We have in-depth installation and setup guides available for you to get started using the AerisWeather SDK for iOS.
The following are basic installation instructions to follow to get the SDK integrated with your project based on your desired method. Select one of the following methods to integrate the SDK based on your preferred method, but don’t use more than one method as that will result in duplicate copies of the SDK and compiler errors.
Add the AerisWeather
pod to your Podfile
. This will add the base AerisWeatherKit.framework and its core dependencies to your project.
pod 'AerisWeather'
If you want to also use any of the weather mapping functionality available in our iOS SDK, you’ll need to also include the Maps
pod:
pod 'AerisWeather/Maps'
# include this if using Mapbox for maps in your project
pod 'AerisWeather/Mapbox'
# or include this if using Google Maps for maps in your project
pod 'AerisWeather/Google'
Run pod install
from the Terminal at the root of your project where your Podfile
is located.
*.xcworkspace
file with Xcode. Do NOT use *.xcodeproj
as you’ll receive ld: library not found
errors for the AerisWeather libraries.Under the Build Phases tab of your Target, click the + button on the top-left and select New Run Script Phase. Setup the build phase as follows, and make sure this phase is below the Embed Frameworks phase:
Shell /bin/sh
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AerisCore.framework/strip-frameworks.sh"
Show environment variables in build log: Checked
Run script only when installing: Not checked
Input Files: Empty
Output Files: Empty
Add the following to your Cartfile
:
binary "https://www.aerisweather.com/downloads/ios/AerisWeather.json"
Run carthage update
.
Aeris###.framework
files (e.g. AerisCore.framework
, AerisWeatherKit.framework
, etc) you wish to use from the Carthage/Build/iOS
folder on disk.In the Build Phases tab, click the + icon and choose New Run Script Phase. Create a Run Script phase and add the following to the script area below the shell:
/usr/local/bin/carthage copy-frameworks
Then add the framework paths to the Input Files for this script phase:
$(SRCROOT)/Carthage/Build/iOS/AerisCore.framework
$(SRCROOT)/Carthage/Build/iOS/AerisCoreUI.framework
$(SRCROOT)/Carthage/Build/iOS/AerisWeatherKit.framework
...
Review the Carthage setup documentation for more information about setting up your project.
Under the Build Phases tab of your Target, click the + button on the top-left and select New Run Script Phase. Setup the build phase as follows, and make sure this phase is below the Embed Frameworks phase:
Shell /bin/sh
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AerisCore.framework/strip-frameworks.sh"
Show environment variables in build log: Checked
Run script only when installing: Not checked
Input Files: Empty
Output Files: Empty
Follow our setup guide to start using the SDK.
Aeris###
.framework` files you need located within the decompressed directory you downloaded and select them. Make sure to check the Destination: Copy items if needed checkbox when prompted.Under the Build Phases tab of your Target, click the + button on the top-left and select New Run Script Phase. Setup the build phase as follows, and make sure this phase is below the Embed Frameworks phase:
Shell /bin/sh
bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AerisCore.framework/strip-frameworks.sh"
Show environment variables in build log: Checked
Run script only when installing: Not checked
Input Files: Empty
Output Files: Empty
Follow our setup guide to start using the SDK.
Check out the included demo project, under the Demo directory, which contains a variety of example views using different components of the SDK, including pre-built weather views and weather maps utilizing different mapping libraries. Since the project’s AerisWeather SDK dependencies in the demo project are installed and managed using CocoaPods, you will need to open the Demo/AerisDemo.xcworkspace.
For complete details and instructions on installing and getting started with the AerisWeather SDK for iOS, refer to our complete Getting Started and API documentation.
Feel free to submit a new ticket with any questions, bug reports or feature suggestions you have. You can also reach out to us on Twitter at @AerisDeveloper.