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

ignore on web and desktop #115

Merged
merged 1 commit into from
Apr 1, 2020
Merged

ignore on web and desktop #115

merged 1 commit into from
Apr 1, 2020

Conversation

sayem314
Copy link
Contributor

This PR properly handles platform-specific code, on web and desktop instead of throwing error it would simply ignore for cross-platform compatibility.

@wonday wonday merged commit 019818f into wonday:master Apr 1, 2020
@wonday
Copy link
Owner

wonday commented Apr 1, 2020

Thank you.

@euharrison
Copy link
Contributor

A suggestion is to use .native.js instead of .ios.js and .android.js
https://reactnative.dev/docs/platform-specific-code#native-specific-extensions-ie-sharing-code-with-nodejs-and-web

@sayem314
Copy link
Contributor Author

@euharrison then wouldn't it break on windows? And this package has some difference between ios and android.

@r0b0t3d
Copy link
Contributor

r0b0t3d commented Jul 4, 2020

Hi, I got problem with android and ios. It always run code in index.js instead of index.android.js and index.ios.js.
@euharrison suggest also not working then. I have to rename index -> orientation to make it works.

@wonday This PR breaks android and ios platform. I will open another PR.

@sayem314
Copy link
Contributor Author

sayem314 commented Jul 4, 2020

@r0b0t3d there is some broken setup where this happens. If this PR breaks for everyone how does my app on AppStore and play-store works just fine?

@r0b0t3d
Copy link
Contributor

r0b0t3d commented Jul 4, 2020

@sayem314 Did you point to master branch in your package.json?

@r0b0t3d
Copy link
Contributor

r0b0t3d commented Jul 4, 2020

@sayem314 waiting to hear from you. If everything works well on your side, I will create another PR to see whether there is other folks got same problem like me.

@sayem314
Copy link
Contributor Author

sayem314 commented Jul 4, 2020

@r0b0t3d there is only one branch.
yarn add wonday/react-native-orientation-locker

@r0b0t3d
Copy link
Contributor

r0b0t3d commented Jul 5, 2020

Your PR got merged but not release yet. If you'd like to check out your PR, please run this

yarn add https://github.com/wonday/react-native-orientation-locker.git#master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants