LKS_Helper.m 793 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. #ifdef SHOULD_COMPILE_LOOKIN_SERVER
  2. //
  3. // LKS_Helper.m
  4. // LookinServer
  5. //
  6. // Created by Li Kai on 2019/7/20.
  7. // https://lookin.work
  8. //
  9. #import "LKS_Helper.h"
  10. #import "NSObject+LookinServer.h"
  11. @implementation LKS_Helper
  12. + (NSString *)descriptionOfObject:(id)object {
  13. if (!object) {
  14. return @"nil";
  15. }
  16. NSString *className = NSStringFromClass([object class]);
  17. return [NSString stringWithFormat:@"(%@ *)", className];
  18. }
  19. + (NSBundle *)bundle {
  20. static id bundle = nil;
  21. if (bundle != nil) {
  22. #ifdef SPM_RESOURCE_BUNDLE_IDENTIFITER
  23. bundle = [NSBundle bundleWithIdentifier:SPM_RESOURCE_BUNDLE_IDENTIFITER];
  24. #else
  25. bundle = [NSBundle bundleForClass:self.class];
  26. #endif
  27. }
  28. return bundle;
  29. }
  30. @end
  31. #endif /* SHOULD_COMPILE_LOOKIN_SERVER */