Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Everything gives "Unexpected" error #201

Open
Chucky3000 opened this issue Jul 10, 2017 · 2 comments
Open

Everything gives "Unexpected" error #201

Chucky3000 opened this issue Jul 10, 2017 · 2 comments

Comments

@Chucky3000
Copy link

I just bought iSwift. Was hoping to use it as a self-teaching tool as I learn Swift. I know no ObjC. I can sometimes follow what the code is doing, but usually it's a mystery.

Every piece of ObjC code I paste into the app fails to convert. There's always some sort of error labeled "unexpected." "}" ":" ">" "USER_TYPE_NAME"

My goal is to take open source ObjC where I know the purpose of the code (what it does) run it through iSwift... And then magically become a Swift expert. (Mostly joking, but I hope you get my point.)

Any direction on what ObjC code I should start with would help.
Thanks!

@adamnemecek
Copy link

Hey did you figure this out? I'm running into the same problem.

@drkameleon
Copy link
Collaborator

Hi!

And honest apologies for the so-delayed reply. (I just noticed the messages here).

Unexpected USER_TYPE_NAME usually means it encountered an undeclared type, thus it tried to see it as an identifier.

The most common way of circumventing the issue is by adding a @class XYZ; declaration on top of the file, with class name triggering the error.

Can you show me some specific code, to make sure?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants