Closed ddrscott closed 11 years ago
http://developer.apple.com/library/ios/#releasenotes/ObjectiveC/ObjCAvailabilityIndex/index.html
NSDictionary
andNSArray
subscripting: Deploys back to iOS 5
Strange. I wonder what's causing the issue. I'm using RubyMotion, so I'll check in with that group. For now I'll stay on my fork since I don't yet have another work around.
I'm using XCode 4.6. Maybe RubyMotion is picking the wrong XCode
Hi Scoot,
did you find a solution for this issue ? I'm using rubymotion too and I have the exact same issue. I posted a new topic to the rubymotion google group but no answer so far...
Thanks.
I'm using my fork of the project to fix the issue. You can do the same. Just create a new podspec and point to my git repo. I'd also recommend trying to work it out with RubyMotion. I haven't submitted the ticket with them, yet.
Create: vender/SDSegmentedControl.podspec with contents:
Pod::Spec.new do |s|
s.name = "SDSegmentedControl"
s.version = "1.0.2"
s.homepage = "https://github.com/ddrscott/SDSegmentedControl"
s.summary = "A drop-in remplacement for UISegmentedControl that mimic iOS 6 AppStore tab controls."
s.description = "forked to fix Array[] access"
s.license = 'MIT'
s.author = { "Olivier Poitrey" => "rs@dailymotion.com", "Marius Rackwitz" => "git@mariusrackwitz.de" }
s.requires_arc = true
s.source = { :git => "https://github.com/ddrscott/SDSegmentedControl.git", :tag => "1.0.2" }
s.platform = :ios, '5.0'
s.source_files = '*.{h,m}'
end
Then in Rakefile update with:
app.pods do
pod 'SDSegmentedControl', :podspec => 'vendor/SDSegmentedControl.podspec'
end
Thank you for your answer but I had this problem with another pod (FXLabel). I got an answer from someone that was running into the same issue
Adding ARC compatibility in you rakefile seems to fix the problem
app.libs << "-fobjc-arc"
Would anyone possibly happen to have a working sample of SDSegmentedControl working in ruby motion? If so I would be eternally grateful..!
I did get it to work, but the project is too huge to give out. The main thing I had to do is already mentioned above. Do you have a specific error your getting?
objectAtIndexedSubscript is only available for iOS >= 6.0. use objectAtIndex instead.
https://developer.apple.com/library/ios/documentation/Cocoa/Reference/Foundation/Classes/NSArray_Class/NSArray.html#//apple_ref/occ/instm/NSArray/objectAtIndexedSubscript: