Skip to content

Instantly share code, notes, and snippets.

View Rickyip's full-sized avatar

Rick Yip Rickyip

  • Hong Kong
View GitHub Profile
@Rickyip
Rickyip / CameraXFragment.kt
Last active July 4, 2022 06:32
CameraX on Android Fragment in Kotlin
import android.Manifest
import android.annotation.SuppressLint
import android.content.Context
import android.content.pm.PackageManager
import android.graphics.drawable.GradientDrawable
import android.net.Uri
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
@Rickyip
Rickyip / build-xcframework.sh
Created July 8, 2020 09:27 — forked from quangDecember/build-xcframework.sh
Build XCFramework (universal) framework, create new Aggregate target, add to New Run Script Phase
env > env.txt
instruments -s devices > devices.txt
#! /bin/sh -e
# This script demonstrates archive and create action on frameworks and libraries
# Based on script by @author Boris Bielik
# Release dir path
OUTPUT_DIR_PATH="${PROJECT_DIR}/XCFramework"
function archivePathSimulator {
#!/bin/sh
if [ -z "$XCODE_VERSION_CORRECT" ]
then
export SUDO_ASKPASS="${PROJECT_DIR}/../scripts/askpass.sh"
fi
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
# make sure the output directory exists