I integrated InAppPurchase2 into my ionic5 app.
Android is OK, but ios building failled with this error:
warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'appname' from project 'appname')
** BUILD FAILED **
The following build commands failed:
CompileC /Users/xxx/Library/Developer/Xcode/DerivedData/xxxx-ffnkffnytspipoagpiashkggwqfn/Build/Intermediates.noindex/xxx.build/Debug-iphonesimulator/yyy.build/Objects-normal/x86_64/InAppPurchase.o /Users/Shared/projects/ionic5/yyy/platforms/ios/yyy/Plugins/cc.fovea.cordova.purchase/InAppPurchase.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65
[ERROR] An error occurred while running subprocess cordova.
cordova build ios exited with exit code 65.
Re-running this command with the --verbose flag may provide more information.
#IONIC INFO
Ionic:
Ionic CLI : 6.12.3 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.5.5
@angular-devkit/build-angular : 0.1100.7
@angular-devkit/schematics : 10.0.8
@angular/cli : 10.0.8
@ionic/angular-toolkit : 3.1.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : not available
Cordova Plugins : not available
Utility:
cordova-res : 0.15.3
native-run : not installed
System:
ios-sim : 8.0.2
NodeJS : v12.16.1 (/usr/local/bin/node)
npm : 6.13.4
OS : macOS Catalina
Xcode : Xcode 11.4.1 Build version 11E503a
Build command used:
ionic cordova build ios --prod --verbose
In order to sole an other issue, I replaced target es2015 with es5 into tsconfig.json file
{
"compileOnSave": false,
"compilerOptions": {
"baseUrl": "./",
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"downlevelIteration": true,
"experimentalDecorators": true,
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es5",
"lib": [
"es2018",
"dom"
],
"noUnusedLocals": false,
"noUnusedParameters": false
},
"angularCompilerOptions": {
"fullTemplateTypeCheck": true,
"strictInjectionParameters": true
}
}
If I open xCode and try to build, this error is shown
/Plugins/cc.fovea.cordova.purchase/InAppPurchase.m:326:40: No visible @interface for 'SKPaymentQueue' declares the selector 'presentCodeRedemptionSheet'
Is there anyone who has had the same problem?
Thanks in advance
L