Archived
Confirmed sucessful Firebase/Crashlytics installation
This commit is contained in:
BIN
Binary file not shown.
+51
@@ -0,0 +1,51 @@
|
||||
//
|
||||
// FABAttributes.h
|
||||
// Fabric
|
||||
//
|
||||
// Copyright (C) 2015 Twitter, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x)))
|
||||
|
||||
#if !__has_feature(nullability)
|
||||
#define nonnull
|
||||
#define nullable
|
||||
#define _Nullable
|
||||
#define _Nonnull
|
||||
#endif
|
||||
|
||||
#ifndef NS_ASSUME_NONNULL_BEGIN
|
||||
#define NS_ASSUME_NONNULL_BEGIN
|
||||
#endif
|
||||
|
||||
#ifndef NS_ASSUME_NONNULL_END
|
||||
#define NS_ASSUME_NONNULL_END
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* The following macros are defined here to provide
|
||||
* backwards compatability. If you are still using
|
||||
* them you should migrate to the native nullability
|
||||
* macros.
|
||||
*/
|
||||
#define fab_nullable nullable
|
||||
#define fab_nonnull nonnull
|
||||
#define FAB_NONNULL __fab_nonnull
|
||||
#define FAB_NULLABLE __fab_nullable
|
||||
#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN
|
||||
#define FAB_END_NONNULL NS_ASSUME_NONNULL_END
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// Fabric.h
|
||||
// Fabric
|
||||
//
|
||||
// Copyright (C) 2015 Twitter, Inc.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
// you may not use this file except in compliance with the License.
|
||||
// You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing, software
|
||||
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "FABAttributes.h"
|
||||
|
||||
NS_ASSUME_NONNULL_BEGIN
|
||||
|
||||
#if TARGET_OS_IPHONE
|
||||
#if __IPHONE_OS_VERSION_MIN_REQUIRED < 60000
|
||||
#error "Fabric's minimum iOS version is 6.0"
|
||||
#endif
|
||||
#else
|
||||
#if __MAC_OS_X_VERSION_MIN_REQUIRED < 1070
|
||||
#error "Fabric's minimum OS X version is 10.7"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Fabric Base. Coordinates configuration and starts all provided kits.
|
||||
*/
|
||||
@interface Fabric : NSObject
|
||||
|
||||
/**
|
||||
* Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use.
|
||||
*
|
||||
* For example, in Objective-C:
|
||||
*
|
||||
* `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];`
|
||||
*
|
||||
* Swift:
|
||||
*
|
||||
* `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])`
|
||||
*
|
||||
* Only the first call to this method is honored. Subsequent calls are no-ops.
|
||||
*
|
||||
* @param kitClasses An array of kit Class objects
|
||||
*
|
||||
* @return Returns the shared Fabric instance. In most cases this can be ignored.
|
||||
*/
|
||||
+ (instancetype)with:(NSArray *)kitClasses;
|
||||
|
||||
/**
|
||||
* Returns the Fabric singleton object.
|
||||
*/
|
||||
+ (instancetype)sharedSDK;
|
||||
|
||||
/**
|
||||
* This BOOL enables or disables debug logging, such as kit version information. The default value is NO.
|
||||
*/
|
||||
@property (nonatomic, assign) BOOL debug;
|
||||
|
||||
/**
|
||||
* Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
|
||||
*/
|
||||
- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
|
||||
|
||||
/**
|
||||
* Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance.
|
||||
*/
|
||||
+ (instancetype)new FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance.");
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
BIN
Binary file not shown.
+6
@@ -0,0 +1,6 @@
|
||||
framework module Fabric {
|
||||
umbrella header "Fabric.h"
|
||||
|
||||
export *
|
||||
module * { export * }
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
#!/bin/sh
|
||||
|
||||
# run
|
||||
#
|
||||
# Copyright (c) 2015 Crashlytics. All rights reserved.
|
||||
#
|
||||
#
|
||||
# This script is meant to be run as a Run Script in the "Build Phases" section
|
||||
# of your Xcode project. It sends debug symbols to symbolicate stacktraces,
|
||||
# sends build events to track versions, and onboard apps for Crashlytics.
|
||||
#
|
||||
# This script calls upload-symbols twice:
|
||||
#
|
||||
# 1) First it calls upload-symbols synchronously in "validation" mode. If the
|
||||
# script finds issues with the build environment, it will report errors to Xcode.
|
||||
# In validation mode it exits before doing any time consuming work.
|
||||
#
|
||||
# 2) Then it calls upload-symbols in the background to actually send the build
|
||||
# event and upload symbols. It does this in the background so that it doesn't
|
||||
# slow down your builds. If an error happens here, you won't see it in Xcode.
|
||||
#
|
||||
# You can find the output for the background execution in Console.app, by
|
||||
# searching for "upload-symbols".
|
||||
#
|
||||
# If you want verbose output, you can pass the --debug flag to this script
|
||||
#
|
||||
|
||||
# Figure out where we're being called from
|
||||
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
|
||||
# If the first argument is specified without a dash, treat it as the Fabric API
|
||||
# Key and add it as an argument
|
||||
if [ -z "$1" ] || [[ $1 == -* ]]; then
|
||||
API_KEY_ARG=""
|
||||
else
|
||||
API_KEY_ARG="-a $1"; shift
|
||||
fi
|
||||
|
||||
# If a second argument is specified without a dash, treat it as the Build Secret
|
||||
# and add it as an argument
|
||||
if [ -z "$1" ] || [[ $1 == -* ]]; then
|
||||
BUILD_SECRET_ARG=""
|
||||
else
|
||||
BUILD_SECRET_ARG="-bs $1"; shift
|
||||
fi
|
||||
|
||||
# Build up the arguments list, passing through any flags added after the
|
||||
# API Key and Build Secret
|
||||
ARGUMENTS="$API_KEY_ARG $BUILD_SECRET_ARG $@"
|
||||
VALIDATE_ARGUMENTS="$ARGUMENTS --build-phase --validate"
|
||||
UPLOAD_ARGUMENTS="$ARGUMENTS --build-phase"
|
||||
|
||||
# Quote the path to handle folders with special characters
|
||||
COMMAND_PATH="\"$DIR/upload-symbols\" "
|
||||
|
||||
# Ensure params are as expected, run in sync mode to validate,
|
||||
# and cause a build error if validation fails
|
||||
eval $COMMAND_PATH$VALIDATE_ARGUMENTS
|
||||
return_code=$?
|
||||
|
||||
if [[ $return_code != 0 ]]; then
|
||||
exit $return_code
|
||||
fi
|
||||
|
||||
# Verification passed, convert and upload cSYMs in the background to prevent
|
||||
# build delays
|
||||
#
|
||||
# Note: Validation is performed again at this step before upload
|
||||
#
|
||||
# Note: Output can still be found in Console.app, by searching for
|
||||
# "upload-symbols"
|
||||
#
|
||||
eval $COMMAND_PATH$UPLOAD_ARGUMENTS > /dev/null 2>&1 &
|
||||
BIN
Binary file not shown.
Reference in New Issue
Block a user