capacitor-community / sqlite

⚡Capacitor plugin for native & electron SQLite databases.
MIT License
488 stars 116 forks source link

iOS build fails on getConfig() because it doesn't exist for iOS #333

Closed sinan92 closed 1 year ago

sinan92 commented 1 year ago

Please check this comment: https://github.com/capacitor-community/sqlite/commit/e2e02249c7f5389be2b859ac4ff902de65f2a71d#r86787084

getConfig() is used within Swift. In Swift you have to call getConfigValue() instead of getConfig(). This causes the iOS build to fail.

jepiqueau commented 1 year ago

@sinan92 which version of capacitor are you using? Can you share your package.jon file

sinan92 commented 1 year ago

See my package.json below:

{ "name": "test-project", "version": "2.24.0", "author": "Ionic Framework", "homepage": "https://ionicframework.com/", "scripts": { "ng": "ng", "start": "ng serve", "build": "ng build --configuration production", "test": "ng test", "lint": "ng lint", "resources": "cordova-res ios && cordova-res android && node scripts/resources.js", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular/animations": "^14.2.1", "@angular/cdk": "^12.2.13", "@angular/common": "^14.2.1", "@angular/core": "^14.2.1", "@angular/forms": "^14.2.1", "@angular/material": "^12.2.13", "@angular/platform-browser": "^14.2.1", "@angular/platform-browser-dynamic": "^14.2.1", "@angular/router": "^14.2.1", "@capacitor-community/background-geolocation": "^1.0.4", "@capacitor-community/barcode-scanner": "^2.0.1", "@capacitor-community/keep-awake": "^2.1.0", "@capacitor-community/sqlite": "^4.2.1", "@capacitor/app": "1.0.6", "@capacitor/core": "^3.8.0", "@capacitor/device": "^1.1.0", "@capacitor/dialog": "^1.0.6", "@capacitor/filesystem": "^1.0.6", "@capacitor/haptics": "1.1.3", "@capacitor/ios": "^3.8.0", "@capacitor/keyboard": "1.1.3", "@capacitor/network": "^1.0.6", "@capacitor/share": "^4.0.1", "@capacitor/splash-screen": "^1.1.6", "@capacitor/status-bar": "1.0.6", "@composoftware/barcode-collection": "0.0.7-temp-22", "@composoftware/capacitor-plugin-20face": "^0.2.84", "@composoftware/capacitor-plugin-zebrascanner": "^0.0.4", "@composoftware/compo-login": "^1.0.43", "@composoftware/facial-recognition": "^2.0.9-temp", "@composoftware/ml-kit-scanner": "0.0.7", "@fortawesome/angular-fontawesome": "^0.10.1", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.15.4", "@ionic-native/barcode-scanner": "^5.36.0", "@ionic-native/core": "^5.31.1", "@ionic-native/document-viewer": "^5.19.1", "@ionic-native/file": "^5.20.0", "@ionic-native/file-opener": "^5.19.1", "@ionic-native/file-transfer": "^5.29.0", "@ionic-native/screen-orientation": "^5.31.1", "@ionic/angular": "^6.2.6", "@ionic/storage": "^2.2.0", "@ngrx/component": "^14.3.1", "@ngrx/effects": "^14.3.1", "@ngrx/schematics": "^14.3.1", "@ngrx/store": "^14.3.1", "@ngrx/store-devtools": "^14.3.1", "@ngx-translate/core": "^14.0.0", "@ngx-translate/http-loader": "^7.0.0", "@types/file-saver": "^2.0.1", "@types/socket.io-client": "^1.4.33", "assert": "^2.0.0", "buffer": "^6.0.3", "capacitor-resources": "^2.0.4", "crypto-browserify": "^3.12.0", "crypto-js": "^4.1.1", "file-saver": "^2.0.2", "https-browserify": "^1.0.0", "lodash": "^4.17.21", "lottie-web": "5.7.14", "moment": "^2.29.4", "net": "^1.0.2", "ng2-fittext": "1.2.12", "ngrx-store-localstorage": "^14.0.0", "ngx-lottie": "^6.4.0", "ngx-papaparse": "^5.1.0", "ngx-pipes": "^2.7.5", "ngx-translate-multi-http-loader": "^3.0.0", "onscan.js": "^1.5.2", "os-browserify": "^0.3.0", "path-browserify": "^1.0.1", "rxjs": "^7.5.6", "socket.io-client": "^2.3.0", "stream-browserify": "^3.0.0", "stream-http": "^3.2.0", "tslib": "^2.2.0", "uuid": "^8.3.2", "verbose": "^0.2.3", "zone.js": "~0.11.4" }, "devDependencies": { "@angular-devkit/architect": "^0.1402.2", "@angular-devkit/build-angular": "^14.2.2", "@angular-eslint/builder": "~12.7.0", "@angular-eslint/eslint-plugin": "~12.7.0", "@angular-eslint/eslint-plugin-template": "~12.7.0", "@angular-eslint/template-parser": "~12.7.0", "@angular/cli": "^14.2.2", "@angular/compiler": "^14.2.1", "@angular/compiler-cli": "^14.2.1", "@angular/language-service": "^14.2.1", "@capacitor/android": "^3.8.0", "@capacitor/cli": "^3.8.0", "@ionic/angular-toolkit": "^6.1.0", "@types/jasmine": "~3.6.0", "@types/jasminewd2": "~2.0.3", "@types/node": "^12.20.37", "@typescript-eslint/eslint-plugin": "4.16.1", "@typescript-eslint/parser": "4.16.1", "cordova-res": "^0.15.3", "eslint": "^7.6.0", "eslint-plugin-import": "2.22.1", "eslint-plugin-jsdoc": "30.7.6", "eslint-plugin-prefer-arrow": "1.2.2", "jasmine-core": "~3.8.0", "jasmine-spec-reporter": "~5.0.0", "karma": "~6.3.2", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "~2.0.3", "karma-coverage-istanbul-reporter": "~3.0.2", "karma-jasmine": "~4.0.0", "karma-jasmine-html-reporter": "^1.5.0", "protractor": "~7.0.0", "ts-node": "~8.3.0", "typescript": "~4.6.4" }, "description": "An Ionic project" }

jepiqueau commented 1 year ago

@sinan92 you have to upgrade your app to capacitor 4 and use @capacitor/core@4.1.0 @capacitor/ios@4.1.0 @capacitor/android @4.1.0 ans it will work

sinan92 commented 1 year ago

Unfortunately that is not an option for me right now since that would require me to update all my packages to capacitor 4. I think that only leaves me with the option of forking the repo for now. Thank you however for confirming where the issue lies.

jepiqueau commented 1 year ago

@sinan92 if you do not want to upgrade to capacitor 4 for any reason you must use @capacitor-community/sqlite@3.7.0 voilà

sinan92 commented 1 year ago

Makes sense. Thanks!

jepiqueau commented 1 year ago

@sinan92 in that case you will not have access to the latest development see the changelog.md. if you need some of them tell me