목록Swift (726)
투케이2K

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] /* MARK: - [실시간 비콘 스캔 요약 설명] // ----------------------------------------- [필요한 import 선언] import CoreLocation import CoreBluetooth */ // ----------------------------------------- /* [필요한 class delegate 선언] class A_Main: UIViewController, CLLocationManagerDelegate { } */ // ----------------------------------------- /* [실시간 비콘 스캔 시작 방법] s..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명]

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [권한 부여 참고 사이트] https://blog.naver.com/kkh0977/222539543845 10. (ios/swift) 퍼미션 권한 요청 수행 실시 - info , permission [개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] [결과 출력] blog.naver.com [소스 코드] func openCamera(){ print("") print("===============================") print("[A_Main >> openCamera() :: 카메라 열기 수행 실시]") print("===============================..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명 :: 이미지에서 알파 타입 제거 실시]

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] ====================================== [엔터프라이즈 ipa 외부 배포용 생성 방법] 1. 프로젝트 [Edit Scheme] >> [아카이브 모드]를 >> [Enterprise]로 변경 2. 아카이브 진행 >> 오거나이저에서 [Distribute App] 선택 3. 아카이브 메소드를 [Enterprise] 선택 실시 4. Url 정보 (ipa, image) 임시 입력 (추후 manifest.plist 수정 진행) 5. 프로비져닝 파일을 엔터프라이즈 [distribution] 파일 선택 실시 6. [Export] 최종 완료 시 >> [manifest.plist] 파일과 [ipa] 파일 2..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] func changeAppIcon(iconName:String) { /* MARK: [참고 사항] 1. info.plist 에 동적으로 변경하려는 아이콘을 등록해야합니다 2. 동적으로 변경하려는 아이콘을 프로젝트에 추가해야합니다 3. 동적 아이콘 변경은 ios 10.3 버전 이상부터 사용할 수 있습니다 4. 호출 방법 : [실제 디바이스 기기에서 확인 필요] - self.changeAppIcon(iconName: "") // 기본 Assets 에서 설정한 아이콘 지정 실시 - self.changeAppIcon(iconName: "Icon1") // info.plist 에서 지정한 동적 파일 ..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [참고 사이트 주소] https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/app-icon/ App Icon - Icons and Images - iOS - Human Interface Guidelines - Apple Developer App Icon Every app needs a beautiful and memorable icon that attracts attention in the App Store and stands out on the Home screen. Your icon is the first opportunity to ..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [참고 사이트 주소] https://red-cherry-ring.tistory.com/16 [iOS] Xcode 업로드 오류 해결법 (App Store Connect 업로드 불가) 최근 MacOS 업데이트 후, Xcode로 Archive > Upload 과정을 거치고 있었다. 그런데 분명 App Store Connect로 Upload 성공이 떴는데 막상 App Store Connect에 가서 확인해보면 아래 사진처럼 빌드목록에 안보이다.. red-cherry-ring.tistory.com

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명 : canOpenURL 앱 설치 여부 확인 시 참고] [소스 코드] // MARK: [외부 앱 실행 실시 - 스키마 외부 열기] // [SEARCH FAST] : [외부 이동] /* 1. https://www.apple.com/kr/ 사이트에 접속해서 특정 앱 주소를 확인합니다 2. 크롬 앱 id 확인 : https://apps.apple.com/kr/app/google-chrome/id535886823 [id535886823 부분을 사용해서 외부앱을 실행합니다] 3. 크롬 스키마 확인 : googlechrome:// 4. 로직 : 외부앱 설치되었을 경우 >> 외부앱 실행 (스키마) / 외부앱이 설치되지 않은 경우..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] // MARK: [전화번호 주소록에 데이터 저장 메소드] let store = CNContactStore() // 전화번호 주소록 접근 객체 func saveAddress(){ print("") print("===============================") print("[ViewController >> saveAddress() :: 전화번호 주소록에 데이터 저장 실시]") print("===============================") print("") // [퍼미션 권한 확인] self.store.requestAccess(for: .contacts) { (granted, err..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명] [소스 코드] // MARK: [전화번호 주소록에 저장된 데이터 확인 메소드] let store = CNContactStore() // 전화번호 주소록 접근 객체 func readAddress(){ print("") print("===============================") print("[ViewController >> readAddress() :: 전화번호 주소록에 저장된 데이터 읽기 실시]") print("===============================") print("") // [퍼미션 권한 확인] self.store.requestAccess(for: .contacts) { (gran..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // ----------------------------------------- print("") print("===============================") print("[A_Main >> init_WebView() :: 웹뷰 초기 설정 값 정의 실시 및 웹뷰 로드 수행]") print("url :: \(_loadUrl)") print("===============================") print("") // ----------------------------------------- // [웹뷰 로컬 스토리지 속성 지정] // [전체 방문 데이터 지우기] /*WKWebsiteDataStore..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [방법 설명]

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] func testMain(){ print("") print("===============================") print("[MainController > testMain() : 테스트 메인 시작]") print("===============================") print("") /* [설 명] 1. brightness 를 사용해서 화면 밝기 값을 확인 및 제어 할 수 있습니다 2. brightness 값은 Float 데이터 형태로 0.0 ~ 1.0 까지 밝기 값을 나타냅니다 3. 필요사항 : import UIKit */ // 현재 설정된 화면 밝기 값 알아오기 실시 [Float 데이터 형] ..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // [앱 강제 종료 수행 방법 - exit 차이점] exit(0) : 성공적인 프로그램 종료 (Exit Success) exit(1) : 성공적이지 않은 프로그램 종료 (Exit Failure)

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // MARK: - [푸시 알림 전달 받음 상태 확인] func application(_ application: UIApplication, didReceiveRemoteNotification userInfo: [AnyHashable : Any]){ // [switch 문을 사용해서 분기 처리 실시] switch UIApplication.shared.applicationState { case .active: print("") print("===============================") print("[AppDelegate >> didReceiveRemoteNotification]") print("설명 :: ..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // ----------------------------------------- // [커스텀 버튼 생성 실시] let button = UIButton( frame: CGRect( x: self.view.frame.size.width - 70, // 가로 마진 y: statusBarHeight + 15, // 세로 마진 width: 50, // 가로 크기 height: 50 // 세로 크기 ) ) // 마진 및 사이즈 지정 button.backgroundColor = .white // 배경 색상 지정 button.setTitle("", for: .normal) // 타이틀 지정 button.setImage(UIIma..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] func testMain(){ print("") print("===============================") print("[ViewController >> testMain() :: 테스트 메인 함수 수행 실시]") print("===============================") print("") // [초기 각 변수 선언 실시] var strData = "hello" var intData = 10 var boolData = true var douData = 20.5 var arrData = [10, 20] var dicData = ["name":"twok", "age":28] as [String..

[개발 환경 설정] 개발 툴 : XCODE 개발 언어 : SWIFT [소스 코드] // MARK: - [웹뷰 실시간 url 변경 감지 실시] func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void) { let _shouldUrl = String(describing: webView.url?.description ?? "") var action: WKNavigationActionPolicy? guard let url = navigationAction.request.url else { ret..