Skip to content
New issue

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

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

Already on GitHub? # to your account

Example could not work #7

Open
yonghuming opened this issue Aug 17, 2023 · 11 comments
Open

Example could not work #7

yonghuming opened this issue Aug 17, 2023 · 11 comments

Comments

@yonghuming
Copy link

2023-08-17 18:57:13.138245+0800 MD2[3201:3124067] [SwiftUI] Accessing Environment<ColorScheme>'s value outside of being installed on a View. This will always read the default value and will not update.
2023-08-17 18:57:13.144124+0800 MD2[3201:3124067] -[WKWebView _setDrawsTransparentBackground:] is deprecated and should not be used.
2023-08-17 18:57:13.190866+0800 MD2[3201:3124067] Metal API Validation Enabled
2023-08-17 18:57:13.305731+0800 MD2[3201:3124067] [Process] 0x12205c480 - [PID=0] WebProcessProxy::didFinishLaunching: Invalid connection identifier (web process failed to launch)
2023-08-17 18:57:13.305812+0800 MD2[3201:3124067] [Process] 0x12205c480 - [PID=0] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash
2023-08-17 18:57:13.306167+0800 MD2[3201:3124067] [Process] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::processDidTerminate: (pid 0), reason=Crash
2023-08-17 18:57:13.306356+0800 MD2[3201:3124067] [Loading] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
2023-08-17 18:57:13.306372+0800 MD2[3201:3124067] [Loading] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=0] WebPageProxy::dispatchProcessDidTerminate: Not eagerly reloading the view because it is not currently visible
2023-08-17 18:57:13.388055+0800 MD2[3201:3124067] [Process] 0x12205c100 - [PID=3207] WebProcessProxy::didClose: (web process 3207 crash)
2023-08-17 18:57:13.388084+0800 MD2[3201:3124067] [Process] 0x12205c100 - [PID=3207] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=Crash
2023-08-17 18:57:13.388139+0800 MD2[3201:3124067] [Process] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=3207] WebPageProxy::processDidTerminate: (pid 3207), reason=Crash
2023-08-17 18:57:13.394372+0800 MD2[3201:3124067] [Loading] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=3207] WebPageProxy::dispatchProcessDidTerminate: reason=Crash
2023-08-17 18:57:13.394400+0800 MD2[3201:3124067] [Process] 0x12082de18 - [pageProxyID=6, webPageID=7, PID=3207] WebPageProxy::tryReloadAfterProcessTermination: process crashed and the client did not handle it, not reloading the page because we reached the maximum number of attempts
2023-08-17 18:57:13.395249+0800 MD2[3201:3124067] [Process] 0x122018340 - NetworkProcessProxy::didClose (Network Process 3206 crash)
2023-08-17 18:57:13.396340+0800 MD2[3201:3124483] flock failed to lock list file (/var/folders/45/mympflmx17v2f4l9x5ls42h80000gn/C/cn.kikicoding.MD2//cn.kikicoding.MD2/com.apple.metal/31001/libraries.list): errno = 35
2023-08-17 18:57:13.396907+0800 MD2[3201:3124483] flock failed to lock list file (/var/folders/45/mympflmx17v2f4l9x5ls42h80000gn/C/cn.kikicoding.MD2//cn.kikicoding.MD2/com.apple.metal/16777235_530/functions.list): errno = 35

code is

//
//  ContentView.swift
//  MD2
//
//  Created by meng xianlang on 2023/8/17.
//

import SwiftUI
import Markdown

struct ContentView: View {
    @State private var mdStr: String = """
    ## Hello World
    
    Render Markdown text in SwiftUI
    """
    var body: some View {
        VStack {
            Markdown(content: $mdStr)
            TextEditor(text: $mdStr)
            
        }
        .padding()
    }
}

struct ContentView_Previews: PreviewProvider {
    static var previews: some View {
        ContentView()
    }
}
    

@jaywcjlove
Copy link
Owner

image

@yonghuming 这里你配置了吗

@yonghuming
Copy link
Author

yonghuming commented Aug 17, 2023 via email

@jaywcjlove
Copy link
Owner

我看到一个错误信息 flock failed to lock list file 这是一个错误,指示在锁定列表文件时出现问题,可能是由于权限或文件相关问题导致的。

你可以查看 https://github.com/jaywcjlove/swiftui-markdown/tree/main/Example 这个示例 @yonghuming

@yonghuming
Copy link
Author

我看到一个错误信息 flock failed to lock list file 这是一个错误,指示在锁定列表文件时出现问题,可能是由于权限或文件相关问题导致的。

你可以查看 https://github.com/jaywcjlove/swiftui-markdown/tree/main/Example 这个示例 @yonghuming

非常感谢,我再试试看,

@yonghuming
Copy link
Author

image

@yonghuming 这里你配置了吗

是没有的,这里配置的作用是什么呢。我昨晚另外一个 swifti-markdwon-ui 渲染 markdown 虽然成功了,但是效果一般,你这个支持数学公式,更强大。

@yonghuming
Copy link
Author

image
我看了下,我的电脑是没有 app sandbox 的,添加能力也没有

@yonghuming
Copy link
Author

也没有 signing 里面也没有 enable sandbox 的选项

@yonghuming
Copy link
Author

image

@yonghuming
Copy link
Author

image
虽然有点奇怪,但是手机可以了

@yonghuming
Copy link
Author

Uploading image.png…

@yonghuming
Copy link
Author

image

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants