收藏
回答

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' 


这是什么鬼?

最后一次编辑于  09-11
回答关注问题邀请回答
收藏

1 个回答

  • 社区技术运营专员-娇华
    社区技术运营专员-娇华
    09-11

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

    09-11
    赞同
    回复 15
    • 沉默的石头
      沉默的石头
      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];
      09-12
      回复
    • 沉默的石头
      沉默的石头
      09-12
      不设置miniProgramType属性,是可以跳转的,一设置miniProgramType属性就崩,不管是WXMiniProgramTypeRelease,WXMiniProgramTypeTest还是WXMiniProgramTypePreview
      09-12
      回复
    • 沉默的石头
      沉默的石头
      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 ) =================================================================
      09-12
      回复
    • 沉默的石头
      沉默的石头
      09-12
      移动应用appid:wx47dfa927afee418d 小程序appid:10000000000000134510
      09-12
      回复
    • 社区技术运营专员-娇华
      社区技术运营专员-娇华
      09-12回复沉默的石头
      好,我们看下
      09-12
      1
      回复
    查看更多(10)
问题标签