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

Swift iOS Passthrough Samples #36

Open
michaelkroll opened this issue May 2, 2015 · 5 comments
Open

Swift iOS Passthrough Samples #36

michaelkroll opened this issue May 2, 2015 · 5 comments

Comments

@michaelkroll
Copy link

Could you provide some simple snippets on how to call the iOS Sample in Swift?

@neil-oliver
Copy link

        var path: NSString = "link"
        var params: NSDictionary = ["where" : "label=\"link_name\""]
        var c = BAAClient.sharedClient()

        c.getPath(path as String, parameters: params as [NSObject : AnyObject], success:{(success: AnyObject!) -> Void in
               println(success)
            }, failure:{(failure: NSError!) -> Void in
               println(failure)
        })

@neil-oliver
Copy link

I am a total novice but that worked for me! i hope it makes sense and helps you out.

@shams-ahmed
Copy link
Contributor

@neil-oliver seems alright, i would use 'let' instead of var if its going to be mutable

@neil-oliver
Copy link

thanks! thats definitely a weakness for me, i will look at improving that in my code. Thank you for the tip! I am hoping that the SDK will have better link support in the near future

@michaelkroll
Copy link
Author

Will test this out. Thanks.

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