iPhone
Build .app file for Simulator using fastlane
시뮬레이터에 업로드 하기 위한 .app 파일 빌드 build_app( scheme: options[:scheme], project: config[:project], # configuration: build_configuration, clean: true, derived_data_path: options[:output], skip_package_ipa: true, skip_archive: true, destination: "generic/platform=iOS Simulator", )
아이폰 시뮬레이터 Gif로 녹화 하기
시뮬레이터 상단 카메라 버튼 alt를 누르면 영상으로 바뀐다alt 클릭으로 녹화시작 녹화 완료 후 우측하단에 미리보기가 뜨는데 여기에 우클릭 후 save as Animated Image 클릭
Firebase 이벤트 로깅 놓치기 쉬운 유의사항
firebase.google.com/docs/reference/android/com/google/firebase/analytics/FirebaseAnalytics.Event FirebaseAnalytics.Event firebase.ml.naturallanguage.translate firebase.google.com 앱당 최고 500개 events event 개당 최대 25 파라미터 event name 최대 40글자 (알파벳, 언더스코어"_" 사용 가능) 유저 행동과 네이티브 코드에 연결될만한 이벤트가 정의하기 편함 예: click_button { view: "LoginViewController" name: "Login" } design system이 있다면 swizzling 을 통해 모든 행동에다가 ..
Swift 팀원 및 원격 빌드를 위한 cocoapods 프레임워크 캐싱
팀은 없지만 잦은 빌드로 인해 Jenkins + bitbucket + fastlane으로 원격 빌드를 구성하고 자주 Release build를 배포하기 위해 빌드 시간의 개선이 필요했습니다. 기존에 빠른 빌드를 위해 Carthage의 framework를 썼지만 Xcode12로 넘어오는주에 급하게 동작을 안해서 Cocoapods로 다시 옮겼습니다. Cocoapods plugin중에 그랩에서 만든 다음 플러그인을 사용합니다. github.com/grab/cocoapods-binary-cache 명령어와 아래에서 Podfile만 참고해도 잘작동합니다 github.com/grab/cocoapods-binary-cache/blob/master/PodBinaryCacheExample/Podfile 명령어 prebu..
cocoapods-rome does not specify a Swift version and none of the targets
[!] Unable to determine Swift version for the following pods: - `HGCircularSlider` does not specify a Swift version and none of the targets ... integrating it have the `SWIFT_VERSION` attribute set. Please contact the author or set the `SWIFT_VERSION` attribute in at least one of the targets that integrate this pod. - `SwiftDate` does not specify a Swift version and none of the targets ... integ..
Swift Lint yml
https://github.com/realm/SwiftLint Add SwiftLint pod pod 'SwiftLint' Add run script phase (use autocorrent for swiftlint to autocorrect files) ${PODS_ROOT}/SwiftLint/swiftlint autocorrect ${PODS_ROOT}/SwiftLint/swiftlint Add .swiftlint.yml in project root folder opt\_in\_rules: - explicit\_type\_interface #- empty\_count #- missing\_docs disabled\_rules: - line\_length - trailing\_whites..
AWS Simple Notification Service p12
Exporting .p12 APNS(Apple Push Notification Service) file for AWS SNS Notification The help link in SNS to AWS Document is useless they only provide how to create cem, pem file which they don’t use Step-by-step guide Getting the p12 file for update Create Apple Push Services Certificate from apple. Download and install Certificate. From KeyChainAccess.App export Apple Push Services to cert.p12 a..
Safe area / layout by code for iPhone X, XS, XR, XS Max
simple fix let SAFE_TOP: CGFloat = UIScreen.main.applicationFrame.height >= 792 ? 22.0 : 0 let SAFE_BOTTOM: CGFloat =UIScreen.main.applicationFrame.height >= 792 ? 34.0 : 0 for ipad use below struct Constraints { static var STATUS_HEIGHT: CGFloat { if #available(iOS 11.0, *) { let window: UIWindow = UIApplication.shared.windows[0] let safeFrame = window.safeAreaLayoutGuide.layoutFrame return saf..
Underline text / title in UIButton
use NSAttributedString to underline the string itself let btShop: UIButton = UIButton() btShop.frame = CGRect(x: 40, y: 240, width: 320, height: 50) let attributedString: NSAttributedString = NSAttributedString(string: NSLocalizedString("Buy", comment: ""), attributes:[ NSAttributedString.Key.font : UIFont.systemFont(ofSize: 16.0), NSAttributedString.Key.foregroundColor : UIColor.gray, NSAttribu..
rbenv install stuck at installing openssl
rbenv install 2.7.1 seems like it's stuck try this, you will see the logs that it's working rbenv install -v 2.7.1
iOS10 firebase crashlytics showing NSInternalInconsistencyException
oastackview NSInternalInconsistencyException iOS 10 crash in firebase remove stackview.addArrangedSubview(innerView) change to let stackview: OAStackView = OAStackView.init(arrangedSubviews: allIndicator)
AWS SNS iOS push certificate
create pem file download filename.cer from itunes and doubleclick to add to key chaingo to key chain and export Apple Push Services (and key below) to filename.p12save both as same name save the macro below as awssnscert```FILENAME="$1"pem=".pem"p12=".p12"cer=".cer"out="_out"cert="_cert"key="_key"openssl x509 -in $FILENAME$cer -inform DER -out $FILENAME$cert$pemopenssl pkcs12 -in $FILENAME$p12 -..
ERROR ITMS-90206
For using extensions (watch extension, today extension) with Cocoapods (v1.0) ERROR ITMS-90206 Build Settings -> Embedded Content Contains Swift Code -> "NO"Build Phases -> Embed Pod Frameworks -> X (Delete this) Build Phases -> + (add Run Script) -> add below script cd "${CONFIGURATION_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/" if [[ -d "Frameworks" ]]; then rm -fr Frameworks fi"
관심사
https://github.com/facebook/AsyncDisplayKit https://github.com/colemancda/NetworkObjects Dynamic Grid LayoutSalvattore (from left to right) - http://salvattore.comJQuery.waterfall (from highest to lowest) - http://dfcreative.github.io/projects/waterfall/ handlebars tutorial - 19th of below linkhttps://www.youtube.com/user/ht4eg/videos http://www.dringend.cc/ipad 개발 TUIO protocol 통신을 이용한 제어https:..
AppDelegate UIViewController Transition Animation
UIViewController *nextViewController = [[UIViewController alloc] init]; UIView *screenShot = [self.window snapshotViewAfterScreenUpdates:YES]; [nextViewController.view addSubview:screenShot]; self.window.rootViewController = viewController; [UIView animateWithDuration:0.5 animations:^{ screenShot.layer.opacity = 0.0; } completion:^(BOOL finished) { [screenShot removeFromSuperview]; }]; for uivie..
Xcode plugin
alcatraz 를 이용해서 설치fuzzyautocomplete - 타이핑 자동완성 도움injectionplugin - 실행중에 코드 인젝션scxcodeminimap - 서브라임텍스트 처럼 미니맵xalign - '=' 을 기준으로 정렬
UIWebView remove top 20px
UIWebView automatically sets 20px margin on the top of mobile web view inside UIViewController set this: [self setAutomaticallyAdjustsScrollViewInsets:NO]; 20px should be now gone
NSData dataWithContentsOfURL returns nil
NSData dataWithContentsOfURL returns nil solution :just restart ios simulator (exit the simulator comletely)this often happens after xcode 6 don't know why (when wifi changes to another place simulator error occurs)