Fastlane、iOS 配置文件和推送通知权限(举例)

问题描述 投票:0回答:1

我正在尝试让 Fastlane 获取我的 iOS 应用程序的源代码并将其构建/代码设计到存档/IPA 文件中。这是我的

Fastfile
:

default_platform(:ios)

platform :ios do
  lane :staging do
    puts "iOS staging build"
    clean_build_artifacts
    disable_automatic_code_signing(path: "./ios/myappmobile.xcodeproj")
    build_app(
      scheme: "myappmobile",
      project: "./ios/myappmobile.xcodeproj",
      export_options: {
        signingStyle: "manual",
        provisioningProfiles: {
          "com.myapp" => "/Users/myuser/workspace/myapp/myappprovisioningprofile.mobileprovision"
        }
      },
      clean: true
    )
  end
end

请务必注意,

/Users/myuser/workspace/myapp/myappprovisioningprofile.mobileprovision
是有效的文件路径/位置,也是我下载配置文件文件的位置。

当我运行

fastlane ios staging
时,我收到以下错误:

error: "myappmobile" requires a provisioning profile with the Push Notifications feature. Select a provisioning profile in the Signing & Capabilities editor. (in target 'myappmobile' from project 'myappmobile')

当我创建我的应用程序和所有相关资源(证书、配置文件等)时,我记得选中了一个复选框,表示我想为我的应用程序提供推送通知功能。

所以我的第一个假设是 Fastlane 正在查找我的配置文件文件 (

myappprovisioningprofile.mobileprovision
),并且可能其中的某些内容尚未正确配置。但即使我将
provisioningProfiles
值更改为:

,我也会收到相同的错误
provisioningProfiles: {
  "com.myapp" => "/Users/myuser/workspace/myapp/myappprovisioningprofile.mobileprovision"
}

胡言乱语:

provisioningProfiles: {
  "com.myapp" => "flim-flam-fizz-buzz"
}

这是怎么回事?! 为什么 Fastlane 无法找到我的配置文件(由于某种原因它是否需要是相对路径?!)。但最疯狂的事情是:它知道应用程序需要推送通知,但无法读取/解析配置文件,那么它如何知道推送通知是必需的?!

ios xcode code-signing apple-developer
1个回答
0
投票

无需输入路径,只需输入你的苹果帐户中的个人资料名称即可,这是我的快速文件的一部分

 export_options: {
        "signingStyle" => "manual", 
    provisioningProfiles: {
            "com.YOUR_APP.application" => "Distribution",
        "com.YOUR_APP.application.AB24Intents" => "AB24Intents",
        "com.YOUR_APP.application.ABRPWidget" => "ABRPWidget"
                
        }
© www.soinside.com 2019 - 2024. All rights reserved.