You are viewing our Forum Archives. To view or take place in current topics click here.
| iOS Tweak Development Tips | Objective-C | Tutorial |
Posted:

| iOS Tweak Development Tips | Objective-C | Tutorial |Posted:

LacertosusDeus
  • Ladder Climber
Status: Offline
Joined: Jan 19, 201311Year Member
Posts: 396
Reputation Power: 17
Status: Offline
Joined: Jan 19, 201311Year Member
Posts: 396
Reputation Power: 17



[ Register or Signin to view external links. ]

A Simple Guide To Start Learn Objective-C!


[ Register or Signin to view external links. ]
Information
Hooking Classes in iOS Development is Required to Building Your Tweak.

What are "Classes"? Classes are the code inside "Headers" iOS runs off of, and what you edit when making a tweak.

Example of a Header:
[ Register or Signin to view external links. ]

And these are the Methods/Classes inside this Header:
+(id)sharedVolumeControl;
-(void)_registerForAVSystemControllerNotifications;
-(void)_unregisterForAVSystemControllerNotifications;
-(void)cancelVolumeEvent;
-(void)handleVolumeEvent:(IOHIDEventRef)arg1 ;
-(void)removeAlwaysHiddenCategory:(id)arg1 ;
-(void)addAlwaysHiddenCategory:(id)arg1 ;
-(void)hideVolumeHUDIfVisible;
-(void)increaseVolume;
-(void)decreaseVolume;
-(float)volumeStepUp;
-(BOOL)headphonesPresent;
-(void)_initializeEUVolumeLimits;
-(BOOL)_isCategoryAlwaysHidden:(id)arg1 ;
-(BOOL)_isMusicPlayingSomewhere;
-(float)_calcButtonRepeatDelay;
-(void)_changeVolumeBy:(float)arg1 ;
-(float)volumeStepDown;
-(void)sendEUVolumeLimitAcknowledgementIfNecessary;
-(BOOL)_turnOnScreenIfNecessaryForEULimit:(BOOL)arg1 ;
-(void)_EUVolumeLimitChanged:(id)arg1 ;
-(void)_EUVolumeEnforcementChanged:(id)arg1 ;
-(void)_serverConnectionDied:(id)arg1 ;
-(int)_volumeModeForCategory:(id)arg1 ;
-(BOOL)_HUDIsDisplayableForCategory:(id)arg1 ;
-(id)_volumeHUDViewWithMode:(int)arg1 volume:(float)arg2 ;
-(BOOL)_isVolumeHUDVisible;
-(BOOL)_isVolumeHUDVisibleOrFading;
-(void)_userAcknowledgedEUEnforcement;
-(float)getMediaVolume;
-(void)clearAlwaysHiddenCategories;
-(id)lastDisplayedCategory;
-(id)volumeHUDForCurrentCategory;
-(void)dealloc;
-(id)init;
-(void)_effectiveVolumeChanged:(id)arg1 ;
-(void)_presentVolumeHUDWithMode:(int)arg1 volume:(float)arg2 ;
-(void)toggleMute;
-(float)volume;
-(void)setMediaVolume:(float)arg1;

------------------------------------------------------

Example
Once you know what these terms are,
here is an example of what you can do with this information:
[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]
Information
What is an "if" statement? An IF statement checks conditions.

This can be used to detect if a switch is on, if a number is larger, smaller or equal to another number, and more. They are very useful and almost vital when making a tweak.

------------------------------------------------------

Example
Once you know what these terms are,
here is an example of what you can do with this information:
[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]

Information
Boolean
Bool is yes/no property, simple.
Example:
BOOL showingAlert = YES;     //All booleans must be CAPITALIZED and the answer is too (YES & NO)
BOOL signedIn = NO;

NSLog
NSlog is mainly used in code for debugging, it outputs a custom text to the sytem log.
Example:
NSLog(@"This is output to system log!"     //This is very useful to detect if a tweak is working

NSNumber
NSNumber is a useful property that is mainly used to store/retrieve data values.
Example:
NSNumber *yourDataHolder = 73;     //You can use "yourDataHolder" in an NSNumber and will be translated to "73"

Float
Float is essentially another number data, but it can complete mathematical operations easily.
Example:
float finalVelocity = beginVelocity + GRAV_CONSTANT * time;     //The "float" number is whatever the math equation equals

Int
Int (short for Integer) is simply that, another form of number data, BUT it can only be a whole number such as 5 or 17 (no decimals!).
Example:
int someNumber = 35;     //Holds number data basically

%ORIG
%orig is specifically used for iOS development. It is used to return a method as it normally would.
Example:
-(BOOL)isUserInteractionEnabled {
          return %orig;     //This means that isUserInteractionEnabled will continue as normal
}

------------------------------------------------------

Example
Once you know what these terms are,
here is an example of what you can do with this information:
[ Register or Signin to view external links. ]


[ Register or Signin to view external links. ]

Information
Integrating Activator into your tweak is pretty easy. If you dont know what Activator is, it is a fundamental tweak that almost everyone has.

How to make your tweak appear in Activator's settings:
[ Register or Signin to view external links. ]

iPhone Dev Wiki for more info:
[ Register or Signin to view external links. ]

------------------------------------------------------

Example
Once you know what these terms are,
here is an example of what you can do with this information:
[ Register or Signin to view external links. ]

[ Register or Signin to view external links. ]

*Need Help With Anything? PM Me!

*If There Are Any Errors, Please Tell Me!

*More Open Source Tweaks At My Website: [ Register or Signin to view external links. ]



Jump to:
You are viewing our Forum Archives. To view or take place in current topics click here.