In App Purchase 2

I’m trying to integrate into my project In App Purchase 2 but I have problems in ios.(some time the app crush, unable to buy products…etc)
The documentation that has not helped me so much and there is no complete examples of how to work exactly.
I do not know if the problem is in the app store or in my project.
If someone did it really well and knew how to explain to me exactly where my problems (paid if needed) will contact me