关于IOS应用签名不一致的问题解决方法

搞了好久,终于找到了官方的文档,所以纪录下来,作为以后的参考

https://developer.apple.com/library/content/qa/qa1814/_index.html

说再多不如官方的文档,直接看吧。自己归纳出最核心的思想有四点

1、要先全部设置到默认值

2、再设置为automic

3、最后设置team 和build 信息

4、一定切记要restart

具体看下面吧

Technical Q&A QA1814

Setting up Xcode to automatically manage your provisioning profiles

Q:  How do I configure my Xcode project to use automatic provisioning?

A: Many developers who are maintaining older apps may have specific selections for their code signing build settings; this Q&A discusses how to opt into Xcode's automatic provisioning by reverting those build settings to their defaults. This topic applies to both iOS and Mac app development.

Xcode's automatic provisioning is the preferred way to code sign apps during both development and distribution. In other words, this is the recommended approach for setting up your projects for both enterprise and App Store developer accounts. All developers should consider the code signing practices described in this document before resorting to other techniques. Also, this is the only process documented in the App Distribution Guide. Opting into automatic provisioning means that you will no longer supply choices for the Code Signing Identity or Provisioning Profile build settings, and this allows Xcode to make the best choice for you.

Follow these steps to use Xcode's automatic provisioning:

  • Set the project level code signing build settings to their defaults:

    1. Navigate to the Project > Build Settings tab.

    2. Set the Provisioning Profile build setting to Automatic for all build configurations.

    3. Set the Code Signing Identity build setting:

      • Set to iOS Developer for all build configurations in iOS projects.

      • Set to Mac Developer or Developer ID, as appropriate, for all build configurations in OS X projects.

  • Set the targets' code signing build settings to their defaults:

    1. Set the Target > General > Team to None.

      Important: For Mac apps, also set Target > General > "Signing" to None.

    2. Change the Provisioning Profile build setting to Automatic for all build configurations.

    3. Set the Code Signing Identity build setting:

      • Set to iOS Developer for all build configurations in iOS targets.

      • Set to Mac Developer or Developer ID, as appropriate, for all build configurations in OS X targets.

  • Return to the Target > General tab for all of your app's targets and set the Team using these steps:

    1. For Mac apps, set Target > General > "Signing" to Mac App Store.

    2. Set the Target > General > Team to your team.

Note: It's just as important to set Target > General > Team to None before reverting all the code signing build settings to their defaults, as it is to set it back to the value of your team afterwards.

Compare your project with the figures below that illustrate correct configuration for automatic provisioning.

Figure 1  Build settings of an iOS project correctly configured for automatic provisioning. Figure 2  Build settings of an OS X project correctly configured for automatic provisioning. Figure 3  Target > General > Team of an iOS project correctly configured for automatic provisioning. Figure 4  Target > General > Team of an OS X project correctly configured for automatic provisioning.

Important: Finally, after making these changes, Xcode should be restarted.

Once you have switched over to letting Xcode manage your applications provisioning profiles, capabilities should now be added to your project using the Capabilities pane in the project editor for your target. When you add capabilities to your app using Xcode, Xcode automatically configures your project to use them. Xcode edits the entitlements and information property list files for you and adds technology-specific frameworks as needed. For entitlements to take effect, Xcode creates code signing and provisioning assets for your team and sets your code signing build settings for you. Xcode creates a wildcard App ID and explicit App ID, if needed, to enable the app services you choose.

You can easily identify any Xcode-managed provisioning profiles in the Member Center that use an explicit App ID because they will begin with the text “iOS Team Provisioning Profile:” followed by the bundle ID. Xcode 5 requires that you create your own distribution profile in the Member Center. Xcode 6 will create any distribution certificates or distribution provisioning profiles that are required. When Xcode creates a distribution provisioning profile, the name of the distribution provisioning profile begins with the text XC: followed by the App ID. If you are using a wildcard App ID, the name of the distribution provisioning profile is XC:*.



Document Revision History

Date Notes
2015-12-26

emphasized this is the recommended approach for Code Signing

2015-03-31

Added images reflecting recommended build settings.

2015-03-25

Fixed broken link.

2015-03-23

Minor change.

2015-03-17

Rewrote for improved readability

2014-10-07

updated with information about Xcode 6

2014-04-24

Added note about bundle seed id differing from team id. Updated for both iOS and OS X.

2014-01-21

New document that talks about how to set up Xcode to automatically manage your provisioning profiles.





  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值