Skip to content

Commit

Permalink
Updated repo for Xcode 14 and Swift 5.8 (#59)
Browse files Browse the repository at this point in the history
- Re-generated a sample SwiftUI application
  - Easier than carrying over a lot of the migration cruft
- Updated gitignores
- Updated package versions
- Removed unused files
- Added a logo
- Replaced old Apply with Scoping Functions
- Removed default team
  • Loading branch information
sureshjoshi authored Jul 2, 2023
1 parent 1e4bb77 commit a0583fc
Show file tree
Hide file tree
Showing 42 changed files with 1,120 additions and 1,363 deletions.
55 changes: 39 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,17 @@
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## Build generated
## User settings
xcuserdata/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/

## Various settings
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -15,14 +21,11 @@ DerivedData/
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/

## Other
*.moved-aside
*.xcuserstate

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM
Expand All @@ -35,6 +38,14 @@ playground.xcworkspace
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
# hence it is not needed unless you have added a package configuration file to your project
.swiftpm

.build/

# CocoaPods
Expand All @@ -43,25 +54,37 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build
Carthage/Build/

# Accio dependency management
Dependencies/
.accio/

# fastlane
#
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/screenshots/**/*.png
fastlane/test_output
Test Peripheral/nodejs/node_modules
Test Peripheral/nodejs/dist

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
56 changes: 56 additions & 0 deletions .swift-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"fileScopedDeclarationPrivacy" : {
"accessLevel" : "private"
},
"indentation" : {
"spaces" : 4
},
"indentConditionalCompilationBlocks" : true,
"indentSwitchCaseLabels" : false,
"lineBreakAroundMultilineExpressionChainComponents" : false,
"lineBreakBeforeControlFlowKeywords" : false,
"lineBreakBeforeEachArgument" : false,
"lineBreakBeforeEachGenericRequirement" : false,
"lineLength" : 100,
"maximumBlankLines" : 1,
"prioritizeKeepingFunctionOutputTogether" : false,
"respectsExistingLineBreaks" : true,
"rules" : {
"AllPublicDeclarationsHaveDocumentation" : false,
"AlwaysUseLowerCamelCase" : true,
"AmbiguousTrailingClosureOverload" : true,
"BeginDocumentationCommentWithOneLineSummary" : false,
"DoNotUseSemicolons" : true,
"DontRepeatTypeInStaticProperties" : true,
"FileScopedDeclarationPrivacy" : true,
"FullyIndirectEnum" : true,
"GroupNumericLiterals" : true,
"IdentifiersMustBeASCII" : true,
"NeverForceUnwrap" : false,
"NeverUseForceTry" : false,
"NeverUseImplicitlyUnwrappedOptionals" : false,
"NoAccessLevelOnExtensionDeclaration" : true,
"NoBlockComments" : true,
"NoCasesWithOnlyFallthrough" : true,
"NoEmptyTrailingClosureParentheses" : true,
"NoLabelsInCasePatterns" : true,
"NoLeadingUnderscores" : false,
"NoParensAroundConditions" : true,
"NoVoidReturnOnFunctionSignature" : true,
"OneCasePerLine" : true,
"OneVariableDeclarationPerLine" : true,
"OnlyOneTrailingClosureArgument" : true,
"OrderedImports" : true,
"ReturnVoidInsteadOfEmptyTuple" : true,
"UseEarlyExits" : false,
"UseLetInEveryBoundCaseVariable" : true,
"UseShorthandTypeNames" : true,
"UseSingleLinePropertyGetter" : true,
"UseSynthesizedInitializer" : true,
"UseTripleSlashForDocumentationComments" : true,
"UseWhereClausesInForLoops" : false,
"ValidateDocumentationComments" : false
},
"tabWidth" : 4,
"version" : 1
}
4 changes: 4 additions & 0 deletions Examples/Central/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
27 changes: 20 additions & 7 deletions Examples/Central/Package.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.8

// Copyright (c) 2023 Robot Pajamas

// 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
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import PackageDescription

let package = Package(
name: "Central",
platforms: [
.macOS(.v10_15), .iOS(.v13),
.iOS(.v13),
.macOS(.v10_15),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "SwiftyTeeth", path: "../../"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
.executableTarget(
name: "Central",
dependencies: ["SwiftyTeeth"]),
]
Expand Down
4 changes: 4 additions & 0 deletions Examples/Peripheral/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@
/Packages
/*.xcodeproj
xcuserdata/
DerivedData/
.swiftpm/config/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata
.netrc
27 changes: 20 additions & 7 deletions Examples/Peripheral/Package.swift
Original file line number Diff line number Diff line change
@@ -1,21 +1,34 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.8

// Copyright (c) 2023 Robot Pajamas

// 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
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

import PackageDescription

let package = Package(
name: "Peripheral",
platforms: [
.macOS(.v10_15), .iOS(.v13),
.iOS(.v13),
.macOS(.v10_15),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
.package(name: "SwiftyTeeth", path: "../../"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
.executableTarget(
name: "Peripheral",
dependencies: [.product(name: "SwiftyTooth", package: "SwiftyTeeth")]),
]
Expand Down
25 changes: 7 additions & 18 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.
// swift-tools-version:5.8

// Copyright (c) 2020 Robot Pajamas
// Copyright (c) 2023 Robot Pajamas

// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand All @@ -22,10 +21,10 @@ import PackageDescription
let package = Package(
name: "SwiftyTeeth",
platforms: [
.macOS(.v10_14),
.iOS(.v10),
.tvOS(.v10),
.watchOS(.v4)
.iOS(.v13),
.macOS(.v10_15),
.tvOS(.v13),
.watchOS(.v6),
],
products: [
// Products define the executables and libraries produced by a package, and make them visible to other packages.
Expand All @@ -36,20 +35,10 @@ let package = Package(
name: "SwiftyTooth",
targets: ["SwiftyTooth"]),
],
dependencies: [
// Dependencies declare other packages that this package depends on.
// .package(url: /* package url */, from: "1.0.0"),
],
targets: [
// Targets are the basic building blocks of a package. A target can define a module or a test suite.
// Targets can depend on other targets in this package, and on products in packages which this package depends on.
.target(
name: "SwiftyTeeth"),
.target(
name: "SwiftyTooth"),
// .testTarget(
// name: "SwiftyTeeth Tests",
// dependencies: ["SwiftyTeeth"]),
],
swiftLanguageVersions: [.v5]
]
)
24 changes: 0 additions & 24 deletions Sources/SwiftyTeeth/Info.plist

This file was deleted.

19 changes: 0 additions & 19 deletions Sources/SwiftyTeeth/SwiftyTeeth.h

This file was deleted.

22 changes: 0 additions & 22 deletions Sources/SwiftyTooth/Info.plist

This file was deleted.

18 changes: 0 additions & 18 deletions Sources/SwiftyTooth/SwiftyTooth.h

This file was deleted.

Loading

0 comments on commit a0583fc

Please sign in to comment.