2

在 Instagram (v7.7) 上进行类转储时,我对为什么在这个类中缺少“赞助上下文”的方法声明感到困惑。相比之下,IDA 显示了“-(char)ownedContext”方法。

类转储结果:

@interface IGFeedItemTimelineLayoutAttributes : XXUnknownSuperclass {
    BOOL _sponsoredContext;
    BOOL _showExploreContext;
    BOOL _showTimeStampOnFirstLayoutElement;
    IGFeedItem* _feedItem;
    NSArray* _rowItems;
}
@property(retain, nonatomic) NSArray* rowItems;
@property(assign, nonatomic) BOOL showTimeStampOnFirstLayoutElement;
@property(assign, nonatomic) BOOL showExploreContext;
@property(assign, nonatomic) BOOL sponsoredContext;
@property(retain, nonatomic) IGFeedItem* feedItem;
-(void).cxx_destruct;
-(id)commentForTextTimelineRow:(int)textTimelineRow;
-(int)cellTypeForTextTimelineRow:(int)textTimelineRow;
-(int)numberOfTextRowsInTimeline;
-(id)initWithFeedItem:(id)feedItem sponsoredContext:(BOOL)context showExploreContext:(BOOL)context3 showTimeStampOnFirstLayoutElement:(BOOL)element;
@end

国际开发协会结果:

IGFeedItemTimelineLayoutAttributes - (char)sponsoredContext
char __cdecl -[IGFeedItemTimelineLayoutAttributes sponsoredContext](struct IGFeedItemTimelineLayoutAttributes *self, SEL)
__IGFeedItemTimelineLayoutAttributes_sponsoredContext_

MOV             R1, #(_OBJC_IVAR_$_IGFeedItemTimelineLayoutAttributes._sponsoredContext - 0x15C64)
ADD             R1, PC
LDR             R1, [R1]
LDRSB           R0, [R0,R1]
BX              LR
End of function -[IGFeedItemTimelineLayoutAttributes sponsoredContext]

另外,当我尝试使用徽标挂钩此方法时:

%hook IGFeedItemTimelineLayoutAttributes
-(BOOL)sponsoredContext{
    NSLog(@"Text:%d", %orig());
    return %orig();
}
%end

Cydia Substrate 给了我错误:

MS:Warning: message not found [IGFeedItemTimelineLayoutAttributes sponsoredContext:]

我怎样才能挂钩这个方法?为什么 class-dump 不显示它,但 IDA 显示?这种方法有什么特别之处?

提前致谢。

4

0 回答 0