iOS SDK

17 posts

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

iOS SDKReleases

iOS SDK v1.3.6

Today we've updated the Rdio iOS SDK to version 1.3.6. The update includes the following changes

  • Fix status bar using parent VC's preferred status bar settings. (issue #99)
  • Handle unstreamable tracks correctly when pre-buffering. (issue #112)
  • Calling previous while playing the first track now causes playback to stop. (Previously it was a NOP)
  • Fix CPU spike issue. (issue #113)

The latest release is available at http://www.rdio.com/media/static/developer/ios/rdio-ios.tar.gz.

Check out the iOS SDK documentation for more info, and drop us a line on our Google Group if you have any questions.

Happy hacking!

iOS SDKReleases

iOS SDK v1.3.5

Version 1.3.5 of the Rdio iOS SDK has been released and includes one improvement:

Download the latest release from the Rdio Developer site.

iOS SDKReleases

iOS SDK v1.3.4

Version 1.3.4 of the Rdio iOS SDK has been released and includes one improvement:

Download the latest release from the Rdio Developer site.

iOS SDKReleases

iOS SDK v1.3.3

We're happy to announce an update to the iOS SDK!

Here are the changes:

  • Fix -updateQueue:withCurrentTrackIndex: race condition. All queue manipulation methods are now serialized properly so that the required network requests don't create undesirable states.
  • Fix documentation on -play
  • Better sanity checking in various places
  • Handle iOS 7's status bar changes by pushing the Auth View down by the status bar's height if the SDK is running on iOS 7. A bit more information is available in the documentation.

The latest release is available at http://www.rdio.com/media/static/developer/ios/rdio-ios.tar.gz

With this release, we've also improved the iOS SDK documentation. The documentation now mentions the version number and release date of the most recent release. Visit the iOS SDK documentation and check it out.