Skip to content

Commit

Permalink
Update targets (#265)
Browse files Browse the repository at this point in the history
* Update targets

* Update

* Update to macOS 12

* Update commands

* Update paralelism

* Downgrade parallelism

* ?
  • Loading branch information
3lvis committed Jun 16, 2023
1 parent 795199e commit f35d5d9
Show file tree
Hide file tree
Showing 15 changed files with 172 additions and 178 deletions.
13 changes: 7 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
version: 2
version: 2.1
jobs:
build-and-test:
parallelism: 1
macos:
xcode: "11.5.0"
xcode: "14.3.1"
shell: /bin/bash --login -o pipefail
steps:
- checkout
- run: xcodebuild -project Demo.xcodeproj -scheme "macOSTests" -sdk macosx test | xcpretty
- run: xcodebuild -project Demo.xcodeproj -scheme "iOSTests" -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=13.5,name=iPhone 11' test | xcpretty
- run: xcodebuild -project Demo.xcodeproj -scheme "tvOSTests" -destination 'platform=tvOS Simulator,name=Apple TV,OS=13.4' test | xcpretty
- run: xcodebuild -project Demo.xcodeproj -scheme "iOSTests" -sdk iphonesimulator -destination 'platform=iOS Simulator,OS=16.4,name=iPhone 14' test | xcpretty
- run: xcodebuild -project Demo.xcodeproj -scheme "tvOSTests" -destination 'platform=tvOS Simulator,name=Apple TV,OS=16.4' test | xcpretty

workflows:
version: 2
version: 2.1
build-and-test:
jobs:
- build-and-test
- build-and-test
227 changes: 151 additions & 76 deletions Demo.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Demo.xcodeproj/xcshareddata/xcschemes/iOSDemo.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Demo.xcodeproj/xcshareddata/xcschemes/iOSTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Demo.xcodeproj/xcshareddata/xcschemes/macOSTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion Demo.xcodeproj/xcshareddata/xcschemes/tvOSTests.xcscheme
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1200"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
10 changes: 5 additions & 5 deletions Networking.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ Simple NSURLSession wrapper with support for image caching and faking network re
EOS
s.homepage = "https://github.com/3lvis/Networking"
s.license = 'MIT'
s.author = { "Elvis Nuñez" => "elvisnunez@me.com" }
s.author = { "Elvis Nunez" => "elvisnunez@me.com" }
s.source = { git: "https://github.com/3lvis/Networking.git", tag: s.version.to_s }
s.social_media_url = 'https://twitter.com/3lvis'
s.ios.deployment_target = '11.0'
s.osx.deployment_target = '10.15'
s.watchos.deployment_target = '5.0'
s.tvos.deployment_target = '11.0'
s.ios.deployment_target = '13.0'
s.osx.deployment_target = '12.0'
s.watchos.deployment_target = '6.0'
s.tvos.deployment_target = '13.0'
s.requires_arc = true
s.source_files = 'Sources/**/*'
s.frameworks = 'Foundation'
Expand Down
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -512,24 +512,6 @@ let networking = Networking(baseURL: "http://httpbin.org")
networking.disableErrorLogging = true
```

## Updating the Network Activity Indicator

**Networking** balances how the network activity indicator is displayed.

> A network activity indicator appears in the status bar and shows that network activity is occurring.
>The network activity indicator:
>
> - Spins in the status bar while network activity proceeds and disappears when network activity stops
> - Doesn’t allow user interaction
>
> Display the network activity indicator to provide feedback when your app accesses the network for more than a couple of seconds. If the operation finishes sooner than that, you don’t have to show the network activity indicator, because the indicator is likely to disappear before users notice its presence.
>
>[iOS Human Interface Guidelines](https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/Controls.html)
<p align="center">
<img src="https://raw.githubusercontent.com/3lvis/NetworkActivityIndicator/master/GIF/sample.gif"/>
</p>

## Installing

**Networking** is available through [CocoaPods](http://cocoapods.org). To install
Expand Down
51 changes: 0 additions & 51 deletions Sources/NetworkActivityIndicator.swift

This file was deleted.

10 changes: 1 addition & 9 deletions Sources/Networking+Private.swift
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,6 @@ extension Networking {
let requestID = UUID().uuidString
var request = URLRequest(url: try! composedURL(with: path), requestType: requestType, path: path, parameterType: parameterType, responseType: responseType, boundary: boundary, authorizationHeaderValue: authorizationHeaderValue, token: token, authorizationHeaderKey: authorizationHeaderKey, headerFields: headerFields)

DispatchQueue.main.async {
NetworkActivityIndicator.sharedIndicator.visible = true
}

var serializingError: NSError?
if let parameterType = parameterType {
switch parameterType {
Expand Down Expand Up @@ -273,11 +269,7 @@ extension Networking {

if TestCheck.isTesting && self.isSynchronous == false {
semaphore.signal()
} else {
DispatchQueue.main.async {
NetworkActivityIndicator.sharedIndicator.visible = false
}

} else {
self.logError(parameterType: parameterType, parameters: parameters, data: returnedData, request: request, response: returnedResponse, error: connectionError as NSError?)
if let unauthorizedRequestCallback = self.unauthorizedRequestCallback, let error = connectionError as NSError?, error.code == 403 || error.code == 401 {
unauthorizedRequestCallback()
Expand Down
5 changes: 0 additions & 5 deletions Sources/Networking.h

This file was deleted.

0 comments on commit f35d5d9

Please sign in to comment.