最近文章

解决xcode 9.2上传app到appstore报Java异常:IllegalStateException: could not find needed OSGiFramework

升级到xcode 9.2,上传app到appstore报java错误:java.lang.reflect.InvocationTargetException     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    &
标签:

Xcode9.1报错处理:Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2

升级到Xcode9.1,编译项目报错:Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2这个是因为Swift4.0.2的ABI与Swift4.0不兼容。对于之前的依赖需要重新编译。解决方法:重新编译:使用Carthage,
标签:

解决xcrun: error: invalid active developer path

升级到macOS High Sierra后,执行git命令报错:xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Librar
标签:

Xcode 9真机,iPhone is busy: Preparing debugger support for xxx's iPhone

Xcode9使用真机测试,提示警告:iPhone is busy: Preparing debugger support for xxx's iPhone解决方法退出Xcdoe,重启iPhone真机
标签:

Xcode 8升级到Xcode 9,构建Cordova App报requires a provisioning profile错误

Xcode 8升级到Xcode 9,重新构建Cordova app,报错:error: exportArchive: "App Name.app" requires a provisioning profile.Error Domain=IDEProvisioningE
标签:

解决xcode 9.2上传app到appstore报Java异常:IllegalStateException: could not find needed OSGiFramework

升级到xcode 9.2,上传app到appstore报java错误:

java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at com.apple.transporter.launcher.Application.start(Application.java:206)
    at com.apple.transporter.launcher.Application.main(Application.java:519)
Caused by: java.lang.IllegalStateException: could not find needed OSGiFramework
    at com.apple.transporter.osgi.BootstrapHelper.setupClassLoader(BootstrapHelper.java:120)
    at com.apple.transporter.osgi.FelixOSGiBootstrapper.bootstrap(FelixOSGiBootstrapper.java:9)

Java版本:1.8.0_151

删除.itmstransporter目录后解决了问题:

rm -R ~/.itmstransporter

Xcode9.1报错处理:Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2

升级到Xcode9.1,编译项目报错:

Module compiled with Swift 4.0 cannot be imported in Swift 4.0.2

这个是因为Swift4.0.2的ABI与Swift4.0不兼容。对于之前的依赖需要重新编译。

解决方法:

  • 重新编译:使用Carthage,cocoapods或手动重新编译相应的依赖
  • 如果不想重新编译,可以安装外部的Swift 4.0 Toolchain, Xcode -> Preferences -> Components -> Toolchains使用Xcode 9.0 swift toolchain 

解决xcrun: error: invalid active developer path

更新于 2017.10.16 22分钟阅读 0 评论 5 推荐

    MacOS

    作者: See1987
  1. 解决xcrun: error: invalid active developer path Page 1

升级到macOS High Sierra后,执行git命令报错:

xcrun: error: invalid active developer path
 (/Library/Developer/CommandLineTools), missing xcrun at:
 /Library/Developer/CommandLineTools/usr/bin/xcrun

解决方法

xcode-select --install

如果还是有问题,尝试

xcode-select --reset

Xcode 9真机,iPhone is busy: Preparing debugger support for xxx's iPhone

Xcode9使用真机测试,提示警告:

iPhone is busy: Preparing debugger support for xxx's iPhone

解决方法

退出Xcdoe,重启iPhone真机

Xcode 8升级到Xcode 9,构建Cordova App报requires a provisioning profile错误

Xcode 8升级到Xcode 9,重新构建Cordova app,报错:

error: exportArchive: "App Name.app" requires a provisioning profile.

Error Domain=IDEProvisioningErrorDomain Code=9 ""App Name.app" requires a provisioning profile." UserInfo={NSLocalizedDescription="App Name.app" requires a provisioning profile., NSLocalizedRecoverySuggestion=Add a profile to the "provisioningProfiles" dictionary in your Export Options property list.}

** EXPORT FAILED **

Error: Error code 70 for command: xcodebuild with args: -exportArchive,-archivePath,App Name.xcarchive,-exportOptionsPlist,/Users/Shared/Workspace/github/AppName/platforms/ios/exportOptions.plist,-exportPath,/Users/Shared/Workspace/github/AppName/platforms/ios/build/device

解决方法

这个错误主要是Cordova生成的ExportOptions.plist缺失Xcode 9所需要的key。

这个bug已经在cordova-ios 4.5.1修复,修复内容为CB-13315: (ios) fixed bug building for ios using Xcode 9

Cordova的build.json文件可以添加iCloudContainerEnvironment配置项 。iCloudContainerEnvironment = Production/Development只有在通知推送时需要。

build.json类似于:

"ios": {
    "debug": {
        "codeSignIdentitiy": "iPhone Developer",
        "developmentTeam":"MYTEAMID",
        "provisioningProfile": "provisioning profile name or UUID",
        "packageType": "developer",
        "iCloudContainerEnvironment": "Development"
    },
    "release": {
        "codeSignIdentitiy": "iPhone Distribution",
        "developmentTeam":"MYTEAMID",
        "provisioningProfile": "provisioning profile name or UUID",
        "packageType": "ad-hoc",
        "iCloudContainerEnvironment": "Production"
    }
}

其中,provisioningProfile可以为名称或者是UUID。