Skip to content

Conversation

@safaiyeh
Copy link
Member

@safaiyeh safaiyeh commented Jan 21, 2020

Summary

Fix for #9. Catch when NSURLComponents cannot resolve the URL.

Test Plan

What's required for testing (prerequisites)?

CookieManager.get("google.com", true); this should not crash.

What are the steps to reproduce (after prerequisites)?

CookieManager.get("google.com", true).catch(e => console.log(e));

Should log Invalid URL: You may be missing http:// or https:// in your URL.

Compatibility

OS Implemented
iOS
Android N/A

Checklist

  • I have tested this on a device and a simulator
  • I added the documentation in README.md
  • I mentioned this change in CHANGELOG.md
  • I updated the typed files (TS and Flow)
  • I added a sample use of the API in the example project (example/App.js)

Copy link

@jfox16 jfox16 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good my dood

@safaiyeh safaiyeh merged commit 0b047b6 into master Jan 26, 2020
@safaiyeh safaiyeh deleted the ios-invalid-url-crash branch January 26, 2020 02:48
react-native-community-bot pushed a commit that referenced this pull request Jan 26, 2020
## [1.1.1](v1.1.0...v1.1.1) (2020-01-26)

### Bug Fixes

* **iOS:** Resolve crash when using WebKit CookieManager.get with missing URL protocol ([#13](#13)) ([0b047b6](0b047b6))
@react-native-community-bot
Copy link
Collaborator

🎉 This PR is included in version 1.1.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants