This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Replaced JSON framework with JSONKit (for TestApps)

Fixed header search paths in static library target
Fixed framework search paths in framework target
  • Loading branch information...
1 parent 87b87dc commit 120408e19b8e114c56eaf7f677ddc3ff2982fe0c @stigi stigi committed Mar 16, 2011
View
@@ -1,6 +1,6 @@
[submodule "Outsourced/OAuth2Client"]
path = Outsourced/OAuth2Client
url = git://github.com/nxtbgthng/OAuth2Client.git
-[submodule "TestApps/Support/JSON"]
- path = TestApps/Support/JSON
- url = git://github.com/nxtbgthng/json-framework.git
+[submodule "TestApps/Support/JSONKit"]
+ path = TestApps/Support/JSONKit
+ url = git://github.com/johnezang/JSONKit.git
View
@@ -17,16 +17,17 @@ If you're looking for additional documentation on this wrapper have a look at th
In your terminal:
-- git clone git://github.com/soundcloud/cocoa-api-wrapper.git
-- cd cocoa-api-wrapper
+- git clone git://github.com/soundcloud/cocoa-api-wrapper.git SoundCloudAPI
+- cd SoundCloudAPI
- git submodule update --recursive --init
In your Xcode project:
- drag SoundCloudAPI.xcodeproj into your project
- add it as a build dependency
-- add "/tmp/SoundCloudAPI.dst/usr/local/include" to your user header search path in the build settings
-- you can also include the [OAuth2Client](http://github.com/nxtbgthng/OAuth2Client) headers by adding "/tmp/OAuth2Client.dst/usr/local/include" too (although you might not need them)
+- add the static library as a liked target
+- add "[relative path to SoundCloudAPI]/Sources/SoundCloudAPI" to your header search path in the build settings
+- you can also include the [OAuth2Client](http://github.com/nxtbgthng/OAuth2Client) headers by adding "[relative path to SoundCloudAPI]/Outsourced/OAuth2Client/Sources/OAuth2Client" too (although you might not need them)
## Using the Wrapper in your code
@@ -483,7 +483,7 @@
PRODUCT_NAME = SoundCloudAPI;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
- USER_HEADER_SEARCH_PATHS = /tmp/OAuth2Client.dst/usr/local/include;
+ USER_HEADER_SEARCH_PATHS = "Outsourced/**";
};
name = Debug;
};
@@ -502,7 +502,7 @@
PRODUCT_NAME = SoundCloudAPI;
SDKROOT = iphoneos;
SKIP_INSTALL = YES;
- USER_HEADER_SEARCH_PATHS = /tmp/OAuth2Client.dst/usr/local/include;
+ USER_HEADER_SEARCH_PATHS = "Outsourced/**";
};
name = Release;
};
@@ -543,7 +543,7 @@
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_SEARCH_PATHS = "Outsourced/OAuth2Client/build/$(CONFIGURATION)/";
+ FRAMEWORK_SEARCH_PATHS = "Outsourced/**";
FRAMEWORK_VERSION = A;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
@@ -571,7 +571,7 @@
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
- FRAMEWORK_SEARCH_PATHS = "Outsourced/OAuth2Client/build/$(CONFIGURATION)/";
+ FRAMEWORK_SEARCH_PATHS = "Outsourced/**";
FRAMEWORK_VERSION = A;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_MODEL_TUNING = G5;
Submodule JSON deleted from afa87b
Submodule JSONKit added at 524b9d
@@ -18,13 +18,13 @@
*
*/
+#import "JSONKit.h"
+
#import "iPhoneTestAppViewController.h"
#import "iPhoneTestAppAppDelegate.h"
#import "SCSoundCloudAPI+TestApp.h"
-#import "JSON/JSON.h"
-
@interface iPhoneTestAppViewController(private)
-(void)commonAwake;
@@ -64,10 +64,8 @@ - (void)requestUserInfo;
- (void)updateUserInfoFromData:(NSData *)data;
{
- NSString *dataString = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
+ id object = [data objectFromJSONData];
- id object = [dataString JSONValue];
- [dataString release];
if([object isKindOfClass:[NSDictionary class]]) {
NSDictionary *userInfoDictionary = (NSDictionary *)object;
[usernameLabel setText:[userInfoDictionary objectForKey:@"username"]];
@@ -106,7 +104,6 @@ -(void)didReceiveMemoryWarning;
- (void)soundCloudAPI:(SCSoundCloudAPI *)soundCloudAPI didFinishWithData:(NSData *)data context:(id)context userInfo:(id)userInfo;
{
- NSString *dataString = [[[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding] autorelease];
if([context isEqualToString:@"userInfo"]) {
[self updateUserInfoFromData:data];
}
@@ -116,15 +113,15 @@ - (void)soundCloudAPI:(SCSoundCloudAPI *)soundCloudAPI didFinishWithData:(NSData
return; // comment this line to add the track to the field recordings group http://sandbox-soundcloud.com/groups/field-recordings
- NSDictionary *newTrack = [dataString JSONValue];
+ NSDictionary *newTrack = [data objectFromJSONData];
NSNumber *groupId = [NSNumber numberWithInt:8]; // check group id for production
NSNumber *trackId = [newTrack objectForKey:@"id"];
[scAPI postTrackWithId:trackId toGroupWithId:groupId context:@"addToGroup"];
}
if ([context isEqualToString:@"addToGroup"]) {
- NSLog(@"%@", [dataString JSONValue]);
+ NSLog(@"%@", [data objectFromJSONData]);
}
}
@@ -12,7 +12,6 @@
2899E5220DE3E06400AC0155 /* iPhoneTestAppViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2899E5210DE3E06400AC0155 /* iPhoneTestAppViewController.xib */; };
28AD733F0D9D9553002E5188 /* MainWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = 28AD733E0D9D9553002E5188 /* MainWindow.xib */; };
28D7ACF80DDB3853001CB0EB /* iPhoneTestAppViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 28D7ACF70DDB3853001CB0EB /* iPhoneTestAppViewController.m */; };
- 94135EEC12313C5500D42EF1 /* libjson.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 94135EE712313C4C00D42EF1 /* libjson.a */; };
9431457C12393B3A00CF41D6 /* SCSoundCloudAPI+TestApp.m in Sources */ = {isa = PBXBuildFile; fileRef = 9431457B12393B3A00CF41D6 /* SCSoundCloudAPI+TestApp.m */; };
9469478F128319C1006181DF /* SoundCloud.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 9469478E128319C1006181DF /* SoundCloud.bundle */; };
948711A8124CDF9B002557D1 /* libOAuth2Client.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 9487119D124CDF8E002557D1 /* libOAuth2Client.a */; };
@@ -22,54 +21,15 @@
949C17511061052B00C4044D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 949C17501061052B00C4044D /* Foundation.framework */; };
949C17D61061055800C4044D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 949C17D51061055800C4044D /* UIKit.framework */; };
94BF8FDD11245C01002EF7F8 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 94BF8FDC11245C01002EF7F8 /* Security.framework */; };
+ 94FE06381330F7EB00AB45E2 /* CHANGELOG.md in Resources */ = {isa = PBXBuildFile; fileRef = 94FE061E1330F7EB00AB45E2 /* CHANGELOG.md */; };
+ 94FE06391330F7EB00AB45E2 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 94FE06201330F7EB00AB45E2 /* JSONKit.m */; };
+ 94FE063A1330F7EB00AB45E2 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 94FE06211330F7EB00AB45E2 /* README.md */; };
D355263B0F4D7C650074030D /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = D35526390F4D7C650074030D /* LICENSE */; };
D355263C0F4D7C650074030D /* NOTICE in Resources */ = {isa = PBXBuildFile; fileRef = D355263A0F4D7C650074030D /* NOTICE */; };
D375FD860F3B0A4D00954DE4 /* 1375_sleep_90_bpm_nylon2.wav in Resources */ = {isa = PBXBuildFile; fileRef = D375FD850F3B0A4D00954DE4 /* 1375_sleep_90_bpm_nylon2.wav */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
- 94135EE212313C4C00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 53D229810C96121600276605;
- remoteInfo = JSON;
- };
- 94135EE412313C4C00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 53D2298D0C96122A00276605;
- remoteInfo = Tests;
- };
- 94135EE612313C4C00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = FE2BBD800D8B0D3900184787;
- remoteInfo = libjson;
- };
- 94135EE812313C4C00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = FE2BBDAB0D8B0EE000184787;
- remoteInfo = libjsontests;
- };
- 94135EEA12313C4C00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 2;
- remoteGlobalIDString = 53EF4D400DC247B3005F5E6D;
- remoteInfo = bench;
- };
- 94135EED12313C5D00D42EF1 /* PBXContainerItemProxy */ = {
- isa = PBXContainerItemProxy;
- containerPortal = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- proxyType = 1;
- remoteGlobalIDString = FE2BBD7F0D8B0D3900184787;
- remoteInfo = libjson;
- };
94871193124CDF83002557D1 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 94E5AE3D122C1E8200C7021A /* SoundCloudAPI.xcodeproj */;
@@ -125,7 +85,6 @@
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
32CA4F630368D1EE00C91783 /* iPhoneTestApp_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = iPhoneTestApp_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
- 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = JSON.xcodeproj; path = ../Support/JSON/JSON.xcodeproj; sourceTree = SOURCE_ROOT; };
9431457A12393B3A00CF41D6 /* SCSoundCloudAPI+TestApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "SCSoundCloudAPI+TestApp.h"; sourceTree = "<group>"; };
9431457B12393B3A00CF41D6 /* SCSoundCloudAPI+TestApp.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "SCSoundCloudAPI+TestApp.m"; sourceTree = "<group>"; };
9469478E128319C1006181DF /* SoundCloud.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = SoundCloud.bundle; path = ../../SoundCloud.bundle; sourceTree = "<group>"; };
@@ -136,6 +95,10 @@
949C17D51061055800C4044D /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
94BF8FDC11245C01002EF7F8 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; };
94E5AE3D122C1E8200C7021A /* SoundCloudAPI.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SoundCloudAPI.xcodeproj; path = ../../SoundCloudAPI.xcodeproj; sourceTree = SOURCE_ROOT; };
+ 94FE061E1330F7EB00AB45E2 /* CHANGELOG.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CHANGELOG.md; sourceTree = "<group>"; };
+ 94FE061F1330F7EB00AB45E2 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSONKit.h; sourceTree = "<group>"; };
+ 94FE06201330F7EB00AB45E2 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = JSONKit.m; sourceTree = "<group>"; };
+ 94FE06211330F7EB00AB45E2 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
D35526390F4D7C650074030D /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
D355263A0F4D7C650074030D /* NOTICE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = NOTICE; sourceTree = "<group>"; };
D375FD850F3B0A4D00954DE4 /* 1375_sleep_90_bpm_nylon2.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = 1375_sleep_90_bpm_nylon2.wav; sourceTree = "<group>"; };
@@ -148,7 +111,6 @@
files = (
948711A8124CDF9B002557D1 /* libOAuth2Client.a in Frameworks */,
948711A9124CDF9B002557D1 /* libSoundCloudAPI.a in Frameworks */,
- 94135EEC12313C5500D42EF1 /* libjson.a in Frameworks */,
949C17511061052B00C4044D /* Foundation.framework in Frameworks */,
949C17D61061055800C4044D /* UIKit.framework in Frameworks */,
94BF8FDD11245C01002EF7F8 /* Security.framework in Frameworks */,
@@ -227,18 +189,6 @@
name = Frameworks;
sourceTree = "<group>";
};
- 94135ED512313C4B00D42EF1 /* Products */ = {
- isa = PBXGroup;
- children = (
- 94135EE312313C4C00D42EF1 /* JSON.framework */,
- 94135EE512313C4C00D42EF1 /* Tests.octest */,
- 94135EE712313C4C00D42EF1 /* libjson.a */,
- 94135EE912313C4C00D42EF1 /* libjsontests.octest */,
- 94135EEB12313C4C00D42EF1 /* bench */,
- );
- name = Products;
- sourceTree = "<group>";
- };
9431457912393B2200CF41D6 /* Additions */ = {
isa = PBXGroup;
children = (
@@ -266,12 +216,24 @@
name = Products;
sourceTree = "<group>";
};
+ 94FE05F91330F7EB00AB45E2 /* JSONKit */ = {
+ isa = PBXGroup;
+ children = (
+ 94FE061E1330F7EB00AB45E2 /* CHANGELOG.md */,
+ 94FE061F1330F7EB00AB45E2 /* JSONKit.h */,
+ 94FE06201330F7EB00AB45E2 /* JSONKit.m */,
+ 94FE06211330F7EB00AB45E2 /* README.md */,
+ );
+ name = JSONKit;
+ path = ../Support/JSONKit;
+ sourceTree = "<group>";
+ };
D3A305890F336D9800408EA8 /* Outsourced */ = {
isa = PBXGroup;
children = (
+ 94FE05F91330F7EB00AB45E2 /* JSONKit */,
9469478E128319C1006181DF /* SoundCloud.bundle */,
948866EC123A89D70085E52C /* OAuth2Client.xcodeproj */,
- 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */,
94E5AE3D122C1E8200C7021A /* SoundCloudAPI.xcodeproj */,
);
name = Outsourced;
@@ -291,7 +253,6 @@
buildRules = (
);
dependencies = (
- 94135EEE12313C5D00D42EF1 /* PBXTargetDependency */,
948711AB124CDFA3002557D1 /* PBXTargetDependency */,
948711AD124CDFA3002557D1 /* PBXTargetDependency */,
);
@@ -318,10 +279,6 @@
mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
projectDirPath = "";
projectReferences = (
- {
- ProductGroup = 94135ED512313C4B00D42EF1 /* Products */;
- ProjectRef = 94135ED412313C4B00D42EF1 /* JSON.xcodeproj */;
- },
{
ProductGroup = 94871198124CDF8E002557D1 /* Products */;
ProjectRef = 948866EC123A89D70085E52C /* OAuth2Client.xcodeproj */;
@@ -339,41 +296,6 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
- 94135EE312313C4C00D42EF1 /* JSON.framework */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.framework;
- path = JSON.framework;
- remoteRef = 94135EE212313C4C00D42EF1 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 94135EE512313C4C00D42EF1 /* Tests.octest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = Tests.octest;
- remoteRef = 94135EE412313C4C00D42EF1 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 94135EE712313C4C00D42EF1 /* libjson.a */ = {
- isa = PBXReferenceProxy;
- fileType = archive.ar;
- path = libjson.a;
- remoteRef = 94135EE612313C4C00D42EF1 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 94135EE912313C4C00D42EF1 /* libjsontests.octest */ = {
- isa = PBXReferenceProxy;
- fileType = wrapper.cfbundle;
- path = libjsontests.octest;
- remoteRef = 94135EE812313C4C00D42EF1 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
- 94135EEB12313C4C00D42EF1 /* bench */ = {
- isa = PBXReferenceProxy;
- fileType = "compiled.mach-o.executable";
- path = bench;
- remoteRef = 94135EEA12313C4C00D42EF1 /* PBXContainerItemProxy */;
- sourceTree = BUILT_PRODUCTS_DIR;
- };
94871194124CDF83002557D1 /* libSoundCloudAPI.a */ = {
isa = PBXReferenceProxy;
fileType = archive.ar;
@@ -415,6 +337,8 @@
D355263B0F4D7C650074030D /* LICENSE in Resources */,
D355263C0F4D7C650074030D /* NOTICE in Resources */,
9469478F128319C1006181DF /* SoundCloud.bundle in Resources */,
+ 94FE06381330F7EB00AB45E2 /* CHANGELOG.md in Resources */,
+ 94FE063A1330F7EB00AB45E2 /* README.md in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -429,17 +353,13 @@
1D3623260D0F684500981E51 /* iPhoneTestAppAppDelegate.m in Sources */,
28D7ACF80DDB3853001CB0EB /* iPhoneTestAppViewController.m in Sources */,
9431457C12393B3A00CF41D6 /* SCSoundCloudAPI+TestApp.m in Sources */,
+ 94FE06391330F7EB00AB45E2 /* JSONKit.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
- 94135EEE12313C5D00D42EF1 /* PBXTargetDependency */ = {
- isa = PBXTargetDependency;
- name = libjson;
- targetProxy = 94135EED12313C5D00D42EF1 /* PBXContainerItemProxy */;
- };
948711AB124CDFA3002557D1 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = OAuth2Client;
@@ -462,14 +382,13 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iPhoneTestApp_Prefix.pch;
- HEADER_SEARCH_PATHS = "Outsourced/**";
+ HEADER_SEARCH_PATHS = ../../Sources/SoundCloudAPI;
INFOPLIST_FILE = Info.plist;
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = iPhoneTestApp;
- USER_HEADER_SEARCH_PATHS = "/tmp/SoundCloudAPI.dst/usr/local/include /tmp/JSON.dst/usr/local/include";
};
name = Debug;
};
@@ -480,14 +399,13 @@
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = iPhoneTestApp_Prefix.pch;
- HEADER_SEARCH_PATHS = "Outsourced/**";
+ HEADER_SEARCH_PATHS = ../../Sources/SoundCloudAPI;
INFOPLIST_FILE = Info.plist;
OTHER_LDFLAGS = (
"-all_load",
"-ObjC",
);
PRODUCT_NAME = iPhoneTestApp;
- USER_HEADER_SEARCH_PATHS = "/tmp/SoundCloudAPI.dst/usr/local/include /tmp/JSON.dst/usr/local/include";
};
name = Release;
};

0 comments on commit 120408e

Please sign in to comment.