ryanfowler / SwiftData

Simple and Effective SQLite Handling in Swift
MIT License
517 stars 93 forks source link

Fit for swift2.0 #27

Closed Anveena closed 7 years ago

Anveena commented 8 years ago

Please...I really like it..........I cant remove it from my project at all

RegisStGelais commented 8 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 :)

Anveena commented 8 years ago

thank u,thank u,thank u,thank u,thank u,thank u,thank u,I just change it into "aaa"+"\bbb"

duraiganesh0 commented 8 years ago

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?

RegisStGelais commented 8 years ago

Add a new swift file in your project (I called mine StringExtention.swift) and put the class extension code in it.

matibzurovski commented 8 years ago

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.

RegisStGelais commented 8 years ago

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.

kamalkcspl246 commented 8 years ago

RegisStGelais, thanks... it save me.

ConorBeckett commented 8 years ago

Nice fix , thanks!