Skip to content

Support for Swift Package Manager #35

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
project.xcworkspace
xcuserdata

# SPM
.build
20 changes: 20 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -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: "."
),
]
)
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#import <Foundation/Foundation.h>

@interface NSData (TBXML_Compression)

// ================================================================================================
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions TBXML-Code/TBXML+HTTP.m → TBXML/TBXML+HTTP.m
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
2 changes: 2 additions & 0 deletions TBXML-Headers/TBXML.h → TBXML/TBXML.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
// THE SOFTWARE.
// ================================================================================================

#import <Foundation/Foundation.h>

@class TBXML;


Expand Down
2 changes: 1 addition & 1 deletion TBXML-Code/TBXML.m → TBXML/TBXML.m
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ - (void) dealloc {
}
}

#ifndef ARC_ENABLED
#if !__has_feature(objc_arc)
[super dealloc];
#endif
}
Expand Down