I'm trying to develop a simple ios tweak that uses some springboard components. I've dumped the headers and included the one I need (SBLockScreenNotificationScrollView.h), but when I compile I get a linker error:
Undefined symbols for architecture armv7s:
"_OBJC_CLASS_$_SBLockScreenNotificationScrollView", referenced from:
objc-class-ref in NotificationSwipe.o
ld: symbol(s) not found for architecture armv7s
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've tried copying the SpringBoard binary from phone and adding it under Link Binary with Libraries in xcode. Thanks for the help.
When you don't have class implementation or library it defined in you have to obtain the class at runtime. This is what objc_getClass
function is for. It returns an objc class at runtime and gives you the ability to use the class without knowing anything about him at compile-time.
Just replace SBLockScreenNotificationScrollView
with objc_getClass("SBLockScreenNotificationScrollView")
.
I suggest you read about objective-C runtime. Developing tweaks requires you to understand at least basics in which case you wouldn't ask this kind of questions.