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

modal show on iOS only one time #57

Open
qinqing3761 opened this issue Sep 5, 2017 · 7 comments
Open

modal show on iOS only one time #57

qinqing3761 opened this issue Sep 5, 2017 · 7 comments

Comments

@qinqing3761
Copy link

Hello, I set up according to your steps, and then there was a very strange phenomenon,the modal box on ios can only show one time, the first time is normal, but after I call "ShareExtension.close()" function,evoke ShareExtension once again,only MyShareEx.m’s view appears the modal box no longer appears,
I have set “rootView.backgroundColor = [UIColor redColor];”,this is screenshots,
59691022-c8f9-4bad-b9e1-29e8040b0491
the first time, and the second time
15acc44b-7498-42b3-8081-1c045f78603d
Very strange, do you know why?
my english is poor, I do not know if you have understand what I mean。

@qinqing3761
Copy link
Author

qinqing3761 commented Sep 6, 2017

@alinz please help me!

@alinz
Copy link
Owner

alinz commented Oct 27, 2017

@qinqing3761 can you push your code into a repo and I will look into it. It could be a lot of things.

@FMaulwurf
Copy link

@qinqing3761 I am just guessing but it seems like the Modal is not showing properly.

I had a similar issue.

_onClosePress = () => {
    this.setState({
        showModal: false
    }, () => {
        ShareExtension.close()
    })
}

The Modal gets this showModal bool as visible parameter and it is true as default. Closing the Modal via a TouchableHighlight calls this _onClosePress function.

Maybe this helps.

@admbtlr
Copy link

admbtlr commented Apr 16, 2018

I'm having this problem too. First time, everything works fine. But then if I try to launch the share extension again, all that happens is that the overlay is shown. It seems that neither the constructor nor render() nor componentDidUpdate() function is called.

I've tried intentionally crashing the extension as mentioned in #64, but that doesn't help.

I'm just using the code in examples/Sample1/share.ios.js. Any suggestions?

@FMaulwurf I don't see any difference between your use of _onClosePress and the closing function in examples/Sample1/share.ios.js, but maybe I'm missing something? In both cases the modal is hidden and ShareExtension.close() gets called.

I'm seeing a lot of the following error in the XCode console:

nw_connection_get_connected_socket 159 Connection has no connected handler

Maybe that has something to do with it?

Or is it possible that the share extension is silently crashing due to memory usage? I'm currently not using separate bundles, so that could well be happening, but I'm not seeing any errors in XCode.

@i25878427
Copy link

@qinqing3761 @adamvert - I am having the same issue, did you find a solution?

@admbtlr
Copy link

admbtlr commented Oct 18, 2018

The solution for me was to make the share extension crash intentionally, as suggested here: #64 (comment)

@i25878427
Copy link

Thanks - I did the same and used this lib in order to do it: react-native-exit-app.

componentWillUnmount(){
RNExitApp.exitApp();
}

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

No branches or pull requests

5 participants