반응형

다음은 스크린 캡쳐 이벤트 처리 방법이다.

말 그대로 이벤트만 받는다. 막는건 안된다.

// Objective C
NSOperationQueue *mainQueue = [NSOperationQueue mainQueue];
[[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationUserDidTakeScreenshotNotification
                                                  object:nil
                                                   queue:mainQueue
                                              usingBlock:^(NSNotification *note) {
                                                 // executes after screenshot
                                              }];


// Swift
NotificationCenter.default.addObserver(
    forName: UIApplication.userDidTakeScreenshotNotification,
    object: nil,
    queue: .main) { notification in
        //executes after screenshot
}



방법 1
func detectScreenShot(action: @escaping () -> ()) {
    let mainQueue = OperationQueue.main
    NotificationCenter.default.addObserver(forName: UIApplication.userDidTakeScreenshotNotification, object: nil, queue: mainQueue) { notification in
        // executes after screenshot
        action()
    }
}


방법  2
func detectScreenShot(action: () -> ()) {
    let mainQueue = NSOperationQueue.mainQueue()
    NSNotificationCenter.defaultCenter().addObserverForName(UIApplicationUserDidTakeScreenshotNotification, object: nil, queue: mainQueue) { notification in
        // executes after screenshot
        action()
    }
}

방법1, 2 실행방법 
detectScreenShot { () -> () in
    print("User took a screen shot")
}
반응형
블로그 이미지

SKY STORY

,
반응형

환경 설정이 정상적으로 되어있는지 확인하려면 아래 사이트에서 가능하다.

 

Apple Search API Validation Tool 

https://search.developer.apple.com/appsearch-validation-tool

ex) 도메인이 'www.youtube.com'일 경우 검증

※ 주의 사항 : 

☞ 유니버셜링크는 앱링크 도메인이 등록된 앱이 스토어에 반영되어 있어야 하며 최도 등록시 활성화 되는데 최대 48시간의 시간이 걸릴  있다. (대부분 바로 적용 됨.)

☞ 위의 검증 사이트는 참고용으로만 사용한다. 정상적으로 동작하지만 경고를 출력하기도 한다. 예를들어 youtube.com은 정상으로 출력되나 google.com의 경우 오류가 뜬다. (참고만 할 것!)

 

 

Branch

https://branch.io/resources/aasa-validator/

Branch 와 Firebase 다이나믹 링크 비교

https://blog.branch.io/ko/branch가-firebase-다이나믹-링크를-대체할까요/

 

Apps Flyer

https://www.appsflyer.com/tools/app-links-validator/

 

Universal Link Validator

https://limitless-sierra-4673.herokuapp.com

 

yURL: Universal Links / AASA File Validator

https://yurl.chayev.com

 

 

※ 주의 사항

마지막으로, 테스트 도중 AASA파일을 수정했을 경우 앱은 이미 해당 파일을 앱 로컬 영역에 다운받아 캐싱되고 있으므로 변경된 사항이 적용되지 않았을 경우 다음과 같이 시도해 본다.

앱 삭제, 사파리의 '방문 기록 및 웹 사이트 데이터 지우기', 재부팅, 다시 앱 설치  이렇게 3번 반복!

이후 변경내용이 적용 된다. 

 

 

 

 

2021.03.16 - [iOS/Tips] - Universal Link (1/4) - 네이티브 환경설정

2021.03.16 - [iOS/Tips] - Universal Link (2/4) - 네이티브 링크 수신

2021.03.16 - [iOS/Tips] - Universal Link (3/4) - 웹서버 환경 설정

2021.03.16 - [iOS/Tips] - Universal Link (4/4) - 웹서버 환경 검증

