Skip to content

Commit

Permalink
Add fabric to the app
Browse files Browse the repository at this point in the history
  • Loading branch information
tsabend committed Jul 7, 2016
1 parent a97308d commit aa3b98f
Show file tree
Hide file tree
Showing 64 changed files with 3,031 additions and 1,389 deletions.
Binary file added Fabric.framework/Fabric
Binary file not shown.
60 changes: 60 additions & 0 deletions Fabric.framework/Headers/FABAttributes.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
//
// 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 fab_nullable nullable
#define fab_nonnull nonnull
#define fab_null_unspecified null_unspecified
#define fab_null_resettable null_resettable
#define __fab_nullable __nullable
#define __fab_nonnull __nonnull
#define __fab_null_unspecified __null_unspecified
#else
#define fab_nullable
#define fab_nonnull
#define fab_null_unspecified
#define fab_null_resettable
#define __fab_nullable
#define __fab_nonnull
#define __fab_null_unspecified
#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 new versions that
* are defined above.
*/
#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
77 changes: 77 additions & 0 deletions Fabric.framework/Headers/Fabric.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
//
// 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.");

@end

NS_ASSUME_NONNULL_END

57 changes: 57 additions & 0 deletions Fabric.framework/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>14F1021</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Fabric</string>
<key>CFBundleIdentifier</key>
<string>io.fabric.sdk.ios</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>Fabric</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.6.7</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>iPhoneOS</string>
</array>
<key>CFBundleVersion</key>
<string>53</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>13C75</string>
<key>DTPlatformName</key>
<string>iphoneos</string>
<key>DTPlatformVersion</key>
<string>9.2</string>
<key>DTSDKBuild</key>
<string>13C75</string>
<key>DTSDKName</key>
<string>iphoneos9.2</string>
<key>DTXcode</key>
<string>0721</string>
<key>DTXcodeBuild</key>
<string>7C1002</string>
<key>MinimumOSVersion</key>
<string>6.0</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2015 Twitter. All rights reserved.</string>
<key>UIDeviceFamily</key>
<array>
<integer>3</integer>
<integer>2</integer>
<integer>1</integer>
<integer>4</integer>
</array>
</dict>
</plist>
6 changes: 6 additions & 0 deletions Fabric.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
framework module Fabric {
umbrella header "Fabric.h"

export *
module * { export * }
}
28 changes: 28 additions & 0 deletions Fabric.framework/run
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# run
#
# Copyright (c) 2015 Crashlytics. All rights reserved.

# Figure out where we're being called from
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )

# Quote path in case of spaces or special chars
DIR="\"${DIR}"

PATH_SEP="/"
VALIDATE_COMMAND="uploadDSYM\" $@ validate run-script"
UPLOAD_COMMAND="uploadDSYM\" $@ run-script"

# Ensure params are as expected, run in sync mode to validate
eval $DIR$PATH_SEP$VALIDATE_COMMAND
return_code=$?

if [[ $return_code != 0 ]]; then
exit $return_code
fi

# Verification passed, upload dSYM in background to prevent Xcode from waiting
# Note: Validation is performed again before upload.
# Output can still be found in Console.app
eval $DIR$PATH_SEP$UPLOAD_COMMAND > /dev/null 2>&1 &
Binary file added Fabric.framework/uploadDSYM
Binary file not shown.
15 changes: 15 additions & 0 deletions PictoGif.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@
149D31D61C75480800866522 /* Resources */,
D9136ED375BA2D409DED5160 /* Embed Pods Frameworks */,
AD6F26EA791F5BB5B2362C58 /* Copy Pods Resources */,
48D1B2F41D2DEF1E00CFA7F3 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -402,6 +403,19 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-PictoGifTests/Pods-PictoGifTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
48D1B2F41D2DEF1E00CFA7F3 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Fabric/run\" 2b2061866e776581d2312160e9ddc7fa464fed90 7b0a68389936c817147e95af368559c8c776f38107b91ba489297d27be220181\n";
};
730D529F777D84F19D1D9D15 /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -640,6 +654,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
INFOPLIST_FILE = "$(SRCROOT)/PictoGif/Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down
4 changes: 3 additions & 1 deletion PictoGif/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//

import UIKit
import Fabric
import Crashlytics

@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {
Expand All @@ -16,7 +18,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {


Fabric.with([Crashlytics.self])
self.window = UIWindow()
self.window?.frame = UIScreen.mainScreen().bounds
let vc = ImagePickerViewController()
Expand Down
2 changes: 1 addition & 1 deletion PictoGif/Base.lproj/LaunchScreen.storyboard
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
Expand Down
1 change: 1 addition & 0 deletions PictoGif/IAPHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
*/

import StoreKit
import Crashlytics

public typealias ProductIdentifier = String
public typealias ProductsRequestCompletionHandler = (success: Bool, products: [SKProduct]?) -> ()
Expand Down
9 changes: 9 additions & 0 deletions PictoGif/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>2b2061866e776581d2312160e9ddc7fa464fed90</string>
<key>Kits</key>
<array>

</array>
</dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
Expand Down
2 changes: 2 additions & 0 deletions Podfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ target 'PictoGif' do
pod 'SwiftGifOrigin'
pod 'ASValueTrackingSlider'
pod 'Reveal-iOS-SDK', :configurations => ['Debug']
pod 'Fabric'
pod 'Crashlytics'
end


Expand Down
7 changes: 7 additions & 0 deletions Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
PODS:
- ASValueTrackingSlider (0.11.2)
- CGRectExtensions (2.0)
- Crashlytics (3.7.2):
- Fabric (~> 1.6.3)
- Fabric (1.6.7)
- Nimble (4.0.1)
- Quick (0.9.2)
- Reveal-iOS-SDK (1.6.2)
Expand All @@ -9,6 +12,8 @@ PODS:
DEPENDENCIES:
- ASValueTrackingSlider
- CGRectExtensions
- Crashlytics
- Fabric
- Nimble
- Quick
- Reveal-iOS-SDK
Expand All @@ -17,6 +22,8 @@ DEPENDENCIES:
SPEC CHECKSUMS:
ASValueTrackingSlider: 45c9f78252da60de01d8f2afe869aaf90dd978d9
CGRectExtensions: 67fa367a91d537bc2fcdd97069a66262777d1412
Crashlytics: 130ab943f8c78cda7a814b434f270b2e2c8a3cba
Fabric: caf7580c725e64db144f610ac65cd60956911dc7
Nimble: 0f3c8b8b084cda391209c3c5efbb48bedeeb920a
Quick: 18d057bc66451eedd5d1c8dc99ba2a5db6e60226
Reveal-iOS-SDK: e2250b3c155bcfac53ae223ddc1f76d08f206c33
Expand Down
1 change: 1 addition & 0 deletions Pods/Crashlytics/Crashlytics.framework/README

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Pods/Crashlytics/Crashlytics.framework/submit

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit aa3b98f

Please sign in to comment.