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
def openNotesXcodeProject(): | |
print("My App XCODE OPENING") | |
pathToOpen = "/app_directory/app_name/"+ "App.xcworkspace" | |
openFile = "open " + "'" + pathToOpen + "'" | |
os.system(openFile) |
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
def pListModification(): | |
bundleName = "MY APP" | |
bundleIdentifier = "net.myapp" | |
plistNote ="app_directory/app_name/" + "/App/App-Info.plist" | |
plistNoteData = plistlib.readPlist(plistNote) | |
plistNoteData['CFBundleDisplayName'] = "New My App" |
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
import errno | |
import shutil | |
def copy(src, dest): | |
try: | |
shutil.copytree(src, dest) | |
except OSError as e: | |
# If the error was caused because the source wasn't a directory | |
if e.errno == errno.ENOTDIR: | |
shutil.copy(src, dest) |
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
try: | |
removeIcons = "/app_directory/app_name/Images.xcassets/AppIcon.appiconset" | |
shutil.rmtree(removeIcons) | |
print("Icons deleted") | |
except: | |
print("ERROR: Icons not found") |
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
import os | |
import shutil | |
import subprocess | |
import plistlib |
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
def modifyXCodeProjByRuby(bundleIdentifier, path): | |
print("XCode Project Modified by Ruby") | |
rubyModifyCommand = "ruby RUBY_FILE_NAME.rb " + "\"" + bundleIdentifier + "\"" + " " + "\"" + path + "\"" | |
print(rubyModifyCommand) | |
os.system(rubyModifyCommand) |
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
#!/usr/bin/ruby | |
#XCode modification | |
require 'xcodeproj' | |
bundleId = ARGV[0] | |
path = ARGV[1] | |
project_path = path + "/XCodeProject.xcodeproj" | |
puts(project_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
class Properties{ | |
static let sharedInstance = Properties() | |
private let userDefaults:UserDefaults = UserDefaults() | |
var fontSize:Double = 10.0{ | |
didSet{ | |
userDefaults.setValue(fontSize, forKey: "FONT_SIZE") | |
userDefaults.synchronize() | |
print("Font Size Saved") | |
} |
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
#define IS_IPAD (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) | |
#define IS_IPHONE (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
#define IS_RETINA ([[UIScreen mainScreen] scale] >= 2.0) | |
#define SCREEN_WIDTH ([[UIScreen mainScreen] bounds].size.width) | |
#define SCREEN_HEIGHT ([[UIScreen mainScreen] bounds].size.height) | |
#define SCREEN_MAX_LENGTH (MAX(SCREEN_WIDTH, SCREEN_HEIGHT)) | |
#define SCREEN_MIN_LENGTH (MIN(SCREEN_WIDTH, SCREEN_HEIGHT)) |
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
struct Device { | |
// iDevice detection code | |
static let IS_IPAD = UIDevice.current.userInterfaceIdiom == .pad | |
static let IS_IPHONE = UIDevice.current.userInterfaceIdiom == .phone | |
static let IS_RETINA = UIScreen.main.scale >= 2.0 | |
static let SCREEN_WIDTH = Int(UIScreen.main.bounds.size.width) | |
static let SCREEN_HEIGHT = Int(UIScreen.main.bounds.size.height) | |
static let SCREEN_MAX_LENGTH = Int( max(SCREEN_WIDTH, SCREEN_HEIGHT) ) | |
static let SCREEN_MIN_LENGTH = Int( min(SCREEN_WIDTH, SCREEN_HEIGHT) ) |