Ohos AppLink防坑指南
- ohos applink配置时module.json pathRegex一定不能以
/
开头,否则会报类似错误
05-14 14:49:41.201 1539 2653 E C01656/foundation/UDMF: UtdClient::GetUniformDataTypesByFilenameExtension invalid fileExtension. fileExtension:.xx/xx/xxx******, belongsTo:#default
05-14 14:49:41.201 1539 2653 E C01120/foundation/BMS: [skill.cpp(MatchUri:425)]regex error
05-14 14:49:41.201 1539 2653 E C01120/foundation/BMS: [skill.cpp(MatchUri:425)]regex error
05-14 14:49:41.201 1539 2653 E C01120/foundation/BMS: [skill.cpp(MatchUri:425)]regex error
05-14 14:49:41.201 1539 2653 E C01120/foundation/BMS: [skill.cpp(MatchUri:425)]regex error
- 验证app domain
hdc shell hidumper -s AppDomainVerifyManager - 验证本地跳跳转
hdc shell “aa start -A ohos.want.action.viewData -U ‘https://example.com/xx/xxx’” - 检查服务端是否配置正确配置appId,
https://example/.well-known/applinking.json
{
"applinking": {
"apps": [
{
"appIdentifier": "1111110101854990831"
}
]
}
}
- 检查ohos portal端允许通过的url正则配置是否满足module.json中配置的路径跳转
^https://example\.com/xx/xxx.*