Compare commits

..

2 Commits

Author SHA1 Message Date
Elias Nahum
d2497cef94 Bump App Version to 1.15.1 and Build number to 166 (#2475)
* Bump app version number to 1.15.1

* Bump app build number to 166
2018-12-21 11:00:15 -03:00
Elias Nahum
39e7ffb5e1 Add the onMessage handler when sso completes (#2474)
* Add the onMessage handler when sso completes

* Enable handler only for mattermost server
2018-12-21 10:45:17 -03:00
6 changed files with 25 additions and 17 deletions

View File

@@ -113,8 +113,8 @@ android {
applicationId "com.mattermost.rnbeta"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 165
versionName "1.15.0"
versionCode 166
versionName "1.15.1"
multiDexEnabled = true
ndk {
abiFilters "armeabi-v7a", "x86"

View File

@@ -79,6 +79,7 @@ class SSO extends PureComponent {
error: null,
renderWebView: false,
jsCode: '',
messagingEnabled: false,
};
switch (props.ssoType) {
@@ -156,16 +157,20 @@ class SSO extends PureComponent {
onNavigationStateChange = (navState) => {
const {url} = navState;
const nextState = {};
const nextState = {
messagingEnabled: false,
};
const parsed = urlParse(url);
if (parsed.host.includes('.onelogin.com')) {
nextState.jsCode = oneLoginFormScalingJS;
} else if (parsed.pathname === this.completedUrl) {
// To avoid `window.postMessage` conflicts in any of the SSO flows
// we enable the onMessage handler only When the webView navigates to the final SSO URL.
nextState.messagingEnabled = true;
}
if (Object.keys(nextState).length) {
this.setState(nextState);
}
this.setState(nextState);
};
onLoadEnd = (event) => {
@@ -210,7 +215,7 @@ class SSO extends PureComponent {
render() {
const {theme} = this.props;
const {error, renderWebView, jsCode} = this.state;
const {error, messagingEnabled, renderWebView, jsCode} = this.state;
const style = getStyleSheet(theme);
let content;
@@ -235,14 +240,14 @@ class SSO extends PureComponent {
renderLoading={this.renderLoading}
injectedJavaScript={jsCode}
onLoadEnd={this.onLoadEnd}
onMessage={this.onMessage}
onMessage={messagingEnabled && this.onMessage}
useWebKit={true}
/>
);
}
return (
<View style={{flex: 1}}>
<View style={style.container}>
<StatusBar/>
{content}
</View>
@@ -252,6 +257,9 @@ class SSO extends PureComponent {
const getStyleSheet = makeStyleSheetFromTheme((theme) => {
return {
container: {
flex: 1,
},
errorContainer: {
alignItems: 'center',
flex: 1,

View File

@@ -2527,7 +2527,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 165;
CURRENT_PROJECT_VERSION = 166;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;
@@ -2579,7 +2579,7 @@
CODE_SIGN_ENTITLEMENTS = Mattermost/Mattermost.entitlements;
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CURRENT_PROJECT_VERSION = 165;
CURRENT_PROJECT_VERSION = 166;
DEAD_CODE_STRIPPING = NO;
DEVELOPMENT_TEAM = UQ8HT4Q2XM;
ENABLE_BITCODE = NO;

View File

@@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.15.0</string>
<string>1.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
@@ -34,7 +34,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>165</string>
<string>166</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@@ -21,9 +21,9 @@
<key>CFBundlePackageType</key>
<string>XPC!</string>
<key>CFBundleShortVersionString</key>
<string>1.15.0</string>
<string>1.15.1</string>
<key>CFBundleVersion</key>
<string>165</string>
<string>166</string>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>

View File

@@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>1.15.0</string>
<string>1.15.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>165</string>
<string>166</string>
</dict>
</plist>