Coder Social home page Coder Social logo

react-native-intercom-webview's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-intercom-webview's Issues

Error: Setting onMessage on a WebView...

[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:

intercom
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):

intercomblank

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!

Typing issues and attachment issues

In iOS, while sending messages we have identified typing issues.
In Android, we can't send attachments. In iOS, while sending attachments app stuck

Does not work on android

Everything works fine on iOS, but on android, nothing shows up because the script in the html file won't run.

Empty screen

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;

Update npm version for new changes.

@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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.