Skip to content
This repository has been archived by the owner on Dec 5, 2019. It is now read-only.

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.

License

Notifications You must be signed in to change notification settings

IBM/weather-forecasting-ios

Repository files navigation

WARNING: This repository is no longer maintained ⚠️

This repository will not be updated. The repository will be kept available in read-only mode.

Platform

Create an iOS weather application in Swift

In this code pattern, you will create an iOS weather forecasting app using Apple Maps and the Weather Company Data service. Use this service to consume current conditions or hourly, daily, and intraday forecasts based on Apple Maps geolocation coordinations of your user's device. Use this pattern to solve real business problems where weather has a significant impact on the outcome.

When you have completed this code pattern, you will understand how to:

  • Provision and integrate the Weather Company Data service
  • Use Geolocation information integrated with Apple Maps
  • Connect to additional IBM Cloud services

Steps

As an alternative to the steps below, you can create this project as a starter kit on IBM Cloud, which automatically provisions required services, and injects service credentials into a custom fork of this pattern. Then, you can skip directly to step 4 below.

  1. Install developer tools
  2. Install dependencies
  3. Create a Weather service instance
  4. Run

1. Install developer tools

Ensure you have the required developer tools installed from Apple:

  • iOS 8.0+
  • Xcode 8.0
  • Swift 3.0

2. Install dependencies

This starter uses the IBM Cloud Mobile services SDKs to use the functionality of the Mobile Analytics, Push Notifications, and Weather services.

The IBM Cloud Mobile services SDK uses CocoaPods to manage and configure dependencies. To use our latest SDKs, you need version 1.1.0.rc.2.

Install CocoaPods using the following command:

$ sudo gem install cocoapods --pre

If the CocoaPods repository is not configured, run the following command:

$ pod setup

For this starter, a pre-configured Podfile is included in this repository. To download and install the required dependencies, run the following command in this repository:

$ pod install

Open the Xcode workspace: {APP_Name}.xcworkspace. Continue to open the .xcworkspace file as it contains all the dependencies and configurations.

If you run into any issues during the pod install, it is recommended to run a pod update by using the following commands:

$ pod update
$ pod install

3. Create a Weather service instance

Use the IBM Cloud Catalog and create a Weather Company Data service instance.

A WeatherCredentials.plist configuration file is included in the Xcode project that includes credential configurations for Weather service. Find the credentials for your WeatherCredentials.plist file by clicking the Service Credentials button:

Service credentials

4. Run

Click Product > Run to start the app in Xcode.

Weather App Screenshot

The application allows you determine the forecast of any location using your Weather instance on IBM Cloud. Long click to view the forecast.

License

This code pattern is licensed under the Apache License, Version 2. Separate third-party code objects invoked within this code pattern are licensed by their respective providers pursuant to their own separate licenses. Contributions are subject to the Developer Certificate of Origin, Version 1.1 and the Apache License, Version 2.

Apache License FAQ

About

WARNING: This repository is no longer maintained ⚠️ This repository will not be updated. The repository will be kept available in read-only mode.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •