<script src="https://cdn.quiltt.io/v1/connector.js"></script>
<button quiltt-button="YOUR_CONNECTOR_ID">Connect Now</button>
import { QuilttButton } from '@quiltt/react';
export const App = () => {
return (
<QuilttButton connectorId="YOUR_CONNECTOR_ID">
Connect Now
</QuilttButton>
);
};
export default App;
import { QuilttConnector } from '@quiltt/react-native';
export const ConnectorScreen = ({ navigation }) => {
return (
<QuilttConnector
connectorId="YOUR_CONNECTOR_ID"
oauthRedirectUrl="YOUR_APP_DEEP_LINK"
onExitSuccess={(metadata) => {
console.log('Connected:', metadata.connectionId);
navigation.navigate('Home');
}}
/>
);
};
import 'package:quiltt_connector/quiltt_connector.dart';
import 'package:quiltt_connector/configuration.dart';
void connectWithQuiltt(BuildContext context) {
final config = QuilttConnectorConfiguration(
connectorId: "YOUR_CONNECTOR_ID",
oauthRedirectUrl: "YOUR_APP_DEEP_LINK"
);
QuilttConnector().connect(
context,
config,
onExitSuccess: (event) {
print("Connected: ${event.eventMetadata.connectionId}");
},
);
}
import androidx.compose.runtime.Composable
import androidx.compose.ui.viewinterop.AndroidView
import app.quiltt.connector.QuilttConnector
import app.quiltt.connector.QuilttConnectorConnectConfiguration
@Composable
fun QuilttConnectorView() {
val config = QuilttConnectorConnectConfiguration(
connectorId = "YOUR_CONNECTOR_ID",
oauthRedirectUrl = "YOUR_APP_DEEP_LINK"
)
val quilttConnector = QuilttConnector(LocalContext.current)
AndroidView(factory = {
quilttConnector.connect(
config = config,
onExitSuccess = { metadata ->
println("Connected: ${metadata.connectionId}")
}
)
})
}
import SwiftUI
import QuilttConnector
struct ConnectorView: View {
var body: some View {
QuilttWebView()
}
}
struct QuilttWebView: UIViewRepresentable {
func makeUIView(context: Context) -> WKWebView {
let config = QuilttConnectorConnectConfiguration(
connectorId: "YOUR_CONNECTOR_ID",
oauthRedirectUrl: "YOUR_APP_UNIVERSAL_LINK"
)
let quilttConnector = QuilttConnector()
return quilttConnector.connect(
config: config,
onExitSuccess: { metadata in
print("Connected: \(metadata.connectionId ?? "")")
}
)
}
func updateUIView(_ uiView: WKWebView, context: Context) {}
}