Skip to content

Instantly share code, notes, and snippets.

View donygeorgek's full-sized avatar

Dony George donygeorgek

  • Bangalore, India
View GitHub Profile
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
@donygeorgek
donygeorgek / universal-framework.sh
Created November 13, 2017 04:31 — forked from atsepkov/universal-framework.sh
This run script will build the iphoneos and iphonesimulator schemes and then combine them into a single framework using the lipo tool (including all the Swift module architectures). This version works with Cocoapods, merging simulator and device architectures for intermediate libraries as well. To use this script, go to Product > Scheme > Edit S…
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal
if [ "true" == ${ALREADYINVOKED:-false} ]
then
echo "RECURSION: Detected, stopping"
else
export ALREADYINVOKED="true"
-(NSNumber*)numberOfPairs:(NSArray*) a joinArg2:(NSNumber*) k {
//No of Pairs
int nop=0;
int sumNumber =[k intValue];
//Checking to see if the sum can be perfectly halved so as to avoid an issues with removing duplicates
if ((sumNumber % 2) == 0){
//No of occurence of half of sum number to be tested
int noSameDivNo=0;
NSMutableArray *testArrayModified=[[NSMutableArray alloc] init];
NSMutableArray *testArray=[[NSMutableArray alloc] initWithArray:a];