Skip to content

Commit ac74021

Browse files
add uitest script to readme and restructure it a bit (#99)
* add uitest script to readme and restructure it a bit * clean * fix for reject names that are likely to be mangled C name: golang/go@5e17278#diff-d390090e3c58a2b4a9dbe8531e63b0e7R188 * using hmtl tags instead of markdowns
1 parent 1988469 commit ac74021

File tree

2 files changed

+65
-3
lines changed

2 files changed

+65
-3
lines changed

README.md

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,66 @@ What this tool does:
2525
Just open up your `Terminal.app` on OS X, copy-paste this into it and hit Enter
2626
to run:
2727

28-
For `Xcode` project (project or workspace):
28+
#### Xcode
29+
<details ><summary>For Archiving & Exporting IPA for <code>Xcode</code> project (project or workspace):</summary>
30+
<p>
2931

32+
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):
3033
```
3134
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode.sh)"
3235
```
36+
</p>
37+
</details>
3338

34-
For `Xamarin` project (solution):
39+
40+
<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>
41+
<p>
42+
43+
---
44+
45+
_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._
46+
_So you will need to run the `install_wrap-xcode.sh ` and the `install_wrap-xcode-uitests.sh` as well._
47+
48+
---
49+
50+
First you need to export the code signing files of the App target and it's dependent targets:
51+
```
52+
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode.sh)"
53+
```
54+
55+
Secondly you need to export the code signing files of the UI test targets:
56+
57+
```
58+
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xcode-uitests.sh)"
59+
```
60+
61+
---
62+
63+
If the UITest scanner cannot find the desired scheme, follow these steps:
64+
65+
1. Make sure your scheme is valid for running a UITest.
66+
- It has to contain a UITest target that is enabled to run.
67+
68+
2. Refresh your project settings:
69+
- Select the Generic iOS Device target for your scheme in Xcode.
70+
- Clean your project: ⌘ Cmd + ↑ Shift + K.
71+
- Run a build for testing: ⌘ Cmd + ↑ Shift + U.
72+
- Run codesigndoc again.
73+
</p>
74+
</details>
75+
76+
77+
#### Xamarin
78+
<details><summary>For Archiving & Exporting IPA for <code>Xamarin</code> project (solution):</summary>
79+
<p>
3580

3681
```
3782
bash -l -c "$(curl -sfL https://raw.githubusercontent.com/bitrise-tools/codesigndoc/master/_scripts/install_wrap-xamarin.sh)"
3883
```
84+
</p>
85+
</details>
86+
87+
----
3988

4089
### Manual install & run
4190

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

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

150+
## Troubleshooting the UITest scanner
151+
If the UITest scanner cannot find the desired scheme, follow these steps:
152+
153+
1. Make sure your scheme is valid for running a UITest.
154+
- It has to contain a UITest target that is enabled to run.
155+
156+
2. Refresh your project settings:
157+
- Select the Generic iOS Device target for your scheme in Xcode.
158+
- Clean your project: ⌘ Cmd + ↑ Shift + K.
159+
- Run a build for testing: ⌘ Cmd + ↑ Shift + U.
160+
- Run codesigndoc again.
161+
100162
## Development
101163

102164
### Create a new release

osxkeychain/osxkeychain.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func FindIdentity(identityLabel string) ([]IdentityWithRefModel, error) {
184184
C.CFDictionaryAddValue(queryDict, unsafe.Pointer(C.kSecReturnRef), unsafe.Pointer(C.kCFBooleanTrue))
185185

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

0 commit comments

Comments
 (0)