I use swift and obj-c classes together in my project.
And I declare this in obj-c header file.
@property (nonatomic, copy) NSString *AppStoreId;
I want to use this obj-c code in my swift class:
NSDictionary *productParameters = @{ SKStoreProductParameterITunesItemIdentifier : [NSNumber numberWithInt:[appItem.AppStoreId intValue]]};
I convert it to swift like this:
var productParameters : NSDictionary = SKStoreProductParameterITunesItemIdentifier(NSNumber.numberWithInt(appItem.AppStoreId))
However, it gives me an error which says "UnsafeMutablePointer < Int32>" is not convertible to "Int32"
I also tried this:
var productParameters : NSDictionary = SKStoreProductParameterITunesItemIdentifier(NSNumber.numberWithInt(appItem.AppStoreId(IntegerType)).intValue)
But this time it gives me an error about using of IntegerType. I don't know what should I do. I am a beginner in swift and objective c. Thank you for any help.