2020년 5월 11일 월요일

swift Unable to install issue! -> solution

현재까지 두가지 경우 발견 (둘다 번들아이디를 변경 후 발생함)

1. 기기내 앱의 흔적이 남아있는경우

디버깅 중에 간혹 swift Unable to install 이런 오류가 발생할 경우
해당 디바이스내 기록을 지워주면 해결 된다.

xcode > window

1) Devices and Simulators  실행


2) 해당 디바이스 우클릭! > "Show Provisioning Profiles..." 클릭


3) 에러가 발생하는 프로젝트를 선택 후  " - " 제거!


4) Done을 누른뒤 다시 실행하면 오류가 없어진걸 확인가능!


2. Extension 을 사용시 번들 아이디를 바꿔도 발생

1) 프로젝트에서 하단에 임베드한 위젯을 없애고나서 다시 추가한다.


2) 프로젝트의 설정에서 Build phases 으로 이동




3) 아래 항목을 선택하여




4) 네모칸을 체크 해준다




2020년 3월 9일 월요일

TableView code 로 만들때 꼭 참고 @@ in Swift5.1 - Xcode 11.3.1

var tableView = UITableView()


1. delegate, dataSource 위임

override func viewDidLoad() {
  super.viewDidLoad()

  tableView.delegate = self
  tableView.dataSource = self

}


2. 초기화 init
  code로 tableView 생성 시 자동으로 초기화가 되지 않기 때문에 따로 선언해줘야 한다


override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
  super.init(style: style, reuseIdentifier: reuseIdentifier)

}


required init?(coder aDecoder: NSCoder) {
  fatalError("init(coder:) has not been implemented")
}


3. 레지스터 
 TableViewCell를 변수값에 넣어준다. 안넣을 시 cell 빌더 시 오류 발생

override func viewDidLoad() {
  super.viewDidLoad()
  tableView.delegate = self
  tableView.dataSource = self 

  tableView.register(testTableViewCell.self, forCellReuseIdentifier: "CodingCustomTableViewCell")

}

  1. func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
    return 1
    }
  2. func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
    let cell = tableView.dequeueReusableCell(withIdentifier: "testTableViewCell", for: indexPath) as? testTableViewCell else { return UITableViewCell() }
    return cell
  3. }


    }

2020년 2월 24일 월요일

ios framework linker command failed with exit code 1 (use -v to see invocation)


 ios framework linker command failed with exit code 1 (use -v to see invocation) ...
 FrameWork 를 못찾겠다며 뜨는 이슈


왼쪽 framework 폴더에서 붉게 표시된 파일들을 삭제시 해결
붉게 된 표시가 없고 연한 흰색으로 표시도 됨 

2020년 2월 23일 일요일

Mac 업데이트 후 cocoapods 이슈 발생 ..ruby: no such file or directory

zsh: /usr/local/bin/pod: bad interpreter: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby: no such file or directory

Mac 업데이트 후 생긴 오류

새로 설치하면 해결
터미널 실행 > sudo gem install cocoapods  > pod install 설치

추천 게시물

애플 개발자 등록방법 2016년 5월 8일 기준!!

애플 개발자 등록 절차 1. 개발자 등록 페이지 이동    애플 개발자 로그인 > Account 페이지 이동 > 하단 영역 클릭 (이미지 참조)   >> Enroll 클릭 >> 무조건 승인!! ...