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" applicationId "com.mattermost.rnbeta"
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 165 versionCode 166
versionName "1.15.0" versionName "1.15.1"
multiDexEnabled = true multiDexEnabled = true
ndk { ndk {
abiFilters "armeabi-v7a", "x86" abiFilters "armeabi-v7a", "x86"

View File

@@ -79,6 +79,7 @@ class SSO extends PureComponent {
error: null, error: null,
renderWebView: false, renderWebView: false,
jsCode: '', jsCode: '',
messagingEnabled: false,
}; };
switch (props.ssoType) { switch (props.ssoType) {
@@ -156,16 +157,20 @@ class SSO extends PureComponent {
onNavigationStateChange = (navState) => { onNavigationStateChange = (navState) => {
const {url} = navState; const {url} = navState;
const nextState = {}; const nextState = {
messagingEnabled: false,
};
const parsed = urlParse(url); const parsed = urlParse(url);
if (parsed.host.includes('.onelogin.com')) { if (parsed.host.includes('.onelogin.com')) {
nextState.jsCode = oneLoginFormScalingJS; 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) => { onLoadEnd = (event) => {
@@ -210,7 +215,7 @@ class SSO extends PureComponent {
render() { render() {
const {theme} = this.props; const {theme} = this.props;
const {error, renderWebView, jsCode} = this.state; const {error, messagingEnabled, renderWebView, jsCode} = this.state;
const style = getStyleSheet(theme); const style = getStyleSheet(theme);
let content; let content;
@@ -235,14 +240,14 @@ class SSO extends PureComponent {
renderLoading={this.renderLoading} renderLoading={this.renderLoading}
injectedJavaScript={jsCode} injectedJavaScript={jsCode}
onLoadEnd={this.onLoadEnd} onLoadEnd={this.onLoadEnd}
onMessage={this.onMessage} onMessage={messagingEnabled && this.onMessage}
useWebKit={true} useWebKit={true}
/> />
); );
} }
return ( return (
<View style={{flex: 1}}> <View style={style.container}>
<StatusBar/> <StatusBar/>
{content} {content}
</View> </View>
@@ -252,6 +257,9 @@ class SSO extends PureComponent {
const getStyleSheet = makeStyleSheetFromTheme((theme) => { const getStyleSheet = makeStyleSheetFromTheme((theme) => {
return { return {
container: {
flex: 1,
},
errorContainer: { errorContainer: {
alignItems: 'center', alignItems: 'center',
flex: 1, flex: 1,

View File

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

View File

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

View File

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

View File

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