接入时报如下错误
duplicate symbol _amp2Log2 in:
/Users/***/workspace/*******/Publish/Debug/iOS/AppSotreXcodeProject/Libraries/libiPhone-lib.a(quant_bands.o)
/Users/***/workspace/*******/Assets/Editor/XUPorter/Mods/GCloudVoice/libGCloudVoice.a(quant_bands.o)
duplicate symbol _ec_laplace_decode in:
/Users/***/workspace/*******/Publish/Debug/iOS/AppSotreXcodeProject/Libraries/libiPhone-lib.a(laplace.o)
/Users/***/workspace/*******/Assets/Editor/XUPorter/Mods/GCloudVoice/libGCloudVoice.a(laplace.o)
ld: 48 duplicate symbols for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解决办法
1、首先记得导出IOS记得勾选和填写红框的内容,不然会报错
2、iOS系统配置
将压缩包中的
dist\Unity3D\Plugins\iOS\ GCloudVoice.bundle
整个文件夹拷贝到自己的工程 **MyProj\Assets\Plugins\iOS **目录下。
链接发布包中静态库
dist\Unity3D\Plugins\iOS\libGCloudVoice.a
,在Unity3d导出的Xcode工程中,同时需要链接如下6个系统库:
3、语音权限 Info.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDisplayName</key>
<string>应用名称</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIcons</key>
<dict/>
<key>CFBundleIcons~ipad</key>
<dict/>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.0.9</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>weixin</string>
<key>CFBundleURLSchemes</key>
<array>
<string>wx11111111111</string>
</array>
</dict>
<dict>
<key>CFBundleTypeRole</key>
<string>Editor</string>
<key>CFBundleURLName</key>
<string>com.yunjian.cainiao</string>
<key>CFBundleURLSchemes</key>
<array>
<string>cainiao</string>
</array>
</dict>
</array>
<key>CFBundleVersion</key>
<string>15.3</string>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>wechat</string>
<string>weixin</string>
</array>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
<key>NSLocationWhenInUseUsageDescription</key>
<string>本应用的某个功能用到后台定位,将影响电池寿命。</string>
<key>NSMicrophoneUsageDescription</key>
<string>本应用将获取打开您的麦克风,它将用于您与其他玩家之间的通讯</string>
<key>UIAppFonts</key>
<array/>
<key>UIPrerenderedIcon</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationLandscapeRight</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
</array>
</dict>
</plist>