Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added CocoaLibSpotify as 0.0.1 (unversioned)

  • Loading branch information...
commit 8eeabc25ae1cacd38fcaf77fb0cac4ffaa777aaf 1 parent 3405aec
Kyle Fleming kylefleming authored
Showing with 68 additions and 0 deletions.
  1. +68 −0 CocoaLibSpotify/0.0.1/CocoaLibSpotify.podspec
68 CocoaLibSpotify/0.0.1/CocoaLibSpotify.podspec
View
@@ -0,0 +1,68 @@
+Pod::Spec.new do |s|
+ s.name = 'CocoaLibSpotify'
+ s.version = '0.0.1'
+ s.author = 'Spotify'
+ s.license = 'BSD 3-Clause'
+ s.homepage = 'https://github.com/spotify/cocoalibspotify'
+ s.summary = 'A Cocoa wrapper for libspotify.'
+ s.description = "CocoaLibSpotify is an Objective-C wrapper around our libspotify library. It provides easy access to libspotify's features in a friendly, KVC/O compliant Objective-C wrapper."
+ s.source = { :git => 'https://github.com/spotify/cocoalibspotify.git', :commit => '50c0fffa17ab90e65371aa3d61fea90c79d27d39' }
+ s.requires_arc = true
+
+ s.source_files = 'common', 'iOS Library/View Controllers', 'libspotify-12.1.45-iOS-universal/libspotify.framework/Headers'
+ s.resource = 'iOS Library/SPLoginResources.bundle'
+ s.frameworks = 'SystemConfiguration', 'CFNetwork', 'CoreAudio', 'AudioToolbox', 'AVFoundation', 'libspotify'
+ s.library = 'stdc++'
+ s.xcconfig = { 'OTHER_LDFLAGS' => '-all_load', 'FRAMEWORK_SEARCH_PATHS' => '$(PODS_ROOT)/CocoaLibSpotify/libspotify-12.1.45-iOS-universal' }
+ s.platform = :ios
+
+ def s.post_install(target)
+ # Note: Taken straight from the libspotify build script step
+ # TODO: All this should be put in a pre_install since it adds header files that need to get symlinked and added to the project file. In the meantime, pod install just needs to be run twice.
+ system <<-CMD
+python -c "
+import socket
+socket.setdefaulttimeout(60)
+import urllib
+import zipfile
+import os
+import sys
+import commands
+
+libspotifyFileName = \\"libspotify-12.1.45-iOS-universal.zip\\"
+libspotifyRemoteLocation = \\"http://developer.spotify.com/download/libspotify/\\"
+projectDir = os.path.join(\\"#{config.project_pods_root}\\", \\"cocoalibspotify\\")
+libspotifyDirectoryDir = os.path.join(projectDir, \\"libspotify-12.1.45-iOS-universal\\")
+libspotifyZipDir = os.path.join(projectDir, libspotifyFileName)
+
+if (os.path.exists(libspotifyDirectoryDir)):
+ #print \\"LibSpotify is present, no download needed.\\"
+ sys.exit(0)
+
+print \\"LibSpotify not present, downloading...\\"
+
+try:
+ urllib.urlretrieve(libspotifyRemoteLocation + libspotifyFileName, libspotifyZipDir)
+except OSError:
+ print \\"Could not download \\" + libspotifyRemoteLocation + libspotifyFileName + \\".\\"
+ sys.exit(1)
+
+unzipCommand = 'unzip -q \\"' + libspotifyZipDir + '\\"' + ' -d \\"' + projectDir + '\\"'
+unzipResult = commands.getstatusoutput(unzipCommand)
+
+if (unzipResult[0] != 0):
+ print \\"Could not untar \\" + libspotifyFileName + \\".\\"
+ sys.exit(1)
+
+commands.getstatusoutput('rm -rf \\"' + projectDir + '/__MACOSX\\"')
+
+try:
+ os.remove(libspotifyZipDir)
+except OSError:
+ print \\"Could not remove downloaded file.\\"
+
+print \\"Complete.\\"
+"
+CMD
+ end
+end

3 comments on commit 8eeabc2

wao813

Hi Garthex, after installed this through pod install, I saw 194 linking errors. Just wondered, is there any manual step has to do after?

Jonathan Toland

The comment says it needs installed twice for linking?

wao813

Hi dnalot, I did tried multiple times, but still has the problem.

Please sign in to comment.
Something went wrong with that request. Please try again.