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

global variable #866

Open
Open
@jseter

Description

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)

Metadata

Assignees

No one assigned

    Labels

    staleissues lacking attention, or potentially abandoned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions