[Guide] Releasing a Huawei Quick Game Using the LayaAir Engine - Huawei Developers

Environment for Game Release and Testing
1. Have a Huawei mobile phone ready.
2. Connect that mobile phone to a PC using a data cable, and make sure that it remains connected during the game release.
The reason is that a Huawei quick game will not generate a QR code for release, so the data cable is needed during the release process. Otherwise, only one RPK package will be generated during game release in the LayaAir IDE, and you still need to connect the two devices and copy the RPK package to the mobile phone.
3. Install Node.js 10.x. You can download it here: https://nodejs.org/download/release/latest-v10.x/.
4. Install the LayaAir 2.8.1 IDE, or a later version. You can download it here: https://ldc2.layabox.com/layadownload/?type=layaairide.
Preparations
To ensure that your game release goes as smoothly as possible, make sure that you:
1. Have installed Node.js and LayaAir IDE on your PC. You do not need to install the ADB and OpenSSL, as they are built into the LayaAir IDE.
2. Have enabled the developer mode on your mobile phone, and allowed for USB debugging.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
If you do not know how to enable the developer mode, you can check Huawei’s documentation at https://developer.huawei.com/consumer/en/doc/quickapp-open-developer-option.
Releasing a Huawei Quick Game in the LayaAir IDE
First, use the release function for the LayaAir IDE to package the Huawei quick game project to an RPK file. Then, open this project in the IDE and go to Project > Release. Select the release platform huawei fast game and set Minimum platform version(1075). Lastly, click publish to release your quick game.
I won’t describe the steps required for release in detail here. If you have any questions, please refer to the official website.
About the Certificate Fingerprint
If the release signature has been generated in the project, you can print the signing certificate fingerprint on the release page. This fingerprint will be used when you submit a Huawei quick game.
It’s important to note that the print button is only available after the release signature is generated. If no signature is generated, the message shown in the following figure will be displayed, indicating that the certificate does not exist.
Running and Testing the Game on a Real Device
After the game has been successfully released on LayaAir IDE, it will automatically run on the Huawei phone in full-screen mode. If you exit the game, you can also launch the Huawei Quick App Loader and tap the game name to restart the game.
Debugging the Game
No tool is available for debugging a Huawei quick game, so you’ll need to make sure that your browser supports the HTML5 version of the game. Debugging your Huawei quick game requires that you check its logs, so you’ll need to retain the default value log for the log level in LayaAir IDE, as shown in the figure below. In this case, both the LayaAir IDE logs and error logs will be recorded. If you set the log level to error, only error logs will be recorded. Both options allow you to view logs after the game’s release. If you select off, no logs will be available.
You can directly view logs on the project release page, as shown below.
You can also open another CLI on your PC to view logs by entering the following command. This method enables you to avoid keeping the IDE open for debugging for a long period.
adb logcat -s jsLog
All logs generated during runtime after the release are displayed in the CLI, as shown below.
If you would like to export logs, please use Huawei Quick App PC Assistant.
FAQs
1. Do Huawei quick games support package splitting?
Splitting the package of a Huawei quick game and loading its subpackages helps reduce the traffic and time required for app downloads. When doing so, you can choose to load or download specific subpackages, rather than the entire package.
Before using this method, you’ll need to determine whether this method is necessary for your project. Most quick game packages are small enough that they do not necessarily require splitting. You can opt to:
(1) Delete unnecessary JavaScript code.
If the package is not split, the JavaScript files referenced in the index.js and HTML files are packaged in the last RPK file, unless these JavaScript files are referenced elsewhere in the project. You can also directly delete the unused JavaScript files, for example, those of unused engine libraries and third-party class libraries, to reduce the package size.
(2) Compress and obfuscate JavaScript files.
This can significantly reduce the file size. If the file size does not exceed 4 MB, you won’t need to split the package, as game content can be dynamically loaded through URLs. After the content is loaded for the first time, it is stored in the physical cache. Common content that occupies less than 50 MB will not be reloaded the next time.
2. When a third-party library, for example, protobuf, is introduced, the gameThirdScriptError error is reported. What should I do?
A potential cause is that the library contains such code as Function(“return this”)();. For security purposes, the game engine disables such code by default. It is recommended that you modify the JavaScript code. In addition to protobuf, the following third-party libraries have similar code. If these libraries need to be introduced, you’ll need to modify the code as well.
If you do not modify the code, you’ll need to enable the runGame parameter, which is not recommended.
For more information, please refer to:
Huawei Quick App PC Assistant materials:
https://developer.huawei.com/consum...ickApp-Guides/quickapp-pcassistant-user-guide
Huawei quick game materials:
https://developer.huawei.com/consum...uickApp-Guides/quickgame-develop-runtime-game

