Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Editorial suggestions" #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
46 changes: 22 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,33 @@

# Twitch Unity Deep Link Sample
# Twitch Unity Deeplink Sample

## What does this do?
## What does this do

This example shows you how to check if Twitch is installed on both Android and iOS in Unity.
Additionally, this showcases how to launch a broadcast for a particular game ID using the Twitch mobile app's deep link functionality.
This example shows you how to check if twitch is installed on both Android and IOS in Unity.
Additionaly, this showcases how to launch a broadcast for a particular game id using the Twitch mobile app's deeplink functionality

## How to use it
## How to use

Depending on which mobile platform and OS version you are targeting, you may need to make additional changes.
See additional details below for a given platform.
Depending on which mobile platform and OS version you are targeting you may need to make additional changes.
See below for additional details for a given platform.

### UI interface

The "Open Twitch" button will launch the Twitch mobile app. Buttons will disable if Twitch is not installed.
The open twitch button will simply launch the twitch app. (Buttons will disable if Twitch is not installed)

The input field (i.e. text box) is used to enter your game ID. A game ID can be retrieved via the [Get Games](https://dev.twitch.tv/docs/api/reference#get-games) API endpoint.
Once the game ID has been entered, tap the "Broadcast" button to start Twitch streaming via the deep link functionality.
The input text box is used to enter your game id. Getting the game id can be done via this api: https://dev.twitch.tv/docs/api/reference#get-games
Once the game id has been entered push the "Broadcast" button to start twitch streaming via the deeplink functionality.

### Android

On Unity 2021 and above, no changes will be needed.
On Unity 2021 and above no changes will be needed.

When using Unity 2020, the following manifest change is required:
When using Unity 2020 it will require the following manifest change:

<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
`<meta-data android:name="unityplayer.UnityActivity" android:value="true" />`

When using Unity 2019 or earlier, the following manifest changes are required. Note this was not tested but should work:
When using Unity 2019 or earlier the following manifest changes will be required.
(Note this was not tested but should work):

<activity android:name="com.unity3d.player.UnityPlayerNativeActivity"
android:label="@string/app_name">
Expand All @@ -44,25 +45,22 @@ When using Unity 2019 or earlier, the following manifest changes are required. N

### IOS

You must add "twitch" in `LSApplicationQueriesSchemes` to your app's Info.plist file.
You must add twitch in LSApplicationQueriesSchemes to your app's Info.plist

There are two ways to do so:
1. Manually via editing the plist, this will require you to export to xcode

#### 1. Manually editing the plist

This will require you to export to Xcode. plist example:
plist example:

<key>LSApplicationQueriesSchemes</key>
<array>
<string>twitch</string>
</array>

More documentation can be found [here](https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl?language=objc).

#### 2. Programmatically editing the plist
More documentation can be found here: https://developer.apple.com/documentation/uikit/uiapplication/1622952-canopenurl?language=objc

An example can be found [here](https://github.com/Nrjwolf/unity-ios-can-open-url#example).
2. Alternatively you can do this programatically. Find an example here: https://github.com/Nrjwolf/unity-ios-can-open-url#example

## Acknowledgments and appendix
## Acknowledgments and Appendix

Specials thanks to @Nrjwolf for creating [UNITY-IOS-CAN-OPEN](https://github.com/Nrjwolf/unity-ios-can-open-url).
Specials thanks to Nrjwolf for creating UNITY-IOS-CAN-OPEN: https://github.com/Nrjwolf/unity-ios-can-open-url