Skip to content

Commit

Permalink
fix: format
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanWalker committed Nov 28, 2023
1 parent 2a16cfc commit b43ccab
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
24 changes: 12 additions & 12 deletions content/best-practices/ios-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@ For example:
```ts
let applePayController: PKPaymentAuthorizationViewController

applePayController = PKPaymentAuthorizationViewController.alloc().initWithPaymentRequest(
paymentRequest
)
applePayController.delegate = PKPaymentAuthorizationViewControllerDelegateImpl.initWithOwner(
this
)
applePayController =
PKPaymentAuthorizationViewController.alloc().initWithPaymentRequest(
paymentRequest
)
applePayController.delegate =
PKPaymentAuthorizationViewControllerDelegateImpl.initWithOwner(this)
```

- **GOOD**
Expand All @@ -30,11 +30,11 @@ applePayController.delegate = PKPaymentAuthorizationViewControllerDelegateImpl.i
let applePayController: PKPaymentAuthorizationViewController
let applePayControllerDelegate: PKPaymentAuthorizationViewControllerDelegateImpl

applePayController = PKPaymentAuthorizationViewController.alloc().initWithPaymentRequest(
paymentRequest
)
applePayControllerDelegate = PKPaymentAuthorizationViewControllerDelegateImpl.initWithOwner(
this
)
applePayController =
PKPaymentAuthorizationViewController.alloc().initWithPaymentRequest(
paymentRequest
)
applePayControllerDelegate =
PKPaymentAuthorizationViewControllerDelegateImpl.initWithOwner(this)
applePayController.delegate = applePayControllerDelegate
```
4 changes: 2 additions & 2 deletions content/best-practices/platform-file-split-or-not.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ Using "platform conditionals":

```ts
if (isIOS) {
// handle ios
// handle ios
} else if (isAndroid) {
// handle android
// handle android
}
```

Expand Down
8 changes: 4 additions & 4 deletions content/core/tracing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The following steps outline the basic usage of the Trace class. Steps 1 and 2 sh
// Or, add multiple categories.
Trace.addCategories('categ1, categ2')
// Or, combine the default Trace categories with your own additional categories.
Trace.setCategories(Trace.categories.concat("category1","category2"))
Trace.setCategories(Trace.categories.concat('category1', 'category2'))
```

When writing a trace message, if you don't set a category, or if the category you pass to `Trace.write()` has not been previously added using the above commands, the message will not be written.
Expand All @@ -37,14 +37,14 @@ The following steps outline the basic usage of the Trace class. Steps 1 and 2 sh
// Add a trace message
Trace.write('This is a simple message', 'category')
// Add a trace message with a given message type
Trace.write('This is an error message', 'category2'. Trace.messageType.error)
Trace.write('This is an error message', 'category2'.Trace.messageType.error)
```

4. When your app is in production, you can now simply disable tracing and all `Trace.write()` calls will be ignored.

```ts
if (!__DEV__) {
Trace.disable()
Trace.disable()
}
```

Expand Down Expand Up @@ -74,7 +74,7 @@ const TimestampTraceWriter: TraceWriter = {
console.log(`${timestamp} [${category}] ${message}`)
return
}
}
},
}
```

Expand Down
3 changes: 0 additions & 3 deletions content/guide/accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,3 @@ The following are the platforms tools for debugging accessibility in your app:

- iOS: [Accessibility Inspect](https://developer.apple.com/library/archive/documentation/Accessibility/Conceptual/AccessibilityMacOSX/OSXAXTestingApps.html)
- Android: [Test your app's accessibility](https://developer.android.com/guide/topics/ui/accessibility/testing)



0 comments on commit b43ccab

Please sign in to comment.