nvzqz/RandomKit

Xcode 9/iOS 11 generating errors

danipralea opened this issue · 18 comments

Hi guys!
I have been compiling on of my projects in Xcode 9 (beta) and there's a few errors being generated by RandomKit. any chance you can have a look at that?

More specifically:
screenshot 2017-07-05 09 45 02

Thanks in advance!

nvzqz commented

Are you using release v5.1.0?

I don't know to be honest. I just have pod 'RandomKit' in my Podfile

Specifying the version should do it? and how do I do that?

I tried using pod 'RandomKit', '~> 5.1.0' but I get:
screenshot 2017-07-05 16 15 06

nvzqz commented

Try doing:

pod repo update

Your local specs might by out of sync, and if so, that should fix it.

that did it. I don't have errors in the framework itself, but I have errors where I'm using it.

nvzqz commented

Can you please post an image showing these errors?

nvzqz commented

@danipralea are you still experiencing these errors?

@nvzqz I have not tried yet, cause we postponed the transition to Xcode 9 & iOS 11

Thank you so much for your reply and for checking in! and I apologize for not updating this.
I will try a bit later today.

nvzqz commented

@danipralea any update on your situation?

the same for now 😢

screenshot 2017-07-24 14 52 37

screenshot 2017-07-24 14 52 48

screenshot 2017-07-24 14 49 56

screenshot 2017-07-24 14 51 08

screenshot 2017-07-24 14 51 54

From Podfile.lock:

 RandomKit (5.1.0):
    - ShiftOperations (~> 1.0.2)
    - Threadly (~> 1.0)
nvzqz commented

I see what the problem is: RandomKit 5 and after uses 'in' instead of 'within' for an argument label.

I suggest doing a find & replace of 'within:' to 'in:' within your project.

Also, with that last one, you'll get better performance if you put the for loop inside of the random generator block. 👍

is there cross-compatibility between Swift 4 and Swift 3?

nvzqz commented

RandomKit 5.1 supports Swift 3.2 and Swift 4, yes. This is done via conditional compilation with #swift.

You can build Swift 3.2 projects with the Swift 4 compiler. Oddly enough, there are breaking changes between 3.1.1 and 3.2 which were fixed with RandomKit 5.1.

I'm still not sure what I need to do to work both on Xcode 8 and Xcode 9 😢

nvzqz commented

What errors are you getting?

the ones above? 😛

oh, just replace. saw it later. cool, I will try it later

nvzqz commented

@danipralea have you resolved this on your side?

nvzqz commented

@danipralea Closing this issue now. If you're still experiencing problems, feel free to reopen it.