Xcode 6 Beta 5 Swift Error: Class Exists in libswift_stdlib_core.dylib and in libswiftCore.dylib. Which one is undefined

So, I have an interesting bug that was not in the previous beta version of Xcode. It appears at runtime from this code: (Line 5, to be precise)

func removeDuplicates(urls: [NSString]) -> [NSString]{ var newURLs = [urls[0]] for var i = 0; i < urls.count; i++ { for var j = 0; j < newURLs.count; j++ { if urls[i].isEqualToString(newURLs[j]) { if j == newURLs.count-1 { newURLs.append(urls[i]) } } else { j = newURLs.count } } } println(newURLs.debugDescription) return newURLs } 

Errors are as follows:

objc [322]: the _NSSwiftEnumeratorBase class is implemented both in "MyAppFilePath.app" / Frameworks / libswift _stdlib_core.dylib and in "MyAppFilePath.app" /Frameworks/libswiftCore.dylib. One of the two will be used. Which one is undefined.

There are about two dozen of them for different fast classes.

As I said, there was no problem here until I changed the version, I know that some syntax changed, but nothing in the release notes really pointed to such a thing.

+6
source share
1 answer

If the same problem, pure (Shift + Cmd + K) would solve this for me.

+11
source

Source: https://habr.com/ru/post/973340/


All Articles