Related

Mobile Developer’s Swiss Army Knife: HMS Core Toolkit

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Hi everyone
We need to debug while working on Android applications, include the necessary libraries in the project, follow the documentation and many more. Although it is possible to do these manually, a much more useful solution is now possible, “HMS Core Toolkit”.
What is HMS Core Toolkit?
It is an Android Studio plugin that collects code pieces, additional libraries, auxiliary services during debug and testing that developers can need during the development of their applications, during HMS integration.
What are the Features of HMS Core Toolkit?
Guide to how to integrate HMS Core into an application created from scratch
Tools to automatically integrate dependencies into the application you are developing
Providing practical and fast development in your application with sample codes about kits
Integration to work with G + H or direct Huawei Core services within your application with GMS dependencies
Testing the application on pure HMS devices
Automatic testing of applications on pure HMS devices and monitoring these test outputs
Setup and Getting Started
Let’s start studying…
First, let’s start by downloading the plugin. There are 3 ways to get the Plugin,
The first one is to install via Android Studio market,
The second is to download and install the plugin directly from Huawei’s site,
Finally, compile it by obtaining the source code via github.
Installing on Android Studio:
In Android Studio -> File -> Settings -> Plugins, we search by typing “HMS Core Toolkit” in the search bar:
When we restart Android Studio after installing the plugin, we see that the “HMS” tab is coming.
Getting on Huawei Official Site:
From this address, we go to the HMS Core Toolkit page and say “download now”. I recommend downloading the most current version among:
After the download is complete,
Android Studio -> File -> Settings -> Plugins
Just select “Install plugin from Disk” section and show the location where you downloaded HMS Toolkit:
After the plugin is installed, the “HMS” tab should have appeared on the top:
Also, if you want to see the source code of the plugin and customize it for yourself, you can look at the details on the Github page, or you can compile and use it yourself.
Login
After downloading the plugin, you need to login to your Developer account to start using it:
When you see this page after logging in, you can start using the plugin:
Configuration Wizard
You can follow step by step how to create an application from scratch thanks to this panel, which was created with the HMS ecosystem, which has just been introduced and decided to develop applications:
Repository
This section, which allows you to select the kits you want to use in your application and integrate them into your application, simply select from the interface.
For example, after selecting “Account Kit” and apply, it can automatically see the necessary additions to the gradle file of the HMS Core resources at the project level added with build.gradle:
Coding Asistant
This feature, which contains details on how you can integrate and start using the kits you want to integrate in your application, you can integrate the kits without the need for documentation in your project.
Also, thanks to the “Scenario Description” tab in the last step, you can learn how to use many features in the commonly used related kit and how to integrate them into your application interactively.
With drag and drop feature, it is possible to transfer samples directly into the code:
Cloud Debugging
Cloud debugging is another feature provided by HMS Core Toolkit to test our applications on the device during the development process, we can test your application in pure-HMS devices in real time.
Cloud Testing
We have the opportunity to make 4 different tests of the applications we write automatically. These types are:
Compatibility Test
Stability Test
Performance Test
Consumption Test
After the test is completed, you can view the results and details using the results button next to it.
HMS Convertor
In fact, thanks to this feature of HMS Core Toolkit, which is the main purpose of development, it is possible to automatically detect GMS dependencies for many kits and turn them into a structure that you can use either directly to HMS services or to both HMS and GMS.
Here you may have to wait a bit depending on the size of your project:
We have 3 options:
Add HMS API (HMS API First): if there is both GMS and HMS on the device where the application is installed, a structure that will prefer HMS will be installed first.
Add HMS API (GMS API First): If there is both GMS and HMS on the device where the application is installed, a structure that will be preferred GMS will be established first.
To HMS API: If you choose this option, all GMS dependencies in your application will be removed and HMS kits and services will be integrated instead.
If you are not sure which service you choose, you can get more detailed information from this link.
The part of the code that can automatically convert comes as unchecked next to you to check it, showing you as follows, it is applied automatically when you give your confirmation after checking:
Some parts are not suitable for automatic conversion, so you are asked to check and convert them manually:
In order to see the automatic changes made by the plugin, double clicking on the relevant line presents you the changes it made in a new window in comparison:
If something goes wrong in your project and you want to go back to the previous version, all you have to do is select the “restore project” from the panel to show the location where you backed up:
Thanks to all these features, the fact that all documents and codes we need for HMS integration can be provided through a plug-in while developing is one of the factors that increase comfort during development.
For questions and problems, you can reach us via [email protected] or Huawei developer forum.
Hope to see you in my next post ?
Thanks to Sezer Yavuzer Bozkır for this article
Original post: https://medium.com/huawei-developer...wiss-army-knife-hms-core-toolkit-da0dc5afa018

