diff --git a/.gitignore b/.gitignore index 4aaba75..e3baa23 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ project.xcworkspace xcuserdata +# SPM +.build diff --git a/Package.swift b/Package.swift new file mode 100644 index 0000000..c99d2bc --- /dev/null +++ b/Package.swift @@ -0,0 +1,20 @@ +// swift-tools-version:5.7 + +import PackageDescription + +let package = Package( + name: "TBXML", + products: [ + .library( + name: "TBXML", + targets: ["TBXML"] + ) + ], + targets: [ + .target( + name: "TBXML", + path: "TBXML", + publicHeadersPath: "." + ), + ] +) diff --git a/TBXML-Headers/TBXML+Compression.h b/TBXML/TBXML+Compression.h similarity index 98% rename from TBXML-Headers/TBXML+Compression.h rename to TBXML/TBXML+Compression.h index 6f54c4c..5432d88 100644 --- a/TBXML-Headers/TBXML+Compression.h +++ b/TBXML/TBXML+Compression.h @@ -1,3 +1,5 @@ +#import + @interface NSData (TBXML_Compression) // ================================================================================================ diff --git a/TBXML-Code/TBXML+Compression.m b/TBXML/TBXML+Compression.m similarity index 100% rename from TBXML-Code/TBXML+Compression.m rename to TBXML/TBXML+Compression.m diff --git a/TBXML-Headers/TBXML+HTTP.h b/TBXML/TBXML+HTTP.h similarity index 100% rename from TBXML-Headers/TBXML+HTTP.h rename to TBXML/TBXML+HTTP.h diff --git a/TBXML-Code/TBXML+HTTP.m b/TBXML/TBXML+HTTP.m similarity index 98% rename from TBXML-Code/TBXML+HTTP.m rename to TBXML/TBXML+HTTP.m index bf751c0..9b1e0e4 100644 --- a/TBXML-Code/TBXML+HTTP.m +++ b/TBXML/TBXML+HTTP.m @@ -17,7 +17,7 @@ + (NSMutableURLRequest*) tbxmlGetRequestWithURL:(NSURL*)url { [request setHTTPMethod:@"GET"]; -#ifndef ARC_ENABLED +#if !__has_feature(objc_arc) return [request autorelease]; #else return request; @@ -43,7 +43,7 @@ + (NSMutableURLRequest*) tbxmlPostRequestWithURL:(NSURL*)url parameters:(NSDicti [request setValue:postLength forHTTPHeaderField:@"Content-Length"]; [request setHTTPBody:postData]; -#ifndef ARC_ENABLED +#if !__has_feature(objc_arc) [params release]; return [request autorelease]; #else diff --git a/TBXML-Headers/TBXML.h b/TBXML/TBXML.h similarity index 99% rename from TBXML-Headers/TBXML.h rename to TBXML/TBXML.h index 36a0f67..8e07bad 100644 --- a/TBXML-Headers/TBXML.h +++ b/TBXML/TBXML.h @@ -27,6 +27,8 @@ // THE SOFTWARE. // ================================================================================================ +#import + @class TBXML; diff --git a/TBXML-Code/TBXML.m b/TBXML/TBXML.m similarity index 99% rename from TBXML-Code/TBXML.m rename to TBXML/TBXML.m index b5b1bec..29a6f6f 100644 --- a/TBXML-Code/TBXML.m +++ b/TBXML/TBXML.m @@ -911,7 +911,7 @@ - (void) dealloc { } } -#ifndef ARC_ENABLED +#if !__has_feature(objc_arc) [super dealloc]; #endif }