Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App can't start when add this library (ios < 12). #23

Closed
hoangsang0109 opened this issue Jan 25, 2021 · 10 comments
Closed

App can't start when add this library (ios < 12). #23

hoangsang0109 opened this issue Jan 25, 2021 · 10 comments
Labels
bug Something isn't working

Comments

@hoangsang0109
Copy link

hoangsang0109 commented Jan 25, 2021

Hi Dabakovich, I am very thankful for this library, but currently I am facing a problem. I can't start project on ios < 12, i have tried research, it seems to be related to regex:
/(?<original>(?<trigger>.)\[(?<name>[^[]*)]\((?<id>[^[]*)\))/gi

Can you help me to solve this problem? Thanks.

This is screenshot (iPhone 6s Plus - 10.3.1):
Simulator Screen Shot - iPhone 6s Plus - 2021-01-25 at 13 54 51

@dabakovich dabakovich added the bug Something isn't working label Jan 27, 2021
@dabakovich
Copy link
Owner

Hi @hoangsang0109! What RN version are you using?

@Sendhuraan
Copy link

I'm also facing a similar issue. App crashes on start when using the library. Any suggestions ?

@dabakovich
Copy link
Owner

dabakovich commented Feb 12, 2021

Thanks for your feedback @Sendhuraan!
What platform and RN version are you using? What error are you getting?

@Sendhuraan
Copy link

Sendhuraan commented Feb 13, 2021

Thanks for your feedback @Sendhuraan!
What platform and RN version are you using? What error are you getting?

I'm using IOS 11 and RN version is 0.63.2 and I'm getting the same issue mentioned by @hoangsang0109

@hoangsang0109
Copy link
Author

Hi @hoangsang0109! What RN version are you using?

I'm using RN versions both 0.61.5 and 0.63.3. According to my research: Named capture groups of regex are not supported on version iOS < 11.0.0 (But when I used iOS 11.1 it also crashed).

@dabakovich
Copy link
Owner

@hoangsang0109 thanks for your research!
I came to a similar conclusion.
Will try to do something with this soon.

@kirillrevasiliev
Copy link

@Sendhuraan @hoangsang0109
you need to add @babel/plugin-transform-named-capturing-groups-regex to babel plugins

dabakovich added a commit that referenced this issue Feb 28, 2021
Some devices (iOS < v12, Hermes) doesn't support named capture groups that we are using for mention part types. So we should replace this by not named capture groups. Need to test it.

#23, #37
@dabakovich
Copy link
Owner

Hi all!
I replaced named capture groups with simple capture groups. Can you check if it fixed your issue?
The fix is published as npm alpha v2.2.4-0 release.

@hoangsang0109
Copy link
Author

hoangsang0109 commented Mar 10, 2021

Hi all!
I replaced named capture groups with simple capture groups. Can you check if it fixed your issue?
The fix is published as npm alpha v2.2.4-0 release.

Hi @dabakovich, I try v2.2.4-1 and �it work very well, thank you so much.

@dabakovich
Copy link
Owner

Just published the v2.2.4 release with the fix.

I'm going to close the issue.
Feel free to re-open the issue if you will get some issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants