Sha256: 5f4987095ae0a4c416799739f4317caffb92a711a7c813ad6930262d89a862d2
Contents?: true
Size: 760 Bytes
Versions: 1
Compression:
Stored size: 760 Bytes
Contents
require 'fileutils' require 'ib/parser' require 'ib/generator' require 'xcodeproj' class IB::Project def write app_path = "./app", resources_path = "./resources" project = Xcodeproj::Project.new target = project.targets.new_static_library(:ios, 'ui') stubs = IB::Generator.new.write(app_path, "ui.xcodeproj") stubs_path = Pathname.new("ui.xcodeproj/stubs.h") files = [Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(stubs_path, nil, nil)] Dir.glob("#{resources_path}/**/*.{png,jpg,jpeg,storyboard,xib}") do |file| files << Xcodeproj::Project::PBXNativeTarget::SourceFileDescription.new(Pathname.new(file), nil, nil) end target.add_source_files(files) project.save_as("ui.xcodeproj") end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ib-0.0.1 | lib/ib/project.rb |