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
//Assuming already existing "@property (nonatomic) Dropbox* dropbox;"(DropBox,Box,,GoogleDrive,OneDrive...) | |
UIImage * image = imageSource; | |
NSData * pngImageData = UIImagePNGRepresentation(image); // loading data from some source. (PNG) | |
NSInputStream * inputStream = [NSInputStream inputStreamWithData:pngImageData]; | |
[self.service uploadFileToPath:@"/mudkip.jpg" withStream:inputStream size:imageData.length overwrite:YES]; |
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
//This is the set up code for iOS | |
//By replacing "CRDropbox" in the lines below you can implement whatever Cloud Storage service you want. | |
//Example: | |
//[CRBox alloc] | |
//[CROneDrive alloc], etc... | |
self.dropbox = [[CRDropbox alloc] initWithClientId:@"dropboxKey" | |
clientSecret:@"dropboxSecret" | |
redirectUri:@"https://www.cloudrailauth.com/auth" //example | |
state:@"CRSTATE"];// anyStateString will do for iOS |
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
###################### | |
# Options | |
###################### | |
REVEAL_ARCHIVE_IN_FINDER=false | |
FRAMEWORK_NAME="${PROJECT_NAME}" | |
SIMULATOR_LIBRARY_PATH="${BUILD_DIR}/${CONFIGURATION}-iphonesimulator/${FRAMEWORK_NAME}.framework" |
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
//let cloudStorage : CloudStorageProtocol = Box.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = GoogleDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = OneDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
let cloudStorage : CloudStorageProtocol = Dropbox.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
do{ | |
let inputStream = try cloudStorage.createFolderWithPath("/My folder path") | |
} catch let error{ | |
print("An error: \(error)") | |
} |
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
#DONT PUSH PRODUCTS | |
Products/ | |
Products/* | |
#Docs - Not uploading docs | |
docs/ | |
docs/* | |
# COCOAPODS |
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/sh | |
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else |
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
// id<CRCloudStorageProtocol> cs = [[CROneDrive alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
// id<CRCloudStorageProtocol> cs= [[CRGoogleDrive alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
// id<CRCloudStorageProtocol> cs = [[CRBox alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]" ]; | |
// id<CRCloudStorageProtocol> cs = [[CRDropbox alloc] initWithClientId:@"[CLIENT]" clientSecret:@"[SECRET]"]; | |
id<CRCloudStorageProtocol> cs = [[CREgnyte alloc] initWithDomain:@"[DOMAIN]" clientId:@"[CLIENT]" clientSecret:@"" redirectUri:@"[SECRET]" state:@"ANY"]; | |
NSString * path = [[NSBundle mainBundle] pathForResource:@"UserData" ofType:@"csv"]; | |
NSDictionary *fileAttributes = [[NSFileManager defaultManager] attributesOfItemAtPath:path error:nil]; | |
long fileSize = [fileAttributes fileSize]; |
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
//let cloudStorage : CloudStorageProtocol = Box.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = GoogleDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = OneDrive.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
//let cloudStorage : CloudStorageProtocol = Dropbox.init(clientId: "ClientID", clientSecret: "ClientSecret") | |
let cloudStorage : CloudStorageProtocol = Egnyte.init(domain: "DOMAIN", clientId: "[CLIENT]", clientSecret: "[SECRET]", redirectUri: "[REDIRECTURI]", state: "ANY") | |
let path = Bundle.main.path(forResource: "UserData", ofType: "csv")! | |
let fileAttributes = try! FileManager.default.attributesOfItem(atPath: path) | |
let fileSize: UInt64 = fileAttributes[FileAttributeKey.size] as! UInt64 |
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
APP_PATH="${TARGET_BUILD_DIR}/${WRAPPER_NAME}" | |
# This script loops through the frameworks embedded in the application and | |
# removes unused architectures. | |
find "$APP_PATH" -name '*.framework' -type d | while read -r FRAMEWORK | |
do | |
FRAMEWORK_EXECUTABLE_NAME=$(defaults read "$FRAMEWORK/Info.plist" CFBundleExecutable) | |
FRAMEWORK_EXECUTABLE_PATH="$FRAMEWORK/$FRAMEWORK_EXECUTABLE_NAME" | |
echo "Executable is $FRAMEWORK_EXECUTABLE_PATH" |
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
// self.service = [[CRMicrosoftAzure alloc] initWithAccountName:@"[account_name]" accessKey:@"[access_key]"]; | |
// self.service = [[CRAmazonS3 alloc] initWithAccessKeyId:@"[clientID]" secretAccessKey:@"[client_Secret]" region:@"[region]"]; | |
// self.service = [[CRRackspace alloc] initWithUsername:@"[username]" apiKey:@"[api_key]" region:@"[region]"]; | |
self.service = [[CRBackblaze alloc] initWithAccountID:@"[account_init]" appKey:@"[app_key]"]; | |
CRBucket * bucket = [[CRBucket alloc] init]; | |
bucket.name = @"[bucket_name]"; | |
bucket.identifier = @"[bucket_id]"; | |
NSData * data = //data source; |
OlderNewer