You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Release 2.0.0
* update umbrella import
* update example project code & switch release version to branch while we re-work the release process
* add background uploading capability and streamline some of the Example app code
* update readme, as we no longer should need any netrc stuff for using the SDK
---------
Co-authored-by: Anka <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+9-50Lines changed: 9 additions & 50 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,54 +17,49 @@ The HOVER Capture iOS SDK provides a user flow for capturing and submitting 3D s
17
17
18
18
The HOVER Capture iOS SDK is distributed using Swift Package Manager. You may integrate it using Xcode or a `Package.swift` file.
19
19
20
-
> [!TIP]
21
-
> Swift Package Manager requires a properly configured `.netrc` file to download binary assets from the private repository. Please see [Authenticating with .netrc](#authenticating-with-netrc) below for instructions on how to properly configure this.
22
-
23
20
<details>
24
21
<summary>Xcode</summary>
25
-
22
+
26
23
To integrate the SDK using Xcode, perform the following steps:
27
24
28
25
1. In the Xcode Project Navigator pane (on the left side), select your project.
29
26
2. Select your project under the PROJECT heading on the left-side panel
30
27
3. Select the Package Dependencies tab on the top
31
28
4. Click the + button under the Packages list.
32
29
5. In the "Search or Enter Package URL" search bar, enter the repository url (`https://github.com/hoverinc/hover-capture-ios.git`)
33
-
- We recommend using https to mitigate some bumps with github authentication.
34
30
6. Click "Add Package"
35
31
7. Select a target to add the `HVCaptureSDK` library.
36
32
37
33
</details>
38
34
39
35
<details>
40
36
<summary>Package.swift</summary>
41
-
37
+
42
38
To integrate the SDK into a Swift package, add the following line to your `dependencies` array in your `Package.swift` manifest:
The `Example` app in the repository provides a minimal example of how to integrate the SDK into an application. Additionally, the [Getting Stated](https://hoverinc.github.io/hover-capture-ios/documentation/hvcapturesdk/gettingstarted) guide and [Tutorials](https://hoverinc.github.io/hover-capture-ios/tutorials/tutorials/) have more comprehensive and up-to-date documentation regartding SDK usage, customization and integration.
54
49
55
50
### Initializing the SDK
56
51
57
52
The SDK should be initialized as early as possible in the app lifecycle. This is because the SDK does some background work to set up required structures and upload any remaining captured data from past jobs that have yet to complete.
58
53
As such, the SDK should (ideally) be initialized in host application’s `applicationDidFinishLaunching` method, so that the SDK can continue uploading any files that remain to be uploaded. This helps expedite 3D model generation, as we need all the captured images and metadata to begin the 3D reconstruction process.
@@ -74,7 +69,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
74
69
The host app can launch the SDK in any way it sees fit, as long as there is an active ViewController somewhere in the app. Here is one example using SwiftUI of launching the SDK capture flow on a button click:
The SDK wraps a number of sub-frameworks into one tidy package to simplify distribution and integration. However, to avoid checking these binaries into the repository, we host them as artifacts within the associated Github Release. To meet Swift Package Manager's security requirements, we must use Github's API to download these binary assets, and thus authenticate with the Github API using `netrc` to authorize the download.
150
-
151
-
Your `netrc` file should look something like this:
152
-
153
-
```
154
-
machine api.github.com
155
-
login schrismartin
156
-
password ghp_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
157
-
```
158
-
159
-
-`machine` – This will be `api.github.com`, as SPM will attempt to download the binary frameworks via Github's API
160
-
-`login` – This will be your Github username, omitting any `@domain.com` suffix.
161
-
-`password` – This will be a [Github Personal Access Token](#github-personal-access-token)
162
-
163
-
After making any modifications to this file, you will want to restart Xcode for the changes to take effect. You may need to reset package caches if you continue to see errors.
164
-
165
-
> [!NOTE]
166
-
> An incorrect configuration of this file will result in an `badResponseStatusCode(404)` error when attempting to download a framework binary. While a 404 typically indicates that a resources doesn't exist, in this case, it means it doesn't exist _for you_. If your `.netrc` file is correctly configured and you're still seeing this issue, please review the scopes for your configured Github PAT.
167
-
168
-
### Github Personal Access Tokens:
169
-
170
-
Both Xcode and the `.netrc` file will need access to Github in order to seamlessly download the requirements to build & run the SDK. The associated Github Personal Access Token (PAT) will need to be configured as below.
171
-
172
-
1. Make sure you’re signed into Github for the account that you need to authenticate
173
-
2. Navigate to Settings → Developer Settings → Personal Access Tokens
174
-
3. Click “Generate new token” → “Generate new token (classic)”
175
-
4. Generate a new token that contains at least the following scopes
0 commit comments