https://medium.com/bam-tech/embed-cordova-in-your-native-ios-or-android-app-6c7f5cf86e3c https://github.com/aal80/HybridScreensDemoProject https://github.com/imhotep/InstaSnap http://docs.phonegap.com/develop/1-embed-webview/ios/
This file contains 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.project.targets.each do |target| | |
target.build_configurations.each do |config| | |
if config.name == 'BREnterprise' | |
config.build_settings['CODE_SIGN_IDENTITY[sdk=iphoneos*]'] = 'iPhone Distribution: The Carter Group LLC' | |
config.build_settings['PROVISIONING_PROFILE'] = '${BR_ENTERPRISE_PROVISIONING_PROFILE}' | |
end | |
end | |
end |
This file contains 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
Apache License | |
Version 2.0, January 2004 | |
http://www.apache.org/licenses/ | |
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | |
1. Definitions. | |
"License" shall mean the terms and conditions for use, reproduction, |
This file contains 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 sentiment = Sentimently() | |
print(sentiment.score("Cats are stupid.")) | |
analysisResult(score: -2, comparative: -0.66666666666666663, positive: [], negative: ["stupid"], wordTokens: [wordToken(word: "cats", wordStem: Optional("cat")), wordToken(word: "are", wordStem: Optional("be")), wordToken(word: "stupid", wordStem: Optional("stupid"))]) | |
print(sentiment.score("Cats are very stupid.")) | |
analysisResult(score: -3, comparative: -0.75, positive: [], negative: ["stupid"], wordTokens: [wordToken(word: "cats", wordStem: Optional("cat")), wordToken(word: "are", wordStem: Optional("be")), wordToken(word: "very", wordStem: Optional("very")), wordToken(word: "stupid", wordStem: Optional("stupid"))]) | |
print(sentiment.score("Cats are totally amazing!")) | |
analysisResult(score: 4, comparative: 1.0, positive: ["amazing"], negative: [], wordTokens: [wordToken(word: "cats", wordStem: Optional("cat")), wordToken(word: "are", wordStem: Optional("be")), wordToken(word: "totally", wordStem: Optional("totally")), wordToken(word: " |
This file contains 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
public struct wordToken { | |
let word: String | |
let wordStem: String? | |
init(word: String, wordStem: String?) { | |
self.word = word | |
self.wordStem = wordStem | |
} | |
} | |
func lemmatize(_ text: String) -> [wordToken] { |
This file contains 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 setBuildNumberOnExtension(build_number) | |
raise if build_number.nil? | |
puts "Setting Extension to build number #{build_number}" | |
sh("/usr/libexec/PlistBuddy -c 'Set CFBundleVersion #{build_number}' ../myWatchApp/Info.plist") | |
sh("/usr/libexec/PlistBuddy -c 'Set CFBundleVersion #{build_number}' ../myWatchAppExtension/Info.plist") | |
end |
This file contains 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
desc "Create ipa" | |
lane :build do | |
increment_build_number | |
setBuildNumberOnExtension( | |
get_build_number | |
) | |
gym(scheme: "TestApp", workspace: "TestApp.xcworkspace", output_directory: "../../../Builds/TestApp", clean:true, silent: true, export_method: "enterprise") | |
end |
This file contains 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 UIKit | |
import ImageIO | |
import MobileCoreServices | |
import PlaygroundSupport | |
PlaygroundPage.current.needsIndefiniteExecution = true | |
func report_memory() -> UInt64 { | |
var taskInfo = mach_task_basic_info() | |
var count = mach_msg_type_number_t(MemoryLayout<mach_task_basic_info>.size)/4 |
This file contains 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 Test_JPEGRepresentation_AutoRelease(iterations: Int, compressionRatio: CGFloat,image: UIImage) { | |
//Gather the initial information | |
let startReading = report_memory() | |
print("Memory at start: \(startReading / 1024 / 1024) mb") | |
//Loop through the number of test iterations specified | |
for index in 1...iterations { | |
if let data = UIImageToDataJPEG2(image: image, compressionRatio: compressionRatio) { | |
//Sample the length of the first result to make sure we are comparing the same size | |
if index == 1 { |
This file contains 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 UIImageToDataIO(image: UIImage, compressionRatio: CGFloat, orientation: Int = 1) -> Data? { | |
return autoreleasepool(invoking: { () -> Data in | |
let data = NSMutableData() | |
let options: NSDictionary = [ | |
kCGImagePropertyOrientation: orientation, | |
kCGImagePropertyHasAlpha: true, | |
kCGImageDestinationLossyCompressionQuality: compressionRatio | |
] | |
let imageDestinationRef = CGImageDestinationCreateWithData(data as CFMutableData, kUTTypeJPEG, 1, nil)! |