You must be a member of the Apple Developer Program to use this package.
You can register and check bundle id from Xcode or Certificates, Identifiers & Profiles.
You can check Team ID from Membership.
In order to use the Weather Kit,
- Access to Certificates, Identifiers & Profiles / Keys
- Enter any Key Name in the form and check the Weather Kit checkbox.
- Tap "register" and you can check Key Id
- Tap "Download" to get p8 certificate.
Here are small examples that show you how to use the API.
final weatherKit = WeatherKit();
final token = weatherKit.generateJWT(
bundleId: 'com.example',
teamId: 'team id',
keyId: 'key id',
pem: 'example.p8',
expiresIn: const Duration(hours: 1),
);
final result = await weatherKit.obtainWeatherData(
jwt: token,
language: 'ja',
latitude: '35.71',
longitude: '139.811',
dataSets: 'currentWeather',
);
First 500,000 calls are free. For more details, check this.