Cordova iOS 构建中的重复符号

Duplicate symbol in Cordova iOS build

我是 运行 一个使用应用内购买的 PhoneGap 项目。我一直在很好地构建我的应用程序,直到我在 Xcode 中的 'Link binary with libraries' 下启用了 Audiotoolbox 框架。现在我收到以下错误:

duplicate symbol _OBJC_IVAR_$_InAppPurchase.unfinishedTransactions in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_IVAR_$_InAppPurchase.list in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_IVAR_$_InAppPurchase.retainer in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_IVAR_$_BatchProductsRequestDelegate.plugin in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_IVAR_$_BatchProductsRequestDelegate.command in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_CLASS_$_BatchProductsRequestDelegate in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_METACLASS_$_BatchProductsRequestDelegate in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_CLASS_$_InAppPurchase in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
duplicate symbol _OBJC_METACLASS_$_InAppPurchase in:
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-5FA8967824755833.o
/Users/joy/Sites/phrase/platforms/ios/build/Pop Phrase.build/Debug-iphonesimulator/Pop Phrase.build/Objects-normal/i386/InAppPurchase-8597B14B285C1761.o
ld: 9 duplicate symbols for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

我假设我在某处复制了一个变量,但不确定在哪里。错误引用的文件不存在。有什么想法吗?

已通过完全删除插件并重新添加来修复。 iOS 很奇怪。

重要(自 cordova-ios 4.5.0 起):

请注意,cordova 插件 cordova-plugin-console 现在是 cordova-ios 平台的一部分。 因此,如果您绝对使用 cordova-ios@4.5.0 或更高版本 删除 cordova-plugin-console!

cordova plugin rm cordova-plugin-console

这也涉及普通的 cordova 应用程序和离子应用程序。 更多信息:Console-Plugin on GitHub