Huawei SDK Integration on iOS with using CocoaPods

Huawei Developers
Published in
Nov 4, 2020

In this article we are going to cover how to integrate the Huawei SDK into your iOS project with using CocoaPods.

Adding the AppGallery Connect configuration file of the app to your iOS project

  1. Sign in to AppGallery Connect and select My projects.
  2. Click on your project that needs to integrate the HMS Core SDK.
  3. Go to Project Setting > General information. In the App information area, download the agconnect-services.plist file.

Note: If you have made any changes on the Project setting page, such as setting the data storage location and enabling or managing APIs, you need to download the latest agconnect-services.plist file and replace the existing file in the app’s root directory.

Adding the Huawei SDK with using CocoaPods

  1. Open your development tool and find the Xcode project.
  2. Create a Podfile. (Skip this step if a Profile already exists.)
$  cd go-to-your-project-directory
$ pod init

3. Open the Podfile, add the following content to the file, and save it.

pod 'AGConnectCore'

4. Run pod install command.

$  pod install

And finally your Podfile will be similar to this file:


We have successfully implemented the Huawei SDK into our iOS project. Now we can use Huawei’s enormous kits :)