Introduction to the

This article is aimed at those who have read the relevant reverse moments video. If they have not seen it, they will be confused when reading this article. Therefore, we suggest that you can search for a study.

In the reverse process, we take wechat practice accounts for the vast majority of the general realization of the functions of the moments of friends to save the small video to the local (now the wechat native version has this function) or forwarding the moments of friends and other functions. Step by step how reverse I also don’t wordy, a search words certainly also a lot of information. So what exactly is this article about?

The online sameness is essentially how to get the WCDataItem step by step, and then get the address of the little video. This is another very simple way to get it.

Gets the small video view name

I started with Xcode’s Debug View Hierarchy to get to the video view name WCTLContentItemTemplateVideo, (some tutorials are WCContentItemViewTemplateNewSigh, I here WeChat version is 6.5.21 relatively new, So that’s probably the name of the old version)

Locate the small video long press event

WCTLContentItemTemplateVideo by class – dump processing. H file can be found in several long according to the method, a a breakpoint test can know – (void) onLongTouch is long press event.

Point of interruption verification:

br s -a 0x000000000259c000+0x000000010261092cCopy the code

0x000000000259c000throughimage list -o -f WeChatTo obtain

0x000000010261092cGet it from Hopper


Do here and online basic similar. Just trying to be different. Here’s the point.

findWCDataItem

sinceWCTLContentItemTemplateVideoThat’s what this view is for, so there must be a data source. Look at this view and see that there are no valuable classes. But when you look at it again, it’s inherited fromWCContentItemBaseViewGo to this class and look at it.



This is gonna be a real revelation.

po [[[[[$x0 oDataItem]contentObj]mediaList]lastObject]dataUrlCopy the code

Through the above command, we can verify that this is the address of the small video we are looking for

Then how to do I believe you must know. Ha, ha, ha