This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Prerequisites | |
#- APP_NAME.app is in PWD folder | |
#- APP_NAME.app.dSYM is in PWD folder | |
#Thread 4 Crashed:: [...] | |
#0 YOUR_BUNDLE_ID 0x0 0x01 + 1234 | |
LOAD_ADDRESS=0x01 | |
SYMBOL_ADDRESS=0x0 | |
#OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Helper to stringify OTHER_LDFLAGS content | |
def stringFromhash(hash) | |
items = hash.reduce([]) do |sum,(key,val)| | |
if key == :simple | |
sum += val.to_a.map{ |i| "#{i}"} | |
elsif key == :frameworks | |
sum += val.to_a.map{ |i| "-framework \"#{i}\""} | |
elsif key == :weak_frameworks | |
sum += val.to_a.map{ |i| "-weak_framework \"#{i}\""} | |
elsif key == :libraries |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
post_install do |installer| | |
installer.aggregate_targets.each do |aggregate_target| | |
if aggregate_target.name == "YOUR_TARGET" | |
aggregate_target.xcconfigs.each do |config_name, config_file| | |
#Example to get and set attributes | |
frameworkSearchPaths = config_file.attributes["FRAMEWORK_SEARCH_PATHS"] | |
config_file.attributes["FRAMEWORK_SEARCH_PATHS[sdk=iphoneos*]"] = frameworkSearchPaths | |
#Example to delete attributes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Works only for single-row type license parameters in pod spec | |
for i in {list of pod names space separated}; do pod spec cat $i ;done | grep license |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Dictionary where Key == String { | |
//Generic method to convert the dictionary [String:Any] dict to a specific [enum String:Any] dict | |
func enumDict<R:RawRepresentable>(as type:R.Type) -> [R:Any] where R.RawValue == String { | |
var dict:[R:Any] = [:] | |
self.forEach{ | |
guard let k = R.init(rawValue: $0.key) else {return} | |
dict[k] = $0.value | |
} | |
return dict | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func debuggerAttached() -> Bool { | |
var process_info:kinfo_proc = kinfo_proc() | |
var process_info_len:size_t = MemoryLayout<kinfo_proc>.size | |
var process_info_mib:[Int32] = [ | |
CTL_KERN, | |
KERN_PROC, | |
KERN_PROC_PID, | |
getpid() | |
]; | |