我正在尝试能够在iOS上持续运行Flutter应用程序。不久前,我在iOS端更改了一些设置,但现在情况有点不妙了。我可以在尝试过的所有iOS设备上构建默认的Xcode hello world应用程序,据我所知,我已经正确注册了Apple。我没有遇到iOS模拟器的问题。我还没有找到在大多数设备上运行任何应用程序的方法。如果我创建了一个全新的flutter应用程序,或者更改了捆绑包ID(稍后说明),那么我只能在一个特定的iPhone上运行应用程序。因此,我有两个与之相关的问题:
Signing iOS app for device deployment using developer identity: "Apple Development: roboteng@gmail.com (8SXLAQ739Z)"
Running Xcode build...
Xcode build done. 6.2s
Installing and launching...
════════════════════════════════════════════════════════════════════════════════
No Provisioning Profile was found for your project's Bundle Identifier or your
device. You can create a new Provisioning Profile for your project in Xcode for
your team by:
1- Open the Flutter project's Xcode target with
open ios/Runner.xcworkspace
2- Select the 'Runner' project in the navigator then the 'Runner' target
in the project settings
3- Make sure a 'Development Team' is selected.
- For Xcode 10, look under General > Signing > Team.
- For Xcode 11 and newer, look under Signing & Capabilities > Team.
You may need to:
- Log in with your Apple ID in Xcode first
- Ensure you have a valid unique Bundle ID
- Register your device with your Apple Developer Account
- Let Xcode automatically provision a profile for your app
4- Build or run your project again
It's also possible that a previously installed app with the same Bundle
Identifier was signed with a different certificate.
For more information, please visit:
https://flutter.dev/setup/#deploy-to-ios-devices
Or run on an iOS simulator without code signing
════════════════════════════════════════════════════════════════════════════════
2020-03-02 16:00:36.364 ios-deploy[84718:1415325] [ !! ] Error 0xe8008015: A valid provisioning profile for this executable was not found. AMDeviceSecureInstallApplication(0, device, url, options, install_callback, 0)
Could not install build/ios/iphoneos/Runner.app on 4f97b33c580c63029de5ef1caf08be5d781276db.
Try launching Xcode and selecting "Product > Run" to fix the problem:
open ios/Runner.xcworkspace
Error launching application on Trevor’s iPad.
PRODUCT_BUNDLE_IDENTIFIER = co.tws.quizzler;
。 /project.pbxproj
如果我没有更改此行,则会得到:Signing iOS app for device deployment using developer identity: "Apple Development: roboteng@gmail.com (8SXLAQ739Z)"
Running Xcode build...
Xcode build done. 3.2s
Failed to build iOS app
Error output from Xcode build:
↳
2020-03-02 16:24:42.613 xcodebuild[88704:1485906] DVTPortal: Service '<DVTPortalAppIDService: 0x7ff77316d6b0; action='addAppId'>' encountered an unexpected result code from the portal ('9401')
2020-03-02 16:24:42.614 xcodebuild[88704:1485906] DVTPortal: Error:
Error Domain=DVTPortalServiceErrorDomain Code=9401 "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string." UserInfo={payload={
creationTimestamp = "2020-03-02T23:24:42Z";
httpCode = 200;
protocolVersion = QH65B2;
requestId = "27B41E22-9D92-48E4-8250-CFA4509E2156";
requestUrl = "https://developerservices2.apple.com/services/QH65B2/ios/addAppId.action";
responseId = "cdd5da76-1c76-4b8a-9298-fde35173de63";
resultCode = 9401;
resultString = "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.";
userLocale = "en_US";
userString = "An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.";
}, NSLocalizedDescription=An App ID with Identifier 'co.appbrewery.miCard' is not available. Please enter a different string.}
** BUILD FAILED **
Xcode's output:
↳
=== BUILD TARGET Runner OF PROJECT Runner WITH CONFIGURATION Debug ===
Code Signing Error: Failed to register bundle identifier. The app identifier "co.appbrewery.miCard" cannot be registered to your development team. Change your bundle identifier to a unique string to try again.
Code Signing Error: No profiles for 'co.appbrewery.miCard' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'co.appbrewery.miCard'.
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Code Signing Error: Code signing is required for product type 'Application' in SDK 'iOS 13.2'
Could not build the precompiled application for the device.
Error launching application on Trevor’s iPhone.```