Note that there are some explanatory texts on larger screens.

plurals
  1. POHooking IVAR in theos error
    primarykey
    data
    text
    <p>I have decrypted some header files and this is the header file I would like to hook some ivars from it.</p> <pre><code>/** * This header is generated by class-dump-z 0.2a. * class-dump-z is Copyright (C) 2009 by KennyTM~, licensed under GPLv3. * * Source: (null) */ #import &lt;XXUnknownSuperclass.h&gt; // Unknown library #import "InAppNotificationMessageViewDelegate.h" #import "FBMSessionClassProvidable.h" @class InAppNotificationContainerView, ProjectGatingChecker, FBMViewProvider, InAppNotificationBadgeCounter, FBMBeeperListFetcher; @protocol FBMNavigator, FBProvider, FBMAppProperties; @interface InAppNotificationManager : XXUnknownSuperclass &lt;InAppNotificationMessageViewDelegate, FBMSessionClassProvidable&gt; { id&lt;FBMNavigator&gt; _navigator; FBMBeeperListFetcher* _beeperListFetcher; InAppNotificationBadgeCounter* _badgeCounter; FBMViewProvider* _notificationMessageViewProvider; InAppNotificationContainerView* _notificationContainerView; FBMViewProvider* _notificationContainerViewProvider; id&lt;FBMAppProperties&gt; _appProperties; ProjectGatingChecker* _gatingChecker; id&lt;FBProvider&gt; _rootNavControllerProvider; id&lt;FBProvider&gt; _threadViewControllerProvider; } @property(retain, nonatomic) id&lt;FBMAppProperties&gt; appProperties; @property(retain, nonatomic) id&lt;FBProvider&gt; threadViewControllerProvider; @property(retain, nonatomic) id&lt;FBMNavigator&gt; navigator; @property(retain, nonatomic) ProjectGatingChecker* gatingChecker; </code></pre> <p>So I would like to hook the gatingChecker ivar, I used logify and it created these lines:</p> <pre><code>%hook InAppNotificationManager - (void)setGatingChecker:(ProjectGatingChecker* )gatingChecker { %log; %orig; } - (ProjectGatingChecker* )gatingChecker { %log; ProjectGatingChecker* r = %orig; NSLog(@" = %@", r); return r; } %end </code></pre> <p>When I try to compile this, I get:</p> <pre><code>Tweak.xm:9: error: ‘ProjectGatingChecker’ has not been declared Tweak.xm:9: error: ‘ProjectGatingChecker’ has not been declared Tweak.xm:9: error: expected initializer before ‘*’ token Tweak.xm:9: error: expected initializer before ‘*’ token Tweak.xm:353: error: ‘ProjectGatingChecker’ has not been declared Tweak.xm:354: error: expected initializer before ‘*’ token Tweak.xm: In function ‘void _logosLocalInit()’: Tweak.xm:361: error: ‘_logos_method$_ungrouped$InAppNotificationManager$gatingChecker’ was not declared in this scope Tweak.xm:361: error: ‘_logos_orig$_ungrouped$InAppNotificationManager$gatingChecker’ was not declared in this scope make[2]: *** [obj/Tweak.xm.673b4229.o] Error 1 make[1]: *** [internal-library-all_] Error 2 </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload