Huawei SDK Integration on iOS with using CocoaPods
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
- Sign in to AppGallery Connect and select My projects.
- Click on your project that needs to integrate the HMS Core SDK.
- 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
- Open your development tool and find the Xcode project.
- 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:
Congratulations!
We have successfully implemented the Huawei SDK into our iOS project. Now we can use Huawei’s enormous kits 🙂