Skip to content

Commit

Permalink
Upgrade to Xcode 10.2 and Swift 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ProVir committed Mar 28, 2019
1 parent d2e9093 commit 0e93b29
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
4 changes: 2 additions & 2 deletions AppReports.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "AppReports"
s.version = "1.0.4"
s.version = "1.0.5"
s.summary = "Reports events and errors helper class"

s.description = <<-DESC
Expand All @@ -15,7 +15,7 @@ You can write helper on swift with support objc as wrapper for this class.
s.author = { "ViR (Vitaliy Korotkiy)" => "admin@provir.ru" }
s.source = { :git => "https://github.com/ProVir/AppReports.git", :tag => "#{s.version}" }

s.swift_version = '4.2'
s.swift_version = '5.0'

s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.10'
Expand Down
13 changes: 10 additions & 3 deletions AppReports.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
50A1C658224D61E4003A8554 /* AppReports.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = AppReports.podspec; sourceTree = "<group>"; };
50A1C65A224D6214003A8554 /* README.md */ = {isa = PBXFileReference; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = "<group>"; };
50A1C65B224D6214003A8554 /* LICENSE */ = {isa = PBXFileReference; lastKnownFileType = text; path = LICENSE; sourceTree = "<group>"; };
50A900001FC050CC00750ABF /* AppReportsGeneric.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppReportsGeneric.swift; sourceTree = "<group>"; };
50A900011FC050CC00750ABF /* AppReportsCore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppReportsCore.swift; sourceTree = "<group>"; };
50A9FFD81FBD747F00750ABF /* AppReports.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = AppReports.framework; sourceTree = BUILT_PRODUCTS_DIR; };
Expand All @@ -36,6 +39,9 @@
50A9FFCE1FBD747F00750ABF = {
isa = PBXGroup;
children = (
50A1C658224D61E4003A8554 /* AppReports.podspec */,
50A1C65A224D6214003A8554 /* README.md */,
50A1C65B224D6214003A8554 /* LICENSE */,
50A9FFDA1FBD747F00750ABF /* AppReports */,
50A9FFD91FBD747F00750ABF /* Products */,
);
Expand Down Expand Up @@ -104,7 +110,7 @@
TargetAttributes = {
50A9FFD71FBD747F00750ABF = {
CreatedOnToolsVersion = 9.1;
LastSwiftMigration = 0910;
LastSwiftMigration = 1020;
ProvisioningStyle = Manual;
};
};
Expand All @@ -115,6 +121,7 @@
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 50A9FFCE1FBD747F00750ABF;
productRefGroup = 50A9FFD91FBD747F00750ABF /* Products */;
Expand Down Expand Up @@ -286,7 +293,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Debug;
Expand All @@ -309,7 +316,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_VERSION = 4.2;
SWIFT_VERSION = 5.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
name = Release;
Expand Down
6 changes: 3 additions & 3 deletions AppReports/AppReportError.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,17 +59,17 @@ public struct AppReportsErrorData {
public extension AppReportsGenericError where TypeErrorData == AppReportsErrorData {

///Base function for report errors.
public func report(error:Error?, title:String?, options:AppReportsErrorData.Options, userInfo:[String:Any]? = nil, bigData:Any? = nil) {
func report(error:Error?, title:String?, options:AppReportsErrorData.Options, userInfo:[String:Any]? = nil, bigData:Any? = nil) {
reportError(AppReportsErrorData(error: error, title: title, options: options, userInfo: userInfo, bigData: bigData))
}

///Report Error object with custom additional data.
public func reportError(_ error:Error, userInfo:[String:Any]? = nil) {
func reportError(_ error:Error, userInfo:[String:Any]? = nil) {
reportError(AppReportsErrorData(error: error, userInfo: userInfo))
}

///Report error as string with custom additional data.
public func reportTitleError(_ title:String, userInfo:[String:Any]? = nil) {
func reportTitleError(_ title:String, userInfo:[String:Any]? = nil) {
reportError(AppReportsErrorData(title: title, userInfo: userInfo))
}
}
Expand Down
10 changes: 5 additions & 5 deletions AppReports/AppReportsCore.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ public extension AppReportsCore {

///Add event viewDidAppear in log.
@objc(logScreenDidAppear:)
public func logScreenDidAppear(viewController:AnyObject) {
func logScreenDidAppear(viewController:AnyObject) {
log("Screen Appear: \(NSStringFromClass(type(of: viewController)))")
}

///Add event viewDidDisappear in log.
@objc(logScreenDidDisappear:)
public func logScreenDidDisappear(viewController:AnyObject) {
func logScreenDidDisappear(viewController:AnyObject) {
log("Screen Disappear: \(NSStringFromClass(type(of: viewController)))")
}
}
Expand All @@ -236,17 +236,17 @@ public extension AppReportsCore {
public extension AppReportsCore {

///Write new entry in log
public static func log(_ str:String) {
static func log(_ str:String) {
coreShared?.log(str)
}

///Add event viewDidAppear in log.
public static func logScreenDidAppear(viewController:AnyObject) {
static func logScreenDidAppear(viewController:AnyObject) {
coreShared?.logScreenDidAppear(viewController: viewController)
}

///Add event viewDidDisappear in log.
public static func logScreenDidDisappear(viewController:AnyObject) {
static func logScreenDidDisappear(viewController:AnyObject) {
coreShared?.logScreenDidDisappear(viewController: viewController)
}
}
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ This framework is safe thread.
## Requirements

- iOS 8.0+
- Xcode 9.0
- Swift 4.0
- Xcode 10.2
- Swift 5.0


## Communication
Expand All @@ -52,14 +52,13 @@ This framework is safe thread.
$ gem install cocoapods
```

> CocoaPods 1.1.0+ is required to build AppReports 1.0.0+.
> CocoaPods 1.6.0+ is required to build AppReports 1.0.0+.
To integrate AppReports into your Xcode project using CocoaPods, specify it in your `Podfile`:

```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

target '<Your Target Name>' do
pod 'AppReports', '~> 1.0'
Expand Down

0 comments on commit 0e93b29

Please sign in to comment.