Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
coverage:
ignore:
- Tests/ParseSwiftTests/.*
- TestHost/*
- TestHostTV/*
status:
patch:
default:
target: auto
target: 0
changes: false
project:
default:
target: 76
target: 81
comment:
require_changes: true
15 changes: 10 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ jobs:
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
- name: Prepare codecov
run: |
XCTEST=$(find DerivedData -type f -name 'ParseSwiftTests')
PROFDATA=$(find DerivedData -type f -name '*.profdata')
xcrun llvm-cov export "${XCTEST}" -format="lcov" -instr-profile "${PROFDATA}" > info.lcov
uses: sersoft-gmbh/swift-coverage-action@v2
id: coverage-files
with:
target-name-filter: '^ParseSwift$'
format: lcov
search-paths: ./DerivedData
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: IOS
fail_ci_if_error: false
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

Expand Down Expand Up @@ -63,6 +66,7 @@ jobs:
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: MACOS
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

Expand All @@ -87,6 +91,7 @@ jobs:
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
env_vars: TVOS
fail_ci_if_error: true
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_13 }}

Expand Down
42 changes: 24 additions & 18 deletions ParseSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2844,8 +2844,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_STYLE = Automatic;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = TestHost/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand All @@ -2860,8 +2861,9 @@
isa = XCBuildConfiguration;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_CODE_COVERAGE = NO;
CODE_SIGN_STYLE = Automatic;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = TestHost/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
Expand Down Expand Up @@ -2912,6 +2914,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
Expand Down Expand Up @@ -2976,6 +2979,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
Expand Down Expand Up @@ -3003,7 +3007,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand All @@ -3028,7 +3032,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-iOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
Expand All @@ -3053,7 +3057,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = Tests/ParseSwiftTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwiftTests;
Expand All @@ -3074,7 +3078,7 @@
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "-";
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = Tests/ParseSwiftTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.parse.ParseSwiftTests;
Expand All @@ -3097,7 +3101,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-macOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
Expand All @@ -3124,7 +3128,7 @@
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
FRAMEWORK_VERSION = A;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-macOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/Frameworks";
Expand All @@ -3146,9 +3150,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_CODE_COVERAGE = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = TestHostTV/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
Expand All @@ -3167,9 +3172,10 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = "App Icon & Top Shelf Image";
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
CLANG_ENABLE_CODE_COVERAGE = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Automatic;
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = TestHostTV/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MTL_FAST_MATH = YES;
Expand All @@ -3188,7 +3194,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = ParseSwiftTeststvOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
Expand All @@ -3210,7 +3216,7 @@
CLANG_ENABLE_OBJC_WEAK = YES;
CODE_SIGN_STYLE = Manual;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = ParseSwiftTeststvOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
MTL_FAST_MATH = YES;
Expand All @@ -3233,7 +3239,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = ParseSwiftTestsmacOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
Expand All @@ -3255,7 +3261,7 @@
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = ParseSwiftTestsmacOS/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks @loader_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.15;
Expand All @@ -3279,7 +3285,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -3309,7 +3315,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-watchOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -3337,7 +3343,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down Expand Up @@ -3366,7 +3372,7 @@
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_GENERATE_TEST_COVERAGE_FILES = YES;
GCC_GENERATE_TEST_COVERAGE_FILES = NO;
INFOPLIST_FILE = "ParseSwift-tvOS/Info.plist";
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public struct ParseApple<AuthenticatedUser: ParseUser>: ParseAuthentication {

/// Authentication keys required for Apple authentication.
enum AuthenticationKeys: String, Codable {
case id // swiftlint:disable:this identifier_name
case id
case token

/// Properly makes an authData dictionary with the required keys.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct ParseFacebook<AuthenticatedUser: ParseUser>: ParseAuthentication {

/// Authentication keys required for Facebook authentication.
enum AuthenticationKeys: String, Codable {
case id // swiftlint:disable:this identifier_name
case id
case authenticationToken = "token"
case accessToken = "access_token"
case expirationDate = "expiration_date"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public extension ParseLDAP {
- returns: An instance of the logged in `ParseUser`.
- throws: `ParseError`.
*/
func login(id: String, // swiftlint:disable:this identifier_name
func login(id: String,
password: String,
options: API.Options = []) async throws -> AuthenticatedUser {
try await withCheckedThrowingContinuation { continuation in
Expand Down Expand Up @@ -59,7 +59,7 @@ public extension ParseLDAP {
- returns: An instance of the logged in `ParseUser`.
- throws: `ParseError`.
*/
func link(id: String, // swiftlint:disable:this identifier_name
func link(id: String,
password: String,
options: API.Options = []) async throws -> AuthenticatedUser {
try await withCheckedThrowingContinuation { continuation in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public extension ParseLDAP {
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces a single value and then finishes or fails.
*/
func loginPublisher(id: String, // swiftlint:disable:this identifier_name
func loginPublisher(id: String,
password: String,
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
Future { promise in
Expand Down Expand Up @@ -55,7 +55,7 @@ public extension ParseLDAP {
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: A publisher that eventually produces a single value and then finishes or fails.
*/
func linkPublisher(id: String, // swiftlint:disable:this identifier_name
func linkPublisher(id: String,
password: String,
options: API.Options = []) -> Future<AuthenticatedUser, ParseError> {
Future { promise in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ public struct ParseLDAP<AuthenticatedUser: ParseUser>: ParseAuthentication {

/// Authentication keys required for LDAP authentication.
enum AuthenticationKeys: String, Codable {
case id // swiftlint:disable:this identifier_name
case id
case password

/// Properly makes an authData dictionary with the required keys.
/// - parameter id: Required id.
/// - parameter password: Required password.
/// - returns: authData dictionary.
func makeDictionary(id: String, // swiftlint:disable:this identifier_name
func makeDictionary(id: String,
password: String) -> [String: String] {
[AuthenticationKeys.id.rawValue: id,
AuthenticationKeys.password.rawValue: password]
Expand Down Expand Up @@ -58,7 +58,7 @@ public extension ParseLDAP {
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
- parameter completion: The block to execute.
*/
func login(id: String, // swiftlint:disable:this identifier_name
func login(id: String,
password: String,
options: API.Options = [],
callbackQueue: DispatchQueue = .main,
Expand Down Expand Up @@ -100,7 +100,7 @@ public extension ParseLDAP {
- parameter callbackQueue: The queue to return to after completion. Default value of .main.
- parameter completion: The block to execute.
*/
func link(id: String, // swiftlint:disable:this identifier_name
func link(id: String,
password: String,
options: API.Options = [],
callbackQueue: DispatchQueue = .main,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public struct ParseTwitter<AuthenticatedUser: ParseUser>: ParseAuthentication {

/// Authentication keys required for Twitter authentication.
enum AuthenticationKeys: String, Codable {
case id // swiftlint:disable:this identifier_name
case id
case consumerKey = "consumer_key"
case consumerSecret = "consumer_secret"
case authToken = "auth_token"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import Foundation
public struct ParseAnonymous<AuthenticatedUser: ParseUser>: ParseAuthentication {

enum AuthenticationKeys: String, Codable {
case id // swiftlint:disable:this identifier_name
case id

func makeDictionary() -> [String: String] {
[AuthenticationKeys.id.rawValue: UUID().uuidString.lowercased()]
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseSwift/Objects/ParseObject.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public extension ParseObject {
as models in MVVM and SwiftUI.
- note: `id` allows `ParseObjects`'s to be used even if they are unsaved and do not have an `objectId`.
*/
var id: String { // swiftlint:disable:this identifier_name
var id: String {
guard let objectId = self.objectId else {
return UUID().uuidString
}
Expand Down
2 changes: 1 addition & 1 deletion Sources/ParseSwift/Types/ParseFile.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public struct ParseFile: Fileable, Savable, Fetchable, Deletable, Hashable {
&& data == nil
}

public var id: UUID // swiftlint:disable:this identifier_name
public var id: UUID

/**
The name of the file.
Expand Down
Loading