Skip to content

Instantly share code, notes, and snippets.

View tareq3's full-sized avatar
🎯
Focusing

Tareq Islam tareq3

🎯
Focusing
View GitHub Profile

1. Add Components and sources using cocoapods to your podfile.

//Weavr Component and KYC
pod 'WeavrComponents' ,'1.1.0'
pod 'IdensicMobileSDK' , '1.19.5'
source 'https://cdn.cocoapods.org/'

A project using typescript generate release build app



  1. Release key need to be added 
and do some regular steps as per react -native guidelines 
https://reactnative.dev/docs/signed-apk-android


  2. Instead of creating aab we will create apk

  3. Create assets directory inside Android like below


/Users/tareq/code/threls/react-native/sdk/weavr-react-native/example/android/app/src/main/assets




4.Bundle assets using the following command


## How we can publish a xcframework to cocoapod with a single command
### Step 1: We have to make sure we can publish the framework to cocoapod manually
### Step 2: Then start a terminal from remote repo directory which holds the framework and podspec file
![](https://cdn.cacher.io/attachments/u/397rshf2ej0sc/PcttLaFsPA9IdKoR9GKa9KBHGZlq0ly0/33bmox46o.png)
### Step 3 : Run `fastlane init` command to initialize fastlane in this directory and press "4" when to select manual deploy
This should generate fastlane directory and Gem files and Gemfile.lock

Deploy xcframwork to cocoapod

Step 1: make sure cocoapod is installed

Step 2: prepare your xcframework

Step 3: create a remote public github repo and clone that to your any folder location.

example: https://github.com/tareq3/RandomCarsFramework

Step 4 : Copy xcFramework to the github_repo

Step 5: Add framweworkName.podspec in that github_repo

Create a xcframework

First create a new project selecting type framework

Step 1:

turn on Build libraries for distribution

All about podfile for iOS

What is use_frameworks!

How to add any dependency in podfile

pod 'Alamofire', '~> 5.6'

OR

Using Alamofire make a quick post call without dto

target payload

   private func loginUser(email:String, pass : String){
        let headers = ["Accept": "application/json",
                       "Content-Type": "application/json"
        ]
```
main() {
List<Test> first = [Test(1,"temp"), Test(2,"temp")];
first.where((e)=> e.no==2).map((e){
e.no= 5;
}).toList();
first.forEach((e)=>
print(e.toJson())

How to create Docker custom Container

1.Create a Dockerfile in your project

one exmpaple:

FROM node:12.16.1

WORKDIR /usr/src/app

Create a folder with a meaningful name as this will be your container name

create a file named as docker-composer.yaml

paste following file

version: '3'  //version is important and defined by docker not custom