ios - 是否可以在iOS模拟器上启动签名的.ipa应用程序而不会崩溃

标签 ios automation ios-simulator appium

  • 目的:使用Appium
  • 启动签名的ios应用程序自动化
  • Lauch:尝试通过Appium检查器
  • 启动应用程序
  • 应用程序详细信息: ios应用程序,由第三方开发者签名。仅.ipa可用
  • 问题:应用程序打开并崩溃,并不断崩溃。
  • 设备选项不同的模拟器-结果与真实设备相同。

  • 来自模拟器的日志
    error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
    
    info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air profiled[1132]: (Error) MC: Failed to write /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles/Library/ConfigurationProfiles/ClientTruth.plist with error Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air installd[1101]: 0x700000117000 -[MIBundle _validateWithError:]: 30: Failed to load Info.plist from bundle at path /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/Applications/Photo Booth.app
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air com.apple.CoreSimulator.SimDevice.E2D19473-66F0-4A32-9DD0-DCA4EF863154.launchd_sim[1091] (com.apple.iad.limitadtrackingd[1167]): Could not find and/or execute program specified by service: 2: No such file or directory: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/libexec/limitadtrackingd
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air com.apple.CoreSimulator.SimDevice.E2D19473-66F0-4A32-9DD0-DCA4EF863154.launchd_sim[1091] (com.apple.iad.limitadtrackingd[1167]): Service setup event to handle failure and will not launch until it fires.
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air dataaccessd[1165]: (Error) MC: MobileContainerManager gave us a path we weren't expecting; file a radar against them
        info: [IOS_SYSLOG_ROW ] Expected: /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
        info: [IOS_SYSLOG_ROW ] Actual: /Users/Salman/Library/Developer/CoreSimulator/Devices/E2D19473-66F0-4A32-9DD0-DCA4EF863154/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
        info: [IOS_SYSLOG_ROW ] Overriding MCM with the one true path
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air dataaccessd[1165]: table drop: 101
    
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:50 Muhammads-MacBook-Air installd[1101]: 0x700000117000 __69-[MIFileManager urlsForItemsInDirectoryAtURL:ignoringSymlinks:error:]_block_invoke: Ignoring symlink at /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/CoreServices/CFNetworkAgent
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:51 Muhammads-MacBook-Air dataaccessd[1165]: table drop: 101
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:51 Muhammads-MacBook-Air dataaccessd[1165]: Bogus event on event stream listener.
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:51 Muhammads-MacBook-Air dataaccessd[1165]: 0x7f9f7a504f70|SubCal|Error|Error fetching subscribed holiday calendars. Giving up for now. Error Domain=CoreDAVErrorDomain Code=1 "(null)"
        UILabel:0x7fc65b5ab160' '.firstBaseline == SPUISearchTableHeaderView:0x7fc65b5a8580.top + 36>
        info: [IOS_SYSLOG_ROW ] Make a symbolic breakpoint at UIViewAlertForUnsatisfiableConstraints to catch this in the debugger.
        info: [IOS_SYSLOG_ROW ] The methods in the UIConstraintBasedLayoutDebugging category on UIView listed in <UIKit/UIView.h> may also be helpful.
        info: [IOS_SYSLOG_ROW ] Apr 29 11:54:54 Muhammads-MacBook-Air SpringBoard[1107]: Unable to simultaneously satisfy constraints.
        info: [IOS_SYSLOG_ROW ] Probably at least one of the constraints in the following list is one you don't want.
        info: [IOS_SYSLOG_ROW ] Try this:
        info: [IOS_SYSLOG_ROW ] (1) look at each constraint and try to figure out which you don't expect;
        info: [IOS_SYSLOG_ROW ] (2) find the code that added the unwanted constraint or constraints and fix it.
        info: [IOS_SYSLOG_ROW ] (
        info: [IOS_SYSLOG_ROW ] "<NSLayoutConstraint:0x7fc65b5af850 
        info: Launching instruments
    
        info: [debug] Attempting to run app on iPhone 5s (9.3)
        info: [debug] Spawning instruments with command: /Applications/Xcode.app/Contents/Developer/usr/bin/instruments -t /Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.xrplugin/Contents/Resources/Automation.tracetemplate -D /tmp/appium-instruments/instrumentscli0.trace -w "iPhone 5s (9.3)" /var/folders/ks/ybjl6ngd2056zt6c30y6v4sm0000gn/T/116329-663-1x53997/Payload/Discovery.app -e UIASCRIPT "/Users/Salman/Library/Application Support/appium/bootstrap/bootstrap-f062718992d59810.js" -e UIARESULTSPATH /tmp/appium-instruments
        info: [debug] And extra without-delay env: {}
        info: [debug] And launch timeouts (in ms): {"global":90000}
    
        info: [IOS_SYSLOG_ROW ] Apr 29 11:55:05 Muhammads-MacBook-Air CoreSimulatorBridge[1115]: Requesting installation of file:///var/folders/ks/ybjl6ngd2056zt6c30y6v4sm0000gn/T/116329-663-1x53997/Payload/Discovery.app/ with options: {
        info: [IOS_SYSLOG_ROW ] CFBundleIdentifier = "com.ctv.dailyplanet";
        info: [IOS_SYSLOG_ROW ] PackageType = Developer;
        info: [IOS_SYSLOG_ROW ] SimulatorRootPath = "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk";
        info: [IOS_SYSLOG_ROW ] SimulatorUserPath = "/Users/Salman/Library/Developer/CoreSimulator/Devices/E2D19473-66F0-4A32-9DD0-DCA4EF863154/data";
        info: [IOS_SYSLOG_ROW ] }
    
        info: [debug] Cleaning app data files
    
        warn: Applications directory /Users/Salman/Library/Developer/CoreSimulator/Devices/E2D19473-66F0-4A32-9DD0-DCA4EF863154/data/Containers/Data/Application doesn't exist. Have you run this simulator before?
        warn: Applications directory /Users/Salman/Library/Developer/CoreSimulator/Devices/E2D19473-66F0-4A32-9DD0-DCA4EF863154/data/Containers/Bundle/Application doesn't exist. Have you run this simulator before?
        info: Couldn't find app directories to delete. Probably it's not installed
        info: [debug] Resetting Content and Settings for Simulator
        info: node-simctl: Executing: xcrun with args: simctl erase E2D19473-66F0-4A32-9DD0-DCA4EF863154 and timeout: 2000
    
        error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
    
        info: [debug] Cleaning up appium session
        info: [debug] Error: Instruments crashed on startup
            at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31)
            at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12)
            at ChildProcess.emit (events.js:110:17)
            at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
        info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
        info: <-- POST /wd/hub/session 500 64280.563 ms - 182 
    

    来自真实设备的日志
    error: Failed to start an Appium session, err was: Error: Instruments crashed on startup
    
    info: [debug] Error: Instruments crashed on startup
        at [object Object].Instruments.onInstrumentsExit (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:440:31)
        at [object Object].<anonymous> (/Applications/Appium.app/Contents/Resources/node_modules/appium/submodules/appium-instruments/lib/instruments.js:353:12)
        at ChildProcess.emit (events.js:110:17)
        at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
    info: [debug] Responding to client with error: {"status":33,"value":{"message":"A new session could not be created. (Original error: Instruments crashed on startup)","origValue":"Instruments crashed on startup"},"sessionId":null}
    info: <-- POST /wd/hub/session 500 32271.057 ms - 182 
    

    目标:
  • 使应用程序自动化。
  • 要在模拟器或真实设备上启动并检查
    应用程序元素。
  • 最佳答案

    否。您的ipa是设备应用程序捆绑包,不适合模拟器。

    关于ios - 是否可以在iOS模拟器上启动签名的.ipa应用程序而不会崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36942762/

    相关文章:

    ios - Swift - 将字符串转换为日期

    ios - 无法启动模拟器,launchd 无法响应 Xcode 10.0

    ios7 - 新的 Xcode 6 项目 - 如何在 iOS 7 模拟器中运行

    ios - 在 staticLibrary 中加密字符串时出错

    ios - 即使应用程序关闭也运行时钟或计时器

    ios - 弹出导航后如何从ViewController释放内存

    iphone - 如何编写谓词以仅检索在 iphone 中具有偶数属性的实体

    javascript - 当上面的 it block 失败时如何不执行 it block

    .net - 如何通过传递用户名和密码从身份服务器获取访问 token ?

    unit-testing - 运行 SpecFlow 报告 - 错误 - 元素 <Target> 中的属性 "Label"无法识别