2020.12.08 - [프로그래밍/Java Script] - Android, iOS 앱 설치여부 체크 및 스토어 이동

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (1/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (2/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (3/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (4/4)

 

 

 

 

 

반응형
블로그 이미지

SKY STORY

,
반응형

스마트폰 BTC 채굴앱

https://get.cryptobrowser.site/34473645

 

Earn coins while browsing the web

Earn bitcoins while watching videos, chatting, or playing online. It has never been so easy to increase your income! Tell your friends about CryptoTab Browser, invite them to join, and earn more together. Grow your network—get more profit!

get.cryptobrowser.site

 

apple-app-site-association 파일 생성 및 작성

'appID' [App ID Prefix].[Bundle ID] 작성해 준다.

{
    "applinks": {
        "apps": [],
        "details": [
            {
                "appID": "M1ACL7W8FR.com.example.myapp",
                "paths": [ "*" ]
            }
        ]
    }
}

 

해당 파일을 도메인 루트에 복사 한다.

해당 파일이 정상적으로 접근 가능한지 테스트해 본다.

ex) 웹 브라우저에서 등록된 도메인 URL로 접근했을 때 작성된 json 정보가 출력되는지 확인한다.

https://www.youtube.com/apple-app-site-association

 

※ 주의 사항 :

☞ App ID Prefix 부분은 Team ID로 잘 못 기입하지 않도록 주의 한다. 일반적으로 이 부분은 Team ID와 동일하지만 다른 경우도 있으니 반드시 App ID Prefix를 확인하고 사용하도록 한다.

위의 AASA파일 생성 시 반드시 큰 따옴표( " )를 사용해야 한다. 또한 파일의 확장자는 붙이지 않는다.

 

스마트폰 BTC 채굴앱

https://get.cryptobrowser.site/34473645

 

Earn coins while browsing the web

Earn bitcoins while watching videos, chatting, or playing online. It has never been so easy to increase your income! Tell your friends about CryptoTab Browser, invite them to join, and earn more together. Grow your network—get more profit!

get.cryptobrowser.site

 

2021.03.16 - [iOS/Tips] - Universal Link (1/4) - 네이티브 환경설정

2021.03.16 - [iOS/Tips] - Universal Link (2/4) - 네이티브 링크 수신

2021.03.16 - [iOS/Tips] - Universal Link (3/4) - 웹서버 환경 설정

2021.03.16 - [iOS/Tips] - Universal Link (4/4) - 웹서버 환경 검증

2020.12.08 - [프로그래밍/Java Script] - Android, iOS 앱 설치여부 체크 및 스토어 이동

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (1/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (2/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (3/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (4/4)

 

 

반응형
블로그 이미지

SKY STORY

,
반응형

iOS Deployment Target iOS 13이상 - Swift

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
    ...
    func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
        // Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
        // If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
        // This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
        guard let _ = (scene as? UIWindowScene) else { return }
        
        
        // Get URL components from the incoming user activity.
        guard let userActivity = connectionOptions.userActivities.first,
              userActivity.activityType == NSUserActivityTypeBrowsingWeb,
              let incomingURL = userActivity.webpageURL,
              let components = NSURLComponents(url: incomingURL, resolvingAgainstBaseURL: true) else {
            return
        }
        print("url = \(incomingURL.absoluteString)")
        
        // Check for specific URL components that you need.
        guard let path = components.path,
              let params = components.queryItems else {
            return
        }
        print("path = \(path)")
        
        if let param = params.first(where: { $0.name == "param" })?.value {
            print("param = \(param)")
        } else {
            print("parsing error")
        }
    }
    ...
}

 

iOS Deployment Target iOS 13미만 - Swift

class AppDelegate: UIResponder, UIApplicationDelegate {
    ...
    func application(_ application: UIApplication,
                     continue userActivity: NSUserActivity,
                     restorationHandler: @escaping ([UIUserActivityRestoring]?) -> Void) -> Bool
    {
        // Get URL components from the incoming user activity.
        guard userActivity.activityType == NSUserActivityTypeBrowsingWeb,
        let incomingURL = userActivity.webpageURL,
        let components = NSURLComponents(url: incomingURL, resolvingAgainstBaseURL: true) else {
            return false
        }
        print("url = \(incomingURL.absoluteString)")
        
        // Check for specific URL components that you need.
        guard let path = components.path,
        let params = components.queryItems else {
            return false
        }
        print("path = \(path)")
        
        if let param = params.first(where: { $0.name == "param" })?.value {
            print("param = \(param)")
            return true
        } else {
            print("parsing error")
            return false
        }
    }
    ...
}

 

iOS Deployment Target iOS 13미만 - Objective-C

- (BOOL)application:(UIApplication *)application continueUserActivity:(NSUserActivity *)userActivity restorationHandler:(void(^)(NSArray *restorableObjects))restorationHandler
{
	...
	if ([userActivity.activityType isEqualToString:NSUserActivityTypeBrowsingWeb]) {
		NSString *url = userActivity.webpageURL.absoluteString;
		NSLog(@"url = %@", url);
		return YES;
	}
	...
	return NO;
}

 

2021.03.16 - [iOS/Tips] - Universal Link (1/4) - 네이티브 환경설정

2021.03.16 - [iOS/Tips] - Universal Link (2/4) - 네이티브 링크 수신

2021.03.16 - [iOS/Tips] - Universal Link (3/4) - 웹서버 환경 설정

2021.03.16 - [iOS/Tips] - Universal Link (4/4) - 웹서버 환경 검증

2020.12.08 - [프로그래밍/Java Script] - Android, iOS 앱 설치여부 체크 및 스토어 이동

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (1/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (2/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (3/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (4/4)

 

반응형
블로그 이미지

SKY STORY

,
반응형

스마트폰 BTC 채굴앱

https://get.cryptobrowser.site/34473645

 

Earn coins while browsing the web

Earn bitcoins while watching videos, chatting, or playing online. It has never been so easy to increase your income! Tell your friends about CryptoTab Browser, invite them to join, and earn more together. Grow your network—get more profit!

get.cryptobrowser.site

 

웹에서 앱을 실행할 경우 대부분 URL scheme을 이용한다.

그런데 만약 같은 scheme id를 사용하는 앱이 2개 이상이면 

어떻게 될까?  안드로이드 운영체제에서는 앱 선택창이 떠서

원하는 앱을 실행할 수 있지만 iOS에서는 무작위로 실행된다.

(물론 내부적으로 규칙은 있겠지만... 공개되어있지 않음)

 

※ iOS 14.4.1버전 부터 타임 트릭을 이용한 앱 존재 여부 체크가

사파리가 비활성화 되도 타이머가 진행되어 앱이 존재하더라도

앱 실행 후 앱스토어 이동이 동시에 일어나는 문제가 발생한다.

 

이럴경우를 위해 URL scheme 대신 도메인 주소로 앱을 

실행할 수 있도록 한 것이 Universal Link이다.

 

유니버셜링크 환경설정 방법을 알아보자.

 

 

개발자 사이트 접속

https://developer.apple.com

 

Certificates, Identifiers & Profiles / Identifiers 선택

 

적용할 App ID 선택하고 'Associated Domains' 체크 

 

Provisioning Profile 설정이 바뀌었으므로 다시 활성화 시킨다.

 

 

Xcode에서 'Associated Domains' 을 추가

 

applinks 도메인 추가

 

스마트폰 BTC 채굴앱

https://get.cryptobrowser.site/34473645

 

Earn coins while browsing the web

Earn bitcoins while watching videos, chatting, or playing online. It has never been so easy to increase your income! Tell your friends about CryptoTab Browser, invite them to join, and earn more together. Grow your network—get more profit!

get.cryptobrowser.site

 

2021.03.16 - [iOS/Tips] - Universal Link (1/4) - 네이티브 환경설정

2021.03.16 - [iOS/Tips] - Universal Link (2/4) - 네이티브 링크 수신

2021.03.16 - [iOS/Tips] - Universal Link (3/4) - 웹서버 환경 설정

2021.03.16 - [iOS/Tips] - Universal Link (4/4) - 웹서버 환경 검증

2020.12.08 - [프로그래밍/Java Script] - Android, iOS 앱 설치여부 체크 및 스토어 이동

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (1/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (2/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (3/4)

2021.06.17 - [iOS/Tips] - Firebase dynamic link (다이나믹 링크) (4/4)

 

반응형

'개발 > iOS' 카테고리의 다른 글

Universal Link (3/4) - 웹서버 환경 설정  (0) 2021.03.16
Universal Link (2/4) - 네이티브 링크 수신  (0) 2021.03.16
ARC or Non-ARC Compile Flag 설정  (0) 2021.02.05
String to CGFloat  (0) 2021.01.06
SceneDelegate 포인터 구하기  (0) 2021.01.05
블로그 이미지

SKY STORY

,
반응형

root-level 디렉토리이 기본적으로 생성되어있는 디렉토리는 다음과 같다.

/Applications, /Library, /System, /Users

이곳에 폴더 및 심볼릭링크 생성이 권한문제로 불가능하지만

다음 과정을 통해 생성 가능하다.

/etc 디렉토리에 synthetic.conf 파일 생성

sudo touch /etc/synthetic.conf

 

파일 권한 설정

sudo chmod 755 /etc/synthetic.conf

 

파일에 디렉토리 이름 선언

# 폴더 생성

MyFolder

# 심볼릭링크 폴더 생성

MySymbolicLinkFolder    /Volumes/DATA/MySymbolicLinkFolder

 

저장 후 재부팅

2021.02.22 - [COIN] - DogeCoin Mining

2021.02.08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (4/4)

2021.02.08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (3/4)

2021.02.08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (2/4)

2021.02.08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (1/4)

2021.02.08 - [Proxmark3] - Proxmark3 RFID Tool

2021.02.05 - [프로그래밍/Java] - RSA 암복호화 테스트

2021.02.05 - [프로그래밍/Java] - RSA key 파일 생성

2021.02.05 - [개발노트] - 용어 정리

반응형

'개발 > Mac OS X' 카테고리의 다른 글

NVRAM / PRAM 재설정  (0) 2021.02.05
Mac OS 재설치  (0) 2021.02.05
MacBook을 AP로 설정하는 방법  (0) 2020.12.24
OpenSSL을 이용한 Key 정보 Text 변환  (0) 2020.12.17
SMC(System Management Controller) 재설정  (0) 2020.07.11
블로그 이미지

SKY STORY

,
반응형

도어락 Rfid 복제 테스트

 

1.rfid 정보 읽기

hf search

 

2.필요한 키 찾기

hf mf chk *1 ? t

 

3.모든 키 정보를 찾아내고 덤프파일 생성한다.

hf mf nested 1 0 A ffffffffffff d

 

4.홈 디렉토리에 ‘dumpkeys.bin’파일이 생성된다.

 

5.rfid내용 덤프

hf mf dump

... 중간 생략 ...

 

6.홈 디렉토리에 ‘dumpdata.bin’파일이 생성된다.

 

7.올려놓았던 원본 카드를 제거하고 복사할 공rfid카드를 올려놓는다.

 

8.원본 카드의 UID값으로 설정한다.

hf mf csetuid xxxxxxxx

 

9.복사할 카드에 원본데이터로 복원한다. (복제)

hf mf restore 1

... 중간 생략...

 

10.복제 완료. 

 

2021/02/08 - [Proxmark3] - Proxmark3 RFID Tool

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (1/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (2/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (3/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (4/4)

 

반응형

'IOT > Proxmark3' 카테고리의 다른 글

Proxmark3 V5 개발환경 구축 (3/4)  (0) 2021.02.08
Proxmark3 V5 개발환경 구축 (2/4)  (0) 2021.02.08
Proxmark3 V5 개발환경 구축 (1/4)  (0) 2021.02.08
Proxmark3 RFID Tool  (0) 2021.02.08
블로그 이미지

SKY STORY

,
반응형

Testing

 

1. USB 연결을 해제한 뒤 다시 재 접속을 한다. (연결이 안되면 재부팅 후 재시도)

 

2.USB연결 기기정보 확인

system_profiler SPUSBDataType

... 중간 생략 ...

 

3.proxmark3 시작

/usr/local/Cellar/proxmark3/3.1.0/bin/proxmark3 /dev/cu.usbmodem146224101

 

4.명령어 목록 확인

help

 

2021/02/08 - [Proxmark3] - Proxmark3 RFID Tool

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (1/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (2/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (3/4)

2021/02/08 - [Proxmark3] - Proxmark3 V5 개발환경 구축 (4/4)

 

반응형

'IOT > Proxmark3' 카테고리의 다른 글

Proxmark3 V5 개발환경 구축 (4/4)  (1) 2021.02.08
Proxmark3 V5 개발환경 구축 (2/4)  (0) 2021.02.08
Proxmark3 V5 개발환경 구축 (1/4)  (0) 2021.02.08
Proxmark3 RFID Tool  (0) 2021.02.08
블로그 이미지

SKY STORY

,