Migrate from 2.2 to 3.0
This guide is provided to ease the transition of existing applications using SkyPath v2.2 to v3.0 APIs.
If you are upgrading from 2.1 or earlier it could be easier to upgrade gradually to 2.2 first and address any deprecation warnings.
Due to breaking changes, your application may no longer compile. Follow the fix-it suggestions for simple syntax updates, and review the specific modifications described below.
Breaking Changes
-
New development environment requirements:
- Xcode version 16.2 or higher.
- iOS version 16.0 or higher.
-
The CocoaPods support has been removed. See Install for the supported options.
-
The Turbulence Polygons feature has been removed. Use Viewport instead. The following are not available anymore:
DataTypeOptions.turbulencePolygonsinDataQuery.typesDataQuery.globalEnabledDataQuery.globalTurbulencePolygonsUpToEnabledTurbulencePolygonsQuerySkyPathDelegate.didReceiveNewTurbulencePolygonsDataAreaType.global
-
DataQuery.sevshas been replaced byDataQuery.minSev. -
Flight.depandFlight.destare now required. -
TurbulenceResultis replaced withQueryResultinSkyPath.turbulence(with:).TurbulenceQuery.resultOptionsis nowQueryResultOptionsinstead ofTurbulenceResultOptions. -
DataHistoryTime.sixHourshas been removed. -
SkyPathDelegateupdates:didReceiveNewNowcast()changed todidReceiveNewNowcast(areaType:)didFailToFetchNewData(error:)changed todidFailToFetchNewData(error:type:)
-
DataUpdateFrequencyhas been removed. UseSkyPath.dataUpdateEnabledinstead ofSkyPath.dataUpdateFrequencyto stop data fetching temporarily. -
Nowcasting is now part of OneLayer only and isn't available as a separate layer data. The following are not available anymore:
DataTypeOptions.nowcastSkyPath.nowcast(with:)NowcastQueryNowcastHoursNowcastSeveritySkyPathDelegate.didReceiveNowcast()
-
Turbulence Notifications types and functions have been renamed:
SkyPathDelegate.didReceiveAlert(_:)->SkyPathDelegate.didReceiveNotification(_:)AlertQuery->NotificationQueryAlertResult->NotificationResultAlertError->QueryError
New Features
-
SkyPath OneLayer (see docs). The following types and functions have been introduced:
SkyPath.oneLayer(with:)SkyPathDelegate.didReceiveNewOneLayer(areaType:)DataTypeOptions.oneLayerNotificationResult.oneLayerOneLayerItemOneLayerQueryDataSourceType
-
SkyPath Nowcasting is now extended to 12-hour prediction.
Improvements
-
Query configs such as
TurbulenceQueryhave been updated to use generalQueryResultandQueryResultOptionstypes instead of their types such asTurbulenceResultandTurbulenceResultOptions. -
Query result items such as
TurbulenceItemnow conform to commonItemableandTurbulenceItemableprotocols where applicable for consistency. -
SkyPath.updateDate(of:)allows you to get an update date of a specific type of data. -
DataTypeOptions.set(type:enabled:)is a quick way to enable or disable specific data types.