我使用NSDataDetector
withNSTextCheckingTypeLink
在其中搜索链接的字符串(例如https://stackoverflow.com/questions)。一般来说,它工作正常,但是当字符串包含某些非常长的链接(200+ 字符)后跟一个空格和另一个单词时,我得到这个断言:
> DDRequire failed: the following assertion will only be logged once
>
> assertion on
> /SourceCache/MobileDataDetectorsCore/MobileDataDetectorsCore-154/Sources/PushDown/DDTokenCache.c:310
> "delta >= 0" failed :Bad shift in
> DDTokenCacheMoveStreamOffset, aborting
这是导致这种情况的文本类型:
> blog.somethingorother.com/2011/storynameetcmorestuff/utm_source/eedburnerutmmediumfeedutmcampaign/FeedanutmcontentGooglFeedfetcherutmcampaign/FeedanutmcontentGooglFeedfetcher/eedburnerutm_mediumfeedutmcampaign/FeedanutmcontentGooglFeedfetcherutmcampaign HEY
有谁知道这背后的原因或对此有任何其他见解?