Open miyazaki2048 opened 7 years ago
https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L590-L596 这里应该调用的是[target methodSignatureForSelector:action] ,而不是[self methodSignatureForSelector:action],这里的self是BHRouter
[target methodSignatureForSelector:action]
[self methodSignatureForSelector:action]
https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L275-L285 service的selector是限定只能调用实例方法吗?貌似是的,URL中定义并未区分同签名的实例方法和类方法;这里存在矛盾的地方,canOpenURL里判断selector时 确又是只判断了类方法
canOpenURL
https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L245-L255
如果打开一个https://call.service.beehive/BBSGroupServiceImpl.BBSGroupService.groupViewController#push链接,此处pathComponents值是[@"/",@"BBSGroupServiceImpl.BBSGroupService.groupViewController"}}],会始终被认为flag为NO,应该排除@"/",应和openURL逻辑一致
https://call.service.beehive/BBSGroupServiceImpl.BBSGroupService.groupViewController#push
[@"/",@"BBSGroupServiceImpl.BBSGroupService.groupViewController"}}]
https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L353-L356
@ZoMinster
看起来前两个问题是在f8a9e51这个commit中修改了
https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L590-L596 这里应该调用的是
[target methodSignatureForSelector:action]
,而不是[self methodSignatureForSelector:action]
,这里的self是BHRouterhttps://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L275-L285 service的selector是限定只能调用实例方法吗?貌似是的,URL中定义并未区分同签名的实例方法和类方法;这里存在矛盾的地方,
canOpenURL
里判断selector时 确又是只判断了类方法https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L245-L255
如果打开一个
https://call.service.beehive/BBSGroupServiceImpl.BBSGroupService.groupViewController#push
链接,此处pathComponents值是[@"/",@"BBSGroupServiceImpl.BBSGroupService.groupViewController"}}]
,会始终被认为flag为NO,应该排除@"/",应和openURL逻辑一致https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L353-L356