diff --git a/ios/sdk/src/JitsiMeetView.m b/ios/sdk/src/JitsiMeetView.m index 2b3afebe9..0e0985da8 100644 --- a/ios/sdk/src/JitsiMeetView.m +++ b/ios/sdk/src/JitsiMeetView.m @@ -15,6 +15,7 @@ */ #import +#include #import #import @@ -239,6 +240,17 @@ static NSMapTable *views; props[@"url"] = urlObject; } + // XXX The method loadURLObject: is supposed to be imperative i.e. a second + // invocation with one and the same URL is expected to join the respective + // conference again if the first invocation was followed by leaving the + // conference. However, React and, respectively, + // appProperties/initialProperties are declarative expressions i.e. one and + // the same URL will not trigger componentWillReceiveProps in the JavaScript + // source code. The workaround implemented bellow introduces imperativeness + // in React Component props by defining a unique value per loadURLObject: + // invocation. + props[@"timestamp"] = @(mach_absolute_time()); + if (rootView) { // Update props with the new URL. rootView.appProperties = props; diff --git a/react/features/app/components/AbstractApp.js b/react/features/app/components/AbstractApp.js index 41a56c09e..222392a03 100644 --- a/react/features/app/components/AbstractApp.js +++ b/react/features/app/components/AbstractApp.js @@ -47,6 +47,10 @@ export class AbstractApp extends Component { */ store: PropTypes.object, + // XXX Refer to the implementation of loadURLObject: in + // ios/sdk/src/JitsiMeetView.m for further information. + timestamp: PropTypes.any, + /** * The URL, if any, with which the app was launched. */ @@ -143,7 +147,11 @@ export class AbstractApp extends Component { let { url } = nextProps; url = toURLString(url); - if (toURLString(this.props.url) !== url) { + if (toURLString(this.props.url) !== url + + // XXX Refer to the implementation of loadURLObject: in + // ios/sdk/src/JitsiMeetView.m for further information. + || this.props.timestamp !== nextProps.timestamp) { this._openURL(url || this._getDefaultURL()); } }