I'm trying to de-mangle mangled Swift symbols with swift-demangle. Some symbols are de-mangled just fine, but some others can't be de-mangled at all no matter what verison of Swift I'm using. Example: I've tried to de-mangle _TTSf4g_n_n_n___TTOFE5UIKitCSo18NSAttributedStringcfzT4dataV10Foundation4Data7optionsGVs10DictionarySSP__18documentAttributesGSqGVs33AutoreleasingUnsafeMutablePointerGSqCSo12NSDictionary____S0_ using the swift-demangle utility from the following Swift versions: 2.2.1, 3.0.1, 3.0.2, 3.1, 3.1.1, 4.0.2, 4.0.3 and 4.1, using the following command:
swift-demangle -compact -no-sugar -simplified _TTSf4g_n_n_n___TTOFE5UIKitCSo18NSAttributedStringcfzT4dataV10Foundation4Data7optionsGVs10DictionarySSP__18documentAttributesGSqGVs33AutoreleasingUnsafeMutablePointerGSqCSo12NSDictionary____S0_
, but all resulted in the same mangled symbol as the input.
I'm currently compiling Swift 2.2.1 to see whether the symbol can be de-mangled there (which I doubt)... Any advice on what possibly could be the reason behind those symbols not being able to be de-mangled would be really appreciated...
Related
I recently started my very first swift experience and I got an error
'Module compiled with Swift 4.2.1 cannot be imported by the Swift 5.0
compiler'
I thought that I can moderate this error just selecting my swift language version on build settings. but it doesn't work.
After few searching, I found that there are two options
Downgrade Xcode
Update modules or Rebuild modules using swift 5.0
Are they only options I got? I don't know why changing swift language version does not do anything.
The swift 5 compiler which is bundled with Xcode 10.2 can compile in swift 4 mode. However, it is still the swift 5 compiler and not the swift 4 compiler that came in Xcode 10.1. Modules built with the swift 4 compiler can’t be imported by the swift 5 compiler.
Therefore, the two options you listed are the only options you have.
I have a project, I'm migrating it from Swift 2.3 to Swift 4 and when I build it on the device I have the above mentioned errors.
The following binaries use incompatible versions of Swift 4:
/Carthage/Build/iOS/SwiftyJSON.framework/SwiftyJSON
/Carthage/Checkouts/SwiftRecord/SwiftRecord.framework/SwiftRecord
How can I fix it !! Please help. Thanks
I have a static library that I converter from old Swift to Swift 2.3 and later to Swift 3.0.
Now I need both version (2.3 and 3.0) of the library, but I forgot to take a backup of version 2.3. And I only have 3.0.
Is there a simple way to convert back from Swift 3.0 to Swift 2.3?
Simple, not really, but this will work.
If you don't have it, download XCode 7.3.1 from Apple
Open your library in the 7.3.1 version and correct whatever errors appear
Migrate the corrected code from step 2 into XCode 8.2 or lower (8.3 will not support Swift 2.3)
As mentioned in the comments, maintaining your code in a version control system will spare you problems like this in the future, and is generally just a good idea.
You don't even need to set up your own system, since git is part of MacOS, and XCode can handle simple git features for you.
For getting md5 hash tag in swift i am using the CryptoSwift framework. Followed the procedures of installing it and everything is done right. But while compiling i am getting errors in cryptoswift which is shown in image below. Swift really a headache in adding the framework . A half cooked language it is.
/Users/###/Desktop/SwiftMD5String/CryptoSwift/Sources/CryptoSwift/BlockMode/CipherBlockMode.swift:15:47: Argument passed to call that takes no arguments
This error occurs 17 times
and
it also shows import CryptoSwift -> No module found for CryptoSwift
I had the same issue, and i solved it by forcing CocoaPods to install the version 0.2.1 of the library
pod 'CryptoSwift', '0.2.1'
I’ve been trying to AFNetworking-RACExtensions by using CocoaPods, but it always shows this error:
[!] Unable to satisfy the following requirements:
- `ReactiveCocoa (= 2.1.8)` required by `Podfile`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/Core` required by `ReactiveCocoa (2.1.8)`
- `ReactiveCocoa/no-arc` required by `ReactiveCocoa/Core (2.1.8)`
- `ReactiveCocoa (~> 2.1)` required by `ReactiveViewModel (0.1.1)`
- `ReactiveCocoa (~> 1.5.0)` required by `AFNetworking-RACExtensions (0.0.1)`
What can possible the the cause? Is it because AFNetworking-RACExtensions need AFNetworking 1.5 to work?
The issue here is that you need a version of ReativeCocoa that matches the semantic versioning required by ~> 1.5.0. So I believe that would include the highest version matching 1.5.x but not 1.6*. Regardless 2.* definitely isn't compatible with that. Since you're requiring 2.x other places you can not have both of these versions at once. This is something CocoaPods can't handle because of the nature of duplicate symbols in Objective-C. The only way to fix this would be to downgrade your 2.x version, although I assuming going down to before 2.0 would be difficult. Or the AFNetworking-RACExtensions upgrading to support ReactiveCocoa 2.x.