问题:
- 运行
Xcode10.3
或vscode with flutter
很好。 - 运行
xcodebuild command
失败:Provisioning profile
不包括当前的selected device
“[MyPhone]”。(在目标“跑步者”中)
在设备上
使用 Xcode 。在run on device are fine
终端中使用xcodebuild
命令失败:
xcodebuild -configuration Debug -target Runner -arch armv6 -sdk iphoneos
Build settings from command line:
ARCHS = armv6
SDKROOT = iphoneos12.4
2019-08-10 08:52:54.739 xcodebuild[23765:932559] DTDeviceKit: deviceType from
1daca728d755****0[MyPhoneUUID] was NULL
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: Provisioning profile "iOS Team Provisioning Profile: com.xxxx.xxxx"
doesn't include the currently selected device "[MyPhone]". (in target 'Runner')
Build system information
warning: None of the architectures in ARCHS (armv6) are valid for this target.
Consider setting ARCHS to $(ARCHS_STANDARD) or updating it to include at least
one value from VALID_ARCHS (arm64, arm64e, armv7, armv7s). (in target 'Runner')
Build system information
warning: ignoring duplicated output file: '[Project_Path]/build/ios/Debug-iphoneos/
Runner.app/Frameworks/Flutter.framework' in shell script build phase '[CP] Embed
Pods Frameworks'. This warning represents an extremely serious project misconfiguration
and will likely cause some shell scripts in your project to be skipped entirely,
leading to other build failures or missing files in the build directory. This will
be a hard error in the future. (in target 'Runner')
有没有办法找出在设备上调试时 Xcode 运行什么样的命令。
在模拟器上
使用 Xcode run on simulator iPhone 7(iOS12.4) are fine
。但是xcodebuild
在终端中使用命令失败:
xcodebuild -configuration Debug -target Runner -sdk iphonesimulator
Build settings from command line:
SDKROOT = iphonesimulator12.4
note: Using new build system
note: Planning build
note: Using build description from disk
Build system information
error: Multiple commands produce '[Project_Path]/build/ios/Debug-iphonesimulator/
Runner.app/Frameworks/Flutter.framework':
1) Target 'Runner' has copy command from
'[Project_Path]/ios/Flutter/Flutter.framework' to
'[Project_Path]/build/ios/Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework'
2) That command depends on command in Target 'Runner': script
phase “[CP] Embed Pods Frameworks”
Build system information
warning: ignoring duplicated output file: '[Project_Path]/build/ios/
Debug-iphonesimulator/Runner.app/Frameworks/Flutter.framework' in shell script build
phase '[CP] Embed Pods Frameworks'. This warning represents an extremely serious
project misconfiguration and will likely cause some shell scripts in your project to
be skipped entirely, leading to other build failures or missing files in the build
directory. This will be a hard error in the future. (in target 'Runner')
更新
-arch armv6
应该-arch armV7
在设备上时。
xcodebuild -configuration Debug -target Runner -arch armv7 -sdk iphoneos
清理或错误删除更多文件后
使用 Xcode 运行。使用上面的命令运行:
Build settings from command line:
ARCHS = armv7
SDKROOT = iphoneos12.4
2019-08-10 13:09:30.105 xcodebuild[3131:1467212] DTDeviceKit: deviceType from
1daca728d755****0[MyPhoneUUID] was NULL
2019-08-10 13:09:30.147 xcodebuild[3131:1467213] DTDeviceKit: deviceType from
1daca728d755****0[MyPhoneUUID] was NULL
note: Using new build system
note: Planning build
note: Constructing build description
Build system information
error: Provisioning profile "iOS Team Provisioning Profile: com.xxxx.xxx" doesn't
include the currently selected device "[MyPhoneName]". (in target 'Runner')
更新 2
这个问题是由于 iPhone 是locked
在使用xcodebuild
. 确保设备正常运行plugging
并unlocked
运行xcodebuild
正常。
DTDeviceKit:来自 [PhoneUUID] 的设备类型为 NULL。
更新 3
全部清洁:
- 删除
iPhone Developer certificate
钥匙串中的所有内容。 - 删除
iPhone Developer certificate
苹果账户中的所有内容。 - 删除文件夹中的所有配置文件
~/Library/MobileDevice/Provisioning Profiles
。 - 使用 Xcode/ref/myAccount/"Download Manual Profiles" 下载所有配置文件,然后有一个名为“YourNameOnMac(YourMacName)”的新自动生成证书。
结果:
- 使用 Xcode 运行。
- 通过 CI (codemagic confic with
manual sign config: .p12 + profile
) 运行项目。 - 使用命令运行仍然失败(我更新
armv7
到arm64
)
xcodebuild -configuration Debug -target Runner -arch arm64 -sdk iphoneos
Build settings from command line:
ARCHS = arm64
SDKROOT = iphoneos12.4
note: Using new build system
note: Planning build
note: Using build description from disk
Build system information
error: Provisioning profile "iOS Team Provisioning Profile: com.xxxx.xxx" doesn't
include the currently selected device "[MyPhoneName]". (in target 'Runner')
Build system information
warning: ignoring duplicated output file: '[Project_Path]/build/ios/Debug-iphoneos/
Runner.app/Frameworks/Flutter.framework' in shell script build phase '[CP] Embed
Pods Frameworks'. This warning represents an extremely serious project misconfiguration
and will likely cause some shell scripts in your project to be skipped entirely,
leading to other build failures or missing files in the build directory. This will
be a hard error in the future. (in target 'Runner')
更新 4。
- 取消选中
Automatic manage signing
以查看它是否Team
仅与配置文件问题有关,仍然失败。 - 但是在这两个作品中运行
flutter
并vscode
运行它。Xcode