iOS SDK

21 posts

iOS SDKReleases

iOS SDK v3.0.3

Version v3.0.3 of the Rdio iOS SDK includes the following improvements:

  • Fix skip limit enforcement for ad-supported stations (partners only)
  • Remove documentation that said OAuth 2.0 is for partners only

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  June 19, 2015 — 4:34PM

iOS SDKReleases

iOS SDK v3.0.2

As part of our OAuth 2.0 launch, we’ve released v3.0.2 of the iOS SDK. See our OAuth 2.0 migration guide for details on how to upgrade your iOS application to OAuth 2.0.

Version 3.0.2 of the Rdio iOS SDK includes the following improvements:

  • Major updates to the audio streaming engine.
  • Introduced an RDPlayerStateBuffering state to the RDPlayer to indicate when the player is buffering.
  • Integration with Rdio's pub-sub servers to allow the iOS SDK to share player state across Rdio instances (meaning the iOS SDK can now be used in Rdio's 'Remote Control' mode).
  • Update to the Queuing mechanism so that it's compatible with remote control mode. This means that the methods used to play and queue tracks have changed. Please see the documentation for RDPlayer for more info.
  • Update the codebase to use ARC.
  • Update to the Login screen to fix some issues with landscape devices and Autolayout.
  • Support for OAuth 2.0. The Rdio iOS SDK now requires AFOAuth2Manager as a dependency. We recommend using Cocoapods to bring it into your project.
  • Removal of RDAPIRequestDelegate and update to the callAPI method signature. Results of API calls are now passed to success and failure block parameters, similar to how AFNetworking behaves.
  • Addition of RDStationManager to support proper station playback. Now when you queue up a station source, the RDStationManager will make sure that the station never ends until stop or nextSource is called.

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  June 08, 2015 — 2:18PM

iOS SDKReleases

iOS SDK v2.1.4

Version 2.1.4 of the Rdio iOS SDK includes the following improvement:

  • Fixed login view when device is in landscape mode

Download the latest release, checkout the getting started guide, and let us know what you think.

iOS SDKReleases

iOS SDK v2.1.3

Version 2.1.3 of the Rdio iOS SDK includes the following improvement:

  • logout will no longer delete all cookies

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  July 25, 2014 — 8:45AM

iOS SDKReleases

iOS SDK v2.1.2

Version 2.1.2 of the Rdio iOS SDK includes the following improvement:

  • Further protection from crashing when handling rdioRequest errors

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  July 14, 2014 — 4:03PM

iOS SDKReleases

iOS SDK v2.1.1

Version 2.1.1 of the Rdio iOS SDK includes the following improvement:

  • Fix for crash when handling playback and access token retrieval errors

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  June 26, 2014 — 3:07PM

iOS SDKReleases

iOS SDK v2.1.0

Version 2.1.0 of the Rdio iOS SDK includes the following improvements:

  • Improve the stability of seeking
  • seekToPosition: now calls delegate when changing playback state
  • Two new RDPlayerDelegate methods: rdioPlayerSetAudioCategory and rdioPlayerSetAudioSessionActive: for controlling the audio session
  • Reduce log level from warning to info for "Got NSNull for result" message

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  June 10, 2014 — 10:41AM

iOS SDKReleases

iOS SDK v2.0.1

Version 2.0.1 of the Rdio iOS SDK includes the following improvement:

  • Rename initPlayerWithDelegate: to preparePlayerWithDelegate: to prevent issues with ARC

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  May 15, 2014 — 5:08PM

iOS SDKReleasesTips & Tricks

iOS SDK 2.0.0 Release and Migration Guide

Today we're releasing version 2.0.0 of the iOS SDK. As you might've guessed from the bump in major version number, this release contains some API changes that prevent it from being a total drop-in replacement. So, after we cover the changelog, we'll show you how to migrate your existing app over to the new version.

  • Support for 64-bit builds. #98
  • duration on RDPlayer is now KVO-compliant. #106
  • Fix seekToPosition: to defer seeks that occur before the buffer is ready. #65
  • Fix an infinite-retry bug that occurred when the last queued track was unstreamable in the user's region.
  • Completely remove deprecated authorizeUsingAccessToken:fromController: method.
  • Separate RDPlayer initialization from Rdio initialization. This means the player must be initialized explicitly, which prevents apps from automatically making Rdio API calls on app load.
  • Use NSError in delegate methods that involve errors. The errors returned will usually be from RDErrorDomain, and contain a code value from RDErrorCode.
  • Introduce two new methods to RDPlayer for observing playback position and SPL for the current track. These signatures are based on AVPlayer's method with a similar name:
    • -(id)addPeriodicTimeObserverForInterval:(CMTime)interval queue:(dispatch_queue_t)queue usingBlock:(void (^)(CMTime time))block
      The passed in block is invoked periodically every interval on the queue specified. The passed in time parameter is the player's position in the current playing track.
    • -(id)addPeriodicLevelObserverForInterval:(CMTime)interval queue:(dispatch_queue_t)queue usingBlock:(void (^)(Float32 left, Float32 right))block
      The passed in block is invoked periodically every interval on the queue specified. The passed in left and right parameters contain the channel's volume in decibels.
    • Support removing periodic observers with:
    • -(void)removeTimeObserver:(id)timeObserver
    • -(void)removeLevelObserver:(id)levelObserver

Migration Guide

Since every app is different, this migration guide won't cover every use case, but it should cover the basics.

Replace Rdio.framework with the new version

We start off with baby steps. Replacing the Rdio framework in your Xcode project should be straight forward — it's what you've had to do with 1.x updates anyways.

Add CoreMedia framework

The new version of the SDK introduces a dependency on CoreMedia.framework. To add it, select your app target and scroll down to the Linked Frameworks and Libraries section, and click the +. Type 'coremedia' into the search bar, and select CoreMedia.framework from the list. Xcode 5 should automatically add CoreMedia to the "Link With Binary Libraries" step in "Build Phases", but if you feel like double checking, head over there and do that.

At this point you should be able to build your app without hitting any linker errors, but you might still have some warnings around your delegates.

Update your RdioDelegate and RDPlayerDelegate objects

The signatures for -(void)rdioAuthorizationFailed:(NSError *)error and -(BOOL)rdioPlayerFailedDuringTrack:(NSString *)trackKey withError:(NSError *)error have changed to expect NSError objects instead of NSStrings. Find your implementations of these, update the method signatures, and have a look at the [RDErrorCode](LINK) enum to figure out which errors you should be checking for.

If your app does not incorporate playback, then congratulations! You're done! Otherwise, there's one more crucial step.

Initialize the Rdio Player

As we mentioned in the changelog, the RDPlayer object now requires explicit initialization. When and where you do this will depend on what your app is and how you expect your users to play music. We've done this in the Hello app after the main view controller loads, but if music playback isn't the main focus of your app, you may want to wait until the user has taken some action to indicate that they'll be listening soon.

The line you'll need to add is: [yourRdioInstance initPlayerWithDelegate:someRdioDelegate];

Note that your app should re-initialize the player after login to insure that the player doesn't accidentally contain any stray buffers of 30 second samples. Also note that re-initializing the player will create a new RDPlayer object, so you may need to update any local references to rdioInstance.player.

∞  May 14, 2014 — 11:15AM

iOS SDKReleases

iOS SDK v1.3.7

Version 1.3.7 of the Rdio iOS SDK includes the following improvement:

  • Fix a crash when canceling RDAuthViewController #118

Download the latest release, checkout the getting started guide, and let us know what you think.

∞  May 06, 2014 — 10:59AM