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

value of type 'JSON' has no member 'isExists' #10

Closed
AbbyJanke opened this issue Apr 17, 2016 · 7 comments
Closed

value of type 'JSON' has no member 'isExists' #10

AbbyJanke opened this issue Apr 17, 2016 · 7 comments
Assignees

Comments

@AbbyJanke
Copy link

Hey, I have a new project I am working on and wanting to integrate SwiftRestModel, but when trying to run the app it is popping up with

value of type 'JSON' has no member 'isExists'

  • Pods/SwiftRestModel/Source/SwiftRestModel.swift:44:22: Value of type 'JSON' has no member 'isExists'
@jurajhilje
Copy link
Contributor

Hello Abby! Can you send the code snippet from your app that causes this problem?
What REST method is causing the error?

@AbbyJanke
Copy link
Author

Hey,

Thanks for quick response. I was attempting to use a GET request but it didnt matter because i could not build the app at all before it failed. As for the exact line i will get it tommorrow.

Sent from my iPad

On Apr 18, 2016, at 12:07 AM, Juraj Hilje [email protected] wrote:

Hello Abby! Can you send the code snippet from your app that causes this problem?
What REST method is causing the error?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@AbbyJanke
Copy link
Author

I quickly glanced at the code on my iPad and i found where it is. So i was integrating it manually.

SwiftRestModel.swift line 44 within the isNew function.

public func isNew() -> Bool {
if (self.data["id"].isExists()) {

Sent from my iPad

On Apr 18, 2016, at 12:07 AM, Juraj Hilje [email protected] wrote:

Hello Abby! Can you send the code snippet from your app that causes this problem?
What REST method is causing the error?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@jurajhilje
Copy link
Contributor

This is my fault, i need to complete the documentation for manual integration.
If you are using manual integration that's perfectly ok, just include dependencies (Alamofire, SwiftyJSON and HTTPStatusCodes) in your project and you should be fine.

@AbbyJanke
Copy link
Author

Awesome! I had all but HTTPSTatusCodes included. I will take a look tomorrow. Insaw that as a dependency but didnt think about it. Still new to ios/swift dev coming frim web dev so. Thanks!!

Sent from my iPad

On Apr 18, 2016, at 2:02 AM, Juraj Hilje [email protected] wrote:

This is my fault, i need to complete the documentation for manual integration.
If you are using manual integration that's perfectly ok, just include dependencies (Alamofire, SwiftyJSON and HTTPStatusCodes) in your project and you should be fine.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@jurajhilje
Copy link
Contributor

Cool! Let me know if everything is in order.

@AbbyJanke
Copy link
Author

Alrighty, so I took a look at it and I did already have HTTPStatusCodes imported. Looked into it a little further and was able to figure it out. Looks like just last month SwiftyJSON renamed isExists to exists(). Changed it in the code and it seems to be working fine now. I created a pull request #11

@jurajhilje jurajhilje self-assigned this Apr 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants