본문 바로가기

Apple Developer

(11)
CreatML 기능 살펴보기 (xcode ML 개발 tool) wwdc를 하나씩 보니 재밌는 기능들이 있네아주 좋은 기능이 아니라 숨겨져 있는듯 ㅋㅋxcode에서 한참 찾았네;;  https://developer.apple.com/videos/play/wwdc2024/10183/ What’s new in Create ML - WWDC24 - Videos - Apple DeveloperExplore updates to Create ML, including interactive data source previews and a new template for building object tracking models for...developer.apple.com App개발 시 자주 사용할만한 예시 Template 들이 있다.  내가 가진 Data 만 있으면 쉽게 학습 시켜볼..
맥북에서 AI 학습하기 이번 WWDC24 에서 멋진 Apple intelligence 가 등장하는 모습을 보고 이제 On-Device AI 시대가 오겠구나 싶었다. https://www.apple.com/apple-intelligence/ Apple Intelligence PreviewApple Intelligence is personal intelligence for the things you do every day. Built into iPhone, iPad, and Mac with groundbreaking privacy.www.apple.com 그래서 WWDC24 에서 AI 세션 몰아 보기를 시작했다.역시나 재밌는 주제가 많았고 요즘 관심사인 LLM 에 대한 내용도 많이 있었다.  https://developer.app..
SwiftUI property wrapper 정리 (swift @ 사용법) 처음에 이 @ 들을 잘 몰라서 강의 듣는 것 조차 어려웠다.  @State @BindingObservableObject (protocol 임)@Published@ObsevedObject@StateObject@Environment@EnvironmentObject 1. @State 는 해당 뷰에서 상태를 저장함, 그 값이 변경될 때마다 UI 가 업데이트 된다. 다른 뷰에서 사용하려면 다음에 나오는 Binding 을 써야 함struct ContentView: View { @State private var isPlaying: Bool = false var body: some View { Button(isPlaying ? "Pause":"Play"){ isPlaying.toggl..
swift 클로저 기초 안쓰다보니 너무 헷갈리네.. 클로저 형태 { 매개변수 -> 리턴타입 in 실행코드 } var a = { (value: Int) -> Int in return value * 2 } completion 에서 많이 사용 func foo(completion: () -> ()) { print("foo") completion() } // 실행 시 foo(completion: { print("completion") }) // 결과 // foo // completion // completion 이 함수 마지막 파라미터에 있으면 생략 가능 foo() { print("completion") } // 결과 동일 // foo // completion @escaping 키워드라는 것도 있는데 우선 아래 참고 https://ba..
코코아팟 라이브러리 배포하기 스위프트 패키지용 프로젝트에 가서 https://devmeta.tistory.com/63 GitHub 에서 패키지 Release 하는 법 우측 Create a new release 버튼 클릭 Choose a tag 에서 버전 입력 Target 에서 Recent Commit 선택, Title 에 버전 입력 우측 상단에 Generate release notes 클릭~ 그리고 publish devmeta.tistory.com cd BoxOffices pod spec create BoxOffices 생성된 BoxOffices.podspec 파일을 수정하고 github에 올려줌 그리고 나서 아래 등록 pod trunk register eastsky21@gmail.com Dongho 잘 등록 되면 email로 인증..
GitHub에 배포한 스위프트 패키지 가져오기 여기서 배포한 패키지를 가져오기 https://devmeta.tistory.com/63 GitHub 에서 패키지 Release 하는 법 우측 Create a new release 버튼 클릭 Choose a tag 에서 버전 입력 Target 에서 Recent Commit 선택, Title 에 버전 입력 우측 상단에 Generate release notes 클릭~ 그리고 publish devmeta.tistory.com 프로젝트를 새로 생성하고 Package Dependencies > + 버튼 클릭 후 우측 상단에 Github Repository url 입력 Dependency Rule 에서 Branch 선택, Main 입력 후 Add Package 클릭
xcode 에서 test 버튼 이 곳에 마우스 올리면 > 화살표 나오면서 Test 실행 할 수 있음. 좀 더 실력이 올라가면 단축키 사용해야지
xcode 코드 접기 (Code folding ribbon) vscode 에서 당연히 되던 코드 접기가 셋팅을 해줘야 되는거였다. xcode > settings > Text Editing > Code folding ribbon 체크
Swift 어려운 내용 메모리 관리 (ARC) struct Struct1 { var a: Int = 0 } class Class1 { var a: Int = 0 // 소멸자 deinit { print("class 1 deinit") } } //구조체 Stack - 메모리 공간이 그 위에 생김 //Stack 은 함수 내에 있는 변수는 함수 실행이 끝나면 바로 메모리 해제 //클래스 heap - 동적으로 메모리 관리 //클래스는 좀 더 긴 생명주기 //메모리 레퍼런스 카운트 var struct1 = Struct1() var class1: Class1? = Class1() //1 //메모리 레퍼런스 카운트 증가 (Strong 레퍼런스) var class2: Class1? = class1 //2 class1 = nil //1 clas..
Swift 초보 2 for 문부터 시작 var a = [1,2,3,4,5] for value in a { print(value) } for (index, value) in a.enumerated() { print("\(index) = \(value)") } //where 절 가능 for value in a where value > 3 { print(value) } var b = 0 while b < 10 { b += 1 } //do while 처럼 먼저 실행 코드 repeat { b += 1 } while a < 10 guard 배우기 var a: Int? = 0 var b: Int? = 5 /* func foo(value: Int?) { if let value = value { print(value) } else { pr..