Closed Anveena closed 7 years ago
add this extention for the String class
extension String { func stringByAppendingPathComponent(path: String) -> String { let nsSt = self as NSString return nsSt.stringByAppendingPathComponent(path) } }
You also need to delete the sqlite2 library from your project tree and add libsqlite3.tbd in the "build phase" tab, in section "Link Binary With Libraries"
I use SwiftData with these changes on Xcode 7 and iOS 9 :)
thank u,thank u,thank u,thank u,thank u,thank u,thank u,I just change it into "aaa"+"\bbb"
i have deleted the sqlite 2 library from my project and added the libsqlite3.tbd in the build phase. but i don't know where to add the extension.. can you help me with this?
Add a new swift file in your project (I called mine StringExtention.swift) and put the class extension code in it.
I am able to create the string extension. However, SwiftData.swift has more than 100 errors when I try to add it to a Swift 2 project. Some of them are pretty simple to fix, but I am not sure about the rest.
did you do this step: " You also need to delete the sqlite2 library from your project tree and add libsqlite3.tbd in the "build phase" tab, in section "Link Binary With Libraries" " ?
Also, are the first errors related to stringByAppendingPathComponent? If yes then the compiler is not seeing your extention. The best it to put it in a separate file. Don't forget to import Foundation in the extention file.
RegisStGelais, thanks... it save me.
Nice fix , thanks!
Please...I really like it..........I cant remove it from my project at all