Could not build the precompiled application for the device.
Error (Xcode): No profiles for 'com.example.jiniu' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.example.jiniu'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild.
翻譯大意:Xcode 找不到任何與“com.example.jiniu”匹配的 iOS 應(yīng)用程序開(kāi)發(fā)配置文件。 自動(dòng)簽名已禁用且無(wú)法生成配置文件。 要啟用自動(dòng)簽名,請(qǐng)將 -allowProvisioningUpdates 傳遞給 xcodebuild。
但此時(shí)經(jīng)過(guò)多種方法測(cè)試都不可行。
后面仔細(xì)理解,我目前并沒(méi)有使用什么簽名,只是當(dāng)初為了mac能進(jìn)行真機(jī)調(diào)試,所以在xcode上進(jìn)行操作過(guò),后面查閱資料,總結(jié)如下方法:
打開(kāi)項(xiàng)目根目錄,進(jìn)入ios目錄,使用Xcode打開(kāi)Runner.xcodeproj

此處點(diǎn)擊運(yùn)行,提示報(bào)錯(cuò)。如圖 Runner 1 issue處

提示Module 'shared_preferences_ios' not found
找到錯(cuò)誤原因就好解決了,這個(gè)錯(cuò)誤通常是由于 Flutter 項(xiàng)目缺少了 SharedPreferences 插件,或者該插件在 iOS 上未安裝。
處理方法:
在 pubspec.yaml 文件中添加 SharedPreferences 插件的依賴(lài):
dependencies:
shared_preferences: ^0.5.8+4
運(yùn)行 flutter pub get 命令以安裝該插件。
在 iOS 項(xiàng)目中添加 SharedPreferences 插件的依賴(lài),運(yùn)行 pod install 命令。
如果仍然存在問(wèn)題,請(qǐng)重新構(gòu)建項(xiàng)目。
或者flutter三連:文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-577104.html
flutter clean
flutter pub get
flutter run
重新連接手機(jī)并進(jìn)行真機(jī)調(diào)試,OK,搞定收工睡覺(jué)。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-577104.html
到了這里,關(guān)于Flutter ios真機(jī)調(diào)試報(bào)錯(cuò)Xcode couldn‘t find any iOS App Development provisioning profiles的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!