소스 검색

Enable support for Podfiles with use_frameworks!

The previous implementation looked in the main
bundle for the GCDWebUploader resource bundle.
When using the use_frameworks! Podfile option, the
resource bundle will be in a framework bundle, not
in the main bundle.
Andrew Hershberger 10 년 전
부모
커밋
a674614713
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      GCDWebUploader/GCDWebUploader.m

+ 1 - 1
GCDWebUploader/GCDWebUploader.m

@@ -296,7 +296,7 @@
 
 - (instancetype)initWithUploadDirectory:(NSString*)path {
   if ((self = [super init])) {
-    NSBundle* siteBundle = [NSBundle bundleWithPath:[[NSBundle mainBundle] pathForResource:@"GCDWebUploader" ofType:@"bundle"]];
+    NSBundle* siteBundle = [NSBundle bundleWithPath:[[NSBundle bundleForClass:[GCDWebUploader class]] pathForResource:@"GCDWebUploader" ofType:@"bundle"]];
     if (siteBundle == nil) {
       return nil;
     }