블로그 이미지
Every unexpected event is a path to learning for you. blueasa

카테고리

분류 전체보기 (2795)
Unity3D (852)
Programming (478)
Server (33)
Unreal (4)
Gamebryo (56)
Tip & Tech (185)
협업 (61)
3DS Max (3)
Game (12)
Utility (68)
Etc (98)
Link (32)
Portfolio (19)
Subject (90)
iOS,OSX (55)
Android (14)
Linux (5)
잉여 프로젝트 (2)
게임이야기 (3)
Memories (20)
Interest (38)
Thinking (38)
한글 (30)
PaperCraft (5)
Animation (408)
Wallpaper (2)
재테크 (18)
Exercise (3)
나만의 맛집 (3)
냥이 (10)
육아 (16)
Total
Today
Yesterday
반응형
Posted by blueasa
, |

Last Christmas I bought my wife and myself a Synology NAS to store our pictures on. Given that I’d spent a lot of time over the last few years working on Git LFS, I always thought it would be pretty cool if you could use the NAS as an LFS server.

Like everything else these days, the thing can run apps. I looked around for what it would take to make an app for it and what I found seemed to be mostly a bunch of flaming hoops to jump through. I’m pretty lazy, so I dropped it.

The other day I was checking out Home Assistant and noticed it could be installed on the Synology via Docker. Wait … what? You can run Docker on it‽ Far out! It is Linux, so I guess that makes sense. Now it should be easy to set up an LFS server on it. We have a reference server that’ll do just fine for this.

To get running, first install the Docker app from Package Center. Start the app and head to the Registrytab. It’s hooked up to DockerHub by default. The search seems to love returning results for things you didn’t ask for, so it’s best to just search for rubyist. Searching for rubyist/git-lfs-server is far too specific, I guess, but that’s what you’re looking for. Click Download for download.

Once it’s downloaded, it’ll appear in the Image tab. Click Launch to launch.

This brings up the Docker app’s container wizard. It’s actually quite nice. Click the Advanced Settingsbutton. Set the following options in their respective tabs:

  • Advanced Settings: Enable auto-restart
  • Volume: Add a folder on the drive at a Mount Path of /var/git-lfs
  • Network: Select “Use the same network as Docker Host”
  • Environment: Configure any environment vars for the server

The full set of supported environment variables can be found in the lfs-test-server README, here are the ones you’ll need to set:

  • LFS_HOST: The host name of your NAS
  • LFS_ADMINUSER: The username of the admin user
  • LFS_ADMINPASS: The admin password

When setting LFS_HOST you’ll need to include the port that the LFS server is running on, which will be ":8080". For example, "foobar.localdomain:8080".

Once you’re done there, close the advanced settings and click the Next button. You’ll see a summary of the config. Click Apply.

Your LFS server is now running! Configure LFS by adding the following to the .lfsconfig file in the root of your repo:

[lfs]
	url="http://foobar.localdomain:8080/rubyist/myrepo"

If you have questions, tweet at @rubyist, I might answer.



[출처] https://killring.io/post/synology-for-lfs/

반응형
Posted by blueasa
, |

유니티에서 아이폰X의 하단 Home Indicator 비활성화 하는 방법 찾다가


유니티는 어느 클래스에 넣으란건지 몰라서 헤멨는데 알맞은 답변을 찾아서 펌~


[추가2]

Unity v5.6.5f1 이상에서 Build Settings에 옵션이 추가 됐는데 하단 소스 대응되는 옵션 스크린샷 추가 해놓음.

1. - (BOOL)prefersHomeIndicatorAutoHidden; // add this

-> Off 돼 있어야 함.


2. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures; // add this

-> 모두 On


[추가]

아래 소스를 적용해보니 Home Indicator가 Hide 되긴 하는데 아무 곳이나 터치(드래그 아님) 하면 Home Indicator가 활성화 되는 문제가 있어서 다른팀에 문의해보니 prefersHomeIndicatorAutoHidden을 YES로 하면 안된다고 한다.

prefersHomeIndicatorAutoHidden을 소스에서 없애라고 함.

없애고 테스트 해보니 원하는대로 동작(비활성화 상태에서 드래그하면 활성화 되면서 1회 드래그 무시)한다.


[설명]

Unity 5.6.4f1

XCode 9.1


XCode Project-Classes-UI 폴더에 가면 UnityViewControllerBaseiOS.h / UnityViewControllerBaseiOS.mm 파일이 있음.

해당 파일에 아래 add this 주석 달린 소스 추가


[참고]

This is for both status and edge protection


UnityViewControllerBaseiOS.h

