使用自动管理签名后,也会显示错误。
1).WatchSwift Extension需要配置文件。在项目编辑器中为“Debug”构建配置选择配置文件。
2)。在SDK'watchOS 3.2'中,产品类型'WatchKit Extension'需要进行代码签名
答案 0 :(得分:1)
完成所有这些操作后,您可能会看到一个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