fjcaetano / ReCaptcha

[In]visible ReCaptcha v2 for iOS
http://blog.flaviocaetano.com/post/recaptcha-reaches-1-dot-0/
MIT License
267 stars 133 forks source link

Running on latest iOS #91

Closed vaverkax closed 4 years ago

vaverkax commented 4 years ago

Hi there! I have a problem with running this pod and even the example project. Firstly I've tried to configure pod with my own key and domain( I've check them in project for several times). No luck. I've stacked at func validate and discovered that my webView is not configured. So then I've tried to run the example project.Did the same thing(changed key and domain to my own). But still no luck. When I'm pressing validate button spinner is running and nothing else happens. Here is log from debug:

2020-06-02 11:34:36.928730+0300 ReCaptcha_Example[24424:952135] WF: === Starting WebFilter logging for process ReCaptcha_Example 2020-06-02 11:34:36.928873+0300 ReCaptcha_Example[24424:952135] WF: _userSettingsForUser : (null) 2020-06-02 11:34:36.928967+0300 ReCaptcha_Example[24424:952135] WF: _WebFilterIsActive returning: NO 2020-06-02 11:34:51.674: did finish loading -> subscribed 2020-06-02 11:34:51.678: validate -> subscribed

Any suggestions on how to resolve this issue?

P.S. I've tried only on simulators

fjcaetano commented 4 years ago

Hi @vaverkax, I just tried running the example project on an iPhone 11 simulator running iOS 13.3 and it worked as intended.

That logging (with prefix WF:) is not standard on the library? Could there be another library interfering with WebKit?

I'd recommend you to please try running the Example project. It usually indicates wether or not there's an actual issue with the library. It usually indicates that you may have either misconfigured the library or the key and domain.

vaverkax commented 4 years ago

I’ll try as you said, but that’s log is from example project from repo. I must be mistaken somewhere... Anyway thanks for reply! Maybe I’ll find something after investigating

vaverkax commented 4 years ago

@fjcaetano I've tried again and have some results I'm thinking that im trying to check captcha on wrong domain Can it be the possible reason? Because several times I had this message: Event next(Error Recaptha encountered an error in execution)

any suggestions?

p.s. sorry for late reply

vaverkax commented 4 years ago

@fjcaetano Yep! it was wrong domain everything is working fine sorry for interrupting

p.s. messages from first comment with prefix WF: is standard webkit logging it was included in iOS 10+ and you can turn it off(with other Xcode messages) while debugging by putting OS_ACTIVITY_MODE = disable in Environment Variables section

fjcaetano commented 4 years ago

Glad to know it's working! Configuring the right environment is not a trivial task and we've had a few people having trouble with that. If you have any suggestions on how to improve the instructions or the docs, please let me know!