Cocos Creator Integrates with AppGallery Connect APM – Releasing a Cocos-based App

According to the introduction of Cocos Creator from its official website, Cocos Creator 2.4.1 and later versions support HUAWEI AppGallery Connect and have been providing multiple AppGallery Connect services. The following figure shows all supported AppGallery Connect services.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To test how well Cocos supports AppGallery Connect services, this article uses the App Performance Management (APM) service as an example to monitor the performance data of a Cocos-developed app. First, let's see what APM is.
AppGallery Connect APM
APM of AppGallery Connect provides minute-level app performance monitoring capabilities. You can view and analyze app performance data collected by APM in AppGallery Connect to comprehensively understand the performance features of developed apps, helping you quickly and accurately rectify possible performance problems and continuously improve user experience.
That is, APM can help you monitor your app performance data in a variety of scenarios, including app launch, page loading, and network request. We can assume that APM can quickly locate performance-related problems for games, which attach great importance to performance as it greatly affects user experience.
Before You Start
Downloading and Installing the Cocos Dashboard
1. The Cocos Dashboard is the GUI-based development tool provided by Cocos. You can download it from https://www.cocos.com/creator/ (latest version: 2.4.2).
2. You need to install the Visual Studio as well to obtain the Cocos dependency package. The following figure shows the installation procedure.
3. After the installation is complete, click Run
Downloading and Installing Cocos Creator
1. Open the Cocos Dashboard and click Signin in the upper right corner. You can sign up first if you do not have an account.
2. After sign-in, click Editor on the left, and then click Download in the lower right corner.
3. On the Editor page, select the latest version of Cocos Creator, click the download button on the right, and agree with the terms.
4. Once the download is complete, you can create a Cocos project on the Project page. Take a HelloWorld project as an example.
5. When you open the project for the first time, the system prompts you to select a language. Just select English. Select the corresponding running environment and click Run.
Configuring the Visual Studio Code Compilation Environment
The built-in code editor of Cocos is too simple and is only suitable for code viewing and a small amount of editing. Therefore, we need a more mature and powerful compilation environment. This is where Visual Studio Code comes in.
1. Download and install Visual Studio Code of the required version based on your computer environment.
2. Open your project in Cocos Creator and choose Developer > VS Code Workflow > Install VS Code Extension from the main menu to add an adaptation plug-in to Cocos Creator.
3. If the information shown in the following figure is displayed, the installation is successful.
4. If you want the system to autocomplete the Cocos Creator engine API during coding, you need to generate the API autocompletion data and put the data in the project path through the menu. Choose Developer > VS Code Workflow > Update VS Code API Source.
5. Double-click the HelloWorld.js script in the project directory. In the dialog box that is displayed, click Yes and select Visual Studio Code as the default editor.
6. Double-click the HelloWorld.js script again to develop your app.
Packaging and Releasing a Cocos-based App in AppGallery Connect
Cocos Creator 2.4.1 and later versions allow you to package and release your app to HUAWEI AppGallery through AppGallery Connect. In addition, Cocos Creator suports various AppGallery Connect services, such as APM, which can be quickly integrated and used. The detailed procedure is as follows:
1. Sign in to AppGallery Connect and create an app.
2. Sign in to Cocos Creator, choose Project > Build…, and select HUAWEI AppGallery Connect as the release platform.
3. Click Build. If Built huawei-agc successfully is displayed, the build is successful.
Note: When you build a project for the first time, you need to choose File > Settings… and configure the Android SDK path and NDK path on the native development environment page.
4. Click Compile and wait until the compilation is successful.
5. A jsb-default or jsb-link directory (depending on the template selected on the Build… panel) is generated in the build directory of the default release path. AppGallery Connect services are automatically integrated in the directory. Open the publish directory in the jsb-link directory to view the generated APK file.
6. Upload the packaged APK file locally or using AppGallery Connect.
l Uploading the file on the Upload... panel.
a) Login Type: OAuth
Click Confirm, sign in to your HUAWEI ID (with sufficient permissions), and select the check box of the corresponding permissions. The APK file will be uploaded automatically.
b) Login Type: API Client
Sign in to AppGallery Connect to obtain related configuration. Go to Users and permissions > Connect API > Create, create an API client, select a role as required, and click OK.
Enter your client ID and key of the API client in the text boxes on the Upload... panel in Cocos Creator. Click Confirm.
After the APK file is uploaded successfully, you can view it in AppGallery Connect.
Uploading the file in AppGallery Connect
Click Upload and select the APK generated by Cocos Creator.
For more details, please refer to:
Cocos official documents
AppGallery Connect APM development guide
AppGallery Connect console
GitHub to download demos and sample codes
Stack Overflow to solve any integration problems​

