Search code examples
iosswiftpaypalpaypal-sandbox

Paypal IOS SDK acceptCreditCards crashing


There is a very niche question, I have implemented the PayPal ios SDK as they have it in the sample project however when I change the acceptCreditCards variable to true. The pay with credit card button shows up however if you click it the app crashes. What other code do I have to add to make this work?


Solution

  • After doing some testing I realized that the problem was camera permissions. Paypal needs to use your camera a so you have to put camera permissions in your info.plist. TO do this simply add $(PRODUCT_NAME) camera use under the key Privacy - Camera Usage Description.