Coder Social home page Coder Social logo

Comments (7)

Jeepeng avatar Jeepeng commented on August 29, 2024

能否提供以下信息:
react-native版本:
react-native-xinge-push版本:
报错信息:

from react-native-xinge-push.

stevenxyj avatar stevenxyj commented on August 29, 2024
"react": "16.0.0-alpha.12",
"react-native": "0.47.1",
"react-native-xinge-push": "^0.2.2"

xinge-push 我已经按照 Remove overriden createJSModules 和 Fixed issue when account = null 做过修改。

不上网时调用 XGPush.register('jeepeng') 不会退出。
联网时调用就会退出,没有错误信息。

from react-native-xinge-push.

Jeepeng avatar Jeepeng commented on August 29, 2024

react-native 0.47及更高版本应该使用v0.3.0版本
另外确保AndroidManifest.xml里的相应配置换成自己的包名、AccessId和AccessKey
运行以下命令看一下日志(真机需连接数据线):
ios: react-native log-ios
android: react-native log-android

from react-native-xinge-push.

stevenxyj avatar stevenxyj commented on August 29, 2024

AccessId和AccessKey 都是对的,也是真机测试
已经升级到 v0.30

AndroidManifest.xml 增加下面的一段就退出了,移队就可以启动。

  <!-- 【可选】APP实现的Receiver,用于接收消息透传和操作结果的回调,请根据需要添加 -->
  <!-- YOUR_PACKAGE_PATH.CustomPushReceiver需要改为自己的Receiver: -->
  <receiver android:name="com.qq.xgdemo.receiver.MessageReceiver"
      android:exported="true" >
      <intent-filter>
          <!-- 接收消息透传 -->
          <action android:name="com.tencent.android.tpush.action.PUSH_MESSAGE" />
          <!-- 监听注册、反注册、设置/删除标签、通知被点击等处理结果 -->
          <action android:name="com.tencent.android.tpush.action.FEEDBACK" />
      </intent-filter>
  </receiver>

只需要 中间的 com.qq.xgdemo 改我的 app 包名?还是需要怎么改

from react-native-xinge-push.

Jeepeng avatar Jeepeng commented on August 29, 2024

改成com.jeepeng.react.xgpush

<receiver android:name="com.jeepeng.react.xgpush.receiver.MessageReceiver"
            android:exported="true" >
            <intent-filter>
                <!-- 接收消息透传 -->
                <action android:name="com.tencent.android.tpush.action.PUSH_MESSAGE" />
                <!-- 监听注册、反注册、设置/删除标签、通知被点击等处理结果 -->
                <action android:name="com.tencent.android.tpush.action.FEEDBACK" />
            </intent-filter>
        </receiver>

from react-native-xinge-push.

stevenxyj avatar stevenxyj commented on August 29, 2024

可以了,
建议完善文档,尤其 ios 上的。
增加库, Build Phases->Link Binary With Libraries.
libz.tbd
CoreTelephony.framework

增加路径 Build Settings->Search Paths->Headers Search Paths.
$(SRCROOT)/../node_modules/react-native-xinge-push/ios

from react-native-xinge-push.

Jeepeng avatar Jeepeng commented on August 29, 2024

好的,谢谢了,有空我去完善一下文档

from react-native-xinge-push.

Related Issues (20)

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.