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
78 changes: 78 additions & 0 deletions HotSpot/App/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import ProjectDescription

let project = Project(
name: "HotSpot",
organizationName: "Coby",
settings: .settings(
base: [
"BASE_URL": SettingValue(stringLiteral: "http://webservice.recruit.co.jp/hotpepper"),
"API_KEY": SettingValue(stringLiteral: "8011379945b3b751"),
"SWIFT_VERSION": SettingValue(stringLiteral: "5.9"),
"DEVELOPMENT_TEAM": SettingValue(stringLiteral: "3Y8YH8GWMM")
],
configurations: [
.debug(name: .debug),
.release(name: .release)
]
),
targets: [
.target(
name: "HotSpot",
destinations: [.iPhone],
product: .app,
bundleId: "com.coby.HotSpot",
deploymentTargets: .iOS("15.0"),
infoPlist: .extendingDefault(
with: [
"CFBundleShortVersionString": .string("1.0.0"),
"CFBundleVersion": .string("0"),
"CFBundleDisplayName": .string("HotSpot"),
"BASE_URL": .string("http://webservice.recruit.co.jp/hotpepper"),
"API_KEY": .string("8011379945b3b751"),
"UILaunchScreen": .dictionary([
"UIColorName": .string(""),
"UIImageName": .string("")
]),
"NSAppTransportSecurity": .dictionary([
"NSExceptionDomains": .dictionary([
"webservice.recruit.co.jp": .dictionary([
"NSExceptionAllowsInsecureHTTPLoads": .boolean(true)
])
])
]),
"NSLocationWhenInUseUsageDescription": .string("周辺の店舗を表示するために位置情報が必要です。"),
"NSLocationAlwaysAndWhenInUseUsageDescription": .string("周辺の店舗を表示するために位置情報が必要です。")
]
),
sources: ["Sources/**"],
resources: ["Resources/**"],
dependencies: [
.project(target: "Presentation", path: "../Presentation"),
.project(target: "Data", path: "../Data"),
.project(target: "Domain", path: "../Domain"),
.project(target: "Shared", path: "../Shared")
]
),
.target(
name: "HotSpotTests",
destinations: .iOS,
product: .unitTests,
bundleId: "com.coby.HotSpotTests",
infoPlist: .default,
sources: ["Tests/**"],
dependencies: [.target(name: "HotSpot")]
)
],
schemes: [
.scheme(
name: "HotSpot Debug",
buildAction: .buildAction(targets: ["HotSpot"]),
runAction: .runAction(configuration: .debug)
),
.scheme(
name: "HotSpot Release",
buildAction: .buildAction(targets: ["HotSpot"]),
runAction: .runAction(configuration: .release)
)
]
)
22 changes: 22 additions & 0 deletions HotSpot/App/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# App モジュール

## 概要
Appモジュールは、アプリケーションのエントリーポイントと全体設定を担当します。

## 構造
```
App/
├── Sources/ # アプリケーション設定
├── Resources/ # リソースファイル
└── Tests/ # ユニットテスト
```

## 依存関係
- Presentationモジュール
- Dataモジュール
- Domainモジュール
- Coreモジュール

## 使用方法
Appモジュールは、アプリケーションの起動と初期化を担当します。
他のすべてのモジュールを統合し、アプリケーション全体の設定を行います。
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
116 changes: 116 additions & 0 deletions HotSpot/App/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
{
"images" : [
{
"filename" : "40.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "60.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "20x20"
},
{
"filename" : "58.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "87.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "29x29"
},
{
"filename" : "80.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "120 1.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "40x40"
},
{
"filename" : "120.png",
"idiom" : "iphone",
"scale" : "2x",
"size" : "60x60"
},
{
"filename" : "180.png",
"idiom" : "iphone",
"scale" : "3x",
"size" : "60x60"
},
{
"filename" : "20.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "20x20"
},
{
"filename" : "40 1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "20x20"
},
{
"filename" : "29.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "29x29"
},
{
"filename" : "58 1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "29x29"
},
{
"filename" : "40 2.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "40x40"
},
{
"filename" : "80 1.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "40x40"
},
{
"filename" : "76.png",
"idiom" : "ipad",
"scale" : "1x",
"size" : "76x76"
},
{
"filename" : "152.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "76x76"
},
{
"filename" : "167.png",
"idiom" : "ipad",
"scale" : "2x",
"size" : "83.5x83.5"
},
{
"filename" : "1024.png",
"idiom" : "ios-marketing",
"scale" : "1x",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import SwiftUI
import UIKit
import Presentation

class SceneDelegate: UIResponder, UIWindowSceneDelegate {
var window: UIWindow?
Expand All @@ -16,4 +17,4 @@ class SceneDelegate: UIResponder, UIWindowSceneDelegate {
coordinator = AppCoordinator(window: window)
coordinator?.start()
}
}
}
10 changes: 10 additions & 0 deletions HotSpot/App/Tests/HotSpotTests.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import XCTest
@testable import HotSpot

final class HotSpotTests: XCTestCase {
func testExample() throws {
// This is an example of a functional test case.
// Use XCTAssert and related functions to verify your tests produce the correct results.
XCTAssertTrue(true)
}
}
30 changes: 30 additions & 0 deletions HotSpot/Data/Project.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import ProjectDescription

let project = Project(
name: "Data",
organizationName: "Coby",
targets: [
.target(
name: "Data",
destinations: .iOS,
product: .framework,
bundleId: "com.coby.HotSpot.Data",
deploymentTargets: .iOS("15.0"),
infoPlist: .default,
sources: ["Sources/**"],
dependencies: [
.external(name: "Moya"),
.project(target: "Shared", path: "../Shared")
]
),
.target(
name: "DataTests",
destinations: .iOS,
product: .unitTests,
bundleId: "com.coby.HotSpot.DataTests",
infoPlist: .default,
sources: ["Tests/**"],
dependencies: [.target(name: "Data")]
)
]
)
22 changes: 22 additions & 0 deletions HotSpot/Data/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Data モジュール

## 概要
Dataモジュールは、データの取得と永続化を担当します。

## 構造
```
Data/
├── Sources/
│ ├── Repository/ # リポジトリ実装
│ ├── Network/ # ネットワーク関連
│ └── Local/ # ローカルストレージ
└── Tests/ # ユニットテスト
```

## 依存関係
- Domainモジュール
- Moya

## 使用方法
Dataモジュールは、外部データソース(API、ローカルストレージ)との通信を担当します。
Domainモジュールのリポジトリインターフェースを実装します。
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
import Foundation
import Moya

enum ServiceAPI {
public enum ServiceAPI {
case searchShops(ShopSearchRequestDTO)
}

extension ServiceAPI: TargetType {
var baseURL: URL {
public var baseURL: URL {
guard let baseURLString = Bundle.main.object(forInfoDictionaryKey: "BASE_URL") as? String,
let url = URL(string: baseURLString) else {
fatalError("BASE_URL is not set in configuration")
}
return url
}

var path: String {
public var path: String {
switch self {
case .searchShops:
return "/gourmet/v1/"
}
}

var method: Moya.Method {
public var method: Moya.Method {
switch self {
case .searchShops:
return .get
}
}

var task: Task {
public var task: Task {
guard let apiKey = Bundle.main.object(forInfoDictionaryKey: "API_KEY") as? String else {
fatalError("API_KEY is not set in configuration")
}
Expand All @@ -42,11 +42,11 @@ extension ServiceAPI: TargetType {
}
}

var headers: [String: String]? {
public var headers: [String: String]? {
return nil
}

var validationType: ValidationType {
public var validationType: ValidationType {
return .successCodes
}
}
Loading
Loading