apache / apache/cordova-plugin-file

XCode build fails: Redefinition of enumerator 'SYNTAX_ERR

Open
#315 4 comments 0 reactions 0 assignees View on GitHub
platform: ios support
Dominant language
JavaScript
Stars
744
Forks
754
Avg merge
3d 4h
Merged PRs (30d)
1

Description

# Bug Report
XCode build fails: Redefinition of enumerator 'SYNTAX_ERR

## Problem
The error started to appear when I added the below cordova plugins to the project where cordova-sqlite-storage plugin already existed:
- cordova-plugin-file
- cordova-plugin-qrscanner

### What is expected to happen?
Build should not break.

### What does actually happen?
Xcode build fails

## Information
The cordova-sqlite-storage plugin has WebSQLError enum with SYNTAX_ERR = 5 and cordova-plugin-file plugin has CDVFileError enum with SYNTAX_ERR = 8. It seems to be the problem with the same name for these enums.

### Command or Code
N/A

### Environment, Platform, Device
See ionic info output
```
Ionic:

ionic (Ionic CLI) : 4.10.3 (/Users/alexryltsov/.nvm/versions/node/v10.14.2/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.4.0
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.2.3

Capacitor:

capacitor (Capacitor CLI) : 1.0.0-beta.24
@capacitor/core : 1.0.0-beta.24

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : none
Cordova Plugins : no whitelisted plugins (0 plugins total)

System:

Android SDK Tools : 26.1.1 (/Users/alexryltsov/Library/Android/sdk/)
NodeJS : v10.14.2 (/Users/alexryltsov/.nvm/versions/node/v10.14.2/bin/node)
npm : 6.5.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
```

### Version information
See above

## Checklist

- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Xcode build with cordova-sqlite-storage, cordova-plugin-file, and cordova-plugin-qrscanner installed. Inspect the WebSQLError and CDVFileError enum declarations for the conflicting SYNTAX_ERR names, then confirm the build succeeds while preserving the reported error values.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, objective-c
Domain
build-system, mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.