Hello guys,
I’am working on push notifications using OneSignal, it worked easily on android, but for iOS i’ve added certificate on onesignal and the right code in my project but when i emulate it shows this error:
[16:55:20] lint finished in 3.09 s
✖ Running command - failed!
[ERROR] An error occurred while running cordova build ios (exit code 65):
(truncated) ... dation -fmodules-validate-once-per-build-session -Wno-trigraphs -fpascal-strings -O0 -fno-common
-Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Wno-implicit-atomic-properties
-Wno-objc-interface-ivars -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match
-Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter
-Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow
-Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion
-Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion
-Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match
-Wundeclared-selector -Wdeprecated-implementations -DDEBUG=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator12.2.sdk
-fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=11.0 -g
-Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes
-Wno-semicolon-before-method-body -fobjc-abi-version=2 -fobjc-legacy-dispatch -index-store-path
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Index/DataStore
-iquote
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Tan\ Md-generated-files.hmap
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Tan\ Md-own-target-headers.hmap
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Tan\ Md-all-target-headers.hmap -iquote
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Tan\ Md-project-headers.hmap
-I/Users/ayk/Desktop/tanmd-mobile/platforms/ios/build/emulator/include
-I/Users/ayk/Desktop/tanmd-mobile/platforms/ios/build/emulator/usr/local/lib/include
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/UninstalledProducts/include
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/UninstalledProducts/iphonesimulator/include
-I/Users/ayk/Desktop/tanmd-mobile/platforms/ios/build/emulator
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/DerivedSources-normal/x86_64
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/DerivedSources/x86_64
-I/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/DerivedSources
-F/Users/ayk/Desktop/tanmd-mobile/platforms/ios/build/emulator -include
/Users/ayk/Desktop/tanmd-mobile/platforms/ios/build/sharedpch/SharedPrecompiledHeaders/7572053842712822204/Tan\
Md-Prefix.pch -MMD -MT dependencies -MF
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Objects-normal/x86_64/CDVLocation.d --serialize-diagnostics
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Objects-normal/x86_64/CDVLocation.dia -c
/Users/ayk/Desktop/tanmd-mobile/platforms/ios/Tan\
Md/Plugins/cordova-plugin-geolocation/CDVLocation.m -o
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Objects-normal/x86_64/CDVLocation.o
** BUILD FAILED **
The following build commands failed:
CompileC
/Users/ayk/Library/Developer/Xcode/DerivedData/Ayk-prj-cuxnicfkskfpxgajdqcphaffstzg/Build/Intermdiates.noindex/Tan\
Md.build/Debug-iphonesimulator/Tan\ Md.build/Objects-normal/x86_64/OneSignalPush.o
/Users/ayk/Desktop/tanmd-mobile/platforms/ios/Tan\
Md/Plugins/onesignal-cordova-plugin/OneSignalPush.m normal x86_64 objective-c
com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
xcodebuild: Command failed with exit code 65
And this is my package.json
......
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/app-availability": "^5.4.0",
"@ionic-native/call-number": "^4.20.0",
"@ionic-native/core": "~4.18.0",
"@ionic-native/file": "^5.4.0",
"@ionic-native/geolocation": "^4.20.0",
"@ionic-native/in-app-browser": "^5.4.0",
"@ionic-native/keyboard": "^4.20.0",
"@ionic-native/launch-navigator": "~4.18.0",
"@ionic-native/media": "^4.20.0",
"@ionic-native/network": "^4.20.0",
"@ionic-native/onesignal": "^4.20.0",
"@ionic-native/social-sharing": "^4.20.0",
"@ionic-native/splash-screen": "~4.18.0",
"@ionic-native/sqlite": "^4.20.0",
"@ionic-native/sqlite-porter": "^4.20.0",
"@ionic-native/status-bar": "^4.20.0",
"@ionic/pro": "2.0.4",
"@ionic/storage": "^2.2.0",
"@ngx-translate/core": "^11.0.1",
"@ngx-translate/http-loader": "^4.0.0",
"call-number": "1.0.1",
"cordova-android": "7.1.4",
"cordova-ios": "5.0.1",
"cordova-plugin-appavailability": "^0.4.2",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-file": "6.0.1",
"cordova-plugin-geolocation": "^4.0.1",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^3.1.2",
"cordova-plugin-media": "5.0.2",
"cordova-plugin-network-information": "2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-plugin-x-socialsharing": "^5.4.4",
"cordova-sqlite-storage": "3.2.0",
"ionic-angular": "3.9.3",
"ionicons": "3.0.0",
"leaflet": "^1.4.0",
"leaflet-routing-machine": "^3.2.12",
"mx.ferreyra.callnumber": "0.0.2",
"onesignal-cordova-plugin": "2.5.2",
"promise-polyfill": "^8.1.0",
"rxjs": "^6.4.0",
"rxjs-compat": "^6.4.0",
"sw-toolbox": "3.6.0",
"uk.co.workingedge.cordova.plugin.sqliteporter": "~1.1.0",
"uk.co.workingedge.phonegap.plugin.launchnavigator": "^3.0.0",
"zone.js": "0.8.29"
},
"devDependencies": {
"@ionic/app-scripts": "3.2.1",
"typescript": "~2.8"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-appavailability": {},
"cordova-plugin-x-socialsharing": {
"ANDROID_SUPPORT_V4_VERSION": "24.1.1+"
},
"cordova-plugin-inappbrowser": {},
"cordova-plugin-geolocation": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-file": {},
"cordova-sqlite-storage": {},
"cordova-plugin-media": {},
"uk.co.workingedge.cordova.plugin.sqliteporter": {},
"cordova-plugin-network-information": {},
"mx.ferreyra.callnumber": {},
"call-number": {},
"onesignal-cordova-plugin": {}
},
"platforms": [
"android",
"ios"
]
}
And after deleting plugins platforms and node modules and installing everithing i’m getting this now when i try to add ios platform:
Installing "cordova-sqlite-storage" for ios
installing external dependencies via npm
for package name: cordova-sqlite-storage
npm install of external dependencies ok
Dependent plugin "es6-promise-plugin" already installed on ios.
Installing "onesignal-cordova-plugin" for ios
"framework" tag with type "podspec" is deprecated and will be removed. Please use the "podspec" tag.
Failed to install 'onesignal-cordova-plugin': undefined
CordovaError: Promise rejected with non-error: 'The CocoaPods repo has not been synced yet, this will take a
long time (approximately 500MB as of Sept 2016). Please run `pod setup` first to sync the repo.'
at cli.catch.err (/usr/local/lib/node_modules/cordova/bin/cordova:29:15)
at processTicksAndRejections (internal/process/task_queues.js:86:5)