Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 64 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,66 @@ What this tool does:
Just open up your `Terminal.app` on OS X, copy-paste this into it and hit Enter
to run:

For `Xcode` project (project or workspace):
#### Xcode
<details ><summary>For Archiving & Exporting IPA for <code>Xcode</code> project (project or workspace):</summary>
<p>

Exporting the code signing files of the App target and it's dependent targets for the Archive and IPA generation (e.g: [Xcode Archive & Export for iOS](https://github.com/bitrise-io/steps-xcode-archive) step will need them):
```
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode.sh)"
```
</p>
</details>

For `Xamarin` project (solution):

<details><summary>For UI testing on real device for <code>Xcode</code> project (project or workspace) e.g: <a href="https://github.com/bitrise-steplib/steps-xcode-build-for-test">Xcode Build for testing for iOS</a> & <a href="https://github.com/bitrise-steplib/steps-virtual-device-testing-for-ios">iOS Device Testing</a>:</summary>
<p>

---

_Note: For UI testing you will need the code signing files for the App target and it's dependent targets and for the UI test targets too._
_So you will need to run the `install_wrap-xcode.sh ` and the `install_wrap-xcode-uitests.sh` as well._

---

First you need to export the code signing files of the App target and it's dependent targets:
```
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode.sh)"
```

Secondly you need to export the code signing files of the UI test targets:

```
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode-uitests.sh)"
```

---

If the UITest scanner cannot find the desired scheme, follow these steps:

1. Make sure your scheme is valid for running a UITest.
- It has to contain a UITest target that is enabled to run.

2. Refresh your project settings:
- Select the Generic iOS Device target for your scheme in Xcode.
- Clean your project: ⌘ Cmd + ↑ Shift + K.
- Run a build for testing: ⌘ Cmd + ↑ Shift + U.
- Run codesigndoc again.
</p>
</details>


#### Xamarin
<details><summary>For Archiving & Exporting IPA for <code>Xamarin</code> project (solution):</summary>
<p>

```
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xamarin.sh)"
```
</p>
</details>

----

### Manual install & run

Expand All @@ -49,6 +98,7 @@ bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesign
3. run the `scan` command of the tool
* if you followed the previous examples:
* Xcode project scanner: `./codesigndoc scan xcode`
* Xcode project scanner for UI test targets: `./codesigndoc scan xcodeuitests`
* Xamarin project scanner: `./codesigndoc scan xamarin`

## Manually finding the required base code signing files for an Xcode project or workspace
Expand Down Expand Up @@ -97,6 +147,18 @@ create your archive. **All of the listed certificates & provisioning profiles
have to be available to create an archive of your project** with your current
code signing settings.

## Troubleshooting the UITest scanner
If the UITest scanner cannot find the desired scheme, follow these steps:

1. Make sure your scheme is valid for running a UITest.
- It has to contain a UITest target that is enabled to run.

2. Refresh your project settings:
- Select the Generic iOS Device target for your scheme in Xcode.
- Clean your project: ⌘ Cmd + ↑ Shift + K.
- Run a build for testing: ⌘ Cmd + ↑ Shift + U.
- Run codesigndoc again.

## Development

### Create a new release
Expand Down
2 changes: 1 addition & 1 deletion osxkeychain/osxkeychain.go
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ func FindIdentity(identityLabel string) ([]IdentityWithRefModel, error) {
C.CFDictionaryAddValue(queryDict, unsafe.Pointer(C.kSecReturnRef), unsafe.Pointer(C.kCFBooleanTrue))

var resultRefs C.CFTypeRef
osStatusCode := C.SecItemCopyMatching((_Ctype_CFDictionaryRef)(queryDict), &resultRefs)
osStatusCode := C.SecItemCopyMatching((C.CFDictionaryRef)(queryDict), &resultRefs)
if osStatusCode != C.errSecSuccess {
return nil, fmt.Errorf("Failed to call SecItemCopyMatch - OSStatus: %d", osStatusCode)
}
Expand Down