Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- developer_info = {
- "DevelopmentTeam" => "5-------S4",
- "DevelopmentTeamName" => "Alexander Zimin"
- }
- post_install do |installer|
- path = installer.pods_project.path
- pbxproj_path = path + 'project.pbxproj'
- unless File.exist?(pbxproj_path)
- puts "Pods.xcodeproj wasn't before, please run `pod update`/`pod install` again".red
- next
- end
- plist = Xcodeproj::Plist.read_from_path(pbxproj_path.to_s)
- root_object_string = plist["rootObject"]
- targets = plist["objects"][root_object_string]["targets"]
- developer_info_dic = Hash.new(targets.size())
- targets.each do |target_name|
- developer_info_dic[target_name] = developer_info
- end
- installer.pods_project.root_object.attributes["TargetAttributes"] = developer_info_dic
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement