react-native-wechat-lib icon indicating copy to clipboard operation
react-native-wechat-lib copied to clipboard

第一次调用 registerAPP 返回 undefined

Open surethink opened this issue 1 year ago • 0 comments

最新版本的 wechat lib 3.0.4, rn 0.71.4,仍然存在第一次调用 registerAPP 返回 undefined的问题。麻烦@little-snow-fox关注下。

我现在的办法是判断undefined以后再register一下,就返回true了,之前一直以为是universal link的格式问题,但检查了N遍没问题,用https://baidu.com/也存在一样的问题

          我的问题解决了,主要就是检查一下 universal link 是不是 `https://` 开头 `/` 结尾,比如 `https://check.com/` 这样,然后再检查一下 [这里](https://github.com/little-snow-fox/react-native-wechat-lib/blob/master/docs/build-setup-ios.md) 的步骤有没有漏。之后授权就能拿到返回值了,有点比较奇怪的是第一次调用 registerAPP 返回 undefined,第二次及之后才返回 true,不清楚是什么原因🤔

Originally posted by @Talaxy009 in https://github.com/little-snow-fox/react-native-wechat-lib/issues/179#issuecomment-911189954

surethink avatar Mar 17 '23 02:03 surethink