【问题标题】:app terminates after launched in ios device in xamarin应用程序在 xamarin 的 ios 设备中启动后终止
【发布时间】:2017-05-23 06:25:36
【问题描述】:

我正在尝试在 ios 设备中调试我的 xamarin 应用程序。但是午餐后它成功终止并且调试器被分离。

输出窗口中的消息是:

正在“Testsoft 的 iPhone”上启动“FormBot.iOS”... 该应用已被终止。

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">

    <dict>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>UIAppFonts</key>
    <array>
        <string>Fonts/proximanovalight.ttf</string>
    </array>
    <key>UISupportedInterfaceOrientations~ipad</key>
    <array>
        <string>UIInterfaceOrientationPortrait</string>
        <string>UIInterfaceOrientationPortraitUpsideDown</string>
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>MinimumOSVersion</key>
    <string>6.0</string>
    <key>CFBundleDisplayName</key>
    <string>GreenBot</string>
    <key>CFBundleIdentifier</key>
    <string>com.tatvasoft.allxamarin</string>
    <key>CFBundleVersion</key>
    <string>1</string>
    <key>CFBundleIconFiles</key>
    <array>
        <string>Icon-72@2x.png</string>
        <string>Icon-72.png</string>
        <string>Icon@2x.png</string>
        <string>Icon.png</string>
        <string>Icon-60@2x.png</string>
        <string>Icon-76.png</string>
        <string>Icon-76@2x.png</string>
        <string>Default.png</string>
        <string>Default@2x.png</string>
        <string>Default-568h@2x.png</string>
        <string>Default-Landscape.png</string>
        <string>Default-Landscape@2x.png</string>
        <string>Default-Portrait.png</string>
        <string>Default-Portrait@2x.png</string>
        <string>Icon-Small-50@2x.png</string>
        <string>Icon-Small-50.png</string>
        <string>Icon-Small-40.png</string>
        <string>Icon-Small-40@2x.png</string>
        <string>Icon-Small.png</string>
        <string>Icon-Small@2x.png</string>
    </array>
    <key>NSLocationWhenInUseUsageDescription</key>
    <string></string>
    <key>CFBundleShortVersionString</key>
    <string>1.3</string>
    <key>UIRequiresFullScreen</key>
    <string>YES</string>
    <key>NSAppTransportSecurity</key>
    <dict>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
    </dict>
    <key>NSCameraUsageDescription</key>
    <string>This app needs access to the camera to take photos.</string>
    <key>NSPhotoLibraryUsageDescription</key>
    <string>This app needs access to photos.</string>
</dict>
</plist>

请帮助。提前致谢。

【问题讨论】:

  • 你的应用是做什么的?你能显示一些代码吗?堆栈跟踪不显示任何内容?
  • 应用程序在模拟器、android 设备上运行良好。所以代码没有问题。它是整个项目,所以我应该分享哪一部分代码?
  • 这听起来像是 iOS 10 权限要求的权限问题。您的应用是否使用相机、位置、照片或任何需要用户许可的内容?
  • 是的。它需要。但我也在 info.plist 中提供了这一点
  • 你能用你的 info.plist 文件的打印屏幕更新你的帖子,并告诉你的应用程序正在尝试做什么操作吗?只是为了确认你没有错过任何东西

标签: xamarin xamarin.ios


【解决方案1】:

出乎意料,但这对我有帮助。在 xamarin 中有很多技巧可以帮助我们解决一些没有任何逻辑的奇怪错误。

在这种情况下,我通过单击构建时生成的应用程序图标来手动打开应用程序,开始运行应用程序,并且也会遇到断点。

我认为 Visual Studio 在这里成功部署了应用程序,但在打开它时遇到了问题。所以如果我们手动打开应用程序,它会吃午饭。它运行完美..

这可能对其他人有所帮助。 谢谢

【讨论】:

    【解决方案2】:

    这可能是几件事。首先,构建 -> 全部清除 -> 重新启动 Xamarin Studio(或 VS)。

    如果不这样做,则可能是配置文件问题。确保您使用开发配置文件进行构建。

    【讨论】:

    • 是的,我正在使用新的 iPad,对我来说,它可能是重新启动 VS Mac 和 XCode,并清理所有内容,然后重新构建。您也可以删除 app 文件夹中的 bin 和 obj 文件夹。也许它也信任 XCode 中的设备。 (iOS 上的信任计算机对话有时也需要大约 15 分钟才能显示在新设备上)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-11-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多