alibaba / BeeHive

:honeybee: BeeHive is a solution for iOS Application module programs, it absorbed the Spring Framework API service concept to avoid coupling between modules.
https://github.com/alibaba/BeeHive/blob/master/README.md
GNU General Public License v2.0
4.29k stars 780 forks source link

可能的逻辑错误 #98

Open miyazaki2048 opened 6 years ago

miyazaki2048 commented 6 years ago

https://github.com/alibaba/BeeHive/blob/ff7aef5707481606c6d107cd00840728bb78075a/BeeHive/BHRouter.m#L590-L596 这里应该调用的是[target methodSignatureForSelector:action] ,而不是[self methodSignatureForSelector:action],这里的self是BHRouter


https://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

SoXeon commented 6 years ago

@ZoMinster

xilin commented 6 years ago

看起来前两个问题是在f8a9e51这个commit中修改了