我试图用xcodebuild联编建一个项目,但RestKit和GPUImage下面是给问题:
ld:警告:忽略文件/project/libGPUImage.a,缺少文件/project/libGPUImage.a中所需的架构armv7(2个切片)
ld:警告:忽略文件/project/libRestKit.a,文件是为存档而构建的,而不是被链接的架构(armv7):/ project/librestKit.a
请帮忙!
这是Raywenderlich编辑的JSON样本(http://www.raywenderlich.com/5492/working-with-json-in-ios-5).我需要进一步整合POST数据,例如用户名,以便从URL获取响应.我该怎么办?谢谢.
#define kBgQueue dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) //1
#define kLatestKivaLoansURL [NSURL URLWithString: @"http://www.url.org/json.php"] //2
#import "ViewController.h"
@interface NSDictionary(JSONCategories)
+(NSDictionary*)dictionaryWithContentsOfJSONURLString:(NSString*)urlAddress;
-(NSData*)toJSON;
@end
@implementation NSDictionary(JSONCategories)
+(NSDictionary*)dictionaryWithContentsOfJSONURLString:(NSString*)urlAddress
{
NSData* data = [NSData dataWithContentsOfURL: [NSURL URLWithString: urlAddress] ];
__autoreleasing NSError* error = nil;
id result = [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:&error];
if (error != nil) return nil;
return result;
}
-(NSData*)toJSON
{
NSError* error = nil;
id result = [NSJSONSerialization dataWithJSONObject:self options:kNilOptions error:&error];
if (error != nil) return nil;
return result;
}
@end
@implementation ViewController …Run Code Online (Sandbox Code Playgroud)