Giter VIP home page Giter VIP logo

nim_reactnative_demo's People

Contributors

claiyre avatar dependabot[bot] avatar everlose avatar king3366ster avatar twilbeter avatar yunxinusecase avatar

Stargazers

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

Watchers

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

nim_reactnative_demo's Issues

onMsg问题

onmsg(msg) { if (nimStore.currentSessionId === msg.sessionId) { // nimStore.currentSessionMsgs.push(msg); nimStore.currentSessionMsgs = nimStore.currentSessionMsgs.concat([msg]); // set(nimStore, 'currentSessionMsgs', nimStore.currentSessionMsgs.concat([msg])); constObj.nim.sendMsgReceipt({ msg, done: function sendMsgReceiptDone(error) { // do something console.log(error); }, }); }

    按你代码这样写的话  sdk只有在进入聊天房间才会存在nimStore.currentSessionId, 而当退出app重新进入app的时候,在聊天列表时 ,是没有nimStore.currentSessionId 这样的话 监听到 新消息时, 再进入聊天房间 是没有缓存新消息的 

ios端报错

PushKit apps that use VoIP push must link either CallKit or IncomingCallNotifications frameworks.

安卓无法启动

Error: Type com.xiaomi.push.service.af is referenced as an interface from com.xiaomi.push.service.bd.

image

android 服务无法启动

events.js:167
throw er; // Unhandled 'error' event
^

Error: EPERM: operation not permitted, lstat 'D:\xxxRN_IM\NIM_ReactNative_Demo\android\app\build\generated\source\buildConfig\debug\com'
Emitted 'error' event at:
at NodeWatcher. (D:\xxxRN_IM\NIM_ReactNative_Demo\node_modules\metro\node_modules\sane\src\node_watcher.js:291:16)
at D:\xxxRN_IM\NIM_ReactNative_Demo\node_modules\graceful-fs\polyfills.js:282:31
at FSReqWrap.oncomplete (fs.js:152:21)

安卓端同步报错Could not find method register()

build.gradle文件第23行
tasks.register('forwardDebugPort', Exec) {
def adb = android.getAdbExe()?.toString() ?: 'false'
commandLine adb, 'forward', 'tcp:8083', 'tcp:8083'
ignoreExitValue true
doLast {
if (execResult.getExitValue() != 0) {
logger.error(
.......
报错如下:
Gradle sync failed: Could not find method register() for arguments [forwardDebugPort, class org.gradle.api.tasks.Exec, build_2torxjpq4wwfxdsd5a8b3z376$_run_closure2@7bb92c3b] on task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.

Cannot read property 'showNotification' of undefined

react-native:0.54.2
netease sdk:5.8.0
按照https://dev.yunxin.163.com/docs/product/IM%E5%8D%B3%E6%97%B6%E9%80%9A%E8%AE%AF/SDK%E5%BC%80%E5%8F%91%E9%9B%86%E6%88%90/Web%E5%BC%80%E5%8F%91%E9%9B%86%E6%88%90/ReactNative?pos=toc-4 配置完成之后,运行在华为荣耀八手机上,报 Cannot read property 'showNotification' of undefined 错误。
不知道接下来该怎么办了。
关于rn的skd说明可以的话,将文档写的稍微详细点。

yarn时一直卡在 Building fresh packages... 这一步

yarn后一直卡住,尝试配置淘宝镜像、新建.yarnrc文件,修改全局.yarnrc文件,使用npm、cnpm等全都不行

yarn卡住信息如下:
warning " > [email protected]" has unmet peer dependency "react-native-windows@^0.57.2".
warning "react-navigation > [email protected]" has unmet peer dependency "prop-types@^15.0.0".
[4/4] Building fresh packages...
[1/2] ⠈ react-native-elements [2/2] ⠈ realm

卡很长很长时间后报错信息如下:
[4/4] Building fresh packages...
[1/2] ⡀ react-native-elements error D:\IMRN\NIM_ReactNative_Demo\node_modules\realm: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments:
Directory: D:\IMRN\NIM_ReactNative_Demo\node_modules\realm
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using [email protected]
node-pre-gyp info using [email protected] | win32 | x64
node-pre-gyp WARN Using request for node-pre-gyp https download
node-pre-gyp info check checked for "D:\IMRN\NIM_ReactNative_Demo\node_modules\realm\compiled\node-v72_win32_x64\realm.node" (not found)
node-pre-gyp http GET https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-win32-x64.tar.gz
node-pre-gyp http 404 https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-win32-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://static.realm.io/node-pre-gyp/2.29.2/realm-v2.29.2-node-v72-win32-x64.tar.gz
.
.
.省略
.
.
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:311:20)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Windows_NT 10.0.18363
node-pre-gyp ERR! command "C:\Program Files\nodejs\node.exe" "D:\IMRN\NIM_ReactNative_Demo\node_modules\node-pre-gyp\bin\node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd D:\IMRN\NIM_ReactNative_Demo\node_modules\realm
node-pre-gyp ERR! node -v v12.16.1
node-pre-gyp ERR! node-pre-gyp -v v0.11.0
node-pre-gyp ERR! not ok
Failed to execute 'node-gyp.cmd build --fallback-to-build --module=D:\IMRN\NIM_ReactNative_Demo\node_modules\realm\compiled\node-v72_win32_x64\realm.node --module_name=realm --module_path=D:\IMRN\NIM_ReactNative_Demo\node_modules\realm\compiled\node-v72_win32_x64 --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)

ios项目无法启动

The following commands produced analyzer issues:
Analyze Base/RCTModuleMethod.mm
Analyze Modules/RCTUIManager.m
(2 commands with analyzer issues)

The following build commands failed:
Ld build/Build/Products/Debug-iphonesimulator/NIM_ReactNative_Demo.app/NIM_ReactNative_Demo normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/NIM_ReactNative_Demo.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

npm install报错

在工程目录下执行npm install下载依赖包,会有错误。

deleteLocalMsg fail

realm "version": "2.15.3"
NIM_Web_SDK_rn_v5.6.0.js

async onconnect() {
        console.log('connect!');
        console.group('test')
        let nim = constObj.nim;
        let getSessions = () => new Promise((resolve, reject) => {
          nim.getLocalSessions({
            done: (error, { sessions }) => {
              if (error) {
                reject(error);
              } else {
                resolve(sessions);
              }
            }
          });
        });
        let sessions = await getSessions();
        console.log('sessions', sessions[0]);
        let lastMsg = sessions[0].lastMsg;
        console.log('lastMsg', lastMsg);

        await new Promise((resolve, reject) => {
          nim.deleteLocalMsg({
            msg: lastMsg,
            done: (error) => {
              if (error) {
                reject(error);
              } else {
                console.log('deleteLocalMsg resolve');
                resolve();
              }
            }
          });
        });

        sessions = await getSessions();
        console.log('sessions', sessions[0]);
        lastMsg = sessions[0].lastMsg;
        console.log('lastMsg', lastMsg);

        console.groupEnd('test')
      }

image

账号密码是啥

我看代码还有账号别处登录会被踢下线。
是不是应该有个注册。不然安装就没意义了。账号不能共享。
只能看着登录页面干流泪

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.