venmo / venmo-ios-sdk

Make and accept payments in your iOS app via Venmo
MIT License
178 stars 57 forks source link

Cannot request permissions to integrate venmo #61

Closed sudov closed 9 years ago

sudov commented 9 years ago

So I have the following code in my view controller (SWIFT)

Venmo.sharedInstance().requestPermissions([VENPermissionMakePayments,VENPermissionAccessProfile], withCompletionHandler: { (Bool success, NSError error) -> Void in if (success) { println(":)") } else { println(":(") } })

This results in an 3 errors as below: 1) "_VENPermissionAccessProfile", referenced from: __TFC8SplitPea24VenmoLoginViewController11viewDidLoadfS0_FTT in VenmoLoginViewController.o

2) "_VENPermissionMakePayments", referenced from: __TFC8SplitPea24VenmoLoginViewController11viewDidLoadfS0_FTT in VenmoLoginViewController.o

3) clang: error: linker command failed with exit code 1 (use -v to see invocation)

How does one interpret these? The code only shows errors when i try to run (auto-compile is on in my xcode) and shows no errors when the snippet provided above is commented out. This view controller is connected to a blank view controller in the storyboard if that information helps.

sudov commented 9 years ago

Any takers?

sudov commented 9 years ago

Had to move forward with my project so used the Objective-C you guys provided with a bridging header. Could someone post a fix if they figure this error out?

sanjams2 commented 9 years ago

I am having the same issue. Was this ever resolved

sudov commented 9 years ago

No I don't think so, I was hoping one of the devs had an idea

eliperkins commented 9 years ago

It seems like either Cocoapods or Swift doesn't like the permissions constants that are defined in VENPermssionConstants.h. You should be able to get around it for now by using the strings directly rather than the constants.

So in the case of [VENPermissionMakePayments,VENPermissionAccessProfile], just use ["make_payments", "access_profile"] instead.

Pull requests to fix this would be welcome!

sanjams2 commented 9 years ago

Thanks a ton. Tried dozens of things to do with testing. This finally works.

sudov commented 9 years ago

Thanks!