My problem is: I setted up an iAP in my app and when the user taps on a button it ask him “would you like to buy this”. However, I have a image and a backround image placed on the button. I have this code implementet, that if the user hast bought the item the image of the button, which is a lock icon disappears. It works on the simulator fine, but on the device I am able to buy the item but the lock icon doesnt appears at all. Even if I havent bought the item theres no lock icon. On the simulator there’s a lock item, if the item wasnt bought. I use the BOOL in my .h file: -(BOOL)IAPItemPurchased; and in the .m file I use the IAPItemPurchased to hide the foreground image, in my viewDidLoad:
- (void)viewDidLoad
{
[super viewDidLoad];
if ([self IAPItemPurchased]) {
[buy setImage:nil forState:UIControlStateNormal];
} else {
[buy setImage:[UIImage imageNamed:@"Lock.png"] forState:UIControlStateNormal];
}
}
Does have anyone suggestions or solutions what to do?
Thanks for help.
Kindly Check the Image Name, because In Simulator the Name of image is Case Insensitive, but Device it is case sensitive.
( or )