Commit 81c54f30 authored by Joshua Weinberg's avatar Joshua Weinberg Committed by Eloy Duran

Allow for framework style imports and adjust the sample to match

parent 1fcca9fe
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
// THE SOFTWARE. // THE SOFTWARE.
#import <Foundation/Foundation.h> #import <Foundation/Foundation.h>
#import "AFRestClient.h" #import "AFNetworking/AFRestClient.h"
extern NSString * const kAFGowallaClientID; extern NSString * const kAFGowallaClientID;
extern NSString * const kAFGowallaBaseURLString; extern NSString * const kAFGowallaBaseURLString;
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
#import "SpotTableViewCell.h" #import "SpotTableViewCell.h"
#import "TTTLocationFormatter.h" #import "FormatterKit/TTTLocationFormatter.h"
#import "AFImageCache.h" #import "AFNetworking/AFImageCache.h"
#import "UIImageView+AFNetworking.h" #import "AFNetworking/UIImageView+AFNetworking.h"
@interface NearbySpotsViewController () @interface NearbySpotsViewController ()
@property (readwrite, nonatomic, retain) NSArray *nearbySpots; @property (readwrite, nonatomic, retain) NSArray *nearbySpots;
......
...@@ -61,7 +61,7 @@ module Pod ...@@ -61,7 +61,7 @@ module Pod
# Working around a bug in Xcode 4.2 betas, remove this once the Xcode bug is fixed: # Working around a bug in Xcode 4.2 betas, remove this once the Xcode bug is fixed:
# https://github.com/alloy/cocoapods/issues/13 # https://github.com/alloy/cocoapods/issues/13
#add_file_to_list('PBXHeadersBuildPhase', build_file_uuid) #add_file_to_list('PBXHeadersBuildPhase', build_file_uuid)
add_file_to_list('PBXCopyFilesBuildPhase', build_file_uuid) add_file_to_list('PBXCopyFilesBuildPhase', build_file_uuid, group)
else else
extra = compiler_flags ? {"settings" => { "COMPILER_FLAGS" => compiler_flags }} : {} extra = compiler_flags ? {"settings" => { "COMPILER_FLAGS" => compiler_flags }} : {}
build_file_uuid = add_build_file(file_ref_uuid, extra) build_file_uuid = add_build_file(file_ref_uuid, extra)
...@@ -78,7 +78,7 @@ module Pod ...@@ -78,7 +78,7 @@ module Pod
"children" => [] "children" => []
}) })
add_object_to_group(group_uuid, 'Pods') add_object_to_group(group_uuid, 'Pods')
group_uuid add_copy_header_build_phase(name)
end end
def create_in(pods_root) def create_in(pods_root)
...@@ -113,8 +113,28 @@ module Pod ...@@ -113,8 +113,28 @@ module Pod
})) }))
end end
def add_file_to_list(isa, build_file_uuid) def add_copy_header_build_phase(name)
object_uuid, object = objects_by_isa(isa).first phase_uuid = add_object({
"isa" => "PBXCopyFilesBuildPhase",
"buildActionMask" => "2147483647",
"dstPath" => "$(PUBLIC_HEADERS_FOLDER_PATH)/#{name}",
"dstSubfolderSpec" => "16",
"files" => [],
"name" => "Copy #{name} Public Headers",
"runOnlyForDeploymentPostprocessing" => "0",
})
object_uuid, object = objects_by_isa('PBXNativeTarget').first
object['buildPhases'] << phase_uuid
end
def add_file_to_list(isa, build_file_uuid, name = nil)
isa_objects = objects_by_isa(isa)
object_uuid, object = isa_objects.first
if name != nil
object_uuid, object = isa_objects.select { |_, object| object['name'].include? name }.first
end
object['files'] << build_file_uuid object['files'] << build_file_uuid
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment