This repository was archived by the owner on Jan 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Expand file tree Collapse file tree 3 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 11.DS_Store
22.build /
3+ .swiftpm /
34xcuserdata
45project.xcworkspace
56/build
Original file line number Diff line number Diff line change @@ -66,7 +66,13 @@ @implementation GCDWebUploader
6666
6767- (instancetype )initWithUploadDirectory : (NSString *)path {
6868 if ((self = [super init ])) {
69- NSString * bundlePath = [[NSBundle bundleForClass: [GCDWebUploader class ]] pathForResource: @" GCDWebUploader" ofType: @" bundle" ];
69+ #if SWIFT_PACKAGE
70+ NSBundle * bundle = SWIFTPM_MODULE_BUNDLE;
71+ #else
72+ NSBundle * bundle = [NSBundle bundleForClass: [GCDWebUploader class ]];
73+ #endif
74+
75+ NSString * bundlePath = [bundle pathForResource: @" GCDWebUploader" ofType: @" bundle" ];
7076 if (bundlePath == nil ) {
7177 return nil ;
7278 }
Original file line number Diff line number Diff line change 1- // swift-tools-version:5.2
1+ // swift-tools-version:5.3
22// The swift-tools-version declares the minimum version of Swift required to build this package.
33
44import PackageDescription
@@ -24,13 +24,15 @@ let package = Package(
2424 path: " . " ,
2525 exclude: [
2626 " Frameworks " ,
27- " GCDWebUploader " ,
2827 " iOS " ,
2928 " Mac " ,
3029 " Tests " ,
3130 " tvOS " ,
3231 " Package.swift "
3332 ] ,
33+ resources: [
34+ . copy( " GCDWebUploader/GCDWebUploader.bundle " ) ,
35+ ] ,
3436 cSettings: [
3537 . headerSearchPath( " GCDWebServer/Core " ) ,
3638 . headerSearchPath( " GCDWebServer/Requests " ) ,
You can’t perform that action at this time.
0 commit comments