Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[breaking changes] Remove combine api for Firestore #63

Merged
merged 16 commits into from
Oct 11, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/practical_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
run: |
set -o pipefail && \
xcodebuild -scheme BoardApplication \
build -destination "name=iPhone 12" \
build -destination "name=iPhone 15" \
-clonedSourcePackagesDirPath SourcePackages \
| bundle exec xcpretty
14 changes: 2 additions & 12 deletions .github/workflows/sources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,7 @@ jobs:
- name: Build and Test
run: |
set -o pipefail && \
xcodebuild -scheme EasyFirebaseAuth \
clean build \
-destination "name=iPhone 12" \
| bundle exec xcpretty && \
xcodebuild -scheme EasyFirebaseFirestore \
clean build test \
-destination "name=iPhone 12" \
| bundle exec xcpretty && \
xcodebuild -scheme EasyFirebaseStorage \
clean build test \
-destination "name=iPhone 12" \
| bundle exec xcpretty
swift build && \
swift test
- name: Kill firebase_emulator process
run: kill `cat /tmp/firebase_emulator_pid.pid` &>/dev/null
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,4 +96,6 @@ firestore-debug.log
ui-debug.log

# fvm
.fvm/
.fvm/

.index-build/
69 changes: 69 additions & 0 deletions .swift-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
{
"fileScopedDeclarationPrivacy": {
"accessLevel": "private"
},
"indentation": {
"spaces": 4
},
"indentConditionalCompilationBlocks": true,
"indentSwitchCaseLabels": false,
"lineBreakAroundMultilineExpressionChainComponents": false,
"lineBreakBeforeControlFlowKeywords": false,
"lineBreakBeforeEachArgument": false,
"lineBreakBeforeEachGenericRequirement": false,
"lineLength": 100,
"maximumBlankLines": 1,
"multiElementCollectionTrailingCommas": true,
"noAssignmentInExpressions": {
"allowedFunctions": [
"XCTAssertNoThrow"
]
},
"prioritizeKeepingFunctionOutputTogether": false,
"respectsExistingLineBreaks": true,
"rules": {
"AllPublicDeclarationsHaveDocumentation": false,
"AlwaysUseLiteralForEmptyCollectionInit": 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,
"NoAssignmentInExpressions": true,
"NoBlockComments": true,
"NoCasesWithOnlyFallthrough": true,
"NoEmptyTrailingClosureParentheses": true,
"NoLabelsInCasePatterns": true,
"NoLeadingUnderscores": false,
"NoParensAroundConditions": true,
"NoPlaygroundLiterals": true,
"NoVoidReturnOnFunctionSignature": true,
"OmitExplicitReturns": false,
"OneCasePerLine": true,
"OneVariableDeclarationPerLine": true,
"OnlyOneTrailingClosureArgument": true,
"OrderedImports": true,
"ReplaceForEachWithForLoop": true,
"ReturnVoidInsteadOfEmptyTuple": true,
"TypeNamesShouldBeCapitalized": true,
"UseEarlyExits": false,
"UseLetInEveryBoundCaseVariable": true,
"UseShorthandTypeNames": true,
"UseSingleLinePropertyGetter": true,
"UseSynthesizedInitializer": true,
"UseTripleSlashForDocumentationComments": true,
"UseWhereClausesInForLoops": false,
"ValidateDocumentationComments": false
},
"spacesAroundRangeFormationOperators": false,
"tabWidth": 8,
"version": 1
}
23 changes: 23 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"editor.formatOnSave": true,
"swift.diagnostics": true,
"apple-swift-format.enable": true,
"swift.autoGenerateLaunchConfigurations": true,
"swift.buildArguments": [],
"swift.testEnvironmentVariables": {},
"[swift]": {
"editor.tabSize": 4,
"editor.insertSpaces": true
},
"editor.formatOnSaveMode": "file",
"editor.defaultFormatter": "vknabel.vscode-apple-swift-format",
"cSpell.words": ["firestore"],
"makefile.configureOnOpen": false,
"swift.sourcekit-lsp.serverArguments": [
"-Xswiftc",
"-sdk",
"-Xswiftc",
"/Applications/Xcode-16.0.0.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator18.0.sdk",
]
}

24 changes: 15 additions & 9 deletions Examples/Example/AuthExample/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,39 @@
// Created by Fumiya Tanaka on 2022/01/01.
//

import UIKit
import FirebaseCore
import UIKit

@main
class AppDelegate: UIResponder, UIApplicationDelegate {



func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
FirebaseApp.configure()
return true
}

// MARK: UISceneSession Lifecycle

func application(_ application: UIApplication, configurationForConnecting connectingSceneSession: UISceneSession, options: UIScene.ConnectionOptions) -> UISceneConfiguration {
func application(
_ application: UIApplication,
configurationForConnecting connectingSceneSession: UISceneSession,
options: UIScene.ConnectionOptions
) -> UISceneConfiguration {
// Called when a new scene session is being created.
// Use this method to select a configuration to create the new scene with.
return UISceneConfiguration(name: "Default Configuration", sessionRole: connectingSceneSession.role)
return UISceneConfiguration(
name: "Default Configuration", sessionRole: connectingSceneSession.role)
}

func application(_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>) {
func application(
_ application: UIApplication, didDiscardSceneSessions sceneSessions: Set<UISceneSession>
) {
// Called when the user discards a scene session.
// If any sessions were discarded while the application was not running, this will be called shortly after application:didFinishLaunchingWithOptions.
// Use this method to release any resources that were specific to the discarded scenes, as they will not return.
}


}

10 changes: 5 additions & 5 deletions Examples/Example/AuthExample/SceneDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {

var window: UIWindow?


func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {
func scene(
_ scene: UIScene, willConnectTo session: UISceneSession,
options connectionOptions: UIScene.ConnectionOptions
) {
// Use this method to optionally configure and attach the UIWindow `window` to the provided UIWindowScene `scene`.
// If using a storyboard, the `window` property will automatically be initialized and attached to the scene.
// This delegate does not imply the connecting scene or session are new (see `application:configurationForConnectingSceneSession` instead).
guard let _ = (scene as? UIWindowScene) else { return }
guard (scene as? UIWindowScene) != nil else { return }
}

func sceneDidDisconnect(_ scene: UIScene) {
Expand Down Expand Up @@ -47,6 +49,4 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
// to restore the scene back to its current state.
}


}

Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
// Created by Fumiya Tanaka on 2022/01/01.
//

import UIKit
import EasyFirebaseSwiftAuth
import AuthenticationServices
import EasyFirebaseAuth
import UIKit

class SignInWithAppleViewController: UIViewController {

Expand Down Expand Up @@ -40,7 +40,7 @@ class SignInWithAppleViewController: UIViewController {
private func startSignInWithApple() {
// Show Authentication Alert
// NOTE: Assign `delegate` before proceed.
// appleAuthClient.delegate = self
// appleAuthClient.delegate = self
// `with` parameter is optional
appleAuthClient.startSignInWithAppleFlow(with: nil)
}
Expand Down
2 changes: 0 additions & 2 deletions Examples/Example/AuthExample/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@ class ViewController: UIViewController {
// Do any additional setup after loading the view.
}


}

Loading
Loading