开发者

Can I use Xcode4 with two separate Apple Developer accounts that are not linked?

开发者 https://www.devze.com 2023-04-03 15:08 出处:网络
I want to develop both for an employer and for myself. They have their Apple Dev id & password, and I have mine. Two separate accounts.

I want to develop both for an employer and for myself. They have their Apple Dev id & password, and I have mine. Two separate accounts.

Can this be done? Two accounts on the same computer with the same copy of Xcode?

Or perhaps do I need to create a second login account on the Mac i.e. with separate home directorie开发者_StackOverflow中文版s?


It works best to have 2 separate Mac User accounts. That way, not only are all the iOS Developer & Distribution Certificates kept in 2 separate Keychains, but you will be less likely to accidentally mix your code (and personal documents, etc.) and your employer's IP. Both User accounts can use the same Xcode/SDK installation, unless you change the directory permissions somehow.


While Xcode might work "best" separated into two accounts, I consider this a deficiency in Xcode.

At work, we avoid automatic code sign identity/profile selection; it seems to have paid off (we have several customers who want us to produce builds signed with their certs and even submitted to the app store on their behalf). Our build scripts automatically pick the provisioning profile by name, install it if necessary, and pass PROVISIONING_PROFILE=... to xcodebuild.

Developement builds can use automatic profile selection provided the code signing identity is specific enough. To avoid hassle, we all sign with the same dev cert/key. Distribution builds can use a specific identity anyway, since there's only one per company.

That said, automatic profile selection might have improved since Xcode 3.0 (or whatever the 2.0 SDK came with).

In practice, dev builds don't really matter, you should check the output of dist builds anyway. The only big problem I've encountered was with a company that had both an App Store and an Enterprise account, both with certificates named "iPhone Distribution: CompanyName Inc.". I think that can be solved by passing --keychain=... in "code signing flags".

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号