[英]How to testing Gluon app on iOS Simulator or Real Device?
The problem is related to my previous question when I try to execute the gluon application on iOS Device/simulator.当我尝试在 iOS 设备/模拟器上执行 gluon 应用程序时,该问题与我之前的问题有关。 It seem not working at all.
它似乎根本不起作用。 It show me the following error:
它向我显示以下错误:
launchIPadSimulator
: It error Unable to find a matching device [arch=x86_64, family=iPhone, name=null, sdk=null]
launchIPadSimulator
: 它错误Unable to find a matching device [arch=x86_64, family=iPhone, name=null, sdk=null]
Edited已编辑
launchIOSDevice
: It error No provisioning profile and signing identity found that matches bundle ID
launchIOSDevice
:错误未No provisioning profile and signing identity found that matches bundle ID
I also checking this question , but It doesn't help me.我也检查了这个问题,但它对我没有帮助。 So the question is How to make it working?
所以问题是如何使它工作?
Noted I am using macOS Mojave 10.14.3 and Xcode 10.2.1注意到我使用的是 macOS Mojave 10.14.3 和 Xcode 10.2.1
Build.gradle构建.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.16'
}
}
// Apply the plugin
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'fr.cashmag.GluonApplication'
ext.GLUON_VERSION="5.0.2"
ext.CHARM_DOWN="3.8.6"
dependencies {
compile "com.gluonhq:charm:$GLUON_VERSION"
compile "com.gluonhq:charm-down-plugin-orientation:$CHARM_DOWN"
}
jfxmobile {
downConfig {
version = '3.8.6'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'orientation', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
iOS simulator iOS模拟器
To solve the issue:要解决这个问题:
Unable to find a matching device [arch=x86_64, family=iPhone, name=null, sdk=null]
无法找到匹配的设备 [arch=x86_64, family=iPhone, name=null, sdk=null]
a possible solution is:一个可能的解决办法是:
Include a gradle.properties
file in the root of your project, and add:在项目的根目录中包含一个
gradle.properties
文件,并添加:
robovm.ipaArchs=x86_64
(see documentation for more details). (有关更多详细信息,请参阅文档)。
Run ./gradlew --info createIpa
, wait until the task ends.运行
./gradlew --info createIpa
,等待任务结束。 Review that your project contains the app under build/javafxports/ios/*.app
.检查您的项目是否包含
build/javafxports/ios/*.app
。
Open Xcode, go to Xcode -> Open Developer Tool -> Simulator
打开Xcode,进入
Xcode -> Open Developer Tool -> Simulator
*.app
file.*.app
文件。 It will then install the app on the sim, and you will be able to run it by tapping on it. Once the process is working you can revert the property to:一旦该过程开始工作,您可以将属性恢复为:
robovm.ipaArchs=arm64:thumbv7
in order to create the app for your device and for the Apple Store.以便为您的设备和 Apple Store 创建应用程序。
iOS device iOS设备
To solve the issue:要解决这个问题:
No provisioning profile and signing identity found that matches bundle ID
找不到与捆绑 ID 匹配的配置文件和签名标识
you need to follow these steps, providing you are already enrolled in the Apple Developer program (otherwise you won't be able to distribute your app through the Apple Store):您需要按照以下步骤操作,前提是您已经注册了 Apple Developer 计划(否则您将无法通过 Apple Store 分发您的应用程序):
Certificates, Identifiers & Profiles
.Certificates, Identifiers & Profiles
。Certificates
, and make sure you have created a Development certificate (for testing).Certificates
,并确保您已创建开发证书(用于测试)。 Later on you will need a Production certificate for distribution.Identifiers -> App IDs
, and create a new app identifier.Identifiers -> App IDs
,并创建一个新的应用程序标识符。 Provide a name and make sure you provide the exact Bundle ID from your app, the one listed in your Default-Info.plist file under the CFBundleIdentifier
key.CFBundleIdentifier
键下。Devices
and add your testing devices, providing the UDID
of these devices (go to iTunes, plug your device, and click on device serial, it will reveal it, and ⌘+C to paste it).Devices
并添加您的测试设备,提供这些设备的UDID
(转到 iTunes,插入您的设备,然后单击设备序列号,它会显示它,然后按 ⌘+C 粘贴它)。Provisioning Profiles
, and add a Development profile (later on you will need a Distribution one).Provisioning Profiles
,并添加一个开发配置文件(稍后您将需要一个分发配置文件)。 Select iOS App Development
, select the App ID you provided before, and when finished, download and install (double click).iOS App Development
,选择您之前提供的App ID,完成后下载安装(双击)。 Back to your project, you can add this to your build.gradle
file:回到您的项目,您可以将其添加到您的
build.gradle
文件中:
ios { ... iosSignIdentity = "iPhone Development: *** (^^^^)" iosProvisioningProfile = '$$$' }
Run ./gradlew --info launchIOSDevice
, and review the console logging at the end of the process to check that the provisioning profile is used to sign the app.运行
./gradlew --info launchIOSDevice
,并在过程结束时查看控制台日志记录以检查配置文件是否用于对应用程序进行签名。
Note that you will have to use the distribution provisioning profile in the same way to sign the app you will be submitting to the Apple Store.请注意,您必须以相同的方式使用分发配置文件来签署您将提交到 Apple Store 的应用程序。
EDIT编辑
If you are not enrolled in the Developer program, you can also use the free provisioning profile, that will let you test on your own device.如果您未注册开发人员计划,您还可以使用免费配置文件,这将让您在自己的设备上进行测试。
For that, you have to follow these steps:为此,您必须执行以下步骤:
Xcode -> Preferences -> Accounts
Xcode -> Preferences -> Accounts
Single View App
.Single View App
。iosSignIdentity
and iosProvisioningProfile
).iosSignIdentity
和iosProvisioningProfile
)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.