简体   繁体   English

如何从ios开发重新开始?

[英]How to start over with ios development?

A while ago I was working with iOs on a mac. 前一段时间,我在Mac上使用iO。 Due to an accident the machine is lost and I can't recover anything from it. 由于意外,机器丢失了,我无法恢复任何东西。 I bought a new one and installed xcode. 我买了一个新的,并安装了xcode。 When trying to compile for a device I get an error saying "There are no valid certificates/private key pairs in the default keychain". 尝试为设备编译时,出现错误消息“默认钥匙串中没有有效的证书/私钥对”。

I went to the provisioning portal and I got my developer certificate and added it to the keychain (the login one). 我去了供应门户,并获得了开发人员证书并将其添加到钥匙串(登录名)中。 I also added the provisioning file I used before to the mac (It was already on the iOs device). 我还将以前使用的配置文件添加到了Mac(它已经在iOs设备上)。

In the organizer tab under status I see a warning: "Valid signing identity not found". 在状态下的管理器选项卡中,我看到警告:“找不到有效的签名身份”。

I'm still new to the whole apple development thing and I have no clue as to what should I do. 对于整个苹果开发领域,我还是一个陌生人,我不知道应该怎么做。

Could you guys please help me? 你们能帮我吗?

Thank you 谢谢

You need to toss the existing development cert, and provide a new signing request from the keychain. 您需要扔掉现有的开发证书,并从钥匙串提供新的签名请求。 The thing you are missing is your private key, since you cannot get that just make a new one. 您缺少的是您的私钥,因为您不能获得新的密钥。

In the future, use Time Machine... it's invaluable. 将来,请使用Time Machine ...这是无价的。 Also you can export the private key to save to a USB stick for extra backup. 您也可以导出私钥以保存到USB记忆棒中以进行额外备份。

Go to https://developer.apple.com/ios/manage/overview/index.action (or the iOS provisioning portal!) 转到https://developer.apple.com/ios/manage/overview/index.action (或iOS设置门户!)。

and then go to Provisioning. 然后转到Provisioning。 Then click new profile and create your profile and then download it. 然后单击新的配置文件并创建您的配置文件,然后下载它。 Then open the provisioning file and then your computer will ask you if you want to add it to the Library. 然后打开配置文件,然后您的计算机会询问您是否要将其添加到库中。 Accept it and then you should have it in your computer. 接受它,然后应该将其放入计算机中。 Next open Xcode and open the organizer and then click the device that your using to test and click Provisioning Profiles. 接下来,打开Xcode并打开管理器,然后单击用于测试的设备,然后单击“配置文件”。 Then click import and select the provisioning file that you just downloaded. 然后单击导入,然后选择刚下载的配置文件。 Then in your project select the appropriate profile in your build settings! 然后在您的项目中,在构建设置中选择适当的配置文件! Then try and it should work! 然后尝试,它应该可以工作! You can't use your old certificate so just toss that one out. 您不能使用旧证书,只能扔掉那个证书。 Good Luck! 祝好运!

You cannot use the same certificate you downloaded from developer portal if you did not backup the key. 如果您没有备份密钥,则不能使用从开发人员门户下载的相同证书。 You cannot use the certificate without the key. 没有密钥,您将无法使用证书。 You should have backed up the key on previous machine and now you would just download the certificate and pair it up with backed up key. 您应该已经在先前的计算机上备份了密钥,现在您只需下载证书并将其与备份的密钥配对即可。

If you didn't back up the key, you have to revoke the old certificate and create a new one. 如果您没有备份密钥,则必须撤消旧证书并创建一个新证书。 And when you are finished remember to backup your certificate key. 完成后,请记住备份证书密钥。

Happened to me, so I know by doing it the wrong way ;) 发生在我身上,所以我知道做错了;)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM