-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(docs): add setup method documentation
- Loading branch information
Showing
6 changed files
with
533 additions
and
0 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
src/content/docs/code-snippets/ios/ADJConfig/_configWithAppToken.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<Tabs> | ||
<Tab sync="swift"> | ||
|
||
### Swift | ||
|
||
```swift {3-5} | ||
let yourAppToken = "{YourAppToken}" | ||
let environment = ADJEnvironmentSandbox as? String | ||
let adjustConfig = ADJConfig( | ||
appToken: yourAppToken, | ||
environment: environment) | ||
``` | ||
|
||
</Tab> | ||
<Tab sync="objc"> | ||
|
||
### Objective-C | ||
|
||
```objective-c {3-4} | ||
NSString *yourAppToken = @"{YourAppToken}"; | ||
NSString *environment = ADJEnvironmentSandbox; | ||
*adjustConfig = [ADJConfig configWithAppToken:yourAppToken | ||
environment:environment]; | ||
``` | ||
</Tab> | ||
<Tab sync="js"> | ||
### Javascript | ||
```javascript {4} | ||
setupWebViewJavascriptBridge(function(bridge) { | ||
var yourAppToken = yourAppToken; | ||
var environment = AdjustConfig.EnvironmentSandbox; | ||
var adjustConfig = new AdjustConfig(yourAppToken, environment); | ||
}); | ||
``` | ||
|
||
</Tab> | ||
</Tabs> |
31 changes: 31 additions & 0 deletions
31
src/content/docs/code-snippets/ios/ADJConfig/_setAllowAdServicesInfoReading.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Tabs> | ||
<Tab sync="swift"> | ||
|
||
### Swift | ||
|
||
```swift {6} | ||
let yourAppToken = "{YourAppToken}" | ||
let environment = ADJEnvironmentSandbox as? String | ||
let adjustConfig = ADJConfig( | ||
appToken: yourAppToken, | ||
environment: environment) | ||
adjustConfig?.allowAdServicesInfoReading = true; | ||
//... | ||
Adjust.appDidLaunch(adjustConfig) | ||
``` | ||
|
||
</Tab> | ||
<Tab sync="objc"> | ||
|
||
### Objective-C | ||
|
||
```objc {3} | ||
*adjustConfig = [ADJConfig configWithAppToken:@"{YourAppToken}" | ||
environment:ADJEnvironmentSandbox]; | ||
[adjustConfig.setAllowAdServicesInfoReading:YES]; | ||
//... | ||
[Adjust appDidLaunch:adjustConfig]; | ||
``` | ||
</Tab> | ||
</Tabs> |
31 changes: 31 additions & 0 deletions
31
src/content/docs/code-snippets/ios/ADJConfig/_setAllowIdfaReading.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<Tabs> | ||
<Tab sync="swift"> | ||
|
||
### Swift | ||
|
||
```swift {6} | ||
let yourAppToken = "{YourAppToken}" | ||
let environment = ADJEnvironmentSandbox as? String | ||
let adjustConfig = ADJConfig( | ||
appToken: yourAppToken, | ||
environment: environment) | ||
adjustConfig?.allowIdfaReading = true; | ||
//... | ||
Adjust.appDidLaunch(adjustConfig) | ||
``` | ||
|
||
</Tab> | ||
<Tab sync="objc"> | ||
|
||
### Objective-C | ||
|
||
```objc {3} | ||
*adjustConfig = [ADJConfig configWithAppToken:@"{YourAppToken}" | ||
environment:ADJEnvironmentSandbox]; | ||
[adjustConfig.setAllowIdfaReading:YES]; | ||
//... | ||
[Adjust appDidLaunch:adjustConfig]; | ||
``` | ||
</Tab> | ||
</Tabs> |
45 changes: 45 additions & 0 deletions
45
src/content/docs/code-snippets/ios/ADJConfig/_setNeedsCost.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<Tabs> | ||
<Tab sync="swift"> | ||
|
||
### Swift | ||
|
||
```swift {7} | ||
let yourAppToken = "{YourAppToken}" | ||
let environment = ADJEnvironmentSandbox as? String | ||
let adjustConfig = ADJConfig( | ||
appToken: yourAppToken, | ||
environment: environment) | ||
// ... | ||
adjustConfig?.needsCost = true | ||
``` | ||
|
||
</Tab> | ||
<Tab sync="objc"> | ||
|
||
### Objective-C | ||
|
||
```objc {6} | ||
NSString *yourAppToken = @"{YourAppToken}"; | ||
NSString *environment = ADJEnvironmentSandbox; | ||
*adjustConfig = [ADJConfig configWithAppToken:yourAppToken | ||
environment:environment]; | ||
// ... | ||
[adjustConfig setNeedsCost:YES]; | ||
``` | ||
</Tab> | ||
<Tab sync="js"> | ||
### Javascript | ||
```js {5} | ||
setupWebViewJavascriptBridge(function(bridge) { | ||
var yourAppToken = yourAppToken; | ||
var environment = AdjustConfig.EnvironmentSandbox; | ||
var adjustConfig = new AdjustConfig(yourAppToken, environment); | ||
adjustConfig.setNeedsCost(true); | ||
}); | ||
``` | ||
|
||
</Tab> | ||
</Tabs> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
title: ADJConfig class | ||
description: Use the methods in this class to set up the Adjust SDK. | ||
category-title: ADJConfig class | ||
slug: en/sdk/ios/reference/adjconfig | ||
--- | ||
|
||
Use the methods in this class to set up the Adjust SDK. | ||
|
||
|
||
<Callout type="important"> | ||
|
||
The methods in this class must be called **before** you initialize the SDK. | ||
|
||
</Callout> | ||
|
||
<Function | ||
lang="objc" | ||
name="configWithAppToken" | ||
link="https://github.com/adjust/ios_sdk/blob/20c2666082c372f9f2c0adf871d8cef195d011f7/Adjust/ADJConfig.h#L253-L254" | ||
> | ||
|
||
Initialize the configuration object with your Adjust app token. | ||
|
||
<slot slot="snippet"> | ||
|
||
import ConfigWithAppToken from "@ios-fragments/ADJConfig/_configWithAppToken.mdx" | ||
|
||
<ConfigWithAppToken /> | ||
|
||
</slot> | ||
|
||
<slot slot="parameters"> | ||
|
||
`appToken` (NSString) | ||
: Your Adjust app token. | ||
|
||
`environment` (NSString) | ||
: The environment your app is running in. | ||
|
||
`allowSuppressLogLevel` (BOOL) | ||
: Whether to allow all logging to be suppressed. | ||
|
||
</slot> | ||
|
||
<slot slot="returns"> | ||
|
||
`config` (ADJConfig) | ||
: A config object initialized with the provided params. | ||
|
||
</slot> | ||
|
||
</Function> |
Oops, something went wrong.