SwiftMonkey
SwiftMonkey copied to clipboard
xcode 11.0 use pod build err " Showing All Messages Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements" and " Showing All Messages Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50"
building err
Showing All Messages Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibilityDynamicReplacements
Showing All Messages
Undefined symbol: __swift_FORCE_LOAD_$_swiftCompatibility50
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)"
"$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
Could you provide more details about your setup? Xcode version, CocoaPods version, how are you integrating SwiftMonkey and SwiftMonkeyPaws. Ideally, could you provide a sample project? Also Does the sample provided with the framework work for you?
I have the same error with Xcode 11.2.1, cocoapods (1.8.4)
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
If you want to know what Xcode has done, submit the code before creating the file, and check the changes after creating the file.
@acalism
Is there any way to fix it with out creating empty Swift file?
@acalism
Is there any way to fix it with out creating empty Swift file?
Then remove the empty file as you wish.
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
Thanks for the answer, but I'd like to know how dose it work?
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
you saved my day, Thank you man!
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
Thanks for the answer, but I'd like to know how dose it work?
It works for me too ! Thanks buddy but yeah, why ?
Check this https://blog.cpming.top/p/react-native-0-62-undefined-symbol
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
It is great solution.
Void.swift
in which folder we have to create the file ??
Void.swift
in which folder we have to create the file ??
i also have same doubt.. did u find answer?
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
This function perfectly, but why works?
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
This is the correct solution eventually in my case, but there is one more detail I found out which I think worth to mention. If you made a framework which uses swift library (swiftCompatibility*.a) and then other project uses this framework will encounter similar link error even if they put those paths into "Library Search Paths". One of the failure is by compiling the framework and project with different Xcode version (for saying, Xcode 11 to compile framework and Xcode 12 to compile project which uses previous framework). I don't know why but somehow it can not automatically search the .a file, maybe because they are different version?
Void.swift
in which folder we have to create the file ??
i also have same doubt.. did u find answer?
You need to create in the main project folder, in the same folder as the AppDelegate file. It solved the issue for me, so hopefully it does for you as well.
One of the failure is by compiling the framework and project with different Xcode version (for saying, Xcode 11 to compile framework and Xcode 12 to compile project which uses previous framework). I don't know why but somehow it can not automatically search the .a file, maybe because they are different version?
@ownself, did you ever find a solution to this problem? Thanks!
One of the failure is by compiling the framework and project with different Xcode version (for saying, Xcode 11 to compile framework and Xcode 12 to compile project which uses previous framework). I don't know why but somehow it can not automatically search the .a file, maybe because they are different version?
@ownself, did you ever find a solution to this problem? Thanks!
So far for us, we found one way to deal it, which you need to manually copy the *.a file into your framework project and explicitly link with it. That will make sure no matter which version of XCode they use for their project, when they link with your framework it will always link with your local copied *.a library file.
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
You are the real saver. Thanks a lot.
Figured this out. There is a new library in Xcode 12 that needs to be added to the Link Binary with Libraries phase call libSwiftWebKit.tbd. Error went away after adding this.
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
This way I was able to fix this issue, refer the below images =>
![Screenshot 2021-07-14 at 9 28 39 PM](https://user-images.githubusercontent.com/8893968/125653923-4159de2d-a9d8-4558-b15a-84b1e6e4aa07.png)
![Screenshot 2021-07-14 at 9 30 06 PM](https://user-images.githubusercontent.com/8893968/125654068-7fc02154-c066-4fae-88a3-cd3b31417a84.png)
![Screenshot 2021-07-14 at 9 30 42 PM](https://user-images.githubusercontent.com/8893968/125654241-f3994d59-3b10-451e-8dee-402ec6a39816.png)
![Screenshot 2021-07-14 at 9 26 07 PM](https://user-images.githubusercontent.com/8893968/125653628-35a12e6b-1a11-4319-9f7c-0cc19548359c.png)
what the hell is this sorcery
😂😂 hours wasted only to find out this is the fix. Wow 🤷🏻
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
From Xcode13 you should add new param: "$(SDKROOT)/usr/lib/swift"
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
Amazing!
Create an Empty Swift file using Xcode, such as named Void.swift, and every issue will be solved by Xcode automatically.
out of curiosity, do we know if it will ever be safe to remove the Void.swift file again? or do we just accept that it will stay there for the project to work?
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
From Xcode13 you should add new param: "$(SDKROOT)/usr/lib/swift"
Xcode 13.1:
In my case, dyld`__abort_with_payload:
appeared.
creating an empty swift file solved the issue for me. any explanations? 😳😳😂
Alternate for those who already have bridging header: update cocapods to latest version and do pod install.
project->build settings->search path->Library Search Paths add Code
"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)" "$(TOOLCHAIN_DIR)/usr/lib/swift-5.0/$(PLATFORM_NAME)"
build success
From Xcode13 you should add new param: "$(SDKROOT)/usr/lib/swift"
Xcode 13.1:
In my case,
dyld`__abort_with_payload:
appeared.
@hstdt I have the same problem, did you solve it?