Cocos Creator Integrates with AppGallery Connect APM - Releasing a Cocos-based App

According to the introduction of Cocos Creator from its official website, Cocos Creator 2.4.1 and later versions support HUAWEI AppGallery Connect and have been providing multiple AppGallery Connect services. The following figure shows all supported AppGallery Connect services.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
To test how well Cocos supports AppGallery Connect services, this article uses the App Performance Management (APM) service as an example to monitor the performance data of a Cocos-developed app. First, let's see what APM is.
AppGallery Connect APM
APM of AppGallery Connect provides minute-level app performance monitoring capabilities. You can view and analyze app performance data collected by APM in AppGallery Connect to comprehensively understand the performance features of developed apps, helping you quickly and accurately rectify possible performance problems and continuously improve user experience.
That is, APM can help you monitor your app performance data in a variety of scenarios, including app launch, page loading, and network request. We can assume that APM can quickly locate performance-related problems for games, which attach great importance to performance as it greatly affects user experience.
Before You Start
Downloading and Installing the Cocos Dashboard
The Cocos Dashboard is the GUI-based development tool provided by Cocos. You can download it from (latest version: 2.4.2).
2. You need to install the Visual Studio as well to obtain the Cocos dependency package. The following figure shows the installation procedure.
3. After the installation is complete, click Run
Downloading and Installing Cocos Creator
1. Open the Cocos Dashboard and click Signin in the upper right corner. You can sign up first if you do not have an account.
2. After sign-in, click Editor on the left, and then click Download in the lower right corner.
3. On the Editor page, select the latest version of Cocos Creator, click the download button on the right, and agree with the terms.
4. Once the download is complete, you can create a Cocos project on the Project page. Take a HelloWorld project as an example.
5. When you open the project for the first time, the system prompts you to select a language. Just select English. Select the corresponding running environment and click Run.
Configuring the Visual Studio Code Compilation Environment
The built-in code editor of Cocos is too simple and is only suitable for code viewing and a small amount of editing. Therefore, we need a more mature and powerful compilation environment. This is where Visual Studio Code comes in.
1. Download and install Visual Studio Code of the required version based on your computer environment.
2. Open your project in Cocos Creator and choose Developer > VS Code Workflow > Install VS Code Extension from the main menu to add an adaptation plug-in to Cocos Creator.
3. If the information shown in the following figure is displayed, the installation is successful.
4. If you want the system to autocomplete the Cocos Creator engine API during coding, you need to generate the API autocompletion data and put the data in the project path through the menu. Choose Developer >
VS Code Workflow > Update VS Code API Source.
5. Double-click the HelloWorld.js script in the project directory. In the dialog box that is displayed, click Yes and select Visual Studio Code as the default editor.
6. Double-click the HelloWorld.js script again to develop your app.
Packaging and Releasing a Cocos-based App in AppGallery Connect
Cocos Creator 2.4.1 and later versions allow you to package and release your app to HUAWEI AppGallery through AppGallery Connect. In addition, Cocos Creator suports various AppGallery Connect services, such as APM, which can be quickly integrated and used. The detailed procedure is as follows:
1. Sign in to AppGallery Connect and create an app.
2. Sign in to Cocos Creator, choose Project > Build…, and select HUAWEI AppGallery Connect as the release platform.
3. Click Build. If Built huawei-agc successfully is displayed, the build is successful.
Note: When you build a project for the first time, you need to choose File > Settings… and configure the Android SDK path and NDK path on the native development environment page.
4. Click Compile and wait until the compilation is successful.
5. A jsb-default or jsb-link directory (depending on the template selected on the Build… panel) is generated in the build directory of the default release path. AppGallery Connect services are automatically integrated in the directory. Open the publish directory in the jsb-link directory to view the generated APK file.
6. Upload the packaged APK file locally or using AppGallery Connect.
Uploading the file on the Upload… panel.
a) Login Type: OAuth
Click Confirm, sign in to your HUAWEI ID (with sufficient permissions), and select the check box of the corresponding permissions. The APK file will be uploaded automatically.
b) Login Type: API Client
Sign in to AppGallery Connect to obtain related configuration. Go to Users and permissions > Connect API > Create, create an API client, select a role as required, and click OK.
Enter your client ID and key of the API client in the text boxes on the Upload… panel in Cocos Creator. Click Confirm.
After the APK file is uploaded successfully, you can view it in AppGallery Connect.
Uploading the file in AppGallery Connect
Click Upload and select the APK generated by Cocos Creator.
great
It's very useful. Recently, our Cocos project is focusing on Huawei AppGallery.

