An open API service indexing awesome lists of open source software.

https://github.com/txthinking/codeinstall


https://github.com/txthinking/codeinstall

Last synced: 2 months ago
JSON representation

Awesome Lists containing this project

README

          

https://www.txthinking.com/codeinstall.html

## Web

1. import codeinstall.js

```

```

2. Example

```





Loading...


async function a(){
try{
var link = await CodeInstall('APPID');
document.querySelector('#download').innerText = "Download";
document.querySelector('#download').addEventListener('click', ()=>{
location.href = link;
});
}catch(e){
alert(`${e}`);
}
}
a();


```

## Android

1. Download SDK: [codeinstallsdk.aar](codeinstallsdk.aar)

Tips:targetSdkVersion <= 29

2. Example

```
import codeinstallsdk.Codeinstallsdk;
import android.os.Build;

...

try{
Codeinstallsdk.init();
String code = Codeinstallsdk.get("APPID", Build.VERSION.RELEASE, Build.MODEL);
// code comes from the web; or empty string if expired or not found; please cache it
} catch (Exception e) {
//
}

```

## iOS

1. Download SDK: [Codeinstallsdk.framework](Codeinstallsdk.framework.zip)

2. Example

```
import Codeinstallsdk
import UIKit

...

CodeinstallsdkInit()
var err: NSError? = nil
var code = CodeinstallsdkGet("APPID", UIDevice.current.systemVersion, "iPhone", &err)
if err != nil {
//
return
}
// code comes from the web; or empty string if expired or not found; please cache it
```