[iOS] app size 최소화

카메라, 동영상 편집 앱을 만들 때 필터나 효과를 입히기 위한 리소스 크기가 커서 함께 패키징 하기에 부담스러울 때가 있다. 이런경우 앱스토어에 번들을 올려두고 on demand resource로 다운로드 받도록 하면 최초 다운로드 받을 때 앱의 크기를 줄일 수 있다.

On-Demand Resources

관련 API

[Tip] Crash at converting a html into NSAttributedstring

https://stackoverflow.com/questions/53954178/initialization-of-nsattributedstring-is-crashing-application

  • 결론 (html -> NSAttributedString) 변환을 사용하지 말고 minimal syntax를 정의해서 custom parser를 통해 NSAttributedString으로 변환하는게 바람직함.

[Tip] iOS 11 Ambiguous Layouts

stackView 안에 들어갈 때 uilabel같은 텍스트 길이에 따라서 높이가 결정되는 control 계열은 문자열이 없을 때 높이값이 모호하게 된다. 보통 hugging, compressionResistance priority를 조정하면 해결 되기는 한다.


label.setContentHuggingPriority(.required, for: .vertical)
    label.setContentCompressionResistancePriority(.required, for: .vertical)

하지만 iOS 11에서 Ambiguous Layouts warning이 발생하게 된다.

label의 텍스트 내용이 없을 때 구체적으로 높이를 얼마만큼 되어야 하는지 stackView arrangedSubview 조건이 모호하게 된다.

즉, 명시적으로 label의 최소 높이를 constraint로 지정 하게 되면 이 warning과 layout이 올바로 나오지 않는 현상이 해결된다.

[iOS] fix fastlane-plugin-firebase_app_distribution undefined

if fastlane add_plugin dose not work

[!] Could not find lane 'ios firebase_app_distribution'. Available lanes: ios release_dev, ios release_beta, ios release_prod, ios pre_build, ios increment_marketing_version, ios build, ios upload_to_firebase, ios upload_to_appstoreconnect, ios upload_to_crash

try below solution

// gemspec of firebase fastlane plugin 
// https://github.com/fastlane/fastlane-plugin-firebase_app_distribution/blob/master/fastlane-plugin-firebase_app_distribution.gemspec

$vi Gemfile
// add plugin
gem "fastlane-plugin-firebase_app_distribution" 

$bundle update

Using fastlane 2.167.0
Fetching fastlane-plugin-firebase_app_distribution 0.2.4
Installing fastlane-plugin-firebase_app_distribution 0.2.4

...
// then add plugin
$fastlane add_plugin firebase_app_distribution

// or update plugins
$fastlane update_plugins

References

https://stackoverflow.com/questions/60783449/how-to-fix-fastlane-plugin-firebase-app-distribution-undefined

AVFoundation 동영상 편집

동영상 편집 잘 정리됨

레터박스

https://forums.raywenderlich.com/t/extend-video-render-size-and-add-background-ios-swift/97957

비디오 화면전환

https://github.com/robovm/apple-ios-samples/tree/master/AVCustomEdit/AVCustomEdit

PIP

https://abdulazeem.wordpress.com/2012/04/02/video-manipulation-in-ios-resizingmerging-and-overlapping-videos-in-ios/

[iOS] 프로젝트 설정 & 환경구성

CI & CD (Fastlane)

MVVM with RxSwift

Thiiing 이라는 서비스를 같이 개발하신 분 기술 블로그에 내용이 잘 정리 되어 있어 링크를 남김

carthage git early EOF, index-pack failed

remote: Enumerating objects: 1265, done.
remote: Counting objects: 100% (1265/1265), done.
remote: Compressing objects: 100% (1003/1003), done.
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

$git config –global core.compression 0