Permalink
Browse files

Make AFNetworking & ASIHTTPRequest work on OSX.

Removed ASIHTTPRequest 1.8, because we have enough test data now.
  • Loading branch information...
1 parent 9a932e0 commit f9377d63bbafa3d59e3503133be2733dd4c9a989 @alloy alloy committed Oct 16, 2011
@@ -6,9 +6,19 @@ Pod::Spec.new do |s|
s.author = { 'Gowalla' => 'live@gowalla.com' }
s.source = { :git => 'https://github.com/gowalla/AFNetworking.git', :tag => '0.5.1' }
- s.source_files = 'AFNetworking'
+ if config.ios?
+ s.source_files = 'AFNetworking' # everything
+ else
+ s.source_files = %w{
+ AFNetworking/AFHTTPRequestOperation.h
+ AFNetworking/AFJSONRequestOperation.h
+ AFNetworking/NSData+AFNetworking.h
+ AFNetworking/NSMutableURLRequest+AFNetworking.h
+ AFNetworking/NSString+AFNetworking.h
+ }
+ end
- s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load -l z' }
+ s.xcconfig = { 'OTHER_LDFLAGS' => '-ObjC -all_load -lz' }
s.dependency 'JSONKit'
end
@@ -18,13 +18,14 @@ Pod::Spec.new do |s|
using multipart/form-data.
}
- s.source_files = 'Classes'
+ if config.ios?
+ s.dependency 'Reachability', '~> 2.0', '>= 2.0.4'
+ s.source_files = 'Classes'
+ s.frameworks = 'SystemConfiguration', 'MobileCoreServices', 'CFNetwork'
+ else
+ s.source_files = 'Classes/ASI[^AuthenticationDialog]*.*'
+ s.frameworks = 'SystemConfiguration', 'CoreServices'
+ end
- # TODO actually I think one or some of these are for Reachability
- s.xcconfig = { 'OTHER_LDFLAGS' => '-framework SystemConfiguration ' \
- '-framework CFNetwork ' \
- '-framework MobileCoreServices ' \
- '-l z.1' }
-
- s.dependency 'Reachability', '~> 2.0', '>= 2.0.4'
+ s.library = 'z.1'
end
@@ -1,32 +0,0 @@
-Pod::Spec.new do |s|
- s.name = 'ASIHTTPRequest'
- s.version = '1.8'
- s.summary = 'Easy to use CFNetwork wrapper for HTTP requests, Objective-C, Mac OS X and iPhone'
- s.homepage = 'http://allseeing-i.com/ASIHTTPRequest'
- s.author = { 'Ben Copsey' => 'ben@allseeing-i.com' }
- s.source = { :git => 'https://github.com/pokeb/asi-http-request.git', :tag => 'v1.8' }
-
- s.description = %{
- ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that
- makes some of the more tedious aspects of communicating with web servers
- easier. It is written in Objective-C and works in both Mac OS X and iPhone
- applications.
-
- It is suitable performing basic HTTP requests and interacting with
- REST-based services (GET / POST / PUT / DELETE). The included
- ASIFormDataRequest subclass makes it easy to submit POST data and files
- using multipart/form-data.
- }
-
- # Exclude the ASIWebPageRequest files.
- s.source_files = 'Classes/ASI[^Web]*.*'
-
- # TODO actually I think one or some of these are for Reachability
- s.xcconfig = { 'OTHER_LDFLAGS' => '-framework SystemConfiguration ' \
- '-framework CFNetwork ' \
- '-framework MobileCoreServices ' \
- '-l z.1' }
-
- s.dependency 'Reachability', '~> 2.0', '>= 2.0.4'
-end
-
@@ -1,16 +0,0 @@
-Pod::Spec.new do |s|
- s.name = 'ASIWebPageRequest'
- s.version = '1.8'
- s.homepage = 'http://allseeing-i.com/ASIHTTPRequest/ASIWebPageRequest'
- s.author = { 'Ben Copsey' => 'ben@allseeing-i.com' }
-
- s.summary = %{
- The ASIWebPageRequest class included with ASIHTTPRequest lets you download
- complete webpages, including external resources like images and stylesheets.
- }
-
- s.part_of_dependency = 'ASIHTTPRequest', '1.8'
- s.source_files = 'Classes/ASIWebPageRequest.h', 'Classes/ASIWebPageRequest.m'
-
- s.xcconfig = { 'OTHER_LDFLAGS' => '-l xml2.2.7.3', 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
-end
@@ -1,3 +1,5 @@
+# TODO JSONKit does *not* support GC, we need to specify that.
+
Pod::Spec.new do |s|
s.name = 'JSONKit'
s.version = '1.4'
@@ -1,6 +1,7 @@
Pod::Spec.new do |s|
s.name = 'Reachability'
s.version = '2.0.4'
+ s.platform = :ios
s.part_of = 'ASIHTTPRequest', '>= 1.8'
s.homepage = 'https://github.com/pokeb/asi-http-request/tree/v1.8.1/External/Reachability'
s.authors = 'Apple', 'Donoho Design Group, LLC'

0 comments on commit f9377d6

Please sign in to comment.