Code (CSharp):
  1.  
  2. @interface UnityViewControllerBase : UIViewController
  3. {
  4. }
  5.  
  6. - (BOOL)shouldAutorotate;
  7.  
  8. - (BOOL)prefersStatusBarHidden;
  9. - (UIStatusBarStyle)preferredStatusBarStyle;
  10. - (BOOL)prefersHomeIndicatorAutoHidden; // add this
  11. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures; // add this
  12. @end
  13.  

UnityViewControllerBaseiOS.mm

Code (CSharp):
  1.  
  2. - (BOOL)shouldAutorotate
  3. {
  4.     return YES;
  5. }
  6.  
  7. // add this
  8. - (BOOL)prefersHomeIndicatorAutoHidden
  9. {
  10.     return YES;
  11. }
  12.  
  13. // add this
  14. - (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
  15. {
  16.     return UIRectEdgeAll;
  17. }
  18.  
  19. - (BOOL)prefersStatusBarHidden
  20. {
  21. ....
  22.  



[출처] https://forum.unity.com/threads/option-to-hide-iphone-x-home-indicator-edge-protection.500991/



반응형
Posted by blueasa
, |

UnityEngine.iOS.Device.generation 체크


[참조1] https://docs.unity3d.com/kr/current/ScriptReference/iOS.Device-generation.html

[참조2] https://docs.unity3d.com/kr/current/ScriptReference/iOS.DeviceGeneration.html

반응형
Posted by blueasa
, |

以下はUnity2017.1.1f1Xcode9.0GMで確認しています。

前置き

iPhoneXの対応がめんどくさそう
https://developer.apple.com/ios/human-interface-guidelines/overview/whats-new/

やりたいこと

Unity側でいちいち対応するのは面倒なので、Unityの描画領域を変更して、
iPhoneXの場合は上下に余白を持たせれば良いのでは?という案。

iPhone 8iPhoneX beforeiPhoneX after
iphonex8p.pngiphonex1.pngiphonex2.png

iPhoneX beforeの画像は、iPhone 8の画像と同じコードをそのまま実行したものです。
どう表示されるかはもちろんUnityでの実装によりますが、このサンプルの場合は
画面上部に合わせてテキストを表示しているので、iPhoneXの凹部に隠れてしまっています。

iPhoneX afterの画像は、Unityの描画領域を上50pt、下40pt短くし、余白部分に画像を設定しています。
ついでにステータスバーも表示しています。

ソース

GitHubに上げました。
https://github.com/tkyaji/UnityIPhoneXSupport

UnityIPhoneXSupport.unitypackage をインポートすると、
PostProcessBuildでビルド時にUnityのソースを書き換えて、余白を設定するようになります。

余白のサイズと色、または画像を定数で指定できます。

やってること

1. iPhoneXの場合、ステータスバーを表示する

iPhoneXではステータスバーの非表示は非推奨とのことなので、表示するようにします。

UnityのPlayerSettingsで、Status Ber Hiddenが設定されている場合のみ以下の処理を行います。

  • Info.plistの設定を、ステータスバー表示とする
  • UnityViewControllerBaseiOS.mmを書き換え、iPhoneXの場合は表示、それ以外は非表示とする

2. UnityのViewサイズを変更する

UnityAppController.mmUnityView.mmを書き換え、UIWindowUIViewのサイズをそれぞれ変更します。
高さを90pt短くし、Windowの位置を50pt下げています。
これで上50pt、下40ptの余白ができます。
上下余白部分にUIViewをそれぞれ設定し、色を設定します。
さらに画像がある場合はUIImageViewaddSubViewします。

備考

  • シミュレータで少し確認しただけなので、もしかしたら色々問題があるかもしれません。使用する場合は自己責任でお願いします。
  • iPhoneXのSafe Areaは左右にも余白があるため、ちゃんとやるなら左右にも気を使う必要がありそうです
  • 余白部分がただの黒帯とかだと、そのせいでリジェクトになる可能性があるかもしれません
  • iPhoneXかどうかは画面アスペクト比でざっくり判定しています



[출처] https://qiita.com/tkyaji/items/8cdc0a4324d4e89633e8

반응형
Posted by blueasa
, |



[링크] https://bitbucket.org/Unity-Technologies/assetbundledemo


[링크] https://assetstore.unity.com/packages/tools/utilities/assetbundle-manager-example-scenes-45836

반응형
Posted by blueasa
, |

XCode 최신 버전으로 업데이트 하고나서 빌드 하려니 GA 관련 Link 에러가 나서 찾아봤더니 아래 프레임워크가 필요하다고 한다.


리스트를 살펴보니 CoreData.framework가 빠져 있어서 수동 추가 후 정상 빌드 확인..




The Google Analytics SDK uses the CoreData and SystemConfiguration frameworks, so you will need to add the following to your application target's linked libraries:

  • libGoogleAnalyticsServices.a
  • AdSupport.framework
  • CoreData.framework
  • SystemConfiguration.framework
  • libz.dylib



[출처] https://stackoverflow.com/questions/22008892/google-analytics-doesnt-work-on-new-ios-project

반응형
Posted by blueasa
, |

[펌] ERROR ITMS-4238

Unity3D/Tips / 2017. 11. 2. 19:43


ios도 모르고 하이브리드 앱 개발하기 [ 25  ERROR ITMS-4238  ]





Xcode로 앱을 등록하는 과정에서 다음과 같은 오류가 생겼다.

ERROR ITMS-4238: "Redundant Binary Upload. There already exists a binary upload with build version '1' for train '1.0'" at SoftwareAssets/PreReleaseSoftwareAsset



일단 오류가 나면 당황스럽다.


위 에러는 등록하려는 앱을 중복 업로드할 수 없다는 내용이다.


같은 Version 의 Build 값이 같은 앱은 아이튠즈 커넥트에 등록 할 수 없다.



앱을 다시 등록 할 경우에 

Project > General > Identity > Build 를 수정해 주어야 한다. 


당연히 재배포 시에는 Version 까지 수정해 주어야 한다.




출처: http://cofs.tistory.com/248 [CofS]

반응형
Posted by blueasa
, |

iOS 10에서 Privacy 설정

기존 앱을 XCode8로 다시 빌드하면 
iOS 10에서 카메라나 다른 기능을 사용시 아무런 경고도 없이 Crash가 발생하게 된다.

디버그 메시지는 다음과 같다.

This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app’s Info.plist must contain an NSCameraUsageDescription key with a string value explaining to the user how the app uses this data.

iOS 10에서 아래와 같은 기능을 사용하기 위해서는 사용자의 확인 메시지를 설정해줘야 한다.

사용 설명을 요구하는 API 항목들

Data ClassXCode KeyRaw Info.plist Key
Apple MusicPrivacy - Media Library Usage DescriptionNSAppleMusicUsageDescription
BluetoothPrivacy - Bluetooth Peripheral Usage DescriptionNSBluetoothPeripheralUsageDescription
CalendarPrivacy - Calendars Usage DescriptionNSCalendarsUsageDescription
CameraPrivacy - Camera Usage DescriptionNSCameraUsageDescription
ContactsPrivacy - Contacts Usage DescriptionNSContactsUsageDescription
HealthPrivacy - Health Share Usage Description Privacy - Health Update Usage DescriptionNSHealthShareUsageDescription NSHealthUpdateUsageDescription
HomePrivacy - HomeKit Usage DescriptionNSHomeKitUsageDescription
LocationPrivacy - Location Always Usage Description Privacy - Location When In Use Usage DescriptionNSLocationAlwaysUsageDescription NSLocationWhenInUseUsageDescription
MicrophonePrivacy - Microphone Usage DescriptionNSMicrophoneUsageDescription
MotionPrivacy - Motion Usage DescriptionNSMotionUsageDescription
PhotosPrivacy - Photo Library Usage DescriptionNSPhotoLibraryUsageDescription
RemindersPrivacy - Reminders Usage DescriptionNSRemindersUsageDescription
SiriPrivacy - Siri Usage DescriptionNSSiriUsageDescription
Speech RecognitionPrivacy - Speech Recognition Usage DescriptionNSSpeechRecognitionUsageDescription
TV Provider AccountPrivacy - TV Provider Usage DescriptionNSVideoSubscriberAccountUsageDescription

Info.plist에서 Privacy 설정을 추가해주면 된다.


다음은 사진 라이브러리와 카메라 접근시 사용 예제입니다.

Privacy - Camera Usage Description
Privacy - Photo Library Usage Description

[추가] Decription String을 필수로 넣어야 함. - blueasa

[Privacy - Camera Usage Description] Everyplay requires access to the Camera library

[Privacy - Photo Library Usage Description] Everyplay requires access to the photo library

[Privacy - Calenders Library Usage Description] Some ad content may access calendar


앱에서 사진 라이브러리 접근시 다음과 같은 메시지를 보게 된다.



출처: http://kka7.tistory.com/40 [까칠하게 살자]


[참조1] https://dev.tapjoy.com/ko/submitting-ios-results-warning-nscalendarsusagedescription/


[참조2] http://docs.telerik.com/platform/knowledge-base/troubleshooting/troubleshooting-app-rejected-from-app-store-missing-info-plist-key



반응형
Posted by blueasa
, |


[Windows Path] Users\<user>\AppData\LocalLow\Unity\WebPlayer\Cache\<project_name>\


[Mac Path] ~/Library/Caches/Unity/



[출처] http://answers.unity3d.com/questions/956259/where-is-the-cache-folder-for-wwwloadfromcacheordo.html

반응형
Posted by blueasa
, |