# 静态引用工程时需要设置
# def change_player_project(root_path)
# player_project_path = root_path + "/TXLiteAVDemo/SuperPlayer/Player.xcodeproj"
# player_project = Xcodeproj::Project.open(player_project_path)
# frameworks_group = player_project.root_object.main_group.children.select{|c| c.name=="Frameworks"}.first
# frameworks_group.files.select { |file| not FileTest::exist?(file.real_path) }.each { |f| f.remove_from_project }
# sdk_ref = frameworks_group.new_file("../../../SDK/TXLiteAVSDK_#{$target_name}.framework")
# player_project.targets.select { |t| t.name=="SuperPlayer" }.each do |target|
# target.frameworks_build_phases.files.delete_if{ |f| f.file_ref.nil? or !FileTest::exist?(file.real_path) }
# target.frameworks_build_phase.add_file_reference(sdk_ref)
# release_build_settings = target.build_settings('Release')
# if release_build_settings['HEADER_SEARCH_PATHS'].class == Array
# release_build_settings['HEADER_SEARCH_PATHS'].delete("$(SRCROOT)/../../../SDK/VSDK_Enterprise.framework/Headers")
# release_build_settings['HEADER_SEARCH_PATHS'].push("$(SRCROOT)/../../../SDK/VSDK_#{$target_name}.framework/Headers")
# end
# debug_build_settings = target.build_settings('Debug')
# if debug_build_settings['HEADER_SEARCH_PATHS'].class == Array
# debug_build_settings['HEADER_SEARCH_PATHS'].delete("$(SRCROOT)/../../../SDK/VSDK_Enterprise.framework/Headers")
# debug_build_settings['HEADER_SEARCH_PATHS'].push("$(SRCROOT)/../../../SDK/VSDK_#{$target_name}.framework/Headers")
# end
# end
# player_project.save
# end
ruby 修改Xcode工程备忘录
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...