生成的IPA运行良好并安装在设备上。但是,Gradle构建脚本会产生错误的IPA,显然不适合上传到Apple。
这是其中之一:
错误ITMS-90725:" SDK版本问题。 此应用是使用未知SDK构建的。提交到App Store的所有新iOS应用都必须使用iOS 11.0' SDK或更高版本,包含在Xcode [9.0]或更高版本中。请更新Xcode并重建您的应用。"
所以在这种情况下,我该如何指定正确的SDK?我使用的是最新的(9.4)Xcode版本9.4.1(9F2000),macOS HighSierra 10.13.5
我在Gradle构建设置中找不到属性来建议此版本的构建脚本。
-------更新6/23/18 ---------
我更新了我的pList文件以匹配你的,现在我只得到以下错误:
错误ITMS-90161:"无效的配置文件。捆绑包[Payload / app]中包含的配置文件无效。 [缺少代码签名证书]。在将应用程序提交到App Store时,应使用分发配置文件。有关更多信息,请访问iOS Developer Portal。"
这是我的pList(接下来我将跟随build.gradle):
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.my.App</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleExecutable</key>
<string>my-App</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon-60</string>
<string>Icon-76</string>
<string>Icon-Small-50</string>
<string>Icon-Small</string>
</array>
<key>CFBundleIconFiles~ipad</key>
<array>
<string>Icon-76</string>
<string>Icon-Small-50</string>
<string>Icon-Small</string>
</array>
<key>CFBundleName</key>
<string>my-App</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UIRequiredDeviceCapabilities</key>
<array>
<string>armv7</string>
</array>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<!-- Turns off iPad Multitasking -->
<key>UIRequiresFullScreen</key>
<string>YES</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
</array>
<key>UIDeviceFamily</key>
<array>
<integer>1</integer>
<integer>2</integer>
</array>
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
<key>MinimumOSVersion</key>
<string>9.0</string>
<key>UIRequiresFullScreen</key>
<string>YES</string>
<key>UIStatusBarStyle</key>
<string>UIStatusBarStyleLightContent</string>
<key>UIViewControllerBasedStatusBarAppearance</key>
<false/>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<false/>
<key>NSExceptionDomains</key>
<dict>
<key>gluonhq.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
<key>www.oracle.com</key>
<dict>
<key>NSIncludesSubdomains</key>
<true/>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
</dict>
</dict>
</dict>
<key>UILaunchImages</key>
<array>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>Default-375w-667h</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{375, 667}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>Default-414w-736h</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{414, 736}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>Default-portrait</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{768, 1024}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>Default-ipad105</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{834, 1112}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>8.0</string>
<key>UILaunchImageName</key>
<string>Default-ipad129</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{1024, 1366}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>7.0</string>
<key>UILaunchImageName</key>
<string>Default-568h</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{320, 568}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>6.0</string>
<key>UILaunchImageName</key>
<string>Default</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{320, 480}</string>
</dict>
<dict>
<key>UILaunchImageMinimumOSVersion</key>
<string>11.0</string>
<key>UILaunchImageName</key>
<string>Default-812h</string>
<key>UILaunchImageOrientation</key>
<string>Portrait</string>
<key>UILaunchImageSize</key>
<string>{375, 812}</string>
</dict>
</array>
</dict>
--------------------- build.gradle:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.10'
}
}
// ******************** Java Plugin
apply plugin: 'java'
dependencies {
...
}
// ******************** Java FX Ports Mobile Plugin
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
mavenLocal()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.my.App'
dependencies {
compile 'com.gluonhq:glisten-afterburner:1.2.1'
compile 'com.gluonhq:connect:1.4.3'
}
jfxmobile {
javafxportsVersion = '8.60.9'
downConfig {
version = '3.6.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
ios {
assetsDirectory = 'src/ios/resources/assets/'
infoPList = file('src/ios/resources/Info.plist')
forceLinkClasses = [
'com.gluonhq.charm.down.plugins.ios.IOSLogService',
'com.gluonhq.**.*',
...
]
}
}
// ******************** Java Gluon Plugin
apply from: 'ios-build.gradle'
task xcodebuild {
doLast {
xcodebuildIOS("$project.buildDir","$project.projectDir", "Log")
}
}
task installNativeLib (type: Copy, dependsOn: xcodebuild) {
from( "$project.buildDir/native" )
into( "src/ios/jniLibs" )
include( "*.a" )
}
======== ios-build.gradle
if (System.getProperty('os.name').toLowerCase().contains("mac")) {
new ByteArrayOutputStream().withStream { os ->
exec {
args '-version', '-sdk', 'iphoneos', 'SDKVersion'
executable 'xcodebuild'
standardOutput = os
}
ext.IOS_VERSION = os.toString().trim()
}
} else {
ext.IOS_VERSION = ""
}
ext.IS_DEBUG_NATIVE = Boolean.parseBoolean(System.getProperty("IS_DEBUG_NATIVE", "false"))
def sdkPath(String platform) {
return "/Applications/Xcode.app/Contents/Developer/Platforms/${platform}.platform/Developer/SDKs/${platform}${IOS_VERSION}.sdk";
}
ext.xcodebuildIOS = {buildDir, projectDir, name ->
if (!file(sdkPath('iPhoneOS')).exists()) {
return
}
println "IOS_VERSION: " + ${IOS_VERSION}
def buildSystems = ["iPhoneOS+arm64",
"iPhoneOS+armv7",
"iPhoneSimulator+i386",
"iPhoneSimulator+x86_64"]
def linkerOutputs = []
def lipoOutput = "$buildDir/native/lib${name}.a"
def nativeSources = ["$projectDir/src/ios/native/${name}.m"]
buildSystems.each { buildSystem ->
def (platform, arch) = buildSystem.tokenize("+");
def compileOutput = "$buildDir/native/$arch"
def compileOutputs = ["$buildDir/native/$arch/${name}.o"]
def linkerOutput = "$buildDir/native/$arch/lib${name}.a"
new File(compileOutput).mkdirs();
def clangArgs = [
"-x", "objective-c",
"-miphoneos-version-min=6.0",
"-fmessage-length=0",
"-std=c99",
"-fno-common",
"-Wall",
"-fno-strict-aliasing",
"-fwrapv",
"-fpascal-strings",
"-fobjc-abi-version=2",
"-fobjc-legacy-dispatch",
"-I" + System.getenv("JAVA_HOME") + "/include",
"-I" + System.getenv("JAVA_HOME") + "/include/darwin",
"-c",
IS_DEBUG_NATIVE ? ["-O0", "-DDEBUG", "-g"] : ["-O3", "-DNDEBUG"],
"-arch", arch,
"-isysroot",
sdkPath(platform),
nativeSources].flatten()
def linkerArgs = [
"-static",
"-framework", "Foundation",
"-framework", "CoreGraphics",
"-framework", "CoreBluetooth",
"-framework", "CoreLocation",
"-framework", "CoreMotion",
"-framework", "CoreText",
"-framework", "UIKit",
"-framework", "QuartzCore",
"-framework", "OpenGLES",
"-framework", "UserNotifications",
"-arch_only", arch,
"-syslibroot", sdkPath(platform),
"-L${sdkPath(platform)}/usr/lib",
"-o", linkerOutput,
compileOutputs
].flatten()
exec {
executable "clang"
args clangArgs
workingDir compileOutput
}
exec {
executable "libtool"
args linkerArgs
workingDir compileOutput
}
linkerOutputs.add(linkerOutput)
}
def lipoArgs = [
"-create",
linkerOutputs,
"-o",
lipoOutput
].flatten();
exec {
executable "lipo"
args lipoArgs
}
}
答案 0 :(得分:0)
如果您的捆绑ID中有第一个号码,那么Apple目前不支持该号码。