在Xcode中构建的应用程序仅在其编译的Mac上启动

llycmphe  于 12个月前  发布在  Mac
关注(0)|答案(1)|浏览(148)

我更新了问题,因为我可以缩小问题的范围。从控制台检查崩溃日志显示我遇到了签名问题。我在没有任何CocoaPods的情况下重建了应用程序,现在在我的Xcode项目中有MSAL作为常规包依赖。
当在设备上复制项目并编译它时,生成的应用程序在该设备上运行得很好。
如果我复制.app文件并在另一台Mac上打开它,但是,应用程序不会启动。我可以找到的错误来自英特尔Mac,因为我的Apple Silicon Mac不会产生任何崩溃日志:

"app_name":"ui_test","timestamp":"2023-10-03 16:46:47.00 +0200","app_version":"1.0","slice_uuid":"62be6a29-6e5b-37a4-b396-1dbdf81d3f43","build_version":"1","platform":0,"bundleID":"tardik.newtodomsal","share_with_app_devs":0,"is_first_party":0,"bug_type":"309","os_version":"macOS 13.6 (22G120)","roots_installed":0,"name":"ui_test","incident_id":"94B57AAB-CF8D-4A6A-8545-4D622547DA91"}
{
  "uptime" : 7700,
  "procRole" : "Default",
  "version" : 2,
  "userID" : 501,
  "deployVersion" : 210,
  "modelCode" : "MacPro7,1",
  "coalitionID" : 1952,
  "osVersion" : {
    "train" : "macOS 13.6",
    "build" : "22G120",
    "releaseType" : "User"
  },
  "captureTime" : "2023-10-03 16:46:47.8577 +0200",
  "incident" : "94B57AAB-CF8D-4A6A-8545-4D622547DA91",
  "pid" : 3353,
  "cpuType" : "X86-64",
  "roots_installed" : 0,
  "bug_type" : "309",
  "procLaunch" : "2023-10-03 16:46:47.8008 +0200",
  "procStartAbsTime" : 7793359661050,
  "procExitAbsTime" : 7793416434750,
  "procName" : "ui_test",
  "procPath" : "\/Volumes\/VOLUME\/ui_test.app\/Contents\/MacOS\/ui_test",
  "bundleInfo" : {"CFBundleShortVersionString":"1.0","CFBundleVersion":"1","CFBundleIdentifier":"tardik.newtodomsal"},
  "storeInfo" : {"deviceIdentifierForVendor":"BF901324-EBC4-57EB-80A2-EA437BC60DE6","thirdParty":true},
  "parentProc" : "launchd",
  "parentPid" : 1,
  "coalitionName" : "tardik.newtodomsal",
  "crashReporterKey" : "FE05737C-5218-4DB2-B9C6-BE508F19E65F",
  "codeSigningID" : "",
  "codeSigningTeamID" : "",
  "codeSigningFlags" : 16777216,
  "codeSigningValidationCategory" : 0,
  "codeSigningTrustLevel" : 0,
  "wakeTime" : 6126,
  "sleepWakeUUID" : "AF336868-DAC2-4830-A714-F1D0473DEE13",
  "sip" : "enabled",
  "exception" : {"codes":"0x0000000000000000, 0x0000000000000000","rawCodes":[0,0],"type":"EXC_CRASH","signal":"SIGKILL (Code Signature Invalid)"},
  "termination" : {"flags":66,"code":1,"namespace":"CODESIGNING","indicator":"Taskgated Invalid Signature"},
  "extMods" : {"caller":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"system":{"thread_create":0,"thread_set_state":439,"task_for_pid":9},"targeted":{"thread_create":0,"thread_set_state":0,"task_for_pid":0},"warnings":0},
  "faultingThread" : 0,
  "threads" : [{"triggered":true,"id":104306,"threadState":{"r13":{"value":0},"rax":{"value":0},"rflags":{"value":512},"cpu":{"value":0},"r14":{"value":0},"rsi":{"value":0},"r8":{"value":0},"cr2":{"value":0},"rdx":{"value":0},"r10":{"value":0},"r9":{"value":0},"r15":{"value":0},"rbx":{"value":0},"trap":{"value":0},"err":{"value":0},"r11":{"value":0},"rip":{"value":4382367856,"matchesCrashFrame":1},"rbp":{"value":0},"rsp":{"value":140702045277168},"r12":{"value":0},"rcx":{"value":0},"flavor":"x86_THREAD_STATE","rdi":{"value":0}},"frames":[{"imageOffset":20592,"symbol":"_dyld_start","symbolLocation":0,"imageIndex":0},{"imageOffset":1,"imageIndex":2}]}],
  "usedImages" : [
  {
    "size" : 638976,
    "arch" : "x86_64",
    "source" : "P",
    "base" : 4382347264,
    "uuid" : "3df96f32-b9c9-3566-a6b7-4daebc6d6563"
  },
  {
    "source" : "P",
    "arch" : "x86_64",
    "base" : 4303515648,
    "size" : 180224,
    "uuid" : "62be6a29-6e5b-37a4-b396-1dbdf81d3f43",
    "name" : ""
  },
  {
    "size" : 0,
    "source" : "A",
    "base" : 0,
    "uuid" : "00000000-0000-0000-0000-000000000000"
  }
],
  "vmSummary" : "ReadOnly portion of Libraries: Total=1180K resident=0K(0%) swapped_out_or_unallocated=1180K(100%)\nWritable regions: Total=8192K written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=8192K(100%)\n\n                                VIRTUAL   REGION \nREGION TYPE                        SIZE    COUNT (non-coalesced) \n===========                     =======  ======= \nSTACK GUARD                       56.0M        1 \nStack                             8192K        1 \nVM_ALLOCATE                          4K        1 \n__DATA                              48K        2 \n__DATA_CONST                        48K        2 \n__DATA_DIRTY                        16K        1 \n__LINKEDIT                         384K        3 \n__TEXT                             800K        2 \nshared memory                        4K        1 \n===========                     =======  ======= \nTOTAL                             65.3M       14 \n",
  "legacyInfo" : {
  "threadTriggered" : {

  }
},
  "logWritingSignature" : "c8aecb4bac96e31f0d308bbfed9c73b1b8f822c9",
  "trialInfo" : {
  "rollouts" : [
    {
      "rolloutId" : "60186475825c62000ccf5450",
      "factorPackIds" : {

      },
      "deploymentId" : 240000062
    },
    {
      "rolloutId" : "6391cacc75b0720ff1f8c695",
      "factorPackIds" : {
        "COREOS_ICD" : "63957f508061fa721c8edc4a"
      },
      "deploymentId" : 240000007
    }
  ],
  "experiments" : [
    {
      "treatmentId" : "6dd670af-0633-45e4-ae5f-122ae4df02be",
      "experimentId" : "64406ba83deb637ac8a04419",
      "deploymentId" : 900000017
    }
  ]
},
  "reportNotes" : [
  "dyld_process_snapshot_get_shared_cache failed"
]
}

字符串

f8rj6qna

f8rj6qna1#

我终于找到了答案,它不是上述.应用程序没有在其他Mac上启动,因为MSAL用于身份验证,它需要钥匙链访问工作.钥匙链访问只能与配置文件,因为我没有一个开发者帐户与苹果,我只能签署应用程序运行在设备上编译应用程序,据我所知.
因此,我不能做任何事情,在这一点上,如果我理解正确。这里有一个参考链接:https://learn.microsoft.com/en-us/azure/active-directory/develop/howto-v2-keychain-objc?tabs=swift
即使我禁用钥匙串共享,我仍然必须添加它作为一个权利,从而要求我设置配置的设备.有点伤心,如果我是不正确的所有这一切,我很想在这里是错误的,所以请告诉我,如果我是.

相关问题