createAppStoreProfile method

  1. @override
Future<AppleProvisioningProfileDto> createAppStoreProfile({
  1. required String name,
  2. required String bundleIdId,
  3. required String certificateId,
})
override

Creates an App Store profile for one bundle identifier and certificate.

Implementation

@override
Future<AppleProvisioningProfileDto> createAppStoreProfile({
  required String name,
  required String bundleIdId,
  required String certificateId,
}) async {
  final response = _map(
    await _request(
      'POST',
      '/v1/profiles',
      body: <String, Object?>{
        'data': <String, Object?>{
          'type': 'profiles',
          'attributes': <String, Object?>{
            'name': name,
            'profileType': 'IOS_APP_STORE',
          },
          'relationships': <String, Object?>{
            'bundleId': <String, Object?>{
              'data': <String, Object?>{
                'type': 'bundleIds',
                'id': bundleIdId,
              },
            },
            'certificates': <String, Object?>{
              'data': <Object?>[
                <String, Object?>{
                  'type': 'certificates',
                  'id': certificateId,
                },
              ],
            },
          },
        },
      },
    ),
    'profile',
  );
  return _provisioningProfile(response['data']);
}