简体   繁体   中英

React native iOS deep linking; how can I use `@` character in url

I implemented deep linking to our project, and it is working.

Linking.addEventListener('url', this._handleOpenURL);

Linking.getInitialURL().then(url => {
  this._handleDeepLink(url);
});

but in here url coming without @ character. I mean; I am clicking to xxxx://@yyyyy link, but it is getting like xxxx://yyyyy . But if i put @ second or other words, it is working as expected.

xxxx://@yyyyy => xxxx://yyyyy

xxxx://yyyyy/@zzzzz => xxxx://yyyyy/@zzzzz

xxxx://@yyyyy/@zzzzz => xxxx://yyyyy/@zzzzz

Also Android side has not this issue

Try concatenating the strings using + by checking a condition by using string check methods to check whether the @ exists or not. IF not then concatenate

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM