SwiftData icon indicating copy to clipboard operation
SwiftData copied to clipboard

Update for Swift 2.1?

Open Gob-Lin opened this issue 9 years ago • 12 comments

The new release of Swift generates about 120 errors. Some of them are just println replacements but the others are more structural.

Any chance of an update?

Thanks.

Gob-Lin avatar Jan 07 '16 10:01 Gob-Lin

I posted a simple fix for that in issue #27 and issue #28

RegisStGelais avatar Jan 07 '16 12:01 RegisStGelais

Did as instructed but still get several errors related to Type 'String' does not conform to protocol 'SequenceType'.

G

Gob-Lin avatar Jan 07 '16 13:01 Gob-Lin

Use a separate file for your string extention class and make sure that you import Fondation.

RegisStGelais avatar Jan 07 '16 13:01 RegisStGelais

String extension is already in a separate file, with Foundation imported on top.

Any idea of what can be wrong?

Thanks,

G

Gob-Lin avatar Jan 07 '16 13:01 Gob-Lin

Hum, I successfully use this extention in my project. Did you also remove the old sqlite lib and add libsqlite3.tdb ?

RegisStGelais avatar Jan 07 '16 13:01 RegisStGelais

I have added libsqlite3.tdb, there was no old sqlite lib in my project, or so I guess?

G

Gob-Lin avatar Jan 07 '16 13:01 Gob-Lin

I'm using an old version of swiftdata and added some customisation. Maybe the current version in github has another issue with swift 2.1 ??

One difference that I can see is that the current version has: for char in sql and my version has: for char in sql.characters

RegisStGelais avatar Jan 07 '16 13:01 RegisStGelais

Good, I have added .characters where needed then I have added a try/catch to the methods

saveUIImage(image: UIImage) -> String?

and

deleteUIImageWithID(id: String) -> Bool

Now it compiles correctly. I'll let you know if I discover other issues.

Thanks and, btw, congratulations for this excellent class!

G

Gob-Lin avatar Jan 07 '16 15:01 Gob-Lin

I am not the author of SwiftData, I am a user like you. I just found the class extention trick to fix it. Glad it helped. Keep me posted.

RegisStGelais avatar Jan 07 '16 15:01 RegisStGelais

Yes, I have realized right after posting :-)

So, congratulations to Ryan Fowler and kudos to you!

P

Gob-Lin avatar Jan 07 '16 15:01 Gob-Lin

I did every way(add extention,clear println errors) , but there is 68 errors yet , what i should do?

a-Hejazi avatar Jan 30 '16 12:01 a-Hejazi

Check Issue #34, I made a quick fix for the build break in Swift 2.1.

jychunyih avatar Feb 24 '16 14:02 jychunyih