GluonVM 在 iOS 设备上启动 [问题]

GluonVM launching on iOS Device [issues]

我正在 iOS 上使用 Oracle JDK 10.2 尝试 GluonVM。 我注意到虽然我在 src/ios/Default-Info.plist 中有 "com.javasuns.test",但当我 运行 "./gradlew launchIOSDevice" 命令,bundle ID取自mainClassName中定义的build.gradle.

这是我的例子:

默认-Info.plist

<key>CFBundleIdentifier</key>
<string>com.javasuns.test</string>

build.gradle

dependencies {
     compile 'com.gluonhq:charm:5.0.2'
}

mainClassName = 'test.TestFX'

fxmobile {
    javafxportsVersion = '8.60.12'
    ios { ...... }
}

./gradlew launchIOSDevice

com.gluonhq.higgs.Higgs: non-fatal issue for class javafx.scene.web.JSObjectIosImpl (no known superclass) 
command to dsymutil: xcrun dsymutil -o /Volumes/MyApps/testFX/build/gvm/testFX.app.dSYM /Volumes/MyApps/testFX/build/gvm/testFX.app/testFX 
Error getting ProvisioninedDevices, ignore
created
created
created
created
Error getting ProvisioninedDevices, ignore
created
provprofile asked, bid = test.TestFX and origbid = test.TestFX
provprofile asked, bid = test.* and origbid = test.TestFX
provprofile asked, bid = * and origbid = test.TestFX
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
No provisioning profile found matching signing identity 'iPhone Developer: #NAME#' and app bundle ID 'test.TestFX'
will return PP null
Warning, getProvisioningProfile is failing
java.lang.NullPointerException

我通过在 [=34= 下创建一个名为“test.java”的新 java main class 设法绕过了这个问题]"com.javasuns" 包(忽略 java 类型名称通常以大写字母开头)。

build.gradle(已更改)

mainClassName = 'com.javasuns.test'

但是,现在又出现了一个新的错误,不知如何解决:

13:17:45:491] BosonAppSupport: Validating codesign... 
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: valid on disk
[SUB] /Volumes/MyApps/testFX/build/gvm/testFX.app: satisfies its Designated Requirement
[13:17:46:269] BosonAppSupport: Validation codesign result: true 
[13:17:46:270] BosonAppSupport: Codesign done 
[13:17:46:333] BosonAppBuilder: UploadInternal start 
[13:17:51:041] : Upload Progress: 10% 
[13:17:51:573] : Upload Progress: 20% 
[13:17:52:104] : Upload Progress: 30% 
[13:17:52:916] : Upload Progress: 40% 
[13:17:53:947] : Upload Progress: 50% 
[13:17:54:696] : Upload Progress: 60% 
[13:17:55:520] : Upload Progress: 70% 
[13:17:56:372] : Upload Progress: 80% 
[13:17:57:367] : Upload Progress: 90% 
[13:17:58:414] : Upload Progress: 100% 
[13:17:58:460] BosonAppBuilder: uploadInternal done 

[13:17:58:796] : Progress: CreatingStagingDirectory [5%] 
[13:17:58:798] : Progress: ExtractingPackage [15%] 
[13:17:58:799] : Progress: InspectingPackage [20%] 
[13:17:58:802] : Progress: TakingInstallLock [20%] 
[13:17:58:804] : Progress: PreflightingApplication [30%] 
[13:17:58:805] : Progress: InstallingEmbeddedProfile [30%] 
[13:17:58:812] : Progress: VerifyingApplication [40%] 
[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp

> Task :launchIOSDevice
[13:17:58:955] BosonAppBuilder: Installing finished due to an error. 
[13:17:58:958] BosonAppBuilder: Install internal failed 
[13:17:58:958] BosonAppBuilder: Something went wrong. App wasn't installed on the device 

关于如何解决这两个问题的任何想法?

您必须正确设置两个主要键:CFBundleIdentifierCFBundleExecutable

你可以查看示例SingleView-GluonVM:

  • 主要class名称(参见build.gradle):com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM
  • CFBundleIdentifier(参见Default-info.plist):com.gluonhq.samples.singleviewgvm.SingleViewWithGluonVM

或示例 DeepLearning-LinearClassifier,设置相似。

如您所见,Gluon IDE 插件默认将 CFBundleIdentifier 设置为主 class 名称,将 CFBundleExecutable 设置为移动项目的名称.

CFBundleIdentifier

当您想将您的应用程序部署到 iOS 时,配置文件应该有这个包 ID。但是,您也可以使用通配符。只需确保您已将配置文件下载并安装到您的机器上(它应该在 /Users/<user>/Library/MobileDevice/Provisioning Profiles 下),扩展名为 .mobileprovision.

如果您预览它(例如从 Finder),此文件的 AppID 可能类似于 <TEAM ID>.<mainClassName>,或 <TEAM ID>.*

This 是 jfxmobile 插件设置 appId.

的地方

CFBundleExecutable

关于 CFBundleExecutable,这是您在 build/gvm/ 下的应用程序的名称。在这种情况下,它必须使用您的项目名称(如 gradle 名称)。

This 是 jfxmobile 插件设置 appName.

的地方

您会在 /<appName>/build/gvm/<appName>.app 下找到您的应用(尽管 Finder 只会显示 <appName>:

如果你看到应用程序的内容,你会在/<appName>/build/gvm/<appName>.app/<appName>下找到可执行文件:

您遇到的错误;

[13:17:58:954] : Error: APIInternalError, Description: Failed to unhide archs in executable file:///private/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.LXITKr/extracted/testFX.app/TestApp

显示 testFX.app/TestApp,所以您的项目名称可能是 testFX,但应该是 TestApp?

或者,您可以简单地匹配您在 CFBundleExecutable 中设置的值,方法是将 settings.gradle 文件添加到您的项目,其中:

rootProject.name = "<your bundle executable value>"