如何修复目标c中的配置文件错误?

时间:2017-06-20 05:20:17

标签: xcode provisioning-profile

使用自动管理签名后,也会显示错误。

1).WatchSwift Extension需要配置文件。在项目编辑器中为“Debug”构建配置选择配置文件。

2)。在SDK'watchOS 3.2'中,产品类​​型'WatchKit Extension'需要进行代码签名

1 个答案:

答案 0 :(得分:1)

  1. 设置WatchKit和WatchKit扩展目标的自动配置文件
  2. 转到功能选项卡并选择应用程序组,然后只能使用WatchKit作为其依赖性要求。
  3. 在开发人员门户网站上找到AppID并将其与AppGroup部分中首先创建的AppGroup ID相关联,然后在APPID中启用您启用推送功能。
  4. 此后,配置文件将过期因此请确保在配置文件中再次重新生成它,否则Xcode将为您重新生成它。
  5. 完成所有这些操作后,您可能会看到一个APPNAME.entitlement文件添加到Xcode项目中,看起来像thi:

    import { Component, OnInit } from '@angular/core';
    import { AuthService } from '../auth.service';
    import { FormBuilder, FormGroup } from '@angular/forms';
    import { Router } from '@angular/router';
    import { Http } from '@angular/http';
    import { PostsService } from '../posts.service';
    
    @Component({
      selector: 'app-transfer',
      templateUrl: './transfer.component.html',
      styleUrls: ['./transfer.component.css']
    })
    export class TransferComponent implements OnInit {
    
      constructor(private fb: FormBuilder, private http: Http, private router: Router, private auth: AuthService,private postsService: PostsService) { }
      transfer = {};
      recipients: any;
      transferForm: FormGroup;
      public userEmail: string;
    
      ngOnInit() {
        this.transferForm = this.fb.group({
          emailTo: '',
          amount: ''
        });
        this.auth.currentEmail.subscribe(email => this.userEmail = email);
    
        this.postsService.getAllRecipient().subscribe(recipient => {
          this.recipients = recipient;
        });
      }      
    
    }
    

    请注意,您的详细信息可能会因您的目标而异。

    WatchKit目标权利可能会显示:

    <?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>application-identifier</key>
        <string>TEAMID.com.yourapp.bundleID</string>
        <key>com.apple.security.application-groups</key>
        <array>
            <string>group.yourapp.bundleID</string> . //This is one your created in Apple AooGroup section.
        </array>
        <key>keychain-access-groups</key>
        <array>
            <string>TEAMID.yourkeychaingroups</string> //optional
        </array>
        <key>com.apple.developer.pass-type-identifiers</key>
        <array>
            <string>TEAMID.*</string>
        </array>
        <key>com.apple.developer.siri</key> . //optional
        <true/>
        <key>get-task-allow</key>
        <false/>
    </dict>
    </plist>
    

    WatchKitExtension目标权利可能会显示:

    <?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>application-identifier</key>
        <string>TEAMID.com.yourapp.bundleID.watchkitapp</string>
        <key>keychain-access-groups</key>
        <array>
            <string>TEAMID.com.yourapp.bundleID.watchkitapp</string>
        </array>
    </dict>
    </plist>
    

    如果仍存在问题,最后请参阅apple doc:https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringYourApp/ConfiguringYourApp.html