Skip to content

Commit

Permalink
Update project with new API URL
Browse files Browse the repository at this point in the history
  • Loading branch information
yostane committed Nov 26, 2023
1 parent b49a762 commit c9b97db
Show file tree
Hide file tree
Showing 9 changed files with 278 additions and 28 deletions.
23 changes: 22 additions & 1 deletion corrections/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,25 @@ DerivedData
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build
Carthage/Build

.build
DerivedData
/.previous-build
xcuserdata
.DS_Store
*~
\#*
.\#*
.*.sw[nop]
*.xcscmblueprint
/default.profraw
*.xcodeproj
Utilities/Docker/*.tar.gz
.swiftpm
Package.resolved
/build
*.pyc
.docc-build
.vscode
Utilities/InstalledSwiftPMConfiguration/config.json
82 changes: 82 additions & 0 deletions corrections/Swift samples.playgroundbook/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
*.py[co]
*.sw?
*~
doc/build/*
dist
build
cover
ChangeLog
.coverage
*.egg
*.egg-info
.eggs/*
.DS_Store
.tox
pycscope.*
.idea
MANIFEST

.testrepository/*
.stestr/*
.noseids
subunit.log
test/probe/.noseids
RELEASENOTES.rst
releasenotes/notes/reno.cache
/tools/playbooks/**/*.retry

# Xcode
#
build/
xcshareddata/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/

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

Carthage/Build

.build
DerivedData
/.previous-build
xcuserdata
.DS_Store
*~
\#*
.\#*
.*.sw[nop]
*.xcscmblueprint
/default.profraw
*.xcodeproj
Utilities/Docker/*.tar.gz
.swiftpm
Package.resolved
/build
*.pyc
.docc-build
.vscode
Utilities/InstalledSwiftPMConfiguration/config.json
82 changes: 82 additions & 0 deletions corrections/iOS-training-Moovy.swiftpm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
*.py[co]
*.sw?
*~
doc/build/*
dist
build
cover
ChangeLog
.coverage
*.egg
*.egg-info
.eggs/*
.DS_Store
.tox
pycscope.*
.idea
MANIFEST

.testrepository/*
.stestr/*
.noseids
subunit.log
test/probe/.noseids
RELEASENOTES.rst
releasenotes/notes/reno.cache
/tools/playbooks/**/*.retry

# Xcode
#
build/
xcshareddata/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/

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

Carthage/Build

.build
DerivedData
/.previous-build
xcuserdata
.DS_Store
*~
\#*
.\#*
.*.sw[nop]
*.xcscmblueprint
/default.profraw
*.xcodeproj
Utilities/Docker/*.tar.gz
.swiftpm
Package.resolved
/build
*.pyc
.docc-build
.vscode
Utilities/InstalledSwiftPMConfiguration/config.json
2 changes: 1 addition & 1 deletion corrections/iOS-training-Moovy.swiftpm/LoginView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ struct LoginView: View {
}

func callServer(_ path: String, requestBody: Data) async throws -> UserResponse? {
guard let url = URL(string: "https://vue-js-backend.herokuapp.com/\(path)") else {
guard let url = URL(string: "\(BASE_API_URL)/\(path)") else {
loginState = .failure
return nil
}
Expand Down
2 changes: 1 addition & 1 deletion corrections/iOS-training-Moovy.swiftpm/MovieListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ struct MovieListView: View {
}

func searchMovies(query: String) async{
guard let url = URL(string: "https://vue-js-backend.herokuapp.com/movies/search?title=\(query)") else {
guard let url = URL(string: "\(BASE_API_URL)/movies/search?title=\(query)") else {
movieListState = .failure
return
}
Expand Down
2 changes: 2 additions & 0 deletions corrections/iOS-training-Moovy.swiftpm/MyApp.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import SwiftUI

let BASE_API_URL = "https://movie-api-ybwl.koyeb.app"

@main
struct MyApp: App {
var body: some Scene {
Expand Down
23 changes: 0 additions & 23 deletions corrections/iOS-training-Moovy.swiftpm/Package.resolved

This file was deleted.

8 changes: 6 additions & 2 deletions corrections/iOS-training-Moovy.swiftpm/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import AppleProductTypes
let package = Package(
name: "Moovy",
platforms: [
.iOS("15.2")
.iOS("15.2"),
.macOS("13.0")
],
products: [
.iOSApplication(
Expand All @@ -30,12 +31,15 @@ let package = Package(
.landscapeLeft,
.portraitUpsideDown(.when(deviceFamilies: [.pad]))
],
capabilities: [
.outgoingNetworkConnections()
],
appCategory: .entertainment
)
],
dependencies: [
.package(url: "https://github.com/Tunous/DebouncedOnChange.git", "1.0.0"..<"2.0.0"),
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess.git", "3.0.0"..<"4.0.0")
.package(url: "https://github.com/kishikawakatsumi/KeychainAccess.git", "4.0.0"..<"5.0.0")
],
targets: [
.executableTarget(
Expand Down
82 changes: 82 additions & 0 deletions corrections/iOS-training-url-session.swiftpm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
*.py[co]
*.sw?
*~
doc/build/*
dist
build
cover
ChangeLog
.coverage
*.egg
*.egg-info
.eggs/*
.DS_Store
.tox
pycscope.*
.idea
MANIFEST

.testrepository/*
.stestr/*
.noseids
subunit.log
test/probe/.noseids
RELEASENOTES.rst
releasenotes/notes/reno.cache
/tools/playbooks/**/*.retry

# Xcode
#
build/
xcshareddata/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.moved-aside
DerivedData
*.hmap
*.ipa
*.xcuserstate

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/

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

Carthage/Build

.build
DerivedData
/.previous-build
xcuserdata
.DS_Store
*~
\#*
.\#*
.*.sw[nop]
*.xcscmblueprint
/default.profraw
*.xcodeproj
Utilities/Docker/*.tar.gz
.swiftpm
Package.resolved
/build
*.pyc
.docc-build
.vscode
Utilities/InstalledSwiftPMConfiguration/config.json

0 comments on commit c9b97db

Please sign in to comment.