Titanium에서 Crashlytics 소개
6930 단어 Titanium
Titanium 프로젝트 만들기
$ ti create --id be.k0suke.crashlytics --name Crashlytics --platforms ios --type app --url http:// --workspace-dir .
일단 빌드합시다.
$ cd Crashlytics
$ ti build -p ios -T device -C XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
/path/to/Crashlytics/build/iphone/Crashlytics.xcodeproj
로 Xcode 프로젝트가 생성됩니다.Fabric을 시작합니다.

Select your Xcode Project에는 Crashlytics.xcodeproj가 (아마) 존재하지 않으므로 Browse...에서
/path/to/Crashlytics/build/iphone/Crashlytics.xcodeproj
를 선택합니다.
선택하면 Xcode가 시작되고 Titanium에서 생성한 프로젝트가 열립니다.
Crashlytics 설치

2. Paste in the following command에서 Copy를 클릭하여 스크립트를 복사해 봅시다.

Fabric에 따라 Build Phases를 선택하고 "+"에서 New Run Script Phase를 선택하십시오.


Run Script를 열고 Shell에 이전에 복사한 스크립트를 붙여 넣습니다.

Cmd+B로 빌드합니다. 빌드가 끝나면 Fabric이 다음과 같은 화면으로 전환합니다.

Xcode의 Frameworks를 열어 봅시다.

Fabric의 트렁크 아이콘을 Xcode의 Frameworks로 드래그 앤 드롭하고 Finish를 클릭합니다.

Framewroks에 Fabric.framework 및 Crashlytics.framework가 추가되었는지 확인하십시오.

Fabric이 다음 화면으로 전환합니다.

Xcode에서 Classes → API → TiApp.m을 엽니다.

#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
를 이 근처에 복사합니다.
#ifdef KROLL_COVERAGE
# import "KrollCoverage.h"
#endif
#import <Fabric/Fabric.h>
#import <Crashlytics/Crashlytics.h>
TiApp* sharedApp;
int TiDebugPort = 2525;

[Fabric with:@[CrashlyticsKit]];
를 이 근처에 복사합니다.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions_
{
[Fabric with:@[CrashlyticsKit]];
started = [NSDate timeIntervalSinceReferenceDate];
[TiExceptionHandler defaultExceptionHandler];

Cmd+R로 실제 기기에 설치되어 앱이 시작됩니다.

수고하셨습니다.
Reference
이 문제에 관하여(Titanium에서 Crashlytics 소개), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/k0sukey/items/4e7f30491210d8f38246텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)