This is not how you enable resources using theos. The MyTweak_FILES variable should only include files that can be compiled. Make a file handles resources differently.
To enable resources, you need to create a package as follows.
1) Create a folder called Resources in the tweak.xm directory.
2) Put all your resource files (all your PNGs) in this folder.
3) Add the following information to your file
BUNDLE_NAME = your_bundle_identifier your_bundle_identifier_INSTALL_PATH = /Library/MobileSubstrate/DynamicLibraries include $(THEOS)/makefiles/bundle.mk
4) Define your package as follows on top of the tweak.xm file.
#define kBundlePath @"/Library/MobileSubstrate/DynamicLibraries/your_bundle_identifier.bundle"
5) Now you can initialize the package and use the images in your setup as follows:
NSBundle *bundle = [[[NSBundle alloc] initWithPath:kBundlePath] autorelease]; NSString *imagePath = [bundle pathForResource:@"your_image_name" ofType:@"png"]; UIImage *myImage = [UIImage imageWithContentsOfFile:imagePath]
In the steps above, replace your_bundle_identifier with your bundle identifier, which will be in the control file. (ex: com.yourdomain.tweak_name)
Also replace your_image_name with the name of the image you want to use.
You can pretty much use any resources (for example: sound files) above.
johnny peter
source share