Skip to content

Commit

Permalink
copy paste main over, change github action to main branch (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpaulus authored Mar 29, 2021
1 parent 1415aa5 commit 9d2edf9
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
on:
push:
branches:
- master
- main
name: Release-Go-iOS
jobs:
build_on_mac:
Expand Down
21 changes: 0 additions & 21 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ package main

import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"path/filepath"
"strings"
"syscall"

"os"
Expand Down Expand Up @@ -532,25 +530,6 @@ func outputDetailedListNoJSON(deviceList ios.DeviceList) {
}
}

func getDeviceOrQuit(udid string) (ios.DeviceEntry, error) {
log.Debugf("Looking for device '%s'", udid)
deviceList := ios.ListDevices()
if udid == "" {
if len(deviceList.DeviceList) == 0 {
return ios.DeviceEntry{}, errors.New("no iOS devices are attached to this host")
}
return deviceList.DeviceList[0], nil
}
for _, device := range deviceList.DeviceList {
device.Properties.SerialNumber = strings.ReplaceAll(device.Properties.SerialNumber, "-", "")
udid = strings.ReplaceAll(udid, "-", "")
if device.Properties.SerialNumber == udid {
return device, nil
}
}
return ios.DeviceEntry{}, fmt.Errorf("Device '%s' not found. Is it attached to the machine?", udid)
}

func startListening() {
muxConnection := ios.NewUsbMuxConnection(ios.NewDeviceConnection(ios.DefaultUsbmuxdSocket))
defer muxConnection.ReleaseDeviceConnection()
Expand Down

0 comments on commit 9d2edf9

Please sign in to comment.