Closed BeckettOBrien closed 4 years ago
The instance of SparkAppList may be getting dereferenced before it can return. Try declare it before the block first.
Also, make sure you have installed the latest version on the device from my repo.
I’m also not sure why you are using NSClassFromString - that’s not necessary if you properly added the library to your make file and added the header.
The issue persists when using:
SparkAppList* appList = [[NSClassFromString(@"SparkAppList") alloc] init];
[appList getAppList:^(NSArray* apps){
RLog(@"APPS: %@", apps);
}];
For some reason, NSClassFromString has been necessary for almost all calls to classes.
It’s not necessary at all, it means you aren’t linking the library properly. That’s why it won’t be working as the library isn’t actually getting loaded. Make sure you follow the instructions, include the library in the make file, include the header, and try running a make clean. If you’re calling it from your prefs bundle, make sure it’s in the makefile for the prefs bundle.
Okay, It is working perfectly now. I had to also add it to the libraries section of my preferences makefile as well. Thank you for the help!
I recently switched from AppList to libSparkAppList because AppList had too many features that I didn't need. I attempted to get an NSArray of SparkAppItems using
inside of my viewDidLoad for my preferences list controller. But I have found that the handler block is never being run. I am not %100 sure that this is the proper usage of
getAppList
but I could not find any examples for it, so this was my best attempt. Is this not the proper usage or is there something else wrong, like improper installation or a bug? Thank you!