I'm writing a post_install
script in a Podfile
, and I need to modify a particular scheme. I'm new to Ruby, so I'm sure I have many bad/non-idiomatic habits. Here's what I have:
post_install do |installer|
pods_project = installer.pods_project
scheme_filename = "BonMot.xcscheme"
scheme = Xcodeproj::XCScheme.new File.join(pods_project.path, "xcshareddata/xcschemes", scheme_filename)
# do stuff with scheme
end
How can I avoid the hardcoded xcshareddata/xcschemes
in the middle? Or is that the best way to do this?