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

Release Candidate #37

Merged
merged 30 commits into from
Nov 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
23d0735
Client initialization, GoTrueError refactor, Combine removal
grdsdev Oct 22, 2022
a06458f
Implement JWT decoding and remove JWTDecode dependency
grdsdev Oct 22, 2022
64fe959
Start adding GoTrueLocalStorage
grdsdev Oct 22, 2022
f1c94fb
Remove swift-composable-keychain dependency
grdsdev Oct 23, 2022
22c96f6
Support custom GoTrueLocalStorage
grdsdev Oct 23, 2022
f6c4a99
Bump swift to 5.6
grdsdev Oct 23, 2022
1539129
Fix build
grdsdev Oct 23, 2022
fcad53b
Add Workspace and run tests on CI
grdsdev Oct 23, 2022
50aca42
Fix flag
grdsdev Oct 23, 2022
44be5e1
Add example for auth with email and password
grdsdev Oct 24, 2022
1bbb4ac
Await client initialization before using it
grdsdev Oct 25, 2022
543ce3d
Add job for building example project
grdsdev Oct 25, 2022
decf256
Build example only for iOS
grdsdev Oct 26, 2022
c675a7c
Add cache to CI
grdsdev Oct 26, 2022
8ba2b47
Fix missing closing
grdsdev Oct 26, 2022
ac529ee
Fix typo
grdsdev Oct 26, 2022
6dfd66d
Add local derived data for caching
grdsdev Oct 26, 2022
4a3aefc
Cache .deriveddata folder
grdsdev Oct 26, 2022
772a5d4
Update
grdsdev Oct 26, 2022
6d9039b
Add redirectTo, data, and captcha support on sign up endpoints
grdsdev Nov 4, 2022
c2035f9
Add doc comments to sign in method
grdsdev Nov 4, 2022
f96dd8d
Fix sign in with OTP methods
grdsdev Nov 4, 2022
c31685e
Fix verify otp methods
grdsdev Nov 4, 2022
7c1e565
Add doc comments
grdsdev Nov 4, 2022
664b7b3
Fix tests
grdsdev Nov 4, 2022
9ae6f22
Downgrade mocker dependency
grdsdev Nov 4, 2022
a70c930
Fix redirect url
grdsdev Nov 4, 2022
ac59129
Add documentation
grdsdev Nov 5, 2022
b6f45d5
Remove cache
grdsdev Nov 5, 2022
7650c56
Update mocker
grdsdev Nov 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 36 additions & 10 deletions .github/workflows/ci.yml
@@ -1,19 +1,45 @@
name: CI

on:
on:
push:
branches:
- main
pull_request:
branches:
- '*'

- "*"

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
runs-on: macos-latest
library:
runs-on: macos-12
strategy:
matrix:
xcode: ["14.1"]
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build -v
- name: Run tests
run: swift test -v
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
run: make test-library

example:
runs-on: macos-12
strategy:
matrix:
xcode: ["14.1"]
steps:
- uses: actions/checkout@v3
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Build example
run: make build-example

# examples:
# runs-on: macos-12
# steps:
# - uses: actions/checkout@v3
# - name: Run tests
# run: make test-examples
2 changes: 2 additions & 0 deletions .gitignore
Expand Up @@ -132,3 +132,5 @@ iOSInjectionProject/

# End of https://www.toptal.com/developers/gitignore/api/swift,xcode,macos

# Custom
.deriveddata
1 change: 1 addition & 0 deletions .swift-version
@@ -0,0 +1 @@
5.6
11 changes: 11 additions & 0 deletions .swiftformat
@@ -0,0 +1,11 @@
--binarygrouping none
--decimalgrouping none
--hexgrouping none
--indent 2
--octalgrouping none
--semicolons never
--wraparguments before-first
--wrapcollections before-first
--wrapparameters before-first
--extensionacl on-declarations
--maxwidth 100
77 changes: 77 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/GoTrue.xcscheme
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1410"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GoTrue"
BuildableName = "GoTrue"
BlueprintName = "GoTrue"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GoTrueTests"
BuildableName = "GoTrueTests"
BlueprintName = "GoTrueTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "GoTrue"
BuildableName = "GoTrue"
BlueprintName = "GoTrue"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
38 changes: 26 additions & 12 deletions Examples/Examples.xcodeproj/project.pbxproj
Expand Up @@ -8,29 +8,32 @@

/* Begin PBXBuildFile section */
1820720E286B449B0009D0BF /* Secrets.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1820720D286B449B0009D0BF /* Secrets.swift */; };
18AD3624286B304300855046 /* GoTrue in Frameworks */ = {isa = PBXBuildFile; productRef = 18AD3623286B304300855046 /* GoTrue */; };
18DE58AE286B2C78005F7FF2 /* ExamplesApp.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18DE589E286B2C77005F7FF2 /* ExamplesApp.swift */; };
18DE58B0286B2C78005F7FF2 /* SignInWithGoogleExampleView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18DE589F286B2C77005F7FF2 /* SignInWithGoogleExampleView.swift */; };
18DE58B2286B2C78005F7FF2 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18DE58A0286B2C78005F7FF2 /* Assets.xcassets */; };
798AD51F29072C15001B4801 /* GoTrue in Frameworks */ = {isa = PBXBuildFile; productRef = 798AD51E29072C15001B4801 /* GoTrue */; };
798AD52129072C22001B4801 /* AppView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798AD52029072C22001B4801 /* AppView.swift */; };
798AD5232907309C001B4801 /* SessionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798AD5222907309C001B4801 /* SessionView.swift */; };
798AD525290731A0001B4801 /* AuthWithEmailAndPasswordView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 798AD524290731A0001B4801 /* AuthWithEmailAndPasswordView.swift */; };
/* End PBXBuildFile section */