Coding-free Integration of AppGallery Connect Crash into an iOS App

We've introduced how to integrate AppGallery Connect Crash to an Android app. The integration procedure for an iOS app is similar. Let's take a look. you can also download the codelab to integrate.
Creating Your Project and App
First, you need to create a project in AppGallery Connect and add an app to it. For details, see the AppGallery Connect documentation.
Enabling HUAWEI Analytics
The Crash service uses capabilities of HUAWEI Analytics when reporting crash events. Therefore, you must enable HUAWEI Analytics before integrating the Crash SDK. For details, please refer to the AppGallery Connect documentation.
Integrating SDKs
If you are using Xcode, you can integrate the Crash SDK into your Xcode project with CocoaPods.
1. Sign in to AppGallery Connect and click My projects.
2. Find the project you created from the project list, and click the app for integration on the project card.
3. Go to Project Settings > General information, and click agconnect-services.plist under App information to download the configuration file.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
4. Add the agconnect-services.plist file to the Xcode project directory.
5. Create a Podfile.
Open the CLI and navigate to the location of the Xcode project. Then, create a Podfile. Skip this step if a Podfile already exists.
HTML:
cd project-directory
pod init
6. Edit the Podfile.
1) Integrate the Analytics SDK and the Crash SDK.
Edit the Podfile to add pod dependencies of HUAWEI Analytics and the Crash SDK.
HTML:
target 'demo' do
# Pods for demo
pod 'HiAnalytics'
pod 'AGConnectCrash'
end
end
2) Install the pod and open the*.xcworkspace file to view the project.
pod install
7. Initialize the AppGallery Connect SDK and Analytics SDK.
HTML:
Import header files to the AppDelegate.m file of the project and add code for initialization.
#import "AppDelegate.h"
#import <AGConnectCore/AGConnectCore.h>
#import <HiAnalytics/HiAnalytics.h>
[user=2052344]@impl[/user]ementation AppDelegate
- (BOOL)Application:(UIApplication *)Application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after Application launch.
[AGCInstance startup];// Initialization
[HiAnalytics config];// Initialization
return YES;
}
...
[user=994449]@End[/user]
Testing the Crash Service
Create a test button makecrash in your demo project, and tap the button to trigger a crash. You can drag and drop the button for creating it, which is simple. The result is as follows.
Call the testIt method provided by AppGallery Connect to trigger a crash.
In your Xcode simulator, install and run your app, and tap the makecrash button to trigger a crash.
Viewing a Crash Report
1. Sign in to AppGallery Connect, go to My projects, and find the app in which you triggered the crash.
2. Go to Quality > Crash. On the Crash page, click the Statistics tab to view crash statistics of your app. The crash information is displayed just 1 or 2 minutes after you run your app.
3. Click the Problems tab to view the crash of your app. For example, in the following figure, NSRangeException is the crash triggered during the test.
Click the crash to view its details.
Summary:
1、It is easy to integrate the Crash service. During testing, you can either write code yourself, or use the testIt method provided by AppGallery Connect.
2、Crash reports are available in only 1 or 2 minutes.
3、 All you need to write is just a few lines of code during testing. The service integration for app release is coding-free.
4、 The Crash service also provides features including restoring obfuscated reports and generating custom reports.
Reference documents
HUAWEI AppGallery Connect Crash documentation: https://developer.huawei.com/consum...Gallery-connect-Guides/agc-crash-introduction
Coding-free Integration of AppGallery Connect Crash into an Android App:
https://developer.huawei.com/consumer/en/forum/topic/0201387764119030047?fid=0101271690375130218
Codelab of Crash in iOS:
https://developer.huawei.com/consumer/en/codelab/CrashService-iOS/index.html#0
How much time it took to get reports on AGC console ?
sanghati said:
How much time it took to get reports on AGC console ?
Click to expand...
Click to collapse
It takes 3 to 5 minutes to generate a visualized report.
Wow, thank you for such a useful article. This information really helped me! I am not very well versed in application development, so I often make various mistakes. When I needed to urgently create an application for my project, I was looking for a service that could help me with this. It was very difficult to find a really cool service that could create exactly what I want. On the advice of my friend, I turned to www.cubycode.com and it was a real salvation for me. They did everything exactly as I wanted! Now I try to learn everything related to application development, as it will be very difficult for me without this skill. Thanks to posts like this, I was able to extract a lot of useful information and make fewer mistakes. Thanks!
It can be useful.
Ciceniss said:
Wow, thank you for such a useful article. This information really helped me! I am not very well versed in application development, so I often make various mistakes. When I needed to urgently create an application for my project, I was looking for a service that could help me with this. It was very difficult to find a really cool service that could create exactly what I want. On the advice of my friend, I turned to www.cubycode.com and it was a real salvation for me. They did everything exactly as I wanted! Now I try to learn everything related to application development, as it will be very difficult for me without this skill. Thanks to posts like this, I was able to extract a lot of useful information and make fewer mistakes. Thanks!
Click to expand...
Click to collapse
Thank you for your like. And crash service can reporting non-fatal exceptions now. you can try it to handle your mistake.
Rebis said:
It can be useful.
Click to expand...
Click to collapse
Thank you for your love. I hope you pay attention to my follow-up content.

