收藏
回答

iOS 跳转小程序 WXLaunchMiniProgramReq 崩溃?

ios 跳转小程序时,

 WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object];

    launchMiniProgramReq.userName = @"xx"//拉起的小程序的username

    launchMiniProgramReq.path = @"page/index/index?scene=xx";//拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。

    launchMiniProgramReq.miniProgramType= WXMiniProgramTypeRelease; //拉起小程序的类型

   [WXApi sendReq:launchMiniProgramReq];


直接崩溃,报错:

[Bugly]  Trapped uncaught exception 'NSInvalidArgumentException', reason: '-[WXLaunchMiniProgramReq setMiniProgramType:]: unrecognized selector sent to instance 0x281779a40' 


这是什么鬼?

回答关注问题邀请回答
收藏

3 个回答

  • 小郝同学
    小郝同学
    2023-04-25

    appid 

    wx76b926c32d37088e


    微信小程序

    wx743392eda58fda2f


    可以成功跳转小程序,但是出现页面不存在,只能点击左上角的首页才能恢复正常


    找不到原因,能帮忙看下嘛~


    2023-04-25
    有用
    回复
  • 叭叭速配
    叭叭速配
    2020-03-03

    sdk显示1.8.6,打印出来显示1.8.0,最后怎么替换的


    2020-03-03
    有用
    回复
  • 疯狂的小辣椒
    疯狂的小辣椒
    2019-09-11

    移动应用和小程序的appid、完整的请求、请求时间提供下

    2019-09-11
    有用
    回复 17
    • Abinge
      Abinge
      2019-09-12
      WXLaunchMiniProgramReq *launchMiniProgramReq = [WXLaunchMiniProgramReq object]; launchMiniProgramReq.userName = @"gh_c0ccc4797cb2"; //拉起的小程序的username launchMiniProgramReq.path = @"page/index/index?scene=10000000000000134510";//拉起小程序页面的可带参路径,不填默认拉起小程序首页,对于小游戏,可以只传入 query 部分,来实现传参效果,如:传入 "?foo=bar"。 launchMiniProgramReq.miniProgramType= WXMiniProgramTypeRelease; //拉起小程序的类型 [WXApi sendReq:launchMiniProgramReq];
      2019-09-12
      回复
    • Abinge
      Abinge
      2019-09-12
      不设置miniProgramType属性,是可以跳转的,一设置miniProgramType属性就崩,不管是WXMiniProgramTypeRelease,WXMiniProgramTypeTest还是WXMiniProgramTypePreview
      2019-09-12
      回复
    • Abinge
      Abinge
      2019-09-12
      2019-09-12 09:56:52.912355+0800 NewHoldGold[1486:980045] [Bugly] Trapped uncaught exception 'NSInvalidArgumentException', reason: '-[WXLaunchMiniProgramReq setMiniProgramType:]: unrecognized selector sent to instance 0x281e1d9e0' ( 0 CoreFoundation 0x0000000187047eb8 + 252 1 libobjc.A.dylib 0x0000000186219a40 objc_exception_throw + 56 2 CoreFoundation 0x0000000186f60d04 + 0 3 CoreFoundation 0x000000018704d7b8 + 1412 4 CoreFoundation 0x000000018704f45c _CF_forwarding_prep_0 + 92 5 NewHoldGold 0x0000000104809384 -[PersonalMainController pushKefu] + 156 6 UIKitCore 0x00000001b4216768 + 96 7 UIKitCore 0x00000001b3ca46d0 + 80 8 UIKitCore 0x00000001b3ca49f0 + 440 9 UIKitCore 0x00000001b3ca39f0 + 568 10 UIKitCore 0x00000001b425018c + 2472 11 UIKitCore 0x00000001b42513f0 + 3156 12 UIKitCore 0x00000001b42306ec + 340 13 UIKitCore 0x00000001b42fc57c + 1620 14 UIKitCore 0x00000001b42fef74 + 4740 15 UIKitCore 0x00000001b42f7a64 + 152 16 CoreFoundation 0x0000000186fd81cc + 24 17 CoreFoundation 0x0000000186fd814c + 88 18 CoreFoundation 0x0000000186fd7a30 + 176 19 CoreFoundation 0x0000000186fd28fc + 1040 20 CoreFoundation 0x0000000186fd21cc CFRunLoopRunSpecific + 436 21 GraphicsServices 0x0000000189249584 GSEventRunModal + 100 22 UIKitCore 0x00000001b4215054 UIApplicationMain + 212 23 NewHoldGold 0x0000000104e8cdc8 main + 124 24 libdyld.dylib 0x0000000186a92bb4 + 4 ) =================================================================
      2019-09-12
      回复
    • Abinge
      Abinge
      2019-09-12
      移动应用appid:wx47dfa927afee418d 小程序appid:10000000000000134510
      2019-09-12
      回复
    • 疯狂的小辣椒
      疯狂的小辣椒
      2019-09-12回复Abinge
      好,我们看下
      2019-09-12
      1
      回复
    查看更多(12)
登录 后发表内容
问题标签