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

Opening files in iPad is not working. #15

Open
DaniAkash opened this issue Mar 27, 2017 · 1 comment · Fixed by DaniAkash/react-native-file-opener#1 · May be fixed by #16
Open

Opening files in iPad is not working. #15

DaniAkash opened this issue Mar 27, 2017 · 1 comment · Fixed by DaniAkash/react-native-file-opener#1 · May be fixed by #16

Comments

@DaniAkash
Copy link

The app is showing no dialog boxes for opening files on iPad. But i'm getting success response in the react-native side.

The code in ios/RNFileOpener/RNFileOpener.m as per the commit kristikristo@89ba83e by @kristikristo throws the following errors in xcode

Expected a type (in line 14 fromRect:(CGRectMake)rect)

Sending '_strong id' to parameter of incompatible type 'CGRect' (aka 'struct CGRect') (in line 37 wasOpened = [self.FileOpener presentOptionsMenuFromRect:rect inView:ctrl.view animated:YES];)

DaniAkash added a commit to DaniAkash/react-native-file-opener that referenced this issue Mar 27, 2017
This contains the fix for commit - kristikristo@89ba83e

CGRectMake in line 14 is not a proper return type. It is a function. hence it is removed and the menu containing the list of applications to open the file with is created manually in line 37.

fixes huangzuizui#15
@DaniAkash DaniAkash linked a pull request Mar 27, 2017 that will close this issue
@DaniAkash DaniAkash changed the title Fix for iPad not working. Opening files in iPad is not working. Mar 27, 2017
@DaniAkash
Copy link
Author

I have fixed this problem in my pull request #16, and if anyone needs to implement this fix in the npm package version 0.2.0 just replace the code in RNFileOpener.m with the code in my RNFileOpener.m file using Xcode.

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