본문 바로가기

728x90
728x90
SMALL

SWIFT

(22)
[Unity/iOS] 아이폰 버전 및 LiDAR 여부 체크하는 플러그인 코드 유니티에서 아이폰 버전을 확인할 수 있는 plugin이 필요했다.스택플로우의 여러글들을 찾아 아래 코드를 작성할 수 있었다.내 경우에는 라이다 체크를 위한 코드였으며,세부 버전을 위한 함수가 필요하다면 내부를 조금 변경하면 될 것 같다  Script DeviceChecker.cspublic class DeviceChecker : MonoBehaviour{#if UNITY_IOS [DllImport("__Internal")] public static extern bool DeviceCheck();#endif}  DeviceChecker.swift@objc public class DeviceChecker: NSObject { @objc public static let shared = Devi..
[Xcode/iOS] Swift CocoaPods AppAuth ERROR 해결 방법 예전에 근무하며 노션에 정리해두었던 것을 보고 작성하다보니,자료를 제대로 캡쳐해두지 않은 것들이 있어 에러 내용이 약간 불분명하지만...추후 같은 에러 발생을 염두해 두고 작성해본다! 아마 해당 문제는 CocoaPods 사용 시 발생했던 문제로 AppAuth 뿐만 아니라,다른 SDK에서도 발생할 수 있을 것으로 보여진다.CocoaPods을 사용하면 xcworkspace 파일로 작업을 하게 될 텐데해당 AppAuth 파일이 빨간색이었던걸로 기억한다.   해결방법 Pods 폴더 내부 파일 삭제1. 해당 프로젝트 폴더 > Pods 내부 파일 모두 삭제  DeriveData 폴더 내부 파일 삭제1. 라이브러리 > Developer > Xcode > DerivedData 폴더 진입2. 내부의 모든 파일 삭제** ..
[Xcode/iOS] Swift Unable to Install ERROR 해결 방법 작업 중 종종 만나는 오류로 Detail 버튼을 이용해 이유를 찾을 때도 있었지만,그러지 못했던 경우도 종종 있었다...ㅜㅜ우선 근무 중에 해당 상황이 발생했을 때는 아래 3가지 방법들로 해결이 가능했다! 아래와 같은 방법을 사용하기 위해서는 라이브러리 폴더에 접근이 필요하기 때문에다음과 같은 설정이 필요하다. 사전 설정 라이브러리 폴더 보이게하기1. Finder에서 오른쪽 버튼을 클릭2. 보기 옵션 클릭3. 라이브러리 폴더 보기 체크    해결 방법 Xcode Provisioning profiles 삭제하기  Xcode Provisioning Profiles LocationWhere are the Provisioning Profiles located in Xcode 8.3.3 within the pro..
[Xcode/iOS] Swift Cycle in dependencies between targets ERROR 해결 작업 중 아래와 같은 오류가 발생했다.Cycle in dependencies between targets 'Unity-iPhone' and 'UnityFramework'; building could produce unreliable results. This usually can be resolved by moving the target's Headers build phase before Compile Sources. 물론 내 경우에는 다음과 같은 해결 방법으로 에러를 해결할 수 있었지만,다른 경우에는 순서를 다르게 하거나,아예 다른 해결 방법을 찾아보는 것을 추천한다.    해결방법 문제가 되는 TARGETS을 선택하고Build Phases 메뉴로 들어간다.나의 경우에는 Headers의 순서를 위쪽으로 ..
[Xcode/iOS] Swift TableView 사용해보기 결과 Github GitHub - sohay19/BasicTableView: Practice_ BasicTableView Practice_ BasicTableView. Contribute to sohay19/BasicTableView development by creating an account on GitHub. github.com 코드 Custom Cell class CustomCell : UICollectionViewCell { @IBOutlet weak var imgView : UIImageView! @IBOutlet weak var labelName : UILabel! @IBOutlet weak var labelPrice : UILabel! override func awakeFromNib() {..
[Xcode/iOS] Swift 뮤직 플레이어 만들어보기(with. AVFoundation) 결과보기 Github GitHub - sohay19/Musik: Practice_ MusicPlayer Practice_ MusicPlayer. Contribute to sohay19/Musik development by creating an account on GitHub. github.com AVFoundation AVPlayer : 미디어를 컨트롤하는 플레이어 play() - 미디어 재생 pause() - 미디어 일시정지 seek() - 특정 시간으로 이동 replaceCurrentItem() - 현재 설정된 미디어 교체 addPeridicTimeObserve() - 특정 시간 마다 미디어 재생 시간 관찰 Apple Developer Documentation developer.apple.com AV..

728x90
728x90
LIST