Skip to content

Instantly share code, notes, and snippets.

View manishpathak99's full-sized avatar
💭
Worked with iOS/Android/AWS. Technology Geek ##@@##

Manish Pathak manishpathak99

💭
Worked with iOS/Android/AWS. Technology Geek ##@@##
View GitHub Profile
@manishpathak99
manishpathak99 / uikit-equivalent-swiftui.csv
Created March 12, 2023 18:06
UIKit equivalent to SwiftUI
UIKit SwiftUI
UILabel Text & Label
UIImageView Image
UITextField TextField
UITextView TextEditor
UISwitch Toggle
UISlider Slider
UIButton Button
UITableView List
UICollectionView LazyVGrid / LazyHGrid
@manishpathak99
manishpathak99 / gist:5b6878931282a86ff111bf204c74c126
Created August 31, 2018 09:00
How to find the Xcode version from archive .
Instructions:
1. Change extension of your file from *.ipa to* .zip.
2. Unzip it.
3. Open extracted folder, right click on Application file and then choose "Show Package Contents".
4. Find Info.plist file and open it.
5. Find value for key "DTXcodeBuild".
@manishpathak99
manishpathak99 / New Mac Setup from old one
Last active February 23, 2023 18:24
Setup MacbookPro
Install alfred 4
Install Cinch
Open finder -> show PathBar and show Status bar
show hidden Mac OS X files: run
Install Rosetta2
softwareupdate --install-rosetta
Install Homebrew :
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
@manishpathak99
manishpathak99 / drop-stash.sh
Created May 30, 2018 11:31
Remove/Drop git stash range
# This will remove stash stash@{10}, stash@{11} , stash@{12}
for n in {1..2}
do
git stash drop stash@{10}
done
@manishpathak99
manishpathak99 / Xcode iOS Commands
Last active December 1, 2021 02:42
Xcode iOS Commands
***************** Show build duration time during running the project in xcode ******************
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
*****Create ipa from xarchive******** -> To convert .xcarchive to .ipa | xcode 9
xcodebuild
-exportArchive
@manishpathak99
manishpathak99 / xcode-downloader.rb
Created October 30, 2017 09:10 — forked from iandundas/xcode-downloader.rb
Script for reliably downloading binaries (e.g. Xcode) from Apple's CDN
#!/usr/bin/env ruby
print "What is the URL of your Apple Downloads resource?\nURL:"
url = gets.strip
print "What is the ADCDownloadAuth cookie token:\nADCDownloadAuth: "
token = gets.strip
command = "aria2c --header \"Host: adcdownload.apple.com\" --header \"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\" --header \"Upgrade-Insecure-Requests: 1\" --header \"Cookie: ADCDownloadAuth=#{token}\" --header \"User-Agent: Mozilla/5.0 (iPhone; CPU iPhone OS 10_1 like Mac OS X) AppleWebKit/602.2.14 (KHTML, like Gecko) Version/10.0 Mobile/14B72 Safari/602.1\" --header \"Accept-Language: en-us\" -x 16 -s 16 #{url} -d ~/Downloads"
@manishpathak99
manishpathak99 / AlamofirePrintable.swift
Last active June 6, 2017 13:59
Print JSON response on console using ALAMOFIRE swift 3.0+
import Foundation
import Alamofire
extension Alamofire.DataRequest {
func responseDebugPrint() -> Self {
return responseJSON() {
response in
if let JSON = response.result.value,
let JSONData = try? JSONSerialization.data(withJSONObject: JSON, options: .prettyPrinted),
let prettyString = NSString(data: JSONData, encoding: String.Encoding.utf8.rawValue) {
@manishpathak99
manishpathak99 / README.md
Created December 27, 2016 12:24 — forked from Coeur/README.md
Write to NTFS on OSX Yosemite and El Capitan
# Optimize logging away from release builds
-assumenosideeffects class android.util.Log {
public static *** d(...);
public static *** v(...);
public static *** i(...);
public static *** e(...);
public static *** w(...);
public static *** wtf(...);
public static *** isLoggable(...);
@manishpathak99
manishpathak99 / Reduce_apk_size.txt
Last active June 15, 2016 11:17
Steps to reduce the apk size.
1- reduce the other's language strings in string.xml
add below in build.gradle-
defaultConfig {
resConfigs "en"
}
2- unzip the final apk, go to res directory, run the below commamd to know the size of resfiles in descending order.
find . -type f -exec ls -al {} \; | sort -nr -k5 | head -n 25