/* Begin PBXFileReference section */
1820720D286B449B0009D0BF /* Secrets.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Secrets.swift; sourceTree = "<group>"; };
18AD3626286B33AE00855046 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
18AD3627286B35D300855046 /* Examples.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Examples.entitlements; sourceTree = "<group>"; };
18DE589E286B2C77005F7FF2 /* ExamplesApp.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ExamplesApp.swift; sourceTree = "<group>"; };
18DE589F286B2C77005F7FF2 /* SignInWithGoogleExampleView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SignInWithGoogleExampleView.swift; sourceTree = "<group>"; };
18DE58A0286B2C78005F7FF2 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
18DE58A5286B2C78005F7FF2 /* Examples.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Examples.app; sourceTree = BUILT_PRODUCTS_DIR; };
18DE58BC286B2E7B005F7FF2 /* gotrue-swift */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "gotrue-swift"; path = ..; sourceTree = "<group>"; };
798AD52029072C22001B4801 /* AppView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppView.swift; sourceTree = "<group>"; };
798AD5222907309C001B4801 /* SessionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SessionView.swift; sourceTree = "<group>"; };
798AD524290731A0001B4801 /* AuthWithEmailAndPasswordView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthWithEmailAndPasswordView.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
18DE58A2286B2C78005F7FF2 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
18AD3624286B304300855046 /* GoTrue in Frameworks */,
798AD51F29072C15001B4801 /* GoTrue in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand All @@ -47,7 +50,6 @@
18DE5898286B2C77005F7FF2 = {
isa = PBXGroup;
children = (
18DE58BC286B2E7B005F7FF2 /* gotrue-swift */,
18DE589D286B2C77005F7FF2 /* Shared */,
18DE58A6286B2C78005F7FF2 /* Products */,
18AD3622286B304300855046 /* Frameworks */,
Expand All @@ -58,11 +60,9 @@
isa = PBXGroup;
children = (
18DE58A0286B2C78005F7FF2 /* Assets.xcassets */,
18DE589F286B2C77005F7FF2 /* SignInWithGoogleExampleView.swift */,
18AD3627286B35D300855046 /* Examples.entitlements */,
18DE589E286B2C77005F7FF2 /* ExamplesApp.swift */,
18AD3626286B33AE00855046 /* Info.plist */,
1820720D286B449B0009D0BF /* Secrets.swift */,
79E38C622916675E0006DE6E /* Sources */,
);
path = Shared;
sourceTree = "<group>";
Expand All @@ -75,6 +75,18 @@
name = Products;
sourceTree = "<group>";
};
79E38C622916675E0006DE6E /* Sources */ = {
isa = PBXGroup;
children = (
798AD52029072C22001B4801 /* AppView.swift */,
798AD524290731A0001B4801 /* AuthWithEmailAndPasswordView.swift */,
18DE589E286B2C77005F7FF2 /* ExamplesApp.swift */,
1820720D286B449B0009D0BF /* Secrets.swift */,
798AD5222907309C001B4801 /* SessionView.swift */,
);
path = Sources;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
Expand All @@ -92,7 +104,7 @@
);
name = Examples;
packageProductDependencies = (
18AD3623286B304300855046 /* GoTrue */,
798AD51E29072C15001B4801 /* GoTrue */,
);
productName = "Examples (iOS)";
productReference = 18DE58A5286B2C78005F7FF2 /* Examples.app */;
Expand Down Expand Up @@ -147,9 +159,11 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
18DE58B0286B2C78005F7FF2 /* SignInWithGoogleExampleView.swift in Sources */,
1820720E286B449B0009D0BF /* Secrets.swift in Sources */,
18DE58AE286B2C78005F7FF2 /* ExamplesApp.swift in Sources */,
798AD52129072C22001B4801 /* AppView.swift in Sources */,
798AD525290731A0001B4801 /* AuthWithEmailAndPasswordView.swift in Sources */,
798AD5232907309C001B4801 /* SessionView.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -358,7 +372,7 @@
/* End XCConfigurationList section */

/* Begin XCSwiftPackageProductDependency section */
18AD3623286B304300855046 /* GoTrue */ = {
798AD51E29072C15001B4801 /* GoTrue */ = {
isa = XCSwiftPackageProductDependency;
productName = GoTrue;
};
Expand Down
28 changes: 0 additions & 28 deletions Examples/Shared/ExamplesApp.swift

This file was deleted.

11 changes: 0 additions & 11 deletions Examples/Shared/Secrets.swift

This file was deleted.

69 changes: 0 additions & 69 deletions Examples/Shared/SignInWithGoogleExampleView.swift

This file was deleted.