4
votes

I was using RAMAnimatedTabBarController Module from here: https://github.com/Ramotion/animated-tab-bar

I developed my entire application in swift 1.2 using Xcode 6 and the app was running perfectly . I wanted to try out "side loading" of my app using Xcode 7 which has swift 2.0. I had too many errors and I managed to solve most of the errors but three.

1) This line of code which is from that RAMAnimatedTabBarController module is throwing an error saying the function can't be evoked, when this perfectly compiled in Xcode 6:

 var  constranints = NSLayoutConstraint.constraintsWithVisualFormat(formatString,options:NSLayoutFormatOptions.DirectionRightToLeft,metrics: nil,views: containersDict as [NSObject : AnyObject])

the compiler error for this was:

Cannot invoke 'constraintsWithVisualFormat' with an argument list of type '(String, options: NSLayoutFormatOptions, metrics: nil, views: [NSObject : AnyObject])'

2) Another unusual error was thrown:

linker command failed with exit code 1 (use -v to see invocation)

3) And another:

(null): error: cannot parse the debug map for "/Users/Rakshith/Library/Developer/Xcode/DerivedData/Blubot-heabwwmhqxxvctaabxkwcpgzsadx/Build/Intermediates/SwiftMigration/Blubot/Products/Debug-iphonesimulator/BlubotTests.xctest/BlubotTests": No such file or directory

What is actually wrong with my project? It is still set to iOS 8.3.

4
Blah, blah, blah, but what's the actual compiler error message?Droppy
Uh? I literally copy pasted the compiler error message.Rakshith G B
Yeah after my comment.Droppy
I pasted the 1st issue after you commented the other 2 errors were already there . Anyhow do you happen to have a solution?Rakshith G B
Yeah I have an idea about the first, which is what I was talking about as the other errors are linker errors, not compiler errors.Droppy

4 Answers

9
votes

Disable BitCode

Build Settings -> BitCode
0
votes

I managed to correct the 2nd and 3rd error which most of you probably will face when you're running Xcode 7 Beta as well as Xcode 6. Just solve these two errors by following the steps mentioned in this tread: Xcode Version 6.1 (6A1030) - Apple Match O-Linker Error - Building

0
votes

Try this method:

func createViewContainers() -> [String: UIView] {

    var containersDict = [String: UIView]()

    guard let tabBarItems = tabBar.items else
    {
        return containersDict
    }

    let itemsCount: Int = tabBarItems.count - 1

    for index in 0...itemsCount {
        let viewContainer = createViewContainer()
        containersDict["container\(index)"] = viewContainer
    }

    var formatString = "H:|-(0)-[container0]"
    for index in 1...itemsCount {
        formatString += "-(0)-[container\(index)(==container0)]"
    }
    formatString += "-(0)-|"
    let constranints = NSLayoutConstraint.constraintsWithVisualFormat(formatString,
        options:NSLayoutFormatOptions.DirectionRightToLeft,
        metrics: nil,
        views: containersDict)
    view.addConstraints(constranints)

    return containersDict
}
-1
votes

how about to change the small code from "containersDict as [NSObject : AnyObject]" to "containersDict as [String : AnyObject]".

then I solved the issue above method.