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

Hello, there was an error using in the package. #49

Open
lilunxp opened this issue May 24, 2023 · 1 comment
Open

Hello, there was an error using in the package. #49

lilunxp opened this issue May 24, 2023 · 1 comment

Comments

@lilunxp
Copy link

lilunxp commented May 24, 2023

When executing main.swift

import DocX
import SwiftUI

let string = NSAttributedString(string: "This is a string", attributes: [:])
let url = URL(fileURLWithPath:"/Users/lilun/Downloads")
try? string.writeDocX(to: url)

Thread 1:"-[NSConcreteAttributedString writeDocXTo:error:] unrecognized selector sent to instance 0x600000204f60"
2023-05-24 08:12:28.904180+0800 AddDocx[7329:105841] -[NSConcreteAttributedString writeDocXTo:error:]: unrecognized selector sent to instance 0x600000204f60
2023-05-24 08:12:28.904517+0800 AddDocx[7329:105841] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSConcreteAttributedString writeDocXTo:error:]: unrecognized selector sent to instance 0x600000204f60'
*** First throw call stack:
(
0 CoreFoundation 0x000000019599f154 __exceptionPreprocess + 176
1 libobjc.A.dylib 0x00000001954be4d4 objc_exception_throw + 60
2 CoreFoundation 0x0000000195a46110 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00000001959070a0 forwarding + 1600
4 CoreFoundation 0x00000001959069a0 _CF_forwarding_prep_0 + 96
5 AddDocx 0x0000000100005028 main + 604
6 dyld 0x00000001954eff28 start + 2236
)
libc++abi: terminating due to uncaught exception of type NSException
(lldb)

Where is the problem? Novice learning, the foundation is not yet solid, troublesome! Thank you.

@shinjukunian
Copy link
Owner

Hi,

how are you adding DocX too your target? The error message (to me) suggests that DocX is not actually installed?

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

No branches or pull requests

2 participants