Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

global variable #866

Open
jseter opened this issue Apr 21, 2020 · 1 comment
Open

global variable #866

jseter opened this issue Apr 21, 2020 · 1 comment
Labels
stale issues lacking attention, or potentially abandoned

Comments

@jseter
Copy link

jseter commented Apr 21, 2020

Expected Behaviour

no global variables

Actual Behaviour

the variable _soundFileObject is written in such a way that it is a global variable instead of an instance member of the interface.
SystemSoundID _soundFileObject;

expected:
@implementaotin CDVbcsProcessor {
SystemSoundID _soundFileObject;
}

or if intended global, should have a prefix to make it unique or static scope to the file.

Reproduce Scenario (including but not limited to)

linked with another plugin that has the same variable name fails to build finding the symbol in multiple objects.

Steps to Reproduce

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

iOS 13.4
cordova-ios 5.1.1

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Cordova CLI version and cordova platform version

cordova 9.0.0
cordova platforms

Plugin version

cordova plugin version | grep phonegap-plugin-barcodescanner

Sample Code that illustrates the problem

Logs taken while reproducing problem

duplicate symbol '__soundFileObject' in:
/Users/seterj/Library/Developer/Xcode/DerivedData/Application-cqhviyvaewutwwgivjthnvddaipw/Build/Intermediates.noindex/ArchiveIntermediates/Application/IntermediateBuildFilesPath/Application.build/Debug-iphoneos/Application.build/Objects-normal/arm64/TestCbsProcessor.o
/Users/seterj/Library/Developer/Xcode/DerivedData/Application-cqhviyvaewutwwgivjthnvddaipw/Build/Intermediates.noindex/ArchiveIntermediates/Application/IntermediateBuildFilesPath/Application.build/Debug-iphoneos/Application.build/Objects-normal/arm64/CDVBarcodeScanner.o
ld: 1 duplicate symbol for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@stale
Copy link

stale bot commented Jul 23, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale issues lacking attention, or potentially abandoned label Jul 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale issues lacking attention, or potentially abandoned
Development

No branches or pull requests

1 participant