How Can I Quickly Integrate App Linking of AppGallery Connect into My iOS App?

My app has recently needed to use cross-platform sharing links and fortunately App Linking in AppGallery Connect exactly meets my requirements.
Perform the following steps for service integration:
i. Create an app and enable App Linking for the app.
ii. Create a URL prefix.
iii. Integrate the App Linking SDK into the Xcode project.
iv. Create a link of App Linking.
v. Receive and test the link.
1. Creating an App and Enabling App Linking for the App​Create an app or use an existing app in AppGallery Connect. Click My projects and go to Grow > App Linking, and click Enable now in the displayed page.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Go to My projects > Project settings > General information, download the agconnect-services.plist file, and save the file to the directory of your Xcode project.
2. Creating a URL Prefix​On the displayed App Linking service page, click the URL prefix tab and then click Add URL prefix to create a unique URL prefix.
The system will automatically check uniqueness of your domain name.
3. Integrating the App Linking SDK into Your Xcode Project​1. Open the CLI and navigate to the location of the Xcode project.
2. Run the pod init command to create a Podfile.
3. Open the Podfile and add the pod on which the AppGallery Connect base SDK depends to the Podfile.
Code:
pod 'AGConnectCore'
pod 'AGConnectAppLinking'
4. Run the pod install command to install the pod.
5. Do as follows to initialize the AppGallery Connect SDK: Import the header file <AGConnectCore/AGConnectCore.h> to the AppDelegate.m file of the project,
and add the following code to the applicationUIApplication *)application didFinishLaunchingWithOptionsNSDictionary *)launchOptions method:
Code:
#import "AppDelegate.h"
#import <AGConnectCore/AGConnectCore.h>
@implementation AppDelegate
- (BOOL)Application:(UIApplication *)Application didFinishLaunchingWithOptions: (NSDictionary *)launchOptions {
// Override point for customization after Application launch.
[AGCInstance startup];// Initialization
return YES;
}
4. Creating a Link of App Linking​You can create a link of App Linking in AppGallery Connect or call an API in your Xcode project.
4.1 Creating a Link of App Linking in AppGallery Connect​1. On the displayed App Linking service page, click the App Linking tab and create a link as prompted.
2. Complete default deep link configurations. Refer to the following example. Pay attention to the deep link configuration for Android.
3. Set Link behavior for Android to Open in app.
After the link is successfully created, you can then copy and use it.
4.2 Creating a Link Through Coding​1. In the following iOS UI layout, add three button controls to create and copy links and four label controls to display the created links.
2. Declare necessary parameters.
3. Create a link.
Here, the iOS deep link is set to agckit://android/detail.
The Android deep link is set to agckit://android/detail.
4. Copy the long link and short link.
Refer to the following example for copying links:
5. Receiving a Link​1. To generate an asset verification file for a domain name, set the team ID under Project settings in AppGallery Connect. (The team ID is the value of Membership — Team ID on the Apple developer website.)
2. After the configuration is complete, an asset verification file is automatically generated for the default domain name. You can view the file at https://your_applinking_url_prefix/apple-app-site-association.
3. Set a custom scheme.
4. To set the code for receiving links, open the AppDelegate.m file and add the handleAppLinking method to the system startup method to process received link events.
5. Check whether the received link is a link of App Linking and whether the app can process the link.
For a custom scheme link:
Call sharedInstance of App Linking in the application: openURL: options: method to obtain a singleton object, and call openDeepLinkURL of the object to process the received link.
6. Packaging and Testing​1. Verify the link creation.
Tap CreatLink. A long link and a short link are generated.
2. Verify the function of starting an app through a link.
Click CopyShortLink and copy the link to the browser. An app can be started when you access the link.
7. Summary​Integration is simple. The SDK is small, and links can be shared across Android and iOS. No adaptation is required on different platforms, thereby reducing the workload.
Operations personnel can create links in AppGallery Connect for app promotion, and you can write code in apps to create links in a very convenient process.
For more information, please refer to:
HUAWEI AppGallery Connect App Linking documentation: https://developer.huawei.com/consum...ry-connect-Guides/agc-applinking-introduction
Nice thread
Useful and simple.
Abo Hoor said:
Nice thread
Click to expand...
Click to collapse
Thank you for your liking.
Rebis said:
Useful and simple.
Click to expand...
Click to collapse
Thanks

Categories

Resources