def configurations
      @configurations ||= if workspace?
                            workspace
                              .file_references
                              .map(&:path)
                              .reject { |p| p.include?("Pods/Pods.xcodeproj") }
                              .map do |p|
                                # To maintain backwards compatibility, we
                                # silently ignore non-existent projects from
                                # workspaces.
                                begin
                                  Xcodeproj::Project.open(p).build_configurations
                                rescue
                                  []
                                end
                              end
                              .flatten
                              .compact
                              .map(&:name)
                          else
                            project.build_configurations.map(&:name)
                          end
    end
def configurations
      @configurations ||= if workspace?
                            workspace
                              .file_references
                              .map(&:path)
                              .reject { |p| p.include?("Pods/Pods.xcodeproj") }
                              .map do |p|
                                # To maintain backwards compatibility, we
                                # silently ignore non-existent projects from
                                # workspaces.
                                begin
                                  Xcodeproj::Project.open(p).build_configurations
                                rescue
                                  []
                                end
                              end
                              .flatten
                              .compact
                              .map(&:name)
                          else
                            project.build_configurations.map(&:name)
                          end
    end
Get all available configurations in an array