diff --git a/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000000..bf00e11417 --- /dev/null +++ b/packages/frontend/apps/ios/App/App.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,32 @@ +{ + "pins" : [ + { + "identity" : "networkimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gonzalezreal/NetworkImage", + "state" : { + "revision" : "2849f5323265386e200484b0d0f896e73c3411b9", + "version" : "6.0.1" + } + }, + { + "identity" : "swift-cmark", + "kind" : "remoteSourceControl", + "location" : "https://github.com/swiftlang/swift-cmark", + "state" : { + "revision" : "3ccff77b2dc5b96b77db3da0d68d28068593fa53", + "version" : "0.5.0" + } + }, + { + "identity" : "swift-markdown-ui", + "kind" : "remoteSourceControl", + "location" : "https://github.com/gonzalezreal/swift-markdown-ui", + "state" : { + "revision" : "5f613358148239d0292c0cef674a3c2314737f9e", + "version" : "2.4.1" + } + } + ], + "version" : 2 +} diff --git a/packages/frontend/apps/ios/App/App/Packages/Intelligents/Sources/Intelligents/IntelligentsChatController/ChatTableView/ChatTableView.swift b/packages/frontend/apps/ios/App/App/Packages/Intelligents/Sources/Intelligents/IntelligentsChatController/ChatTableView/ChatTableView.swift index 4a97165701..e96c217ee6 100644 --- a/packages/frontend/apps/ios/App/App/Packages/Intelligents/Sources/Intelligents/IntelligentsChatController/ChatTableView/ChatTableView.swift +++ b/packages/frontend/apps/ios/App/App/Packages/Intelligents/Sources/Intelligents/IntelligentsChatController/ChatTableView/ChatTableView.swift @@ -54,48 +54,77 @@ class ChatTableView: UIView { extension ChatTableView { func putMockData() { DispatchQueue.main.async { - self.dataSource = [ - .init(type: .chat, object: ChatCell.ViewModel( - participant: .system, - markdownDocument: "Welcome to Intelligents" - )), - .init(type: .chat, object: ChatCell.ViewModel( - participant: .user, - markdownDocument: "Please summarize this article for me" - )), - .init(type: .chat, object: ChatCell.ViewModel( - participant: .assistant, - markdownDocument: ###""" - **Activation Code Usage Limits** + let json: [String: Any] = ["query": """ +{ + currentUser { + email + name + } + } +""", "variables": [:]] - A single activation code can be used on multiple devices. + let jsonData = try? JSONSerialization.data(withJSONObject: json) - **Note:** A single activation code is intended for use on a reasonable number of devices by one user. + let url = URL(string: "http://localhost:3010/graphql")! - Excessive activation requests may result in the activation code being banned. Any bans are subject to manual review and are operated by staff. - - `The limit is up to 5 devices per year or 10 activation requests within the same period.` - """### - )), - .init(type: .chat, object: ChatCell.ViewModel( - participant: .user, - markdownDocument: ###""" - **Download Axchange from the App Store** - - You can download Axchange from the App Store: - - - [https://apps.apple.com/app/axchange-adb-file-transfer/id6737504944](https://apps.apple.com/app/axchange-adb-file-transfer/id6737504944) - - The version downloaded this way does not require activation to use. - """### - )), - .init(type: .chat, object: ChatCell.ViewModel( - participant: .assistant, - markdownDocument: "GOOD" - )), + var request = URLRequest(url: url) + request.httpMethod = "POST" + request.allHTTPHeaderFields = [ + "content-type": "application/json" ] + request.httpBody = jsonData - self.tableView.reloadData() + let task = URLSession.shared.dataTask(with: request) { (data, response, error) in + if let error = error { + print(error) + } else if let data = data { + let str = String(data: data, encoding: .utf8) + self.dataSource = [ + .init(type: .chat, object: ChatCell.ViewModel( + participant: .system, + markdownDocument: "Welcome to Intelligents" + str! + )), + .init(type: .chat, object: ChatCell.ViewModel( + participant: .user, + markdownDocument: "Please summarize this article for me" + )), + .init(type: .chat, object: ChatCell.ViewModel( + participant: .assistant, + markdownDocument: ###""" + **Activation Code Usage Limits** + + A single activation code can be used on multiple devices. + + **Note:** A single activation code is intended for use on a reasonable number of devices by one user. + + Excessive activation requests may result in the activation code being banned. Any bans are subject to manual review and are operated by staff. + + `The limit is up to 5 devices per year or 10 activation requests within the same period.` + """### + )), + .init(type: .chat, object: ChatCell.ViewModel( + participant: .user, + markdownDocument: ###""" + **Download Axchange from the App Store** + + You can download Axchange from the App Store: + + - [https://apps.apple.com/app/axchange-adb-file-transfer/id6737504944](https://apps.apple.com/app/axchange-adb-file-transfer/id6737504944) + + The version downloaded this way does not require activation to use. + """### + )), + .init(type: .chat, object: ChatCell.ViewModel( + participant: .assistant, + markdownDocument: "GOOD" + )), + ] + + self.tableView.reloadData() + } + } + + task.resume() } } } diff --git a/packages/frontend/apps/ios/App/Podfile.lock b/packages/frontend/apps/ios/App/Podfile.lock index 21f407e744..3117ca8896 100644 --- a/packages/frontend/apps/ios/App/Podfile.lock +++ b/packages/frontend/apps/ios/App/Podfile.lock @@ -44,4 +44,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 1b0d3fe81862c0e9ce712ddd0c5a0accd0097698 -COCOAPODS: 1.16.2 +COCOAPODS: 1.15.2 diff --git a/packages/frontend/apps/ios/capacitor.config.ts b/packages/frontend/apps/ios/capacitor.config.ts index 916df9c225..8712cc2f95 100644 --- a/packages/frontend/apps/ios/capacitor.config.ts +++ b/packages/frontend/apps/ios/capacitor.config.ts @@ -9,7 +9,7 @@ const config: CapacitorConfig = { path: '.', }, server: { - url: 'http://localhost:8080', + // url: 'http://localhost:8080', }, plugins: { CapacitorCookies: {