donovantc / react-native-intercom-webview Goto Github PK
View Code? Open in Web Editor NEWA React Native Component that renders Intercom in a React Native WebView
License: MIT License
A React Native Component that renders Intercom in a React Native WebView
License: MIT License
removing...
[edit:]
Using an anroid emulator, I see this in the console:
::ffff:192.168.1.87 - - [10/Feb/2018:02:20:34 +0000] "GET /favicon.ico HTTP/1.1" 404 24 "http://192.168.1.87:19001/assets/node_modules/react-native-intercom-webview/IntercomWebView.html?platform=android&hash=[our hash]" "Mozilla/5.0 (Linux; Android 8.0.0; PREVIEW - Google Pixel - 8.0 - API 26 - 1080x1920 Build/OPR6.170623.017; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/58.0.3029.125 Mobile Safari/537.36"
Hope this helps!
[/edit]
Hello, we are having trouble using this plugin! I am using Expo. Using the plugin as outlined (except with our own appId) gives us this error:
I'm not sure what the problem is, but perhaps it's related to #5 ?
I can get rid of the error applying the solution here: facebook/react-native#10865 by kyle-ilantzis, but I'm just left with a blank view (below):
Below is my code
export default class Index extends Component {
render() {
return (
<Grid style={{backgroundColor: 'white'}}>
<Row size={1}>
<TopBar title={this.props.title} />
</Row>
<Row size={9} style={{backgroundColor: 'white'}}>
<IntercomWebView
appId={"ourAppId"}
name={"ourUsersName"}
email={"ourUsersEmail"}
defaultHeight={500}
hideLauncher={false}
showLoadingOverlay={true}
injectedJavaScript={patchPostMessageJsCode}
/>
</Row>
<Row>
<Text>
something
</Text>
</Row>
</Grid>
);
}
}
const patchPostMessageFunction = function() {
var originalPostMessage = window.postMessage;
var patchedPostMessage = function(message, targetOrigin, transfer) {
originalPostMessage(message, targetOrigin, transfer);
};
patchedPostMessage.toString = function() {
return String(Object.hasOwnProperty).replace('hasOwnProperty', 'postMessage');
};
window.postMessage = patchedPostMessage;
};
const patchPostMessageJsCode = '(' + String(patchPostMessageFunction) + ')();';
Thanks in advance!
Invariant Violation: WebView has been removed from React Native. It can now be installed and imported from 'react-native-webview' instead of 'react-native'. See 'https://github.com/react-native-community/react-native-webview'.
In iOS, while sending messages we have identified typing issues.
In Android, we can't send attachments. In iOS, while sending attachments app stuck
Everything works fine on iOS, but on android, nothing shows up because the script in the html file won't run.
I'm using the correct appId, name and email, why it's showing me an empty screen ?
import React from 'react';
import { SafeAreaView, View, Text } from 'react-native';
import IntercomWebView from 'react-native-intercom-webview';
const IntercommScreen = props => (
<SafeAreaView style={{ flex: 1 }}>
<View>
<Text>Teste</Text>
</View>
<View>
<Text>do</Text>
</View>
<View>
<Text>Intercomm</Text>
</View>
<IntercomWebView
appId="xxxxxxx"
name="xxxxxxx"
email="xxxxxxxx"
defaultHeight={500}
hideLauncher={false}
/>
</SafeAreaView>
);
export default IntercommScreen;
@donovantc Hi, i Like this component so much, but please update the lastest version of npm for this component because i steel having problems with the react-native-loading-overlay and intercomWebView proptypes.
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.