SoundCloud Architecture iOS SDK

I am working on an iOS music streaming project and want to use the SoundCloud SDK.

I followed this tee guide: https://developers.soundcloud.com/docs/api/ios-quickstart

Five SoundCloud dependencies:

  • CocoaSoundCloudAPI
  • OAuth2Client
  • Jsonkit
  • OHAttributedLabel
  • CocoaSoundCloudUI

All five of these projects are available as submodules, which you simply add to your current git repository. According to the guidelines above, you should be able to add them and move on to your project. However, their architecture is all different! CocoaSOundCloudAPI, JSONKit, OHAttributedLabel, and CocoaSoundCloudUI are all 32-bit architectural projects, and OAuth2Client is a 64-bit architecture project.

Regardless of the fact that I create my project as 32 or 64 bits, I get a Mach-O linker error. I added 32bit and 64bit as Valid architecture in my main Xcode project, but the problem persists.

I was also unable to find other versions of these submodules. I cannot be the only one with this problem, as I literally followed the guide by word, but I could not find a solution anywhere.

Please help me!

I am using Xcode 6 and am creating for the iOS8 SDK.

Thanks!

Edit:

Here are screenshots of my architectures and errors ... arhitectureserroes

+5
source share
4 answers

Here is something that helped me:

  • Go to the target audience of SmartSpeakers (or depending on the purpose of your application).
  • Build Settings → Other Linker Flags
  • Add $(inherited)
  • Build it!
+3
source

I suggest using CocoaPods to manage this dependency. I once integrated SoundCloud into a project without using CocoaPods, and that was a pain in the rear. Take a look at this link and search for CocoaPods to find out how to install it: https://github.com/soundcloud/CocoaSoundCloudAPI

+4
source

CocoaPods was a way for me. My subfile is as follows:

 pod 'CocoaSoundCloudAPI', '1.0.1' pod 'CocoaSoundCloudUI', '1.0.5' pod 'JSONKit', :podspec => 'https://gist.github.com/marcdown/5282955/raw/2a52cfd92f112f2a52669420c82c1bb1efd15d2a/JSONKit.podspec' 

At the time of this posting, podspec is choosing version 1.6.0. In earlier versions of JSONKit, I had problems with some issues with older versions. If you abandon the module for JSONKit, an earlier version containing these problems is installed by Cocoapods.

I also had to disable ARC for the JSONKit module in the build settings in order to disable ARC errors:

Pods-JSONKit → Build Settings → Apple LLVM 6.0 - Language - Target C

It did it for me.

+2
source

Are you trying to install on a 64-bit device? Try setting Build Active Architecture Only to NO under Goals → Your Application → Build Settings → Architecture.

EDIT: I followed the instructions and created a sample project that is building. I could not understand why you got a linker error, but maybe you can compare my project with yours.

http://lieberman.nyc/sample_soundcloud_project_for_relatively_slow_on_stackoverflow.zip

+1
source

Source: https://habr.com/ru/post/1205893/


All Articles