Skip to content

Commit

Permalink
Added Fabric
Browse files Browse the repository at this point in the history
  • Loading branch information
zaru committed Feb 19, 2017
1 parent 7de2e98 commit 52583a2
Show file tree
Hide file tree
Showing 79 changed files with 1,744 additions and 476 deletions.
1 change: 1 addition & 0 deletions Fabric.framework/Fabric
1 change: 1 addition & 0 deletions Fabric.framework/Headers
1 change: 1 addition & 0 deletions Fabric.framework/Modules
1 change: 1 addition & 0 deletions Fabric.framework/Resources
Binary file added Fabric.framework/Versions/A/Fabric
Binary file not shown.
51 changes: 51 additions & 0 deletions Fabric.framework/Versions/A/Headers/FABAttributes.h
Original file line number Diff line number Diff line change
@@ -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 changes: 82 additions & 0 deletions Fabric.framework/Versions/A/Headers/Fabric.h
Original file line number Diff line number Diff line change
@@ -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

6 changes: 6 additions & 0 deletions Fabric.framework/Versions/A/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 * }
}
53 changes: 53 additions & 0 deletions Fabric.framework/Versions/A/Resources/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<?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>15G31</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>Fabric</string>
<key>CFBundleIdentifier</key>
<string>io.fabric.sdk.mac</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.11</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>CFBundleVersion</key>
<string>60</string>
<key>DTCompiler</key>
<string>com.apple.compilers.llvm.clang.1_0</string>
<key>DTPlatformBuild</key>
<string>7D1014</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>15E60</string>
<key>DTSDKName</key>
<string>macosx10.11</string>
<key>DTXcode</key>
<string>0731</string>
<key>DTXcodeBuild</key>
<string>7D1014</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>
1 change: 1 addition & 0 deletions Fabric.framework/Versions/Current
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.
14 changes: 14 additions & 0 deletions NotifyHub.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@
4532044B1CD4EBDD0099F445 /* Resources */,
CF6CFDD16A84D4EDA4DA9630 /* [CP] Embed Pods Frameworks */,
AF304FE49BF706460B59E9A5 /* [CP] Copy Pods Resources */,
45BE1CF21E59DB0C00E2AC06 /* ShellScript */,
);
buildRules = (
);
Expand Down Expand Up @@ -306,6 +307,19 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
45BE1CF21E59DB0C00E2AC06 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "./Fabric.framework/run ce762277491c721cba77e3f3b14094bf9790482e a3d709e70a31cc0f62006915e07ccbdbf57e399392884e6e17264b28077b1c2d";
};
AF304FE49BF706460B59E9A5 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down
8 changes: 7 additions & 1 deletion NotifyHub/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
//

import Cocoa
import Fabric
import Crashlytics
import Keys
import Alamofire
import SwiftyJSON
Expand All @@ -19,9 +21,13 @@ class AppDelegate: NSObject, NSApplicationDelegate, NSUserNotificationCenterDele
var statusItem = NSStatusBar.systemStatusBar().statusItemWithLength(-2)
let popover = NSPopover()
let MyNotification = "MyNotification"

func applicationDidFinishLaunching(aNotification: NSNotification) {

let ud = NSUserDefaults.standardUserDefaults()
ud.registerDefaults(["NSApplicationCrashOnExceptions": true])
Fabric.with([Crashlytics.self])

NSNotificationCenter.defaultCenter().addObserver(self, selector: #selector(AppDelegate.updatePopoverView(_:)), name: MyNotification, object: nil)

// debug setting
Expand Down
14 changes: 14 additions & 0 deletions NotifyHub/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@
</array>
<key>CFBundleVersion</key>
<string>2</string>
<key>Fabric</key>
<dict>
<key>APIKey</key>
<string>ce762277491c721cba77e3f3b14094bf9790482e</string>
<key>Kits</key>
<array>
<dict>
<key>KitInfo</key>
<dict/>
<key>KitName</key>
<string>Crashlytics</string>
</dict>
</array>
</dict>
<key>LSMinimumSystemVersion</key>
<string>$(MACOSX_DEPLOYMENT_TARGET)</string>
<key>LSUIElement</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 'NotifyHub' do
pod 'AlamofireImage', '~> 2.5'
pod 'SwiftyJSON', '~> 2.4'
pod 'LoginServiceKit', :git => 'https://github.com/Clipy/LoginServiceKit.git', :tag => 'v0.0.1'
pod 'Fabric'
pod 'Crashlytics'
end

plugin 'cocoapods-keys', {
Expand Down
9 changes: 8 additions & 1 deletion Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ PODS:
- Alamofire (3.5.1)
- AlamofireImage (2.5.0):
- Alamofire (~> 3.5)
- Crashlytics (3.8.3):
- Fabric (~> 1.6.3)
- Fabric (1.6.11)
- Keys (1.0.0)
- LoginServiceKit (0.0.1)
- SwiftyJSON (2.4.0)

DEPENDENCIES:
- Alamofire (~> 3.5)
- AlamofireImage (~> 2.5)
- Crashlytics
- Fabric
- Keys (from `Pods/CocoaPodsKeys`)
- LoginServiceKit (from `https://github.com/Clipy/LoginServiceKit.git`, tag `v0.0.1`)
- SwiftyJSON (~> 2.4)
Expand All @@ -28,10 +33,12 @@ CHECKOUT OPTIONS:
SPEC CHECKSUMS:
Alamofire: 0dfba1184a543e2aa160f4e39cac4e8aba48d223
AlamofireImage: 2d34936e5201270bb17a316a786e90e83b4a249d
Crashlytics: 2b6dbe138a42395577cfa73dfa1aa7248cadf39e
Fabric: 5911403591946b8228ab1c51d98f1d7137e863c6
Keys: 9c35bf00f612ee1d48556f4a4b9b4551e224e90f
LoginServiceKit: 92aee420b05d163e356f6c5cbef64dd23eef93e1
SwiftyJSON: 96918c1bf505efa50c4f72957018dd3452090c9c

PODFILE CHECKSUM: 3ae0ca2ce0a94241da40acc5a7df5c8fbee43d07
PODFILE CHECKSUM: b4e00dd7edf4cfd8e4fd201faa80ca34daad6c1c

COCOAPODS: 1.2.0
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.

1 change: 1 addition & 0 deletions Pods/Crashlytics/OSX/Crashlytics.framework/Crashlytics

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

1 change: 1 addition & 0 deletions Pods/Crashlytics/OSX/Crashlytics.framework/Headers

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

1 change: 1 addition & 0 deletions Pods/Crashlytics/OSX/Crashlytics.framework/Modules

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

1 change: 1 addition & 0 deletions Pods/Crashlytics/OSX/Crashlytics.framework/Resources

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

Binary file not shown.
Loading

0 comments on commit 52583a2

Please sign in to comment.