UA-17470720-3

Jump to content


Photo
- - - - -

Using STV Pro with CocoaPods


  • Please log in to reply
2 replies to this topic

#1 Anh Do

Anh Do

    Starting Out

  • STV 3.0 Pro
  • Pip
  • 5 posts
Reputation: 6
Good

Posted 07 July 2013 - 08:31 PM

I've been having trouble getting STV 3.2.1 to work with CocoaPods, as I also use AFNetworking in my project, and including STV source code creates all sorts of problems. I found this great post on using STV with CocoaPods: http://blog.gaslight...with-cocoapods, but it doesn't cover STV+WebServices.

 

Long story short: I spent sometime looking at Podspec and found a way to make STV+WebServices works:

 

1/ Unzip STV 3.2.1 Pro and put it in your project folder.

2/ Put these in Podfile:

 

platform :ios, '5.0'
inhibit_all_warnings!


pod 'AFNetworking', '~> 1.3.1'


pod 'SensibleTableView', :path => "STV 3.2.1 Pro/Source Code/SensibleTableView/"
pod 'STV+WebServices', :path => "STV 3.2.1 Pro/Source Code/STV+WebServices/"
 

3/ Create new podspec for SensibleTableView in STV 3.2.1 Pro/Source Code/SensibleTableView/SensibleTableView.podspec

 

 

 

Pod::Spec.new do |s|
  s.name = 'SensibleTableView'
  s.version = '3.2.1'
  s.platform = :ios
  s.ios.deployment_target = '5.0'
  s.prefix_header_file = 'SensibleTableView/SensibleTableView-Prefix.pch'
  s.source_files = 'SensibleTableView/STV-Core/*.{h,m}'
  s.requires_arc = true
end
 

4/ Create new podspec for STV+WebServices in STV 3.2.1 Pro/Source Code/STV+WebServices/STV+WebServices.podspec

 

 

Pod::Spec.new do |s|
  s.name = 'STV+WebServices'
  s.version = '3.2.1'
  s.platform = :ios
  s.ios.deployment_target = '5.0'
  s.prefix_header_file = 'STV+WebServices/STV+WebServices-Prefix.pch'
  s.source_files = 'STV+WebServices/*.{h,m}'
  s.exclude_files = 'STV+WebServices/UIImageView+WebServices.{h,m}'
  s.dependency 'JSONKit', '~> 1.5pre'
  s.dependency 'AFNetworking', '~> 1.3.1'
  s.requires_arc = true

  s.subspec "CJSONSerializer" do |sp|
    sp.source_files = ['STV+WebServices/external/CJSONSerializer.{h,m}', 'STV+WebServices/external/JSONRepresentation.h']
    sp.requires_arc = false
  end
end

 

 

 

5/ Open SCWebServiceForceLinkerToLinkCategories.m and comment this line:
 

 

#import "UIImageView+WebServices.m"
 

6/ Run pod install 

 

 


  • Tarek, Michael Heger, Everett and 2 others like this

#2 Everett

Everett

    Ev

  • STV 5.0 Pro
  • PipPipPipPipPip
  • 191 posts
  • LocationMichigan
Reputation: 60
Outstanding

Posted 08 July 2013 - 03:14 PM

very interesting. thanks.



#3 brainray

brainray

    Starting Out

  • STV 3.0 Std
  • Pip
  • 3 posts
Reputation: 0
Neutral

Posted 21 October 2013 - 02:18 PM

How would it look like with the standard version, or is that not possibile?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users