├── LibSoundCloud.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ ├── xcshareddata │ │ ├── EmptyProject.xccheckout │ │ └── LibSoundCloud.xccheckout │ └── xcuserdata │ │ └── xpose.xcuserdatad │ │ ├── UserInterfaceState.xcuserstate │ │ └── WorkspaceSettings.xcsettings └── xcuserdata │ └── xpose.xcuserdatad │ └── xcschemes │ ├── EmptyProject.xcscheme │ └── xcschememanagement.plist ├── LibSoundCloud ├── Images.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ └── LaunchImage.launchimage │ │ └── Contents.json ├── JSONKit.h ├── JSONKit.m ├── LibSoundCloud-Info.plist ├── LibSoundCloud-Prefix.pch ├── MainViewController.h ├── MainViewController.m ├── MainViewController.xib ├── SCLoginViewController.h ├── SoundCloud.h ├── SoundCloud.m ├── ViewAppDelegate.h ├── ViewAppDelegate.m ├── en.lproj │ └── InfoPlist.strings └── main.m ├── LibSoundCloudTests ├── EmptyProjectTests.m ├── LibSoundCloudTests-Info.plist └── en.lproj │ └── InfoPlist.strings └── README.md /LibSoundCloud.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 873BC290192F40700021F024 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC28F192F40700021F024 /* Foundation.framework */; }; 11 | 873BC292192F40700021F024 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC291192F40700021F024 /* CoreGraphics.framework */; }; 12 | 873BC294192F40700021F024 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC293192F40700021F024 /* UIKit.framework */; }; 13 | 873BC2B2192F40700021F024 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC2B1192F40700021F024 /* XCTest.framework */; }; 14 | 873BC2B3192F40700021F024 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC28F192F40700021F024 /* Foundation.framework */; }; 15 | 873BC2B4192F40700021F024 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 873BC293192F40700021F024 /* UIKit.framework */; }; 16 | 873F1961192F554100386CC1 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 873F1951192F554100386CC1 /* InfoPlist.strings */; }; 17 | 873F1962192F554100386CC1 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 873F1953192F554100386CC1 /* Images.xcassets */; }; 18 | 873F1964192F554100386CC1 /* LibSoundCloud-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 873F1956192F554100386CC1 /* LibSoundCloud-Info.plist */; }; 19 | 873F1965192F554100386CC1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1958192F554100386CC1 /* main.m */; }; 20 | 873F1966192F554100386CC1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F195A192F554100386CC1 /* MainViewController.m */; }; 21 | 873F1967192F554100386CC1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 873F195B192F554100386CC1 /* MainViewController.xib */; }; 22 | 873F1968192F554100386CC1 /* SoundCloud.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F195E192F554100386CC1 /* SoundCloud.m */; }; 23 | 873F1969192F554100386CC1 /* ViewAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1960192F554100386CC1 /* ViewAppDelegate.m */; }; 24 | 873F196E192F55E800386CC1 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1958192F554100386CC1 /* main.m */; }; 25 | 873F1970192F55E800386CC1 /* MainViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F195A192F554100386CC1 /* MainViewController.m */; }; 26 | 873F1974192F55E800386CC1 /* SoundCloud.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F195E192F554100386CC1 /* SoundCloud.m */; }; 27 | 873F1975192F55E800386CC1 /* ViewAppDelegate.h in Sources */ = {isa = PBXBuildFile; fileRef = 873F195F192F554100386CC1 /* ViewAppDelegate.h */; }; 28 | 873F1976192F55E800386CC1 /* ViewAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1960192F554100386CC1 /* ViewAppDelegate.m */; }; 29 | 873F1977192F561500386CC1 /* LibSoundCloud-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 873F1956192F554100386CC1 /* LibSoundCloud-Info.plist */; }; 30 | 873F1978192F561500386CC1 /* LibSoundCloud-Prefix.pch in Resources */ = {isa = PBXBuildFile; fileRef = 873F1957192F554100386CC1 /* LibSoundCloud-Prefix.pch */; }; 31 | 873F1979192F561500386CC1 /* MainViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 873F195B192F554100386CC1 /* MainViewController.xib */; }; 32 | 873F197A192F565F00386CC1 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1955192F554100386CC1 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 33 | 873F197B192F571D00386CC1 /* JSONKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 873F1955192F554100386CC1 /* JSONKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; 34 | /* End PBXBuildFile section */ 35 | 36 | /* Begin PBXContainerItemProxy section */ 37 | 873BC2B5192F40700021F024 /* PBXContainerItemProxy */ = { 38 | isa = PBXContainerItemProxy; 39 | containerPortal = 873BC284192F40700021F024 /* Project object */; 40 | proxyType = 1; 41 | remoteGlobalIDString = 873BC28B192F40700021F024; 42 | remoteInfo = EmptyProject; 43 | }; 44 | /* End PBXContainerItemProxy section */ 45 | 46 | /* Begin PBXFileReference section */ 47 | 873BC28C192F40700021F024 /* LibSoundCloud.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = LibSoundCloud.app; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 873BC28F192F40700021F024 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 49 | 873BC291192F40700021F024 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 50 | 873BC293192F40700021F024 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 51 | 873BC2B0192F40700021F024 /* LibSoundCloudTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = LibSoundCloudTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 52 | 873BC2B1192F40700021F024 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 53 | 873F1952192F554100386CC1 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = InfoPlist.strings; sourceTree = ""; }; 54 | 873F1953192F554100386CC1 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = LibSoundCloud/Images.xcassets; sourceTree = SOURCE_ROOT; }; 55 | 873F1954192F554100386CC1 /* JSONKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = JSONKit.h; path = LibSoundCloud/JSONKit.h; sourceTree = SOURCE_ROOT; }; 56 | 873F1955192F554100386CC1 /* JSONKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = JSONKit.m; path = LibSoundCloud/JSONKit.m; sourceTree = SOURCE_ROOT; }; 57 | 873F1956192F554100386CC1 /* LibSoundCloud-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = "LibSoundCloud-Info.plist"; path = "LibSoundCloud/LibSoundCloud-Info.plist"; sourceTree = SOURCE_ROOT; }; 58 | 873F1957192F554100386CC1 /* LibSoundCloud-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "LibSoundCloud-Prefix.pch"; path = "LibSoundCloud/LibSoundCloud-Prefix.pch"; sourceTree = SOURCE_ROOT; }; 59 | 873F1958192F554100386CC1 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = LibSoundCloud/main.m; sourceTree = SOURCE_ROOT; }; 60 | 873F1959192F554100386CC1 /* MainViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainViewController.h; path = LibSoundCloud/MainViewController.h; sourceTree = SOURCE_ROOT; }; 61 | 873F195A192F554100386CC1 /* MainViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MainViewController.m; path = LibSoundCloud/MainViewController.m; sourceTree = SOURCE_ROOT; }; 62 | 873F195B192F554100386CC1 /* MainViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = MainViewController.xib; path = LibSoundCloud/MainViewController.xib; sourceTree = SOURCE_ROOT; }; 63 | 873F195C192F554100386CC1 /* SCLoginViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCLoginViewController.h; path = LibSoundCloud/SCLoginViewController.h; sourceTree = SOURCE_ROOT; }; 64 | 873F195D192F554100386CC1 /* SoundCloud.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SoundCloud.h; path = LibSoundCloud/SoundCloud.h; sourceTree = SOURCE_ROOT; }; 65 | 873F195E192F554100386CC1 /* SoundCloud.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SoundCloud.m; path = LibSoundCloud/SoundCloud.m; sourceTree = SOURCE_ROOT; }; 66 | 873F195F192F554100386CC1 /* ViewAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewAppDelegate.h; path = LibSoundCloud/ViewAppDelegate.h; sourceTree = SOURCE_ROOT; }; 67 | 873F1960192F554100386CC1 /* ViewAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ViewAppDelegate.m; path = LibSoundCloud/ViewAppDelegate.m; sourceTree = SOURCE_ROOT; }; 68 | /* End PBXFileReference section */ 69 | 70 | /* Begin PBXFrameworksBuildPhase section */ 71 | 873BC289192F40700021F024 /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | 873BC292192F40700021F024 /* CoreGraphics.framework in Frameworks */, 76 | 873BC294192F40700021F024 /* UIKit.framework in Frameworks */, 77 | 873BC290192F40700021F024 /* Foundation.framework in Frameworks */, 78 | ); 79 | runOnlyForDeploymentPostprocessing = 0; 80 | }; 81 | 873BC2AD192F40700021F024 /* Frameworks */ = { 82 | isa = PBXFrameworksBuildPhase; 83 | buildActionMask = 2147483647; 84 | files = ( 85 | 873BC2B2192F40700021F024 /* XCTest.framework in Frameworks */, 86 | 873BC2B4192F40700021F024 /* UIKit.framework in Frameworks */, 87 | 873BC2B3192F40700021F024 /* Foundation.framework in Frameworks */, 88 | ); 89 | runOnlyForDeploymentPostprocessing = 0; 90 | }; 91 | /* End PBXFrameworksBuildPhase section */ 92 | 93 | /* Begin PBXGroup section */ 94 | 873BC283192F40700021F024 = { 95 | isa = PBXGroup; 96 | children = ( 97 | 873BC295192F40700021F024 /* LibSoundCloud */, 98 | 873BC28E192F40700021F024 /* Frameworks */, 99 | 873BC28D192F40700021F024 /* Products */, 100 | ); 101 | sourceTree = ""; 102 | }; 103 | 873BC28D192F40700021F024 /* Products */ = { 104 | isa = PBXGroup; 105 | children = ( 106 | 873BC28C192F40700021F024 /* LibSoundCloud.app */, 107 | 873BC2B0192F40700021F024 /* LibSoundCloudTests.xctest */, 108 | ); 109 | name = Products; 110 | sourceTree = ""; 111 | }; 112 | 873BC28E192F40700021F024 /* Frameworks */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 873BC28F192F40700021F024 /* Foundation.framework */, 116 | 873BC291192F40700021F024 /* CoreGraphics.framework */, 117 | 873BC293192F40700021F024 /* UIKit.framework */, 118 | 873BC2B1192F40700021F024 /* XCTest.framework */, 119 | ); 120 | name = Frameworks; 121 | sourceTree = ""; 122 | }; 123 | 873BC295192F40700021F024 /* LibSoundCloud */ = { 124 | isa = PBXGroup; 125 | children = ( 126 | 873F194F192F554100386CC1 /* Base.lproj */, 127 | 873F1950192F554100386CC1 /* en.lproj */, 128 | 873F1953192F554100386CC1 /* Images.xcassets */, 129 | 873F1954192F554100386CC1 /* JSONKit.h */, 130 | 873F1955192F554100386CC1 /* JSONKit.m */, 131 | 873F1956192F554100386CC1 /* LibSoundCloud-Info.plist */, 132 | 873F1957192F554100386CC1 /* LibSoundCloud-Prefix.pch */, 133 | 873F1958192F554100386CC1 /* main.m */, 134 | 873F1959192F554100386CC1 /* MainViewController.h */, 135 | 873F195A192F554100386CC1 /* MainViewController.m */, 136 | 873F195B192F554100386CC1 /* MainViewController.xib */, 137 | 873F195C192F554100386CC1 /* SCLoginViewController.h */, 138 | 873F195D192F554100386CC1 /* SoundCloud.h */, 139 | 873F195E192F554100386CC1 /* SoundCloud.m */, 140 | 873F195F192F554100386CC1 /* ViewAppDelegate.h */, 141 | 873F1960192F554100386CC1 /* ViewAppDelegate.m */, 142 | ); 143 | name = LibSoundCloud; 144 | path = EmptyProject; 145 | sourceTree = ""; 146 | }; 147 | 873F194F192F554100386CC1 /* Base.lproj */ = { 148 | isa = PBXGroup; 149 | children = ( 150 | ); 151 | name = Base.lproj; 152 | path = LibSoundCloud/Base.lproj; 153 | sourceTree = SOURCE_ROOT; 154 | }; 155 | 873F1950192F554100386CC1 /* en.lproj */ = { 156 | isa = PBXGroup; 157 | children = ( 158 | 873F1951192F554100386CC1 /* InfoPlist.strings */, 159 | ); 160 | name = en.lproj; 161 | path = LibSoundCloud/en.lproj; 162 | sourceTree = SOURCE_ROOT; 163 | }; 164 | /* End PBXGroup section */ 165 | 166 | /* Begin PBXNativeTarget section */ 167 | 873BC28B192F40700021F024 /* LibSoundCloud */ = { 168 | isa = PBXNativeTarget; 169 | buildConfigurationList = 873BC2C1192F40700021F024 /* Build configuration list for PBXNativeTarget "LibSoundCloud" */; 170 | buildPhases = ( 171 | 873BC288192F40700021F024 /* Sources */, 172 | 873BC289192F40700021F024 /* Frameworks */, 173 | 873BC28A192F40700021F024 /* Resources */, 174 | ); 175 | buildRules = ( 176 | ); 177 | dependencies = ( 178 | ); 179 | name = LibSoundCloud; 180 | productName = EmptyProject; 181 | productReference = 873BC28C192F40700021F024 /* LibSoundCloud.app */; 182 | productType = "com.apple.product-type.application"; 183 | }; 184 | 873BC2AF192F40700021F024 /* LibSoundCloudTests */ = { 185 | isa = PBXNativeTarget; 186 | buildConfigurationList = 873BC2C4192F40700021F024 /* Build configuration list for PBXNativeTarget "LibSoundCloudTests" */; 187 | buildPhases = ( 188 | 873BC2AC192F40700021F024 /* Sources */, 189 | 873BC2AD192F40700021F024 /* Frameworks */, 190 | 873BC2AE192F40700021F024 /* Resources */, 191 | ); 192 | buildRules = ( 193 | ); 194 | dependencies = ( 195 | 873BC2B6192F40700021F024 /* PBXTargetDependency */, 196 | ); 197 | name = LibSoundCloudTests; 198 | productName = EmptyProjectTests; 199 | productReference = 873BC2B0192F40700021F024 /* LibSoundCloudTests.xctest */; 200 | productType = "com.apple.product-type.bundle.unit-test"; 201 | }; 202 | /* End PBXNativeTarget section */ 203 | 204 | /* Begin PBXProject section */ 205 | 873BC284192F40700021F024 /* Project object */ = { 206 | isa = PBXProject; 207 | attributes = { 208 | CLASSPREFIX = View; 209 | LastUpgradeCheck = 0510; 210 | ORGANIZATIONNAME = Stofkat; 211 | TargetAttributes = { 212 | 873BC2AF192F40700021F024 = { 213 | TestTargetID = 873BC28B192F40700021F024; 214 | }; 215 | }; 216 | }; 217 | buildConfigurationList = 873BC287192F40700021F024 /* Build configuration list for PBXProject "LibSoundCloud" */; 218 | compatibilityVersion = "Xcode 3.2"; 219 | developmentRegion = English; 220 | hasScannedForEncodings = 0; 221 | knownRegions = ( 222 | en, 223 | Base, 224 | ); 225 | mainGroup = 873BC283192F40700021F024; 226 | productRefGroup = 873BC28D192F40700021F024 /* Products */; 227 | projectDirPath = ""; 228 | projectRoot = ""; 229 | targets = ( 230 | 873BC28B192F40700021F024 /* LibSoundCloud */, 231 | 873BC2AF192F40700021F024 /* LibSoundCloudTests */, 232 | ); 233 | }; 234 | /* End PBXProject section */ 235 | 236 | /* Begin PBXResourcesBuildPhase section */ 237 | 873BC28A192F40700021F024 /* Resources */ = { 238 | isa = PBXResourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 873F1964192F554100386CC1 /* LibSoundCloud-Info.plist in Resources */, 242 | 873F1962192F554100386CC1 /* Images.xcassets in Resources */, 243 | 873F1961192F554100386CC1 /* InfoPlist.strings in Resources */, 244 | 873F1967192F554100386CC1 /* MainViewController.xib in Resources */, 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | }; 248 | 873BC2AE192F40700021F024 /* Resources */ = { 249 | isa = PBXResourcesBuildPhase; 250 | buildActionMask = 2147483647; 251 | files = ( 252 | 873F1977192F561500386CC1 /* LibSoundCloud-Info.plist in Resources */, 253 | 873F1978192F561500386CC1 /* LibSoundCloud-Prefix.pch in Resources */, 254 | 873F1979192F561500386CC1 /* MainViewController.xib in Resources */, 255 | ); 256 | runOnlyForDeploymentPostprocessing = 0; 257 | }; 258 | /* End PBXResourcesBuildPhase section */ 259 | 260 | /* Begin PBXSourcesBuildPhase section */ 261 | 873BC288192F40700021F024 /* Sources */ = { 262 | isa = PBXSourcesBuildPhase; 263 | buildActionMask = 2147483647; 264 | files = ( 265 | 873F197B192F571D00386CC1 /* JSONKit.m in Sources */, 266 | 873F1966192F554100386CC1 /* MainViewController.m in Sources */, 267 | 873F1969192F554100386CC1 /* ViewAppDelegate.m in Sources */, 268 | 873F1968192F554100386CC1 /* SoundCloud.m in Sources */, 269 | 873F1965192F554100386CC1 /* main.m in Sources */, 270 | ); 271 | runOnlyForDeploymentPostprocessing = 0; 272 | }; 273 | 873BC2AC192F40700021F024 /* Sources */ = { 274 | isa = PBXSourcesBuildPhase; 275 | buildActionMask = 2147483647; 276 | files = ( 277 | 873F197A192F565F00386CC1 /* JSONKit.m in Sources */, 278 | 873F196E192F55E800386CC1 /* main.m in Sources */, 279 | 873F1970192F55E800386CC1 /* MainViewController.m in Sources */, 280 | 873F1974192F55E800386CC1 /* SoundCloud.m in Sources */, 281 | 873F1975192F55E800386CC1 /* ViewAppDelegate.h in Sources */, 282 | 873F1976192F55E800386CC1 /* ViewAppDelegate.m in Sources */, 283 | ); 284 | runOnlyForDeploymentPostprocessing = 0; 285 | }; 286 | /* End PBXSourcesBuildPhase section */ 287 | 288 | /* Begin PBXTargetDependency section */ 289 | 873BC2B6192F40700021F024 /* PBXTargetDependency */ = { 290 | isa = PBXTargetDependency; 291 | target = 873BC28B192F40700021F024 /* LibSoundCloud */; 292 | targetProxy = 873BC2B5192F40700021F024 /* PBXContainerItemProxy */; 293 | }; 294 | /* End PBXTargetDependency section */ 295 | 296 | /* Begin PBXVariantGroup section */ 297 | 873F1951192F554100386CC1 /* InfoPlist.strings */ = { 298 | isa = PBXVariantGroup; 299 | children = ( 300 | 873F1952192F554100386CC1 /* en */, 301 | ); 302 | name = InfoPlist.strings; 303 | sourceTree = ""; 304 | }; 305 | /* End PBXVariantGroup section */ 306 | 307 | /* Begin XCBuildConfiguration section */ 308 | 873BC2BF192F40700021F024 /* Debug */ = { 309 | isa = XCBuildConfiguration; 310 | buildSettings = { 311 | ALWAYS_SEARCH_USER_PATHS = NO; 312 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 313 | CLANG_CXX_LIBRARY = "libc++"; 314 | CLANG_ENABLE_MODULES = YES; 315 | CLANG_ENABLE_OBJC_ARC = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_CONSTANT_CONVERSION = YES; 318 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 319 | CLANG_WARN_EMPTY_BODY = YES; 320 | CLANG_WARN_ENUM_CONVERSION = YES; 321 | CLANG_WARN_INT_CONVERSION = YES; 322 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 323 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 324 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 325 | COPY_PHASE_STRIP = NO; 326 | GCC_C_LANGUAGE_STANDARD = gnu99; 327 | GCC_DYNAMIC_NO_PIC = NO; 328 | GCC_OPTIMIZATION_LEVEL = 0; 329 | GCC_PREPROCESSOR_DEFINITIONS = ( 330 | "DEBUG=1", 331 | "$(inherited)", 332 | ); 333 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 334 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 335 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 336 | GCC_WARN_UNDECLARED_SELECTOR = YES; 337 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 338 | GCC_WARN_UNUSED_FUNCTION = YES; 339 | GCC_WARN_UNUSED_VARIABLE = YES; 340 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 341 | ONLY_ACTIVE_ARCH = YES; 342 | SDKROOT = iphoneos; 343 | TARGETED_DEVICE_FAMILY = "1,2"; 344 | }; 345 | name = Debug; 346 | }; 347 | 873BC2C0192F40700021F024 /* Release */ = { 348 | isa = XCBuildConfiguration; 349 | buildSettings = { 350 | ALWAYS_SEARCH_USER_PATHS = NO; 351 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 352 | CLANG_CXX_LIBRARY = "libc++"; 353 | CLANG_ENABLE_MODULES = YES; 354 | CLANG_ENABLE_OBJC_ARC = YES; 355 | CLANG_WARN_BOOL_CONVERSION = YES; 356 | CLANG_WARN_CONSTANT_CONVERSION = YES; 357 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 358 | CLANG_WARN_EMPTY_BODY = YES; 359 | CLANG_WARN_ENUM_CONVERSION = YES; 360 | CLANG_WARN_INT_CONVERSION = YES; 361 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 364 | COPY_PHASE_STRIP = YES; 365 | ENABLE_NS_ASSERTIONS = NO; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 368 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 369 | GCC_WARN_UNDECLARED_SELECTOR = YES; 370 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 371 | GCC_WARN_UNUSED_FUNCTION = YES; 372 | GCC_WARN_UNUSED_VARIABLE = YES; 373 | IPHONEOS_DEPLOYMENT_TARGET = 7.1; 374 | SDKROOT = iphoneos; 375 | TARGETED_DEVICE_FAMILY = "1,2"; 376 | VALIDATE_PRODUCT = YES; 377 | }; 378 | name = Release; 379 | }; 380 | 873BC2C2192F40700021F024 /* Debug */ = { 381 | isa = XCBuildConfiguration; 382 | buildSettings = { 383 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 384 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 385 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 386 | GCC_PREFIX_HEADER = "LibSoundCloud/LibSoundCloud-Prefix.pch"; 387 | INFOPLIST_FILE = "$(SRCROOT)/LibSoundCloud/LibSoundCloud-Info.plist"; 388 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 389 | PRODUCT_NAME = LibSoundCloud; 390 | WRAPPER_EXTENSION = app; 391 | }; 392 | name = Debug; 393 | }; 394 | 873BC2C3192F40700021F024 /* Release */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 398 | ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage; 399 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 400 | GCC_PREFIX_HEADER = "LibSoundCloud/LibSoundCloud-Prefix.pch"; 401 | INFOPLIST_FILE = "$(SRCROOT)/LibSoundCloud/LibSoundCloud-Info.plist"; 402 | IPHONEOS_DEPLOYMENT_TARGET = 6.0; 403 | PRODUCT_NAME = LibSoundCloud; 404 | WRAPPER_EXTENSION = app; 405 | }; 406 | name = Release; 407 | }; 408 | 873BC2C5192F40700021F024 /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | buildSettings = { 411 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/LibSoundCloud.app/LibSoundCloud"; 412 | FRAMEWORK_SEARCH_PATHS = ( 413 | "$(SDKROOT)/Developer/Library/Frameworks", 414 | "$(inherited)", 415 | "$(DEVELOPER_FRAMEWORKS_DIR)", 416 | ); 417 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 418 | GCC_PREFIX_HEADER = "EmptyProject/EmptyProject-Prefix.pch"; 419 | GCC_PREPROCESSOR_DEFINITIONS = ( 420 | "DEBUG=1", 421 | "$(inherited)", 422 | ); 423 | INFOPLIST_FILE = "EmptyProjectTests/LibSoundCloudTests-Info.plist"; 424 | PRODUCT_NAME = LibSoundCloudTests; 425 | TEST_HOST = "$(BUNDLE_LOADER)"; 426 | WRAPPER_EXTENSION = xctest; 427 | }; 428 | name = Debug; 429 | }; 430 | 873BC2C6192F40700021F024 /* Release */ = { 431 | isa = XCBuildConfiguration; 432 | buildSettings = { 433 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/LibSoundCloud.app/LibSoundCloud"; 434 | FRAMEWORK_SEARCH_PATHS = ( 435 | "$(SDKROOT)/Developer/Library/Frameworks", 436 | "$(inherited)", 437 | "$(DEVELOPER_FRAMEWORKS_DIR)", 438 | ); 439 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 440 | GCC_PREFIX_HEADER = "EmptyProject/EmptyProject-Prefix.pch"; 441 | INFOPLIST_FILE = "EmptyProjectTests/LibSoundCloudTests-Info.plist"; 442 | PRODUCT_NAME = LibSoundCloudTests; 443 | TEST_HOST = "$(BUNDLE_LOADER)"; 444 | WRAPPER_EXTENSION = xctest; 445 | }; 446 | name = Release; 447 | }; 448 | /* End XCBuildConfiguration section */ 449 | 450 | /* Begin XCConfigurationList section */ 451 | 873BC287192F40700021F024 /* Build configuration list for PBXProject "LibSoundCloud" */ = { 452 | isa = XCConfigurationList; 453 | buildConfigurations = ( 454 | 873BC2BF192F40700021F024 /* Debug */, 455 | 873BC2C0192F40700021F024 /* Release */, 456 | ); 457 | defaultConfigurationIsVisible = 0; 458 | defaultConfigurationName = Release; 459 | }; 460 | 873BC2C1192F40700021F024 /* Build configuration list for PBXNativeTarget "LibSoundCloud" */ = { 461 | isa = XCConfigurationList; 462 | buildConfigurations = ( 463 | 873BC2C2192F40700021F024 /* Debug */, 464 | 873BC2C3192F40700021F024 /* Release */, 465 | ); 466 | defaultConfigurationIsVisible = 0; 467 | defaultConfigurationName = Release; 468 | }; 469 | 873BC2C4192F40700021F024 /* Build configuration list for PBXNativeTarget "LibSoundCloudTests" */ = { 470 | isa = XCConfigurationList; 471 | buildConfigurations = ( 472 | 873BC2C5192F40700021F024 /* Debug */, 473 | 873BC2C6192F40700021F024 /* Release */, 474 | ); 475 | defaultConfigurationIsVisible = 0; 476 | defaultConfigurationName = Release; 477 | }; 478 | /* End XCConfigurationList section */ 479 | }; 480 | rootObject = 873BC284192F40700021F024 /* Project object */; 481 | } 482 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/project.xcworkspace/xcshareddata/EmptyProject.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 3547A789-04B1-4F0B-B1F5-891BBFFC734A 9 | IDESourceControlProjectName 10 | EmptyProject 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 773DA8CE-D220-460A-8F66-29C57B5D83BC 14 | https://github.com/MrStofkat/LibSoundCloud-iOS.git 15 | 16 | IDESourceControlProjectPath 17 | EmptyProject.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 773DA8CE-D220-460A-8F66-29C57B5D83BC 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/MrStofkat/LibSoundCloud-iOS.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 773DA8CE-D220-460A-8F66-29C57B5D83BC 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 773DA8CE-D220-460A-8F66-29C57B5D83BC 36 | IDESourceControlWCCName 37 | LibSoundCloud-iOS 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/project.xcworkspace/xcshareddata/LibSoundCloud.xccheckout: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDESourceControlProjectFavoriteDictionaryKey 6 | 7 | IDESourceControlProjectIdentifier 8 | 65976A18-64FA-4EBA-A24D-B2B82F369374 9 | IDESourceControlProjectName 10 | LibSoundCloud 11 | IDESourceControlProjectOriginsDictionary 12 | 13 | 71A00DD3-51A4-4F09-A5D9-C8A3413D3DE9 14 | https://github.com/MrStofkat/LibSoundCloud-iOS.git 15 | 16 | IDESourceControlProjectPath 17 | LibSoundCloud.xcodeproj/project.xcworkspace 18 | IDESourceControlProjectRelativeInstallPathDictionary 19 | 20 | 71A00DD3-51A4-4F09-A5D9-C8A3413D3DE9 21 | ../.. 22 | 23 | IDESourceControlProjectURL 24 | https://github.com/MrStofkat/LibSoundCloud-iOS.git 25 | IDESourceControlProjectVersion 26 | 110 27 | IDESourceControlProjectWCCIdentifier 28 | 71A00DD3-51A4-4F09-A5D9-C8A3413D3DE9 29 | IDESourceControlProjectWCConfigurations 30 | 31 | 32 | IDESourceControlRepositoryExtensionIdentifierKey 33 | public.vcs.git 34 | IDESourceControlWCCIdentifierKey 35 | 71A00DD3-51A4-4F09-A5D9-C8A3413D3DE9 36 | IDESourceControlWCCName 37 | LibSoundCloud-iOS 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/project.xcworkspace/xcuserdata/xpose.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Stofkat/LibSoundCloud-iOS/bde45315a48ed8fe42a2818c793b28bec1b5253e/LibSoundCloud.xcodeproj/project.xcworkspace/xcuserdata/xpose.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/project.xcworkspace/xcuserdata/xpose.xcuserdatad/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges 6 | 7 | SnapshotAutomaticallyBeforeSignificantChanges 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/xcuserdata/xpose.xcuserdatad/xcschemes/EmptyProject.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 49 | 50 | 51 | 52 | 61 | 62 | 68 | 69 | 70 | 71 | 72 | 73 | 79 | 80 | 86 | 87 | 88 | 89 | 91 | 92 | 95 | 96 | 97 | -------------------------------------------------------------------------------- /LibSoundCloud.xcodeproj/xcuserdata/xpose.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | EmptyProject.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 873BC28B192F40700021F024 16 | 17 | primary 18 | 19 | 20 | 873BC2AF192F40700021F024 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /LibSoundCloud/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "40x40", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "60x60", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "ipad", 20 | "size" : "29x29", 21 | "scale" : "1x" 22 | }, 23 | { 24 | "idiom" : "ipad", 25 | "size" : "29x29", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "ipad", 30 | "size" : "40x40", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "40x40", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "76x76", 41 | "scale" : "1x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "76x76", 46 | "scale" : "2x" 47 | } 48 | ], 49 | "info" : { 50 | "version" : 1, 51 | "author" : "xcode" 52 | } 53 | } -------------------------------------------------------------------------------- /LibSoundCloud/Images.xcassets/LaunchImage.launchimage/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "orientation" : "portrait", 5 | "idiom" : "iphone", 6 | "extent" : "full-screen", 7 | "minimum-system-version" : "7.0", 8 | "scale" : "2x" 9 | }, 10 | { 11 | "orientation" : "portrait", 12 | "idiom" : "iphone", 13 | "subtype" : "retina4", 14 | "extent" : "full-screen", 15 | "minimum-system-version" : "7.0", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "orientation" : "portrait", 20 | "idiom" : "ipad", 21 | "extent" : "full-screen", 22 | "minimum-system-version" : "7.0", 23 | "scale" : "1x" 24 | }, 25 | { 26 | "orientation" : "landscape", 27 | "idiom" : "ipad", 28 | "extent" : "full-screen", 29 | "minimum-system-version" : "7.0", 30 | "scale" : "1x" 31 | }, 32 | { 33 | "orientation" : "portrait", 34 | "idiom" : "ipad", 35 | "extent" : "full-screen", 36 | "minimum-system-version" : "7.0", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "orientation" : "landscape", 41 | "idiom" : "ipad", 42 | "extent" : "full-screen", 43 | "minimum-system-version" : "7.0", 44 | "scale" : "2x" 45 | } 46 | ], 47 | "info" : { 48 | "version" : 1, 49 | "author" : "xcode" 50 | } 51 | } -------------------------------------------------------------------------------- /LibSoundCloud/JSONKit.h: -------------------------------------------------------------------------------- 1 | // 2 | // JSONKit.h 3 | // http://github.com/johnezang/JSONKit 4 | // Dual licensed under either the terms of the BSD License, or alternatively 5 | // under the terms of the Apache License, Version 2.0, as specified below. 6 | // 7 | 8 | /* 9 | Copyright (c) 2011, John Engelhart 10 | 11 | All rights reserved. 12 | 13 | Redistribution and use in source and binary forms, with or without 14 | modification, are permitted provided that the following conditions are met: 15 | 16 | * Redistributions of source code must retain the above copyright 17 | notice, this list of conditions and the following disclaimer. 18 | 19 | * Redistributions in binary form must reproduce the above copyright 20 | notice, this list of conditions and the following disclaimer in the 21 | documentation and/or other materials provided with the distribution. 22 | 23 | * Neither the name of the Zang Industries nor the names of its 24 | contributors may be used to endorse or promote products derived from 25 | this software without specific prior written permission. 26 | 27 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 28 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 29 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 30 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 31 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 32 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 33 | TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 34 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 35 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 36 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 37 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 38 | */ 39 | 40 | /* 41 | Copyright 2011 John Engelhart 42 | 43 | Licensed under the Apache License, Version 2.0 (the "License"); 44 | you may not use this file except in compliance with the License. 45 | You may obtain a copy of the License at 46 | 47 | http://www.apache.org/licenses/LICENSE-2.0 48 | 49 | Unless required by applicable law or agreed to in writing, software 50 | distributed under the License is distributed on an "AS IS" BASIS, 51 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 52 | See the License for the specific language governing permissions and 53 | limitations under the License. 54 | */ 55 | 56 | #include 57 | #include 58 | #include 59 | #include 60 | #include 61 | 62 | #ifdef __OBJC__ 63 | #import 64 | #import 65 | #import 66 | #import 67 | #import 68 | #import 69 | #endif // __OBJC__ 70 | 71 | #ifdef __cplusplus 72 | extern "C" { 73 | #endif 74 | 75 | 76 | // For Mac OS X < 10.5. 77 | #ifndef NSINTEGER_DEFINED 78 | #define NSINTEGER_DEFINED 79 | #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 80 | typedef long NSInteger; 81 | typedef unsigned long NSUInteger; 82 | #define NSIntegerMin LONG_MIN 83 | #define NSIntegerMax LONG_MAX 84 | #define NSUIntegerMax ULONG_MAX 85 | #else // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 86 | typedef int NSInteger; 87 | typedef unsigned int NSUInteger; 88 | #define NSIntegerMin INT_MIN 89 | #define NSIntegerMax INT_MAX 90 | #define NSUIntegerMax UINT_MAX 91 | #endif // defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) 92 | #endif // NSINTEGER_DEFINED 93 | 94 | 95 | #ifndef _JSONKIT_H_ 96 | #define _JSONKIT_H_ 97 | 98 | #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__APPLE_CC__) && (__APPLE_CC__ >= 5465) 99 | #define JK_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) 100 | #else 101 | #define JK_DEPRECATED_ATTRIBUTE 102 | #endif 103 | 104 | #define JSONKIT_VERSION_MAJOR 1 105 | #define JSONKIT_VERSION_MINOR 4 106 | 107 | typedef NSUInteger JKFlags; 108 | 109 | /* 110 | JKParseOptionComments : Allow C style // and /_* ... *_/ (without a _, obviously) comments in JSON. 111 | JKParseOptionUnicodeNewlines : Allow Unicode recommended (?:\r\n|[\n\v\f\r\x85\p{Zl}\p{Zp}]) newlines. 112 | JKParseOptionLooseUnicode : Normally the decoder will stop with an error at any malformed Unicode. 113 | This option allows JSON with malformed Unicode to be parsed without reporting an error. 114 | Any malformed Unicode is replaced with \uFFFD, or "REPLACEMENT CHARACTER". 115 | */ 116 | 117 | enum { 118 | JKParseOptionNone = 0, 119 | JKParseOptionStrict = 0, 120 | JKParseOptionComments = (1 << 0), 121 | JKParseOptionUnicodeNewlines = (1 << 1), 122 | JKParseOptionLooseUnicode = (1 << 2), 123 | JKParseOptionPermitTextAfterValidJSON = (1 << 3), 124 | JKParseOptionValidFlags = (JKParseOptionComments | JKParseOptionUnicodeNewlines | JKParseOptionLooseUnicode | JKParseOptionPermitTextAfterValidJSON), 125 | }; 126 | typedef JKFlags JKParseOptionFlags; 127 | 128 | enum { 129 | JKSerializeOptionNone = 0, 130 | JKSerializeOptionPretty = (1 << 0), 131 | JKSerializeOptionEscapeUnicode = (1 << 1), 132 | JKSerializeOptionEscapeForwardSlashes = (1 << 4), 133 | JKSerializeOptionValidFlags = (JKSerializeOptionPretty | JKSerializeOptionEscapeUnicode | JKSerializeOptionEscapeForwardSlashes), 134 | }; 135 | typedef JKFlags JKSerializeOptionFlags; 136 | 137 | #ifdef __OBJC__ 138 | 139 | typedef struct JKParseState JKParseState; // Opaque internal, private type. 140 | 141 | // As a general rule of thumb, if you use a method that doesn't accept a JKParseOptionFlags argument, it defaults to JKParseOptionStrict 142 | 143 | @interface JSONDecoder : NSObject { 144 | JKParseState *parseState; 145 | } 146 | + (id)decoder; 147 | + (id)decoderWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 148 | - (id)initWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 149 | - (void)clearCache; 150 | 151 | // The parse... methods were deprecated in v1.4 in favor of the v1.4 objectWith... methods. 152 | - (id)parseUTF8String:(const unsigned char *)string length:(size_t)length JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length: instead. 153 | - (id)parseUTF8String:(const unsigned char *)string length:(size_t)length error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithUTF8String:length:error: instead. 154 | // The NSData MUST be UTF8 encoded JSON. 155 | - (id)parseJSONData:(NSData *)jsonData JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData: instead. 156 | - (id)parseJSONData:(NSData *)jsonData error:(NSError **)error JK_DEPRECATED_ATTRIBUTE; // Deprecated in JSONKit v1.4. Use objectWithData:error: instead. 157 | 158 | // Methods that return immutable collection objects. 159 | - (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length; 160 | - (id)objectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error; 161 | // The NSData MUST be UTF8 encoded JSON. 162 | - (id)objectWithData:(NSData *)jsonData; 163 | - (id)objectWithData:(NSData *)jsonData error:(NSError **)error; 164 | 165 | // Methods that return mutable collection objects. 166 | - (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length; 167 | - (id)mutableObjectWithUTF8String:(const unsigned char *)string length:(NSUInteger)length error:(NSError **)error; 168 | // The NSData MUST be UTF8 encoded JSON. 169 | - (id)mutableObjectWithData:(NSData *)jsonData; 170 | - (id)mutableObjectWithData:(NSData *)jsonData error:(NSError **)error; 171 | 172 | @end 173 | 174 | //////////// 175 | #pragma mark Deserializing methods 176 | //////////// 177 | 178 | @interface NSString (JSONKitDeserializing) 179 | - (id)objectFromJSONString; 180 | - (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 181 | - (id)objectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; 182 | - (id)mutableObjectFromJSONString; 183 | - (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 184 | - (id)mutableObjectFromJSONStringWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; 185 | @end 186 | 187 | @interface NSData (JSONKitDeserializing) 188 | // The NSData MUST be UTF8 encoded JSON. 189 | - (id)objectFromJSONData; 190 | - (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 191 | - (id)objectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; 192 | - (id)mutableObjectFromJSONData; 193 | - (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags; 194 | - (id)mutableObjectFromJSONDataWithParseOptions:(JKParseOptionFlags)parseOptionFlags error:(NSError **)error; 195 | @end 196 | 197 | //////////// 198 | #pragma mark Serializing methods 199 | //////////// 200 | 201 | @interface NSString (JSONKitSerializing) 202 | // Convenience methods for those that need to serialize the receiving NSString (i.e., instead of having to serialize a NSArray with a single NSString, you can "serialize to JSON" just the NSString). 203 | // Normally, a string that is serialized to JSON has quotation marks surrounding it, which you may or may not want when serializing a single string, and can be controlled with includeQuotes: 204 | // includeQuotes:YES `a "test"...` -> `"a \"test\"..."` 205 | // includeQuotes:NO `a "test"...` -> `a \"test\"...` 206 | - (NSData *)JSONData; // Invokes JSONDataWithOptions:JKSerializeOptionNone includeQuotes:YES 207 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error; 208 | - (NSString *)JSONString; // Invokes JSONStringWithOptions:JKSerializeOptionNone includeQuotes:YES 209 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions includeQuotes:(BOOL)includeQuotes error:(NSError **)error; 210 | @end 211 | 212 | @interface NSArray (JSONKitSerializing) 213 | - (NSData *)JSONData; 214 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; 215 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; 216 | - (NSString *)JSONString; 217 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; 218 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; 219 | @end 220 | 221 | @interface NSDictionary (JSONKitSerializing) 222 | - (NSData *)JSONData; 223 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; 224 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; 225 | - (NSString *)JSONString; 226 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions error:(NSError **)error; 227 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingDelegate:(id)delegate selector:(SEL)selector error:(NSError **)error; 228 | @end 229 | 230 | #ifdef __BLOCKS__ 231 | 232 | @interface NSArray (JSONKitSerializingBlockAdditions) 233 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; 234 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; 235 | @end 236 | 237 | @interface NSDictionary (JSONKitSerializingBlockAdditions) 238 | - (NSData *)JSONDataWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; 239 | - (NSString *)JSONStringWithOptions:(JKSerializeOptionFlags)serializeOptions serializeUnsupportedClassesUsingBlock:(id(^)(id object))block error:(NSError **)error; 240 | @end 241 | 242 | #endif 243 | 244 | 245 | #endif // __OBJC__ 246 | 247 | #endif // _JSONKIT_H_ 248 | 249 | #ifdef __cplusplus 250 | } // extern "C" 251 | #endif 252 | -------------------------------------------------------------------------------- /LibSoundCloud/LibSoundCloud-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | com.Stofkat.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarHidden 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | UIViewControllerBasedStatusBarAppearance 47 | 48 | CFBundleURLTypes 49 | 50 | 51 | CFBundleURLSchemes 52 | 53 | yourappname 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /LibSoundCloud/LibSoundCloud-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #import 8 | 9 | #ifndef __IPHONE_5_0 10 | #warning "This project uses features only available in iOS SDK 5.0 and later." 11 | #endif 12 | 13 | #ifdef __OBJC__ 14 | #import 15 | #import 16 | #endif 17 | -------------------------------------------------------------------------------- /LibSoundCloud/MainViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewViewController.h 3 | // LibSoundCloud 4 | // 5 | // Created by Stofkat.org on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SoundCloud.h" 11 | #import 12 | @interface MainViewController : UIViewController 13 | 14 | @property (strong, nonatomic) IBOutlet UITextField *txtSearchField; 15 | @property (strong, nonatomic) IBOutlet UITextField *txtURLField; 16 | @property (nonatomic, retain) SoundCloud *soundCloud; 17 | 18 | @property (nonatomic, retain) AVAudioPlayer *audioPlayer; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /LibSoundCloud/MainViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewViewController.m 3 | // LibSoundCloud 4 | 5 | // Created by Stofkat.org on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import "MainViewController.h" 10 | #import "SoundCloud.h" 11 | @interface MainViewController () 12 | 13 | @end 14 | 15 | @implementation MainViewController 16 | 17 | - (void)viewDidLoad 18 | { 19 | [super viewDidLoad]; 20 | 21 | self.soundCloud =[[SoundCloud alloc]init]; 22 | 23 | // Do any additional setup after loading the view, typically from a nib. 24 | } 25 | - (IBAction)btnSearchClicked:(id)sender { 26 | 27 | [self.soundCloud searchForTracksWithQuery:self.txtSearchField.text]; 28 | 29 | } 30 | - (IBAction)btnStreamClicked:(id)sender { 31 | 32 | NSData *data =[self.soundCloud downloadTrackData:self.txtURLField.text]; 33 | 34 | self.audioPlayer = [[AVAudioPlayer alloc]initWithData:data error:nil]; 35 | [self.audioPlayer play]; 36 | } 37 | - (IBAction)btnGetUserSongsClicked:(id)sender { 38 | 39 | [self.soundCloud getUserTracks]; 40 | 41 | } 42 | 43 | - (void)didReceiveMemoryWarning 44 | { 45 | [super didReceiveMemoryWarning]; 46 | // Dispose of any resources that can be recreated. 47 | } 48 | 49 | @end 50 | -------------------------------------------------------------------------------- /LibSoundCloud/MainViewController.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 36 | 46 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /LibSoundCloud/SCLoginViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // SCLoginViewController.h 3 | // Stofkat.org 4 | // 5 | // Created by Stofkat on 08-05-14. 6 | // 7 | // 8 | 9 | #import 10 | 11 | @interface SCLoginViewController : UIViewController 12 | @property (strong, nonatomic) IBOutlet UIWebView *webView; 13 | 14 | @property (strong, nonatomic) NSString *scToken; 15 | @property (strong, nonatomic) NSString *scCode; 16 | @property id soundCloudDelegate; 17 | @end 18 | -------------------------------------------------------------------------------- /LibSoundCloud/SoundCloud.h: -------------------------------------------------------------------------------- 1 | // 2 | // SoundCloud.h 3 | // Stofkat.org 4 | // 5 | // First basic version of my custom SoundCloud library 6 | // The one from SoundCloud has 5 dependancy projects just 7 | // for some very basic funtionality. This project only uses 8 | // JSONKit as an aditional library and should be much easier 9 | // to implement in your own projects 10 | // if you have any questions you can mail me at stofkat@gmail.com 11 | // Created by Stofkat on 08-05-14. 12 | // 13 | // 14 | 15 | #import 16 | #import 17 | @interface SoundCloud : NSObject 18 | 19 | //Change these to your own apps values 20 | #define CLIENT_ID @"ab91a50019b2954d03cad204bd6ace99" 21 | #define CLIENT_SECRET @"f7e8588e40c22510686d80a198331774" 22 | #define REDIRECT_URI @"yourappname://oauth"//don't forget to change this in Info.plist as well 23 | 24 | #define SC_API_URL @"https://api.soundcloud.com" 25 | #define SC_TOKEN @"SC_TOKEN" 26 | #define SC_CODE @"SC_CODE" 27 | 28 | @property (strong, nonatomic) NSMutableArray *scTrackResultList; 29 | @property (nonatomic,retain) AVAudioPlayer *audioPlayer; 30 | @property (strong, nonatomic) NSString *scToken; 31 | @property (strong, nonatomic) NSString *scCode; 32 | 33 | 34 | -(NSMutableArray *) searchForTracksWithQuery: (NSString *) query; 35 | -(NSData *) downloadTrackData :(NSString *)songURL; 36 | -(NSMutableArray *) getUserTracks; 37 | -(BOOL) login; 38 | @end 39 | -------------------------------------------------------------------------------- /LibSoundCloud/SoundCloud.m: -------------------------------------------------------------------------------- 1 | // 2 | // SoundCloud.m 3 | // Stofkat.org 4 | // 5 | // First basic version of my custom SoundCloud library 6 | // The one from SoundCloud has 5 dependancy projects just 7 | // for some very basic funtionality. This project only uses 8 | // JSONKit as an aditional library and should be much easier 9 | // to implement in your own projects 10 | // if you have any questions you can mail me at stofkat@gmail.com 11 | 12 | // Created by Stofkat.org on 23-05-14. 13 | // Copyright (c) 2014 Stofkat. All rights reserved. 14 | // 15 | 16 | 17 | 18 | #import "SoundCloud.h" 19 | #import "JSONKit.h" 20 | @implementation SoundCloud 21 | { 22 | 23 | BOOL hasBeenLoggedIn; 24 | } 25 | 26 | //Logon to SoundCloud with the users account 27 | -(BOOL) login { 28 | 29 | //check if we have the token stored in userprefs 30 | self.scToken=[[NSUserDefaults standardUserDefaults] objectForKey:SC_TOKEN]; 31 | if(self.scToken && self.scToken.length>0) { 32 | //we are already logged in 33 | return true; 34 | } 35 | else { 36 | 37 | self.scCode=[[NSUserDefaults standardUserDefaults] objectForKey:SC_CODE]; 38 | if(self.scCode) 39 | { 40 | [self doOauthWithCode:self.scCode]; 41 | return true; 42 | } 43 | else 44 | { 45 | dispatch_async(dispatch_get_main_queue(), ^(void) 46 | { 47 | //[self openLoginViewController]; 48 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://soundcloud.com/connect?client_id=%@&redirect_uri=%@&response_type=code",CLIENT_ID,REDIRECT_URI]]]; 49 | }); 50 | return false; 51 | } 52 | } 53 | 54 | } 55 | 56 | 57 | - (void)doOauthWithCode: (NSString *)code { 58 | 59 | NSURL *url = [NSURL URLWithString:@"https://api.soundcloud.com/oauth2/token/"]; 60 | NSString *postString =[NSString stringWithFormat:@"client_id=%@&client_secret=%@&grant_type=authorization_code&redirect_uri=%@&code=%@",CLIENT_ID,CLIENT_SECRET,REDIRECT_URI,code]; 61 | NSLog(@"post string: %@",postString); 62 | NSData *postData = [postString dataUsingEncoding:NSUTF8StringEncoding]; 63 | NSMutableURLRequest *request = [NSMutableURLRequest requestWithURL:url]; 64 | [request setHTTPMethod:@"POST"]; 65 | [request setValue:[NSString stringWithFormat:@"%d", postData.length] forHTTPHeaderField:@"Content-Length"]; 66 | [request setValue:@"multipart/form-data" forHTTPHeaderField:@"Content-Type"]; 67 | [request setHTTPBody:postData]; 68 | NSData *returnData = [NSURLConnection sendSynchronousRequest: request returningResponse: nil error: nil]; 69 | NSString *responseBody = [[NSString alloc] initWithData:returnData encoding:NSUTF8StringEncoding]; 70 | NSLog(@"response body; %@",responseBody); 71 | 72 | NSMutableDictionary *resultJSON =[responseBody objectFromJSONString]; 73 | self.scToken=[resultJSON objectForKey:@"access_token"]; 74 | [[NSUserDefaults standardUserDefaults] setObject:self.scToken forKey:SC_TOKEN]; 75 | [[NSUserDefaults standardUserDefaults] synchronize]; 76 | 77 | } 78 | 79 | 80 | 81 | 82 | -(void) loginCallback :(NSString *) token 83 | { 84 | if(token !=nil) 85 | { 86 | hasBeenLoggedIn=true; 87 | self.scToken = token; 88 | } 89 | 90 | } 91 | 92 | //Get list with full user tracks 93 | -(NSMutableArray *) getUserTracks { 94 | 95 | NSString *jsonString =[NSString stringWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"https://api.soundcloud.com/me/tracks.json?oauth_token=%@",self.scToken]] encoding:NSUTF8StringEncoding error:nil]; 96 | NSMutableArray *musicArray =[jsonString objectFromJSONString]; 97 | NSMutableArray *returnArray = [[NSMutableArray alloc]init]; 98 | NSLog(@"%@",jsonString); 99 | 100 | self.scTrackResultList = [[NSMutableArray alloc]init]; 101 | for(int i=0; i< musicArray.count;i++) 102 | { 103 | NSMutableDictionary *result = [musicArray objectAtIndex:i]; 104 | if([[result objectForKey:@"kind" ] isEqualToString:@"track"]) 105 | { 106 | [returnArray addObject:result]; 107 | } 108 | } 109 | 110 | return returnArray; 111 | } 112 | 113 | 114 | 115 | //Search for music with the given query 116 | -(NSMutableArray *) searchForTracksWithQuery: (NSString *) query { 117 | 118 | if(!self.scToken) 119 | { 120 | if(![self login]) 121 | { 122 | return nil; 123 | } 124 | } 125 | if(query.length >0) 126 | query = [query stringByReplacingOccurrencesOfString:@" " withString:@"%20"]; 127 | NSString *jsonString =[NSString stringWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@/tracks.json?oauth_token=%@&client_id=%@&q=%@",SC_API_URL,self.scToken,CLIENT_ID,query]] encoding:NSUTF8StringEncoding error:nil]; 128 | NSLog(@"%@",jsonString); 129 | NSMutableArray *musicArray =[jsonString objectFromJSONString]; 130 | self.scTrackResultList = [[NSMutableArray alloc]init]; 131 | 132 | NSMutableArray *returnArray = [[NSMutableArray alloc]init]; 133 | 134 | for(int i=0; i< musicArray.count;i++) 135 | { 136 | NSMutableDictionary *result = [musicArray objectAtIndex:i]; 137 | if([[result objectForKey:@"kind" ] isEqualToString:@"track"]) 138 | { 139 | [returnArray addObject:result]; 140 | 141 | } 142 | } 143 | return returnArray; 144 | } 145 | 146 | 147 | 148 | //Return the data from the selected track url 149 | //This can be directly played in an AVAudioPlayer without any modification 150 | -(NSData *) downloadTrackData :(NSString *)songURL { 151 | 152 | NSData *data =[NSData dataWithContentsOfURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@?oauth_token=%@",songURL, self.scToken]]]; 153 | 154 | return data; 155 | //NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) objectAtIndex:0]; 156 | //[data writeToFile:[NSString stringWithFormat:@"%@/%@.mp3",documentsPath,songURL] atomically:YES]; 157 | } 158 | 159 | @end 160 | -------------------------------------------------------------------------------- /LibSoundCloud/ViewAppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewAppDelegate.h 3 | // LibSoundCloud 4 | // 5 | // Created by Stofkat.org on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "MainViewController.h" 11 | @interface ViewAppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | @property (strong, nonatomic) MainViewController *mainViewController; 15 | 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /LibSoundCloud/ViewAppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewAppDelegate.m 3 | // LibSoundCloud 4 | 5 | // Created by Stofkat.org on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import "ViewAppDelegate.h" 10 | #import "SoundCloud.h" 11 | @implementation ViewAppDelegate 12 | 13 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 14 | { 15 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 16 | // Override point for customization after application launch. 17 | self.mainViewController = [[MainViewController alloc] init]; 18 | self.window.rootViewController = self.mainViewController; 19 | [self.window makeKeyAndVisible]; return YES; 20 | } 21 | 22 | 23 | // this happens while we are running ( in the background, or from within our own app ) 24 | // only valid if Info.plist specifies a protocol to handle 25 | - (BOOL)application:(UIApplication*)application handleOpenURL:(NSURL*)url 26 | { 27 | if (!url) { 28 | return NO; 29 | } 30 | 31 | [self checkForSoundCloudLogin:url.absoluteString]; 32 | //do your other custom url handling here 33 | 34 | return YES; 35 | } 36 | 37 | -(void) checkForSoundCloudLogin :(NSString *) url 38 | { 39 | if( [url rangeOfString:REDIRECT_URI].location!=NSNotFound) 40 | { 41 | NSLog(@"Found oauth"); 42 | //NSArray *tokenArray =[url componentsSeparatedByString:@"token"]; 43 | NSArray *codeArray =[url componentsSeparatedByString:@"code="]; 44 | NSLog(@"If logging in does not work, please look for this log message and check if the code is being stored correctly"); 45 | if(codeArray.count>1) { 46 | NSString *code = codeArray[1]; 47 | if([code hasSuffix:@"#"])code = [code substringToIndex:code.length-1]; 48 | NSLog(@"Found login code for SoundCloud"); 49 | [[NSUserDefaults standardUserDefaults] setObject:code forKey:SC_CODE]; 50 | [[NSUserDefaults standardUserDefaults] synchronize]; 51 | } 52 | } 53 | } 54 | 55 | - (void)applicationWillResignActive:(UIApplication *)application 56 | { 57 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 58 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 59 | } 60 | 61 | - (void)applicationDidEnterBackground:(UIApplication *)application 62 | { 63 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 64 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 65 | } 66 | 67 | - (void)applicationWillEnterForeground:(UIApplication *)application 68 | { 69 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 70 | } 71 | 72 | - (void)applicationDidBecomeActive:(UIApplication *)application 73 | { 74 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 75 | } 76 | 77 | - (void)applicationWillTerminate:(UIApplication *)application 78 | { 79 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 80 | } 81 | 82 | @end 83 | -------------------------------------------------------------------------------- /LibSoundCloud/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /LibSoundCloud/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // LibSoundCLoud 4 | // 5 | // Created by Stofkat.org on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "ViewAppDelegate.h" 12 | 13 | int main(int argc, char * argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([ViewAppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /LibSoundCloudTests/EmptyProjectTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // EmptyProjectTests.m 3 | // EmptyProjectTests 4 | // 5 | // Created by OwnSite BV on 23-05-14. 6 | // Copyright (c) 2014 Stofkat. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface EmptyProjectTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation EmptyProjectTests 16 | 17 | - (void)setUp 18 | { 19 | [super setUp]; 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | } 22 | 23 | - (void)tearDown 24 | { 25 | // Put teardown code here. This method is called after the invocation of each test method in the class. 26 | [super tearDown]; 27 | } 28 | 29 | - (void)testExample 30 | { 31 | XCTFail(@"No implementation for \"%s\"", __PRETTY_FUNCTION__); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /LibSoundCloudTests/LibSoundCloudTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | com.Stofkat.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /LibSoundCloudTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | LibSoundCloud-iOS 2 | ================= 3 | 4 | A custom library for using soundcloud in your iOS apps. This library doesn't have any dependancy projects like the official SoundCloud SDK and should be much easier to implement in your projects 5 | 6 | The standard iOS library from SoundCloud is quite heavy with many dependancies and has not been updated for quite a while. 7 | This project delivers an almost directly ready to use implementation of the SoundCloud API. 8 | 9 | Still WIP but already has the following functionality: 10 | 11 | - Login with OAUTH via Safari browser with SoundCloud, Google or Facebook account 12 | - Search for tracks 13 | - Get private user tracks 14 | - Download and play selected tracks. 15 | 16 | --------------------------------------------------------------------------------