Hey guys i'm building a tweak for instagram i'm adding a sub preference called instatroll similar to trolltwitter to change the number of followers to any number the user sets (using PSEditTextCell) here is my code so far
#import <Foundation/Foundation.h>
static NSMutableDictionary *plist = [[NSMutableDictionary alloc] initWithContentsOfFile:@"/var/mobile/Library/Preferences/com.idevicelover.InstaEnhancer.plist"];
NSNumber *chosenNumber = [NSNumber numberWithInt:999];
int number = chosenNumber;
static BOOL followerson = NO;
%hook IGUser -(void)setFollowerCount:(NSNumber*)fp8{
followerson = [[plist objectForKey:@"followerson"]boolValue];
if(followerson){
%orig(number);
}
else{
%orig;
}
}
%end
%ctor
{
NSDictionary *InstaEnhancer = [[NSDictionary alloc] initWithContentsOfFile:@"/var /mobile /Library/Preferences/com.idevicelover.InstaEnhancer.plist"];
if ([InstaEnhancer objectForKey:@"numberoffollowers"]) number = [[InstaEnhancer objectForKey:@"numberoffollowers"] intValue];
[InstaEnhancer release];
}
i'm getting this error when compiling :"assigning to NSNumber * from incompatible type "int"