File tree Expand file tree Collapse file tree 5 files changed +19
-3
lines changed
MessageTemplates/ViewControllers Expand file tree Collapse file tree 5 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ +(LPInterstitialViewController *)instantiateFromStoryboard
2020#ifdef SWIFTPM_MODULE_BUNDLE
2121 NSBundle *bundle = SWIFTPM_MODULE_BUNDLE;
2222#else
23- NSBundle *bundle = [NSBundle bundleForClass: [Leanplum class ] ];
23+ NSBundle *bundle = [LPUtils leanplumBundle ];
2424#endif
2525 UIStoryboard *storyboard = [UIStoryboard storyboardWithName: @" Interstitial" bundle: bundle];
2626
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ +(LPPopupViewController *)instantiateFromStoryboard
2323#ifdef SWIFTPM_MODULE_BUNDLE
2424 NSBundle *bundle = SWIFTPM_MODULE_BUNDLE;
2525#else
26- NSBundle *bundle = [NSBundle bundleForClass: [Leanplum class ] ];
26+ NSBundle *bundle = [LPUtils leanplumBundle ];
2727#endif
2828 UIStoryboard *storyboard = [UIStoryboard storyboardWithName: @" Popup" bundle: bundle];
2929
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ +(LPWebInterstitialViewController *)instantiateFromStoryboard
2525#ifdef SWIFTPM_MODULE_BUNDLE
2626 NSBundle *bundle = SWIFTPM_MODULE_BUNDLE;
2727#else
28- NSBundle *bundle = [NSBundle bundleForClass: [Leanplum class ] ];
28+ NSBundle *bundle = [LPUtils leanplumBundle ];
2929#endif
3030 UIStoryboard *storyboard = [UIStoryboard storyboardWithName: @" WebInterstitial" bundle: bundle];
3131
Original file line number Diff line number Diff line change 6262 */
6363+ (BOOL )isSwizzlingEnabled ;
6464
65+ + (NSBundle *)leanplumBundle ;
66+
6567@end
Original file line number Diff line number Diff line change 2727#import " LPExceptionHandler.h"
2828#import " LPAPIConfig.h"
2929#import " LPConstants.h"
30+ #import " Leanplum.h"
3031
3132
3233@implementation LPUtils
@@ -97,4 +98,17 @@ +(BOOL)isSwizzlingEnabled
9798 return swizzlingEnabled;
9899}
99100
101+ + (NSBundle *)leanplumBundle
102+ {
103+ NSBundle *bundle = [NSBundle bundleForClass: [Leanplum class ]];
104+ NSURL *bundleUrl = [bundle URLForResource: @" Leanplum-iOS-SDK" withExtension: @" .bundle" ];
105+ if (bundleUrl != nil )
106+ {
107+ NSBundle *lpBundle = [NSBundle bundleWithURL: bundleUrl];
108+ bundle = lpBundle;
109+ }
110+
111+ return bundle;
112+ }
113+
100114@end
You can’t perform that action at this time.
0 commit comments