PageRenderTime 561ms queryTime 59ms sortTime 41ms getByIdsTime 54ms findMatchingLines 102ms

100+ results results for 'NSString lang:ObjectiveC' (561 ms)

Not the results you expected?
FMGVideoPlayView.m https://gitlab.com/Mr.Tomato/avplayer | Objective C | 485 lines
                    
112#pragma mark - 观察者对应的方法
                    
113- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
                    
114{
                    
144#pragma mark - 设置播放的视频
                    
145- (void)setUrlString:(NSString *)urlString
                    
146{
                    
309
                    
310- (NSString *)timeString
                    
311{
                    
397    
                    
398    NSString *durationString = [NSString stringWithFormat:@"%02ld:%02ld", dMin, dSec];
                    
399    NSString *currentString = [NSString stringWithFormat:@"%02ld:%02ld", cMin, cSec];
                    
436        
                    
437        NSString* emotionName = [NSString stringWithFormat:@"smile_%zd", arc4random_uniform(90)];
                    
438        UIImage* emotion = [UIImage imageNamed:emotionName];
                    
                
FBSDKAppEventsUtility.m https://gitlab.com/maheshm255/B4U | Objective C | 313 lines
                    
154
                    
155+ (void)ensureOnMainThread:(NSString *)methodName className:(NSString *)className
                    
156{
                    
249{
                    
250  [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)];
                    
251  NSDictionary *data = @{ FBSDK_APPEVENTSUTILITY_ANONYMOUSID_KEY : anonymousID };
                    
259
                    
260+ (NSString *)persistenceFilePath:(NSString *)filename
                    
261{
                    
269{
                    
270  [[self class] ensureOnMainThread:NSStringFromSelector(_cmd) className:NSStringFromClass(self)];
                    
271  NSString *file = [[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME];
                    
271  NSString *file = [[self class] persistenceFilePath:FBSDK_APPEVENTSUTILITY_ANONYMOUSIDFILENAME];
                    
272  NSString *content = [[NSString alloc] initWithContentsOfFile:file
                    
273                                                      encoding:NSASCIIStringEncoding
                    
                
BFTask.m https://gitlab.com/maheshm255/B4U | Objective C | 472 lines
                    
21
                    
22NSString *const BFTaskErrorDomain = @"bolts";
                    
23NSInteger const kBFMultipleErrorsError = 80175001;
                    
23NSInteger const kBFMultipleErrorsError = 80175001;
                    
24NSString *const BFTaskMultipleExceptionsException = @"BFMultipleExceptionsException";
                    
25
                    
446
                    
447- (NSString *)description {
                    
448    // Acquire the data from the locked properties
                    
451    BOOL faulted;
                    
452    NSString *resultDescription = nil;
                    
453
                    
457        faulted = self.faulted;
                    
458        resultDescription = completed ? [NSString stringWithFormat:@" result = %@", self.result] : @"";
                    
459    }
                    
                
CastViewController.m https://gitlab.com/adam.lukaitis/io2015-codelabs | Objective C | 648 lines
                    
26
                    
27static NSString * const kListTracks = @"listTracks";
                    
28static NSString * const kListTracksPopover = @"listTracksPopover";
                    
28static NSString * const kListTracksPopover = @"listTracksPopover";
                    
29NSString * const kCastComponentPosterURL = @"castComponentPosterURL";
                    
30
                    
95
                    
96  self.castingToLabel.text = [NSString stringWithFormat:NSLocalizedString(@"Casting to %@", nil),
                    
97      _castDeviceController.deviceManager.device.friendlyName];
                    
99
                    
100  self.volumeControlLabel.text = [NSString stringWithFormat:NSLocalizedString(@"%@ Volume", nil),
                    
101                                    _castDeviceController.deviceManager.device.friendlyName];
                    
322// Little formatting option here
                    
323- (NSString*)getFormattedTime:(NSTimeInterval)timeInSeconds {
                    
324  int seconds = round(timeInSeconds);
                    
                
CDVSound.m https://gitlab.com/dannywillems/cordova-plugin-media | Objective C | 891 lines
                    
102            // see if this exists in the documents/temp directory from a previous recording
                    
103            NSString* testPath = [NSString stringWithFormat:@"%@/%@", [NSTemporaryDirectory()stringByStandardizingPath], resourcePath];
                    
104            if ([[NSFileManager defaultManager] fileExistsAtPath:testPath]) {
                    
132// Creates or gets the cached audio file resource object
                    
133- (CDVAudioFile*)audioFileForResource:(NSString*)resourcePath withId:(NSString*)mediaId doValidation:(BOOL)bValidate forRecording:(BOOL)bRecord
                    
134{
                    
175    if (bError) {
                    
176        jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%@);", @"cordova.require('cordova-plugin-media.Media').onStatus", mediaId, MEDIA_ERROR, [self createMediaErrorWithCode:errcode message:errMsg]];
                    
177        [self.commandDelegate evalJs:jsString];
                    
202// helper function to create a error object string
                    
203- (NSString*)createMediaErrorWithCode:(CDVMediaError)code message:(NSString*)message
                    
204{
                    
222        NSString* errorMessage = [NSString stringWithFormat:@"Failed to initialize Media file with path %@", resourcePath];
                    
223        NSString* jsString = [NSString stringWithFormat:@"%@(\"%@\",%d,%@);", @"cordova.require('cordova-plugin-media.Media').onStatus", mediaId, MEDIA_ERROR, [self createMediaErrorWithCode:MEDIA_ERR_ABORTED message:errorMessage]];
                    
224        [self.commandDelegate evalJs:jsString];
                    
                
MBProgressHUD.m https://gitlab.com/dannywillems/cordova-activityindicator | Objective C | 1017 lines
                    
34	#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
                    
35		boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \
                    
36		attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero;
                    
55- (void)unregisterFromNotifications;
                    
56- (void)updateUIForKeypath:(NSString *)keyPath;
                    
57- (void)hideUsingAnimation:(BOOL)animated;
                    
359
                    
360- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context {
                    
361	[self done];
                    
                
DDXMLNode.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1976 lines
                    
99
                    
100+ (id)elementWithName:(NSString *)name URI:(NSString *)URI
                    
101{
                    
104
                    
105+ (id)attributeWithName:(NSString *)name stringValue:(NSString *)stringValue
                    
106{
                    
113
                    
114+ (id)attributeWithName:(NSString *)name URI:(NSString *)URI stringValue:(NSString *)stringValue
                    
115{
                    
137
                    
138+ (id)processingInstructionWithName:(NSString *)name stringValue:(NSString *)stringValue
                    
139{
                    
485		
                    
486		NSString *result = [NSString stringWithUTF8String:(const char *)content];
                    
487		
                    
                
DDXMLElement.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 801 lines
                    
71
                    
72- (id)initWithName:(NSString *)name URI:(NSString *)URI
                    
73{
                    
87
                    
88- (id)initWithName:(NSString *)name stringValue:(NSString *)string
                    
89{
                    
221		{
                    
222			NSString *uri = [NSString stringWithUTF8String:((const char *)ns->href)];
                    
223			return [self _elementsForName:name localName:localName prefix:prefix uri:uri];
                    
229
                    
230- (NSArray *)elementsForLocalName:(NSString *)localName URI:(NSString *)uri
                    
231{
                    
243	{
                    
244		NSString *name = [NSString stringWithFormat:@"%@:%@", prefix, localName];
                    
245		
                    
                
DDTTYLogger.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1480 lines
                    
102	NSUInteger fgCodeIndex;
                    
103	NSString *fgCodeRaw;
                    
104	
                    
105	NSUInteger bgCodeIndex;
                    
106	NSString *bgCodeRaw;
                    
107	
                    
                
DDFileLogger.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1380 lines
                    
221	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
                    
222	NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory();
                    
223	NSString *logsDirectory = [[basePath stringByAppendingPathComponent:@"Logs"] stringByAppendingPathComponent:appName];
                    
280{
                    
281	NSString *logsDirectory = [self logsDirectory];
                    
282	NSArray *fileNames = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:logsDirectory error:nil];
                    
400	CFStringRef fullStr = CFUUIDCreateString(NULL, uuid);
                    
401	NSString *result = (__bridge_transfer NSString *)CFStringCreateWithSubstring(NULL, fullStr, CFRangeMake(0, 6));
                    
402	
                    
418	{
                    
419		NSString *fileName = [NSString stringWithFormat:@"log-%@.txt", [self generateShortUUID]];
                    
420		
                    
472	
                    
473	return [NSString stringWithFormat:@"%@  %@", dateAndTime, logMessage->logMsg];
                    
474}
                    
                
GCDAsyncSocket.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1831 lines
                    
127
                    
128NSString *const GCDAsyncSocketException = @"GCDAsyncSocketException";
                    
129NSString *const GCDAsyncSocketErrorDomain = @"GCDAsyncSocketErrorDomain";
                    
130
                    
131NSString *const GCDAsyncSocketQueueName = @"GCDAsyncSocket";
                    
132NSString *const GCDAsyncSocketThreadName = @"GCDAsyncSocket-CFStream";
                    
134#if SECURE_TRANSPORT_MAYBE_AVAILABLE
                    
135NSString *const GCDAsyncSocketSSLCipherSuites = @"GCDAsyncSocketSSLCipherSuites";
                    
136#if TARGET_OS_IPHONE
                    
136#if TARGET_OS_IPHONE
                    
137NSString *const GCDAsyncSocketSSLProtocolVersionMin = @"GCDAsyncSocketSSLProtocolVersionMin";
                    
138NSString *const GCDAsyncSocketSSLProtocolVersionMax = @"GCDAsyncSocketSSLProtocolVersionMax";
                    
139#else
                    
140NSString *const GCDAsyncSocketSSLDiffieHellmanParameters = @"GCDAsyncSocketSSLDiffieHellmanParameters";
                    
141#endif
                    
                
XMPPSRVResolver.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 706 lines
                    
43
                    
44NSString *const XMPPSRVResolverErrorDomain = @"XMPPSRVResolverErrorDomain";
                    
45
                    
123
                    
124- (NSString *)srvName
                    
125{
                    
125{
                    
126	__block NSString *result = nil;
                    
127	
                    
306		{
                    
307			XMPPLogWarn(@"%@: delegate doesn't implement %@", THIS_FILE, NSStringFromSelector(selector));
                    
308		}
                    
334			{
                    
335				XMPPLogWarn(@"%@: delegate doesn't implement %@", THIS_FILE, NSStringFromSelector(selector));
                    
336			}
                    
                
XMPPStream.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1956 lines
                    
71
                    
72NSString *const XMPPStreamErrorDomain = @"XMPPStreamErrorDomain";
                    
73NSString *const XMPPStreamDidChangeMyJIDNotification = @"XMPPStreamDidChangeMyJID";
                    
125	
                    
126	NSString *hostName;
                    
127	UInt16 hostPort;
                    
165- (void)continueStartTLS:(NSMutableDictionary *)settings;
                    
166- (void)continueHandleBinding:(NSString *)alternativeResource;
                    
167- (void)setupKeepAliveTimer;
                    
333
                    
334- (NSString *)hostName
                    
335{
                    
559		
                    
560		NSString *keepAliveString = [[NSString alloc] initWithData:keepAliveData encoding:NSUTF8StringEncoding];
                    
561		if ([keepAliveString length] > 0)
                    
                
XMPPParser.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 875 lines
                    
166		
                    
167		NSString *elementName = [[NSString alloc] initWithFormat:@"%@:%@", prefix, name];
                    
168		[element setName:elementName];
                    
172	{
                    
173		NSString *elementName = [[NSString alloc] initWithUTF8String:(const char *)node->name];
                    
174		[element setName:elementName];
                    
230			{
                    
231				NSString *value = [[NSString alloc] initWithUTF8String:(const char *)childNode->content];
                    
232				[element setStringValue:value];
                    
267				NSString *prefix = [[NSString alloc] initWithUTF8String:(const char *)attrNode->ns->prefix];
                    
268				NSString *name   = [[NSString alloc] initWithUTF8String:(const char *)attrNode->name];
                    
269				
                    
269				
                    
270				NSString *attrName = [[NSString alloc] initWithFormat:@"%@:%@", prefix, name];
                    
271				[attr setName:attrName];
                    
                
LocalTime.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1018 lines
                    
24}
                    
25- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix
                    
26{
                    
98				} else {
                    
99					NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding];
                    
100					
                    
221				} else {
                    
222					NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding];
                    
223					
                    
232						
                    
233						NSString *standardPrefix = [[USGlobals sharedInstance].wsdlStandardNamespaces objectForKey:[NSString stringWithCString:(char*)elementNamespace->href encoding:NSUTF8StringEncoding]];
                    
234						
                    
331}
                    
332- (void)sendHTTPCallUsingBody:(NSString *)outputBody soapAction:(NSString *)soapAction forOperation:(LocalTimeSoapBindingOperation *)operation
                    
333{
                    
                
MBProgressHUD.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 659 lines
                    
14- (void)done;
                    
15- (void)updateLabelText:(NSString *)newText;
                    
16- (void)updateDetailsLabelText:(NSString *)newText;
                    
86
                    
87- (void)setLabelText:(NSString *)newText {
                    
88	if ([NSThread isMainThread]) {
                    
98
                    
99- (NSString *)labelText {
                    
100	return labelText;
                    
102
                    
103- (void)setDetailsLabelText:(NSString *)newText {
                    
104	if ([NSThread isMainThread]) {
                    
114
                    
115- (NSString *)detailsLabelText {
                    
116	return detailsLabelText;
                    
                
ASIHTTPRequest.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1398 lines
                    
26// Automatically set on build
                    
27NSString *ASIHTTPRequestVersion = @"v1.8.1-61 2011-09-19";
                    
28
                    
28
                    
29static NSString *defaultUserAgent = nil;
                    
30
                    
30
                    
31NSString* const NetworkRequestErrorDomain = @"ASIHTTPRequestErrorDomain";
                    
32
                    
32
                    
33static NSString *ASIHTTPRequestRunLoopMode = @"ASIHTTPRequestRunLoopMode";
                    
34
                    
177- (void)finishedDownloadingPACFile:(ASIHTTPRequest *)theRequest;
                    
178- (void)runPACScript:(NSString *)script;
                    
179- (void)timeOutPACRead;
                    
                
MBProgressHUD.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 756 lines
                    
33- (void)unregisterFromNotifications;
                    
34- (void)updateUIForKeypath:(NSString *)keyPath;
                    
35- (void)hideUsingAnimation:(BOOL)animated;
                    
318
                    
319- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context {
                    
320	[self done];
                    
                
AppDelegate.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 456 lines
                    
72	
                    
73	NSString *tempFile = [[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"The Great American Novel.txt.download"];
                    
74	if ([[NSFileManager defaultManager] fileExistsAtPath:tempFile]) {
                    
113{
                    
114	[fileLocation setStringValue:[NSString stringWithFormat:@"File downloaded to %@",[request downloadDestinationPath]]];
                    
115	[startButton setTitle:@"Start"];
                    
123	} else {
                    
124		[fileLocation setStringValue:[NSString stringWithFormat:@"An error occurred: %@",[[request error] localizedDescription]]];
                    
125		[startButton setTitle:@"Start"];
                    
169{
                    
170	[bandwidthUsed setStringValue:[NSString stringWithFormat:@"%luKB / second",[ASIHTTPRequest averageBandwidthUsedPerSecond]/1024]];
                    
171}
                    
282	NSMutableData *data = [NSMutableData dataWithLength:1024*1024];
                    
283	NSString *path = [[[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent] stringByAppendingPathComponent:@"bigfile"];
                    
284	[data writeToFile:path atomically:NO];
                    
                
Reachability.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 814 lines
                    
108
                    
109NSString *const kInternetConnection  = @"InternetConnection";
                    
110NSString *const kLocalWiFiConnection = @"LocalWiFiConnection";
                    
110NSString *const kLocalWiFiConnection = @"LocalWiFiConnection";
                    
111NSString *const kReachabilityChangedNotification = @"NetworkReachabilityChangedNotification";
                    
112
                    
117
                    
118static NSString *reachabilityFlags_(SCNetworkReachabilityFlags flags) {
                    
119	
                    
120#if (__IPHONE_OS_VERSION_MIN_REQUIRED >= 30000) // Apple advises you to use the magic number instead of a symbol.
                    
121    return [NSString stringWithFormat:@"Reachability Flags: %c%c %c%c%c%c%c%c%c",
                    
122			(flags & kSCNetworkReachabilityFlagsIsWWAN)               ? 'W' : '-',
                    
133	// Compile out the v3.0 features for v2.2.1 deployment.
                    
134    return [NSString stringWithFormat:@"Reachability Flags: %c%c %c%c%c%c%c%c",
                    
135			(flags & kSCNetworkReachabilityFlagsIsWWAN)               ? 'W' : '-',
                    
                
ASIS3RequestTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 860 lines
                    
16// Fill in these to run the tests that actually connect and manipulate objects on S3
                    
17static NSString *secretAccessKey = @"";
                    
18static NSString *accessKey = @"";
                    
20// You should run these tests on a bucket that does not yet exist
                    
21static NSString *bucket = @"";
                    
22
                    
51{
                    
52	NSString *exampleSecretAccessKey = @"uV3F3YluFJax1cknvbcGwgjvx4QpvB+leU8dUj2o";
                    
53	NSString *exampleAccessKey = @"0PN5J17HBGZHT7JJ3X82";
                    
53	NSString *exampleAccessKey = @"0PN5J17HBGZHT7JJ3X82";
                    
54	NSString *exampleBucket = @"johnsmith";
                    
55	
                    
56	// Test list all my buckets
                    
57	NSString *dateString = @"Wed, 28 Mar 2007 01:29:59 +0000";
                    
58	ASIS3ServiceRequest *serviceRequest = [ASIS3ServiceRequest serviceRequest];
                    
                
ASIHTTPRequestTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1152 lines
                    
61	[request startSynchronous];
                    
62	NSString *html = [request responseString];
                    
63	GHAssertNotNil(html,@"Basic synchronous request failed");
                    
65	// Check we're getting the correct response headers
                    
66	NSString *pingBackHeader = [[request responseHeaders] objectForKey:@"X-Pingback"];
                    
67	BOOL success = [pingBackHeader isEqualToString:@"http://allseeing-i.com/Ping-Back"];
                    
97	NSData *data = [@"Hello, world" dataUsingEncoding:NSUTF8StringEncoding];
                    
98	NSString *base64 = [ASIHTTPRequest base64forData:data];
                    
99	BOOL success = [base64 isEqualToString:@"SGVsbG8sIHdvcmxk"];
                    
248	
                    
249	NSString *etag = [[request responseHeaders] objectForKey:@"Etag"];
                    
250	NSString *lastModified = [[request responseHeaders] objectForKey:@"Last-Modified"];
                    
281	NSArray *IANAEncodings = [NSArray arrayWithObjects:@"UTF-8",@"US-ASCII",@"ISO-8859-1",@"UTF-16",nil];
                    
282	NSUInteger NSStringEncodings[] = {NSUTF8StringEncoding,NSASCIIStringEncoding,NSISOLatin1StringEncoding,NSUnicodeStringEncoding};
                    
283	
                    
                
ASIDownloadCacheTests.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 562 lines
                    
175
                    
176	NSString *path = [[ASIDownloadCache sharedCache] pathToStoreCachedResponseDataForRequest:request];
                    
177	success = (path != nil);
                    
228	for (NSString *cacheType in cacheHeaders) {
                    
229		NSString *url = [NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/%@",cacheType];
                    
230		ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:url]];
                    
268	NSArray *headers = [NSArray arrayWithObjects:@"last-modified",@"etag",@"expires",@"max-age",nil];
                    
269	for (NSString *header in headers) {
                    
270		ASIHTTPRequest *request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/content-always-new/%@",header]]];
                    
277
                    
278		request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/ASIHTTPRequest/tests/content-always-new/%@",header]]];
                    
279		[request setDownloadCache:[ASIDownloadCache sharedCache]];
                    
303	NSArray *extensions = [ASIDownloadCache fileExtensionsToHandleAsHTML];
                    
304	for (NSString *extension in extensions) {
                    
305		NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"http://allseeing-i.com/file.%@",extension]];
                    
                
ASIWebPageRequest.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 722 lines
                    
31+ (NSArray *)CSSURLsFromString:(NSString *)string;
                    
32- (NSString *)relativePathTo:(NSString *)destinationPath fromPath:(NSString *)sourcePath;
                    
33
                    
88	webContentType = ASINotParsedWebContentType;
                    
89	NSString *contentType = [[[self responseHeaders] objectForKey:@"Content-Type"] lowercaseString];
                    
90	contentType = [[contentType componentsSeparatedByString:@";"] objectAtIndex:0];
                    
105
                    
106	NSString *responseCSS = nil;
                    
107	NSError *err = nil;
                    
108	if ([self downloadDestinationPath]) {
                    
109		responseCSS = [NSString stringWithContentsOfFile:[self downloadDestinationPath] encoding:[self responseEncoding] error:&err];
                    
110	} else {
                    
123
                    
124	for (NSString *theURL in urls) {
                    
125		[self addURLToFetch:theURL];
                    
                
ASIDownloadCache.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 514 lines
                    
14
                    
15static NSString *sessionCacheFolder = @"SessionStore";
                    
16static NSString *permanentCacheFolder = @"PermanentStore";
                    
20+ (NSString *)keyForURL:(NSURL *)url;
                    
21- (NSString *)pathToFile:(NSString *)file;
                    
22@end
                    
204	// Grab the file extension, if there is one. We do this so we can save the cached response with the same file extension - this is important if you want to display locally cached data in a web view 
                    
205	NSString *extension = [[url path] pathExtension];
                    
206
                    
225
                    
226- (NSString *)pathToFile:(NSString *)file
                    
227{
                    
428{
                    
429	NSString *cacheControl = [[[request responseHeaders] objectForKey:@"Cache-Control"] lowercaseString];
                    
430	if (cacheControl) {
                    
                
NSDate+ISO8601Parsing.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 655 lines
                    
169 */
                    
170+ (NSDate *)dateWithString:(NSString *)str strictly:(BOOL)strict timeSeparator:(unichar)timeSep getRange:(out NSRange *)outRange {
                    
171  NSCalendar *gregorian = [[NSCalendar alloc]
                    
                
ForAndroid.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1603 lines
                    
28}
                    
29- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix
                    
30{
                    
143				} else {
                    
144					NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding];
                    
145					
                    
346}
                    
347- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix
                    
348{
                    
419}
                    
420- (xmlNodePtr)xmlNodeForDoc:(xmlDocPtr)doc elementName:(NSString *)elName elementNSPrefix:(NSString *)elNSPrefix
                    
421{
                    
493				} else {
                    
494					NSString *elementTypeString = [NSString stringWithCString:(char*)instanceType encoding:NSUTF8StringEncoding];
                    
495					
                    
                
SBJsonParser.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 516 lines
                    
69
                    
70- (id)objectWithString:(NSString *)repr {
                    
71    [self clearErrorTrace];
                    
102
                    
103- (id)objectWithString:(NSString*)repr error:(NSError**)error {
                    
104    id tmp = [self objectWithString:repr];
                    
263        if (![self scanValue:&v]) {
                    
264            NSString *string = [NSString stringWithFormat:@"Object value expected for key: %@", k];
                    
265            [self addErrorWithCode:EPARSE description: string];
                    
302            // check for 
                    
303            id t = [[NSString alloc] initWithBytesNoCopy:(char*)c
                    
304                                                  length:len
                    
340                default:
                    
341                    [self addErrorWithCode:EESCAPE description: [NSString stringWithFormat:@"Illegal escape sequence '0x%x'", uc]];
                    
342                    return NO;
                    
                
ControlsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 414 lines
                    
58
                    
59static NSString *kSectionTitleKey = @"sectionTitleKey";
                    
60static NSString *kLabelKey = @"labelKey";
                    
60static NSString *kLabelKey = @"labelKey";
                    
61static NSString *kSourceKey = @"sourceKey";
                    
62static NSString *kViewKey = @"viewKey";
                    
64// tableView cell id constants
                    
65static NSString *kDisplayCellID = @"DisplayCellID";
                    
66static NSString *kSourceCellID = @"SourceCellID";
                    
155
                    
156- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
                    
157{
                    
                
ButtonsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 447 lines
                    
55
                    
56static NSString *kSectionTitleKey = @"sectionTitleKey";
                    
57static NSString *kLabelKey = @"labelKey";
                    
57static NSString *kLabelKey = @"labelKey";
                    
58static NSString *kSourceKey = @"sourceKey";
                    
59static NSString *kViewKey = @"viewKey";
                    
61// tableView cell id constants
                    
62static NSString *kDisplayCellID = @"DisplayCellID";
                    
63static NSString *kSourceCellID = @"SourceCellID";
                    
151
                    
152- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
                    
153{
                    
220
                    
221+ (UIButton *)newButtonWithTitle:(NSString *)title
                    
222					   target:(id)target
                    
                
ControlsViewController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 453 lines
                    
58
                    
59static NSString *kSectionTitleKey = @"sectionTitleKey";
                    
60static NSString *kLabelKey = @"labelKey";
                    
60static NSString *kLabelKey = @"labelKey";
                    
61static NSString *kSourceKey = @"sourceKey";
                    
62static NSString *kViewKey = @"viewKey";
                    
201
                    
202- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section
                    
203{
                    
227	{
                    
228		static NSString *kDisplayCell_ID = @"DisplayCellID";
                    
229		cell = [self.tableView dequeueReusableCellWithIdentifier:kDisplayCell_ID];
                    
250	{
                    
251		static NSString *kSourceCellID = @"SourceCellID";
                    
252		cell = [self.tableView dequeueReusableCellWithIdentifier:kSourceCellID];
                    
                
ListController.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 618 lines
                    
72@property (nonatomic, retain)   NSMutableArray *  listEntries;
                    
73@property (nonatomic, copy)     NSString *        status;
                    
74
                    
74
                    
75- (void)_updateStatus:(NSString *)statusString;
                    
76
                    
95
                    
96- (void)_updateStatus:(NSString *)statusString
                    
97{
                    
110
                    
111- (void)_receiveDidStopWithStatus:(NSString *)statusString
                    
112{
                    
181
                    
182- (void)_stopReceiveWithStatus:(NSString *)statusString
                    
183    // Shuts down the connection and displays the result (statusString == nil) 
                    
                
FMDatabase.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 761 lines
                    
5
                    
6+ (id)databaseWithPath:(NSString*)aPath {
                    
7    return [[[self alloc] initWithPath:aPath] autorelease];
                    
9
                    
10- (id)initWithPath:(NSString*)aPath {
                    
11    self = [super init];
                    
32
                    
33+ (NSString*)sqliteLibVersion {
                    
34    return [NSString stringWithFormat:@"%s", sqlite3_libversion()];
                    
36
                    
37- (NSString *)databasePath {
                    
38    return databasePath;
                    
111
                    
112- (FMStatement*)cachedStatementForQuery:(NSString*)query {
                    
113    return [cachedStatements objectForKey:query];
                    
                
MGLine.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 552 lines
                    
47
                    
48+ (id)multilineWithText:(NSString *)text font:(UIFont *)font width:(CGFloat)width
                    
49                padding:(UIEdgeInsets)padding {
                    
105
                    
106  // wrap NSStrings and UIImages
                    
107  [self wrapRawContents:self.leftItems align:NSTextAlignmentLeft];
                    
155    id item = contents[i];
                    
156    if ([item isKindOfClass:NSString.class]) {
                    
157      UILabel *label = [self makeLabel:item align:align];
                    
428
                    
429- (UILabel *)makeLabel:(NSString *)text
                    
430                 align:(UITextAlignment)align {
                    
                
UIColor+MGExpanded.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 618 lines
                    
21
                    
22- (NSString *)styleString;
                    
23
                    
28
                    
29+ (UIColor *)searchForColorByName:(NSString *)cssColorName;
                    
30
                    
40
                    
41- (NSString *)colorSpaceString {
                    
42  switch (self.colorSpaceModel) {
                    
379
                    
380- (NSString *)stringFromColor {
                    
381  NSAssert(self.canProvideRGBComponents, @"Must be an RGB color to use -stringFromColor");
                    
381  NSAssert(self.canProvideRGBComponents, @"Must be an RGB color to use -stringFromColor");
                    
382  NSString *result;
                    
383  switch (self.colorSpaceModel) {
                    
                
MGLine.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 867 lines
                    
56
                    
57+ (id)lineWithMultilineLeft:(NSString *)left right:(id)right width:(CGFloat)width
                    
58                  minHeight:(CGFloat)height {
                    
66
                    
67+ (id)lineWithLeft:(id)left multilineRight:(NSString *)right width:(CGFloat)width
                    
68         minHeight:(CGFloat)height {
                    
76
                    
77+ (id)multilineWithText:(NSString *)text font:(UIFont *)font width:(CGFloat)width
                    
78                padding:(UIEdgeInsets)padding {
                    
118
                    
119  // wrap NSStrings, NSAttributedStrings, and UIImages
                    
120  [self wrapRawContents:self.leftItems placement:MGLeft];
                    
188    id item = items[i];
                    
189    if ([item isKindOfClass:NSString.class]
                    
190        || [item isKindOfClass:NSAttributedString.class]) {
                    
                
CC3GLMatrix.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 1045 lines
                    
220
                    
221-(NSString*) description {
                    
222	GLfloat* m = self.glMatrix;
                    
                
CC3Foundation.m https://gitlab.com/praveenvelanati/ios-demo | Objective C | 570 lines
                    
36
                    
37NSString* NSStringFromCC3Vector(CC3Vector v) {
                    
38	return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f)", v.x, v.y, v.z];
                    
173
                    
174NSString* NSStringFromCC3AngularVector(CC3AngularVector av) {
                    
175	return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f)", av.heading, av.inclination, av.radius];
                    
223
                    
224NSString* NSStringFromCC3Vector4(CC3Vector4 v) {
                    
225	return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f, %.3f)", v.x, v.y, v.z, v.w];
                    
363
                    
364NSString* NSStringFromCC3Plane(CC3Plane p) {
                    
365	return [NSString stringWithFormat: @"(%.3f, %.3f, %.3f, %.3f)", p.a, p.b, p.c, p.d];
                    
456
                    
457NSString* NSStringFromCCC4F(ccColor4F rgba) {
                    
458	return [NSString stringWithFormat: @"(%.2f, %.2f, %.2f, %.2f)", rgba.r, rgba.g, rgba.b, rgba.a];
                    
                
PTPusher.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 458 lines
                    
28
                    
29NSURL *PTPusherConnectionURL(NSString *host, NSString *key, NSString *clientID, BOOL secure);
                    
30
                    
41
                    
42NSURL *PTPusherConnectionURL(NSString *host, NSString *key, NSString *clientID, BOOL encrypted)
                    
43{
                    
102{
                    
103  return [self pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate encrypted:(BOOL)isEncrypted cluster:(NSString *) nil];
                    
104}
                    
105
                    
106+ (instancetype)pusherWithKey:(NSString *)key delegate:(id<PTPusherDelegate>)delegate encrypted:(BOOL)isEncrypted cluster:(NSString *) cluster
                    
107{
                    
283
                    
284- (void)sendEventNamed:(NSString *)name data:(id)data channel:(NSString *)channelName
                    
285{
                    
                
SRWebSocket.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 1511 lines
                    
71
                    
72static NSString *const SRWebSocketAppendToSecKeyString = @"258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
                    
73
                    
74static inline int32_t validate_dispatch_data_partial_string(NSData *data);
                    
75static inline void SRFastLog(NSString *format, ...);
                    
76
                    
78
                    
79- (NSString *)stringBySHA1ThenBase64Encoding;
                    
80
                    
83
                    
84@interface NSString (SRWebSocket)
                    
85
                    
85
                    
86- (NSString *)stringBySHA1ThenBase64Encoding;
                    
87
                    
                
AFURLSessionManager.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 1133 lines
                    
56
                    
57NSString * const AFNetworkingTaskDidResumeNotification = @"com.alamofire.networking.task.resume";
                    
58NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete";
                    
58NSString * const AFNetworkingTaskDidCompleteNotification = @"com.alamofire.networking.task.complete";
                    
59NSString * const AFNetworkingTaskDidSuspendNotification = @"com.alamofire.networking.task.suspend";
                    
60NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate";
                    
60NSString * const AFURLSessionDidInvalidateNotification = @"com.alamofire.networking.session.invalidate";
                    
61NSString * const AFURLSessionDownloadTaskDidFailToMoveFileNotification = @"com.alamofire.networking.session.download.file-manager-error";
                    
62
                    
62
                    
63NSString * const AFNetworkingTaskDidStartNotification = @"com.alamofire.networking.task.resume"; // Deprecated
                    
64NSString * const AFNetworkingTaskDidFinishNotification = @"com.alamofire.networking.task.complete"; // Deprecated
                    
65
                    
66NSString * const AFNetworkingTaskDidCompleteSerializedResponseKey = @"com.alamofire.networking.task.complete.serializedresponse";
                    
67NSString * const AFNetworkingTaskDidCompleteResponseSerializerKey = @"com.alamofire.networking.task.complete.responseserializer";
                    
                
AFURLResponseSerialization.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 825 lines
                    
31
                    
32NSString * const AFURLResponseSerializationErrorDomain = @"com.alamofire.error.serialization.response";
                    
33NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"com.alamofire.serialization.response.error.response";
                    
118                NSMutableDictionary *mutableUserInfo = [@{
                    
119                                                          NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
                    
120                                                          NSURLErrorFailingURLErrorKey:[response URL],
                    
134            NSMutableDictionary *mutableUserInfo = [@{
                    
135                                               NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode],
                    
136                                               NSURLErrorFailingURLErrorKey:[response URL],
                    
187    [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
                    
188    [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
                    
189}
                    
253    @autoreleasepool {
                    
254        NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding];
                    
255        if (responseString && ![responseString isEqualToString:@" "]) {
                    
                
AFURLConnectionOperation.m https://gitlab.com/trungminhnt/sampleShinobi | Objective C | 792 lines
                    
59
                    
60static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock";
                    
61
                    
61
                    
62NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start";
                    
63NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish";
                    
70
                    
71static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
                    
72    switch (state) {
                    
138@property (readwrite, nonatomic, strong) NSData *responseData;
                    
139@property (readwrite, nonatomic, copy) NSString *responseString;
                    
140@property (readwrite, nonatomic, assign) NSStringEncoding responseStringEncoding;
                    
229
                    
230- (NSString *)responseString {
                    
231    [self.lock lock];
                    
                
vf_coreimage.m https://gitlab.com/sjchen1981/FFmpeg | Objective C | 688 lines
                    
105
                    
106    NSString *filter_name;
                    
107    while (filter_name = [filters nextObject]) {
                    
108        av_log(ctx, AV_LOG_INFO, "Filter: %s\n", [filter_name UTF8String]);
                    
109        NSString *input;
                    
110
                    
111        CIFilter *filter             = [CIFilter filterWithName:filter_name];
                    
112        NSDictionary *filter_attribs = [filter attributes]; // <nsstring, id>
                    
113        NSArray      *filter_inputs  = [filter inputKeys];  // <nsstring>
                    
294        @try {
                    
295            NSString *tmp_string = [NSString stringWithUTF8String:ctx->output_rect];
                    
296            NSRect tmp           = NSRectFromString(tmp_string);
                    
359{
                    
360        NSString *input_key = [NSString stringWithUTF8String:key];
                    
361        NSString *input_val = [NSString stringWithUTF8String:value];
                    
                
ViewController.m https://gitlab.com/eduardo.alencar/digitorj | Objective C | 397 lines
                    
69            Label = (__bridge NSString *)(ABMultiValueCopyLabelAtIndex(multiPhones, j));
                    
70            NSString *pNumber = (__bridge NSString *) phoneNumberRef;
                    
71            pNumber = [[[[[pNumber stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]stringByReplacingOccurrencesOfString:@"+" withString:@""] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@")" withString:@""];
                    
75                if (bnovo){
                    
76                    Label = [NSString stringWithFormat:@"%@ - %@",[[Label stringByReplacingOccurrencesOfString:@"_$!<" withString:@""]stringByReplacingOccurrencesOfString:@">!$_" withString:@""], [lsufixo text]];
                    
77                }
                    
84                    CFStringRef phoneNumberRef = ABMultiValueCopyValueAtIndex(multi, j);
                    
85                    NSString *pNumber = (__bridge NSString *) phoneNumberRef;
                    
86                    pNumber = [[[[[pNumber stringByReplacingOccurrencesOfString:@"-" withString:@""] stringByReplacingOccurrencesOfString:@" " withString:@""]stringByReplacingOccurrencesOfString:@"+" withString:@""] stringByReplacingOccurrencesOfString:@"(" withString:@""] stringByReplacingOccurrencesOfString:@")" withString:@""];
                    
172{
                    
173    //NSString* name = (__bridge_transfer NSString*)ABRecordCopyValue(person, kABPersonFirstNameProperty);
                    
174    NSString* phone = nil;
                    
185
                    
186-(NSString *)startFormat:(NSString *)Number {
                    
187    if (Number != Nil){
                    
                
JSQMessagesViewController.m https://gitlab.com/joaopaulogalvao/browteco | Objective C | 1061 lines
                    
38
                    
39#import "NSString+JSQMessages.h"
                    
40#import "UIColor+JSQMessages.h"
                    
69
                    
70- (NSString *)jsq_currentlyComposedMessageText;
                    
71
                    
107{
                    
108    return [UINib nibWithNibName:NSStringFromClass([JSQMessagesViewController class])
                    
109                          bundle:[NSBundle bundleForClass:[JSQMessagesViewController class]]];
                    
113{
                    
114    return [[[self class] alloc] initWithNibName:NSStringFromClass([JSQMessagesViewController class])
                    
115                                          bundle:[NSBundle bundleForClass:[JSQMessagesViewController class]]];
                    
315- (void)didPressSendButton:(UIButton *)button
                    
316           withMessageText:(NSString *)text
                    
317                  senderId:(NSString *)senderId
                    
                
PushPlugin.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 611 lines
                    
54    __weak __block PushPlugin *weakSelf = self;
                    
55    gcmRegistrationHandler = ^(NSString *registrationToken, NSError *error){
                    
56        if (registrationToken != nil) {
                    
61            if (topics != nil) {
                    
62                for (NSString *topic in topics) {
                    
63                    NSLog(@"subscribe from topic: %@", topic);
                    
65                    [pubSub subscribeWithToken: [weakSelf gcmRegistrationToken]
                    
66                        topic:[NSString stringWithFormat:@"/topics/%@", topic]
                    
67                        options:nil
                    
103
                    
104- (void)willSendDataMessageWithID:(NSString *)messageID error:(NSError *)error {
                    
105    NSLog(@"willSendDataMessageWithID");
                    
112
                    
113- (void)didSendDataMessageWithID:(NSString *)messageID {
                    
114    NSLog(@"willSendDataMessageWithID");
                    
                
CDVStatusBar.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 480 lines
                    
79
                    
80- (id)settingForKey:(NSString*)key
                    
81{
                    
84
                    
85- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context
                    
86{
                    
120
                    
121    NSString* setting;
                    
122
                    
170    [self updateIsVisible:![UIApplication sharedApplication].statusBarHidden];
                    
171    NSString* setting = @"StatusBarOverlaysWebView";
                    
172    if ([self settingForKey:setting]) {
                    
275
                    
276- (void) setStatusBarStyle:(NSString*)statusBarStyle
                    
277{
                    
                
ImageNameTest.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 702 lines
                    
36// expose private interface
                    
37- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device;
                    
38
                    
56    
                    
57    NSString* name = nil;
                    
58    NSString* expectedImageName = nil;
                    
59    UIInterfaceOrientation currentOrientation;
                    
60    NSString* deviceName = device.iPad? @"iPad" : device.iPhone6Plus? @"iPhone6Plus": device.iPhone6? @"iPhone6": device.iPhone5? @"iPhone5" : @"iPhone";
                    
61    
                    
                
CDVSplashScreen.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 461 lines
                    
56
                    
57- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context
                    
58{
                    
81
                    
82    NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]];
                    
83    UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
                    
169
                    
170- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device
                    
171{
                    
172    // Use UILaunchImageFile if specified in plist.  Otherwise, use Default.
                    
173    NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
                    
174    
                    
303{
                    
304    NSString* imageName = [self getImageName:[self getCurrentOrientation] delegate:(id<CDVScreenOrientationDelegate>)self.viewController device:[self getCurrentDevice]];
                    
305
                    
                
CDVFileTransfer.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 845 lines
                    
86
                    
87- (NSString*)escapePathComponentForUrlString:(NSString*)urlString
                    
88{
                    
106
                    
107    NSString* userAgent = [self.commandDelegate userAgent];
                    
108    if (userAgent) {
                    
188    if (multipartFormUpload) {
                    
189        NSString* contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@", kFormBoundary];
                    
190        [req setValue:contentType forHTTPHeaderField:@"Content-Type"];
                    
193
                    
194    NSData* formBoundaryData = [[NSString stringWithFormat:@"--%@\r\n", kFormBoundary] dataUsingEncoding:NSUTF8StringEncoding];
                    
195    NSMutableData* postBodyBeforeFile = [NSMutableData data];
                    
300{
                    
301    NSString* source = (NSString*)[command argumentAtIndex:0];
                    
302    NSString* server = [command argumentAtIndex:1];
                    
                
CDVLocalFilesystem.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 733 lines
                    
26
                    
27- (id) initWithName:(NSString *)name root:(NSString *)fsRoot
                    
28{
                    
89
                    
90- (NSString *)stripQueryParametersFromPath:(NSString *)fullPath
                    
91{
                    
98
                    
99- (NSString *)filesystemPathForFullPath:(NSString *)fullPath
                    
100{
                    
125    if (fullPath) {
                    
126        NSString* escapedPath = [fullPath stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
                    
127        if ([fullPath hasPrefix:@"/"]) {
                    
140
                    
141- (NSString *)normalizePath:(NSString *)rawPath
                    
142{
                    
                
CDVFile.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 1056 lines
                    
23
                    
24static NSString* toBase64(NSData* data) {
                    
25    SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString");
                    
29    if ([data respondsToSelector:s1]) {
                    
30        NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1];
                    
31        return func(data, s1);
                    
32    } else if ([data respondsToSelector:s2]) {
                    
33        NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2];
                    
34        return func(data, s2);
                    
35    } else if ([data respondsToSelector:s3]) {
                    
36        NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3];
                    
37        return func(data, s3, 0);
                    
44
                    
45extern NSString * const NSURLIsExcludedFromBackupKey __attribute__((weak_import));
                    
46
                    
                
CameraTest.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 511 lines
                    
155        XCTAssertEqual(picker.allowsEditing, pictureOptions.allowsEditing);
                    
156        XCTAssertEqualObjects(picker.mediaTypes, @[(NSString*)kUTTypeImage]);
                    
157        XCTAssertEqual(picker.cameraDevice, pictureOptions.cameraDirection);
                    
216        XCTAssertEqual(picker.allowsEditing, pictureOptions.allowsEditing);
                    
217        XCTAssertEqualObjects(picker.mediaTypes, @[(NSString*)kUTTypeMovie]);
                    
218    }
                    
                
CDVCamera.m https://gitlab.com/boxnia/NFU_MOVIL | Objective C | 765 lines
                    
40
                    
41static NSString* toBase64(NSData* data) {
                    
42    SEL s1 = NSSelectorFromString(@"cdv_base64EncodedString");
                    
46    if ([data respondsToSelector:s1]) {
                    
47        NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s1];
                    
48        return func(data, s1);
                    
49    } else if ([data respondsToSelector:s2]) {
                    
50        NSString* (*func)(id, SEL) = (void *)[data methodForSelector:s2];
                    
51        return func(data, s2);
                    
52    } else if ([data respondsToSelector:s3]) {
                    
53        NSString* (*func)(id, SEL, NSUInteger) = (void *)[data methodForSelector:s3];
                    
54        return func(data, s3, 0);
                    
167#pragma clang diagnostic ignored "-Wtautological-pointer-compare"
                    
168                NSString* settingsButton = (&UIApplicationOpenSettingsURLString != NULL)
                    
169                    ? NSLocalizedString(@"Settings", nil)
                    
                
hadoopfs.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 2160 lines
                    
120
                    
121- (NSString *) pathname {
                    
122  return [[__pathname retain] autorelease];
                    
124
                    
125- (void) setPathname: (NSString *) pathname {
                    
126  [pathname retain];
                    
197@implementation FileStatus
                    
198- (id) initWithPath: (NSString *) path length: (int64_t) length isdir: (BOOL) isdir block_replication: (int16_t) block_replication blocksize: (int64_t) blocksize modification_time: (int64_t) modification_time permission: (NSString *) permission owner: (NSString *) owner group: (NSString *) group
                    
199{
                    
234
                    
235- (void) setPath: (NSString *) path {
                    
236  [path retain];
                    
340
                    
341- (void) setPermission: (NSString *) permission {
                    
342  [permission retain];
                    
                
ANTLRCommonTreeTest.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 555 lines
                    
47    if (tree != nil && tree.token != nil) {
                    
48        STAssertEquals((NSUInteger) tree.token.line, (NSUInteger)1, [NSString stringWithFormat:@"Tree should be at line 1, but was at %d", tree.token.line] );
                    
49        STAssertEquals((NSUInteger) tree.token.charPositionInLine, (NSUInteger)4, [NSString stringWithFormat:@"Char position should be 1, but was at %d", tree.token.charPositionInLine]);
                    
107{
                    
108    NSString *aString;
                    
109	ANTLRCommonTree *errorTree = [ANTLRCommonTree invalidNode];
                    
                
SimpleCLexer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1152 lines
                    
36
                    
37+ (NSString *) tokenNameForType:(NSInteger)aTokenType
                    
38{
                    
                
SymbolTableLexer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 712 lines
                    
138
                    
139- (NSString *) description
                    
140{
                    
160
                    
161+ (NSString *) tokenNameForType:(NSInteger)aTokenType
                    
162{
                    
                
SimpleCParser.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1438 lines
                    
101
                    
102- (NSString *) description
                    
103{
                    
                
ANTLRTreeWizard.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 735 lines
                    
129
                    
130- (NSString *)toString
                    
131{
                    
132    if ( label != nil ) {
                    
133        return [NSString stringWithFormat:@"\% %@ : %@", label, [super toString]];
                    
134    }
                    
292    for (int ttype = ANTLRTokenTypeMIN; ttype < [theTokNams count]; ttype++) {
                    
293        NSString *name = (NSString *) [theTokNams objectAtIndex:ttype];
                    
294        [m putName:name TType:ttype];
                    
299/** Using the map of token names to token types, return the type. */
                    
300- (NSInteger)getTokenType:(NSString *)tokenName
                    
301{
                    
364/** Return a List of subtrees matching pattern. */
                    
365- (AMutableArray *)find:(ANTLRCommonTree *)t Pattern:(NSString *)pattern
                    
366{
                    
                
ANTLRTokenRewriteStream.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 692 lines
                    
288
                    
289- (void) insertAfterProgNam:(NSString *)programName Index:(NSInteger)anIndex Text:(NSString *)theText
                    
290{
                    
342
                    
343- (void) replaceProgNam:(NSString *)programName Token:(id<ANTLRToken>)from Token:(id<ANTLRToken>)to Text:(NSString *)theText
                    
344{
                    
347                         
                    
348- (void) replaceProgNam:(NSString *)programName FromIndex:(NSInteger)from ToIndex:(NSInteger)to Text:(NSString *)theText
                    
349{
                    
447
                    
448- (NSString *)toString:(NSString *)programName
                    
449{
                    
458
                    
459- (NSString *)toString:(NSString *)programName FromStart:(NSInteger)start ToEnd:(NSInteger)end
                    
460{
                    
                
ANTLRBaseRecognizer.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 1129 lines
                    
42static AMutableArray *_tokenNames;
                    
43static NSString *_grammarFileName;
                    
44static NSString *NEXT_TOKEN_RULE_NAME;
                    
54{
                    
55    NEXT_TOKEN_RULE_NAME = [NSString stringWithString:@"nextToken"];
                    
56    [NEXT_TOKEN_RULE_NAME retain];
                    
87
                    
88+ (void)setGrammarFileName:(NSString *)aFileName
                    
89{
                    
321{
                    
322    NSString *hdr = [self getErrorHeader:e];
                    
323    NSString *msg = [self getErrorMessage:e TokenNames:theTokNams];
                    
323    NSString *msg = [self getErrorMessage:e TokenNames:theTokNams];
                    
324    [self emitErrorMessage:[NSString stringWithFormat:@" %@ %@", hdr, msg]];
                    
325}
                    
                
ACBTree.m https://gitlab.com/essere.lab.public/qualitas.class-corpus | Objective C | 721 lines
                    
27
                    
28+ (ACBKey *)newKeyWithKStr:(NSString *)aKey
                    
29{
                    
29{
                    
30    return [[ACBKey alloc] initWithKStr:(NSString *)aKey];
                    
31}
                    
41
                    
42- (id) initWithKStr:(NSString *)aKey
                    
43{
                    
118
                    
119- (ACBTree *)deletekey:(NSString *)dkey
                    
120{
                    
124
                    
125    if ( [dkey isKindOfClass:[NSString class]] ) {
                    
126        dkp = [ACBKey newKeyWithKStr:dkey];
                    
                
UVWelcomeViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 373 lines
                    
61- (void)customizeCellForForum:(UITableViewCell *)cell indexPath:(NSIndexPath *)indexPath {
                    
62    NSString *detail;
                    
63    if ([UVSession currentSession].forum.suggestionsCount == 1) {
                    
65    } else {
                    
66        detail = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%@ ideas", @"UserVoice", [UserVoice bundle], nil), [UVUtils formatInteger:[UVSession currentSession].forum.suggestionsCount]];
                    
67    }
                    
78        cell.textLabel.text = topic.name;
                    
79        cell.detailTextLabel.text = [NSString stringWithFormat:@"%d", (int)topic.articleCount];
                    
80    }
                    
120- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
                    
121    NSString *identifier = @"";
                    
122    NSInteger style = UITableViewCellStyleValue1;
                    
148    if (tableView == _searchController.searchResultsTableView || _searching) {
                    
149        NSString *identifier;
                    
150        id model = [self.searchResults objectAtIndex:indexPath.row];
                    
                
UVSuggestionDetailsViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 590 lines
                    
114    if ([UVSession currentSession].clientConfig.displaySuggestionsByRank) {
                    
115        _subscriberCount.text = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"Ranked %@", @"UserVoice", [UserVoice bundle], nil), _suggestion.rankString];
                    
116    } else {
                    
119        } else {
                    
120            _subscriberCount.text = [NSString stringWithFormat:NSLocalizedStringFromTableInBundle(@"%d people", @"UserVoice", [UserVoice bundle], nil), _suggestion.subscriberCount];
                    
121        }
                    
135- (UITableViewCell *)tableView:(UITableView *)theTableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
                    
136    NSString *identifier;
                    
137    UITableViewCellStyle style = UITableViewCellStyleDefault;
                    
233    category.font = [UIFont systemFontOfSize:13];
                    
234    category.text = _suggestion.category.name ? [NSString stringWithFormat:@"%@ / %@", NSLocalizedStringFromTableInBundle(@"Feedback", @"UserVoice", [UserVoice bundle], nil), _suggestion.category.name] : NSLocalizedStringFromTableInBundle(@"Feedback", @"UserVoice", [UserVoice bundle], nil);
                    
235    category.adjustsFontSizeToFitWidth = YES;
                    
                
UVBaseViewController.m https://gitlab.com/lisit1003/uservoice-ios-sdk | Objective C | 544 lines
                    
118
                    
119- (void)alertError:(NSString *)message {
                    
120    [[[UIAlertView alloc] initWithTitle:NSLocalizedStringFromTableInBundle(@"Error", @"UserVoice", [UserVoice bundle], nil)
                    
127- (void)didReceiveError:(NSError *)error {
                    
128    NSString *msg = nil;
                    
129    [self hideActivityIndicator];
                    
133        NSDictionary *userInfo = [error userInfo];
                    
134        for (NSString *key in [userInfo allKeys]) {
                    
135            if ([key isEqualToString:@"message"] || [key isEqualToString:@"type"])
                    
136                continue;
                    
137            NSString *displayKey = nil;
                    
138            if ([key isEqualToString:@"display_name"])
                    
146            else
                    
147                msg = [NSString stringWithFormat:@"%@ %@", displayKey, [userInfo valueForKey:key]];
                    
148        }
                    
                
UI7TableView.m https://gitlab.com/lisit1003/UI7Kit | Objective C | 471 lines
                    
52
                    
53    if (![NSStringFromClass([self class]) hasPrefix:@"AB"]) {
                    
54        self.backgroundView = nil;
                    
62
                    
63- (id)__dequeueReusableCellWithIdentifier:(NSString *)identifier forIndexPath:(NSIndexPath *)indexPath {
                    
64    return [self dequeueReusableCellWithIdentifier:identifier];
                    
71//
                    
72//- (NSInteger)__decodeIntegerForKey:(NSString *)key { assert(NO); }
                    
73//
                    
73//
                    
74//- (NSInteger)_UI7TableView_decodeIntegerForKey:(NSString *)key {
                    
75//    if ([key isEqualToString:@"UIStyle"]) {
                    
149            if (color == UI7TableViewGroupedViewPatternColor) {
                    
150                if (![NSStringFromClass([self class]) hasPrefix:@"AB"]) {
                    
151                    self.backgroundColor = [UI7Color groupedTableViewSectionBackgroundColor];
                    
                
SDImageCache.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 534 lines
                    
118
                    
119- (NSString *)cachePathForKey:(NSString *)key inPath:(NSString *)path {
                    
120    NSString *filename = [self cachedFileNameForKey:key];
                    
123
                    
124- (NSString *)defaultCachePathForKey:(NSString *)key {
                    
125    return [self cachePathForKey:key inPath:self.diskCachePath];
                    
129
                    
130- (NSString *)cachedFileNameForKey:(NSString *)key {
                    
131    const char *str = [key UTF8String];
                    
136    CC_MD5(str, (CC_LONG)strlen(str), r);
                    
137    NSString *filename = [NSString stringWithFormat:@"%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x",
                    
138                                                    r[0], r[1], r[2], r[3], r[4], r[5], r[6], r[7], r[8], r[9], r[10], r[11], r[12], r[13], r[14], r[15]];
                    
201
                    
202- (BOOL)diskImageExistsWithKey:(NSString *)key {
                    
203    BOOL exists = NO;
                    
                
PSTCollectionViewLayout.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 481 lines
                    
37@property (nonatomic) PSTCollectionViewItemType elementCategory;
                    
38@property (nonatomic, copy) NSString *elementKind;
                    
39@end
                    
57
                    
58+ (instancetype)layoutAttributesForSupplementaryViewOfKind:(NSString *)elementKind withIndexPath:(NSIndexPath *)indexPath {
                    
59    PSTCollectionViewLayoutAttributes *attributes = [self new];
                    
99- (NSString *)description {
                    
100    return [NSString stringWithFormat:@"<%@: %p frame:%@ indexPath:%@ elementKind:%@>", NSStringFromClass(self.class), self, NSStringFromCGRect(self.frame), self.indexPath, self.elementKind];
                    
101}
                    
172    if (!signature) {
                    
173        NSString *selString = NSStringFromSelector(selector);
                    
174        if ([selString hasPrefix:@"_"]) {
                    
182- (void)forwardInvocation:(NSInvocation *)invocation {
                    
183    NSString *selString = NSStringFromSelector([invocation selector]);
                    
184    if ([selString hasPrefix:@"_"]) {
                    
                
PSTCollectionViewFlowLayout.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 420 lines
                    
15
                    
16NSString *const PSTCollectionElementKindSectionHeader = @"UICollectionElementKindSectionHeader";
                    
17NSString *const PSTCollectionElementKindSectionFooter = @"UICollectionElementKindSectionFooter";
                    
19// this is not exposed in UICollectionViewFlowLayout
                    
20NSString *const PSTFlowLayoutCommonRowHorizontalAlignmentKey = @"UIFlowLayoutCommonRowHorizontalAlignmentKey";
                    
21NSString *const PSTFlowLayoutLastRowHorizontalAlignmentKey = @"UIFlowLayoutLastRowHorizontalAlignmentKey";
                    
21NSString *const PSTFlowLayoutLastRowHorizontalAlignmentKey = @"UIFlowLayoutLastRowHorizontalAlignmentKey";
                    
22NSString *const PSTFlowLayoutRowVerticalAlignmentKey = @"UIFlowLayoutRowVerticalAlignmentKey";
                    
23
                    
233
                    
234- (PSTCollectionViewLayoutAttributes *)layoutAttributesForSupplementaryViewOfKind:(NSString *)kind atIndexPath:(NSIndexPath *)indexPath {
                    
235    if (!_data) [self prepareLayout];
                    
261
                    
262- (PSTCollectionViewLayoutAttributes *)layoutAttributesForDecorationViewWithReuseIdentifier:(NSString *)identifier atIndexPath:(NSIndexPath *)indexPath {
                    
263    return nil;
                    
                
PSTCollectionView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1121 lines
                    
38}
                    
39@property (nonatomic, copy) NSString *elementKind;
                    
40@end
                    
59    int _firstResponderViewType;
                    
60    NSString *_firstResponderViewKind;
                    
61    NSIndexPath *_firstResponderIndexPath;
                    
194
                    
195        for (NSString *identifier in cellNibs.allKeys) {
                    
196            _cellNibDict[identifier] = cellNibs[identifier];
                    
203
                    
204        for (NSString *identifier in supplementaryViewNibs.allKeys) {
                    
205            _supplementaryViewNibDict[identifier] = supplementaryViewNibs[identifier];
                    
222
                    
223- (NSString *)description {
                    
224    return [NSString stringWithFormat:@"%@ collection view layout: %@", [super description], self.collectionViewLayout];
                    
                
HPGrowingTextView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 666 lines
                    
163    // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/>
                    
164    NSString *saveText = internalTextView.text, *newText = @"-";
                    
165    
                    
200	// Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/>
                    
201    NSString *saveText = internalTextView.text, *newText = @"-";
                    
202    
                    
232
                    
233- (NSString *)placeholder
                    
234{
                    
237
                    
238- (void)setPlaceholder:(NSString *)placeholder
                    
239{
                    
425
                    
426-(void)setText:(NSString *)newText
                    
427{
                    
                
FMDatabase.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1413 lines
                    
6
                    
7- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
                    
8- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
                    
20
                    
21+ (instancetype)databaseWithPath:(NSString*)aPath {
                    
22    return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
                    
28
                    
29- (instancetype)initWithPath:(NSString*)aPath {
                    
30    
                    
64
                    
65- (NSString *)databasePath {
                    
66    return _databasePath;
                    
68
                    
69+ (NSString*)FMDBUserVersion {
                    
70    return @"2.3";
                    
                
AFURLResponseSerialization.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 779 lines
                    
116                NSDictionary *userInfo = @{
                    
117                                           NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: unacceptable content-type: %@", @"AFNetworking", nil), [response MIMEType]],
                    
118                                           NSURLErrorFailingURLErrorKey:[response URL],
                    
129            NSDictionary *userInfo = @{
                    
130                                       NSLocalizedDescriptionKey: [NSString stringWithFormat:NSLocalizedStringFromTable(@"Request failed: %@ (%ld)", @"AFNetworking", nil), [NSHTTPURLResponse localizedStringForStatusCode:response.statusCode], (long)response.statusCode],
                    
131                                       NSURLErrorFailingURLErrorKey:[response URL],
                    
178    [coder encodeObject:self.acceptableStatusCodes forKey:NSStringFromSelector(@selector(acceptableStatusCodes))];
                    
179    [coder encodeObject:self.acceptableContentTypes forKey:NSStringFromSelector(@selector(acceptableContentTypes))];
                    
180}
                    
233    // See https://github.com/rails/rails/issues/1742
                    
234    NSStringEncoding stringEncoding = self.stringEncoding;
                    
235    if (response.textEncodingName) {
                    
244    @autoreleasepool {
                    
245        NSString *responseString = [[NSString alloc] initWithData:data encoding:stringEncoding];
                    
246        if (responseString && ![responseString isEqualToString:@" "]) {
                    
                
AFURLRequestSerialization.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1281 lines
                    
35
                    
36static NSString * AFBase64EncodedStringFromString(NSString *string) {
                    
37    NSData *data = [NSData dataWithBytes:[string UTF8String] length:[string lengthOfBytesUsingEncoding:NSUTF8StringEncoding]];
                    
66
                    
67static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
                    
68    static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[].";
                    
72
                    
73static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
                    
74	return (__bridge_transfer  NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));
                    
213    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
                    
214    userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
                    
215#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
                    
215#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
                    
216    userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
                    
217#endif
                    
                
EditGroupViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 504 lines
                    
40
                    
41- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
                    
42{
                    
113}
                    
114-(BOOL)searchDisplayController:(UISearchDisplayController *)controller shouldReloadTableForSearchString:(NSString *)searchString {
                    
115    if ([searchString isEqualToString:@""]) {
                    
255    if (tableView.tag == 100) {
                    
256        NSString *keyStr = [self allKeys][(NSUInteger) (section)];
                    
257        NSArray *arr = (self.items)[keyStr];
                    
263
                    
264- (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section {
                    
265  
                    
271        [[self allKeys] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
                    
272            char firstLetter = getFirstChar((NSString *)obj);
                    
273            [arr addObject:[NSString stringWithFormat:@"%c",firstLetter]];
                    
                
ChattingMainViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1268 lines
                    
77@property(assign)PanelStatus panelStatus;
                    
78@property(strong)NSString *chatObjectID;
                    
79@property(strong) UIButton *titleBtn ;
                    
110    TouchDownGestureRecognizer* _touchDownGestureRecognizer;
                    
111    NSString* _currentInputContent;
                    
112    UIButton *_recordButton;
                    
139    NSDictionary* messageContentDic = @{DD_IMAGE_LOCAL_KEY:photo.localPath};
                    
140    NSString* messageContent = [messageContentDic jsonString];
                    
141
                    
149        
                    
150    } failure:^(NSString *errorDescripe) {
                    
151        DDLog(@"消息插入DB失败");
                    
153    photo=nil;
                    
154    [[DDSendPhotoMessageAPI sharedPhotoCache] uploadImage:messageContentDic[DD_IMAGE_LOCAL_KEY] success:^(NSString *imageURL) {
                    
155         [self scrollToBottomAnimated:YES];
                    
                
ContactsViewController.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 443 lines
                    
230            {
                    
231                NSString *keyStr = [self allKeys][(NSUInteger) (section - 2)];
                    
232                NSArray *arr = (self.items)[keyStr];
                    
236        
                    
237        NSString *keyStr = [self allKeys][(NSUInteger) (section)];
                    
238        NSArray *arr = (self.items)[keyStr];
                    
260{
                    
261    static NSString *cellIdentifier = @"contactsCell";
                    
262    DDContactsCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier ];
                    
353    }
                    
354    NSString *string = [NSString stringWithFormat:@"tel:%@",user.telphone];
                    
355    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];
                    
361    }
                    
362    NSString *string = [NSString stringWithFormat:@"mailto:%@",user.email];
                    
363    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:string]];
                    
                
AQGridViewCell.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 706 lines
                    
48@property (nonatomic, retain) UIView * contentView;
                    
49@property (nonatomic, copy) NSString * reuseIdentifier;
                    
50- (void) flipHighlightTimerFired: (NSTimer *) timer;
                    
58
                    
59- (id) initWithFrame: (CGRect) frame reuseIdentifier: (NSString *) reuseIdentifier
                    
60{
                    
292	{
                    
293        NSString *imageName = nil;
                    
294#ifdef BUILTIN_IMAGES
                    
411
                    
412- (void) highlightAnimationStopped: (NSString * __unused) animationID context: (void * __unused) context
                    
413{
                    
                
AQGridView.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1603 lines
                    
71
                    
72NSString * const AQGridViewSelectionDidChangeNotification = @"AQGridViewSelectionDidChangeNotification";
                    
73
                    
455
                    
456	//NSLog( @"Resetting offset from %@ to %@", NSStringFromCGPoint(oldOffset), NSStringFromCGPoint(offset) );
                    
457	self.contentOffset = offset;
                    
                
DDMessageModule.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 453 lines
                    
149                }
                    
150            } failure:^(NSString *errorDescripe) {
                    
151                NSLog(@"消息插入DB失败");
                    
194}
                    
195- (NSArray*)popAllUnreadMessagesForSessionID:(NSString*)sessionID
                    
196{
                    
213            }
                    
214        } failure:^(NSString *errorDescripe) {
                    
215            NSLog(@"消息插入DB失败");
                    
276        [usersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
                    
277            NSString* userID = (NSString*)obj;
                    
278            DDGetUserUnreadMessagesAPI* getUserUnreadMessageAPI = [[DDGetUserUnreadMessagesAPI alloc] init];
                    
333        [usersArray enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
                    
334            NSString* groupID = (NSString*)obj;
                    
335            DDGroupsUnreadMessageAPI* getUserUnreadMessageAPI = [[DDGroupsUnreadMessageAPI alloc] init];
                    
                
DDDatabaseUtil.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 763 lines
                    
104{
                    
105    NSString* directorPath = [NSString userExclusiveDirection];
                    
106    
                    
268            [_database setShouldCacheStatements:YES];
                    
269            NSString* sqlString = [NSString stringWithFormat:@"select * from %@ where sessionId = ? AND messageID >= ? order by msgTime DESC,rowid DESC",TABLE_MESSAGE];
                    
270            FMResultSet* result = [_database executeQuery:sqlString,sessionID,message.msgID];
                    
288            [_database setShouldCacheStatements:YES];
                    
289            NSString* sqlString = [NSString stringWithFormat:@"SELECT * from %@ where sessionId=? AND messageType = ? ORDER BY msgTime DESC,rowid DESC limit 0,1",TABLE_MESSAGE];
                    
290            FMResultSet* result = [_database executeQuery:sqlString,sessionID,@(4)];
                    
309            
                    
310            NSString* sqlString = [NSString stringWithFormat:@"SELECT * FROM %@ where sessionId=? ORDER BY msgTime DESC,rowid DESC limit 0,1",TABLE_MESSAGE];
                    
311            
                    
334            
                    
335            NSString* sqlString = [NSString stringWithFormat:@"SELECT COUNT(*) FROM %@ where sessionId=?",TABLE_MESSAGE];
                    
336            
                    
                
std.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 257 lines
                    
10
                    
11NSString *bundleVerison(){
                    
12    NSBundle * bundle=[NSBundle mainBundle];
                    
12    NSBundle * bundle=[NSBundle mainBundle];
                    
13    NSString * ver=[bundle.infoDictionary objectForKey:@"CFBundleShortVersionString"];
                    
14    return ver;
                    
                
IMClient2ServGroup.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1617 lines
                    
109}
                    
110- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
                    
111  if (self.hasCmdId) {
                    
338}
                    
339- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
                    
340  if (self.hasCmdId) {
                    
345    [element writeDescriptionTo:output
                    
346                     withIndent:[NSString stringWithFormat:@"%@  ", indent]];
                    
347    [output appendFormat:@"%@}\n", indent];
                    
                
IMClient2ServFile.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1725 lines
                    
109}
                    
110- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
                    
111  if (self.hasCmdId) {
                    
314}
                    
315- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
                    
316  if (self.hasCmdId) {
                    
435@property SInt32 cmdId;
                    
436@property (strong) NSString* userId;
                    
437@property (strong) NSString* token;
                    
                
IMBaseDefine.pb.m https://gitlab.com/lisit1003/TTiOSClient | Objective C | 1811 lines
                    
91@interface IpAddr ()
                    
92@property (strong) NSString* ip;
                    
93@property UInt32 port;
                    
198}
                    
199- (void) writeDescriptionTo:(NSMutableString*) output withIndent:(NSString*) indent {
                    
200  if (self.hasIp) {
                    
317}
                    
318- (NSString*) ip {
                    
319  return result.ip;
                    
320}
                    
321- (IpAddrBuilder*) setIp:(NSString*) value {
                    
322  result.hasIp = YES;
                    
349@interface ClientUserInfo ()
                    
350@property (strong) NSString* userId;
                    
351@property (strong) NSString* name;
                    
                
AFURLRequestSerialization.m https://gitlab.com/lisit1003/test | Objective C | 1272 lines
                    
65
                    
66static NSString * AFPercentEscapedQueryStringKeyFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
                    
67    static NSString * const kAFCharactersToLeaveUnescapedInQueryStringPairKey = @"[].";
                    
71
                    
72static NSString * AFPercentEscapedQueryStringValueFromStringWithEncoding(NSString *string, NSStringEncoding encoding) {
                    
73	return (__bridge_transfer  NSString *)CFURLCreateStringByAddingPercentEscapes(kCFAllocatorDefault, (__bridge CFStringRef)string, NULL, (__bridge CFStringRef)kAFCharactersToBeEscapedInQueryString, CFStringConvertNSStringEncodingToEncoding(encoding));
                    
212    // User-Agent Header; see http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.43
                    
213    userAgent = [NSString stringWithFormat:@"%@/%@ (%@; iOS %@; Scale/%0.2f)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], (__bridge id)CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle(), kCFBundleVersionKey) ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[UIDevice currentDevice] model], [[UIDevice currentDevice] systemVersion], [[UIScreen mainScreen] scale]];
                    
214#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
                    
214#elif defined(__MAC_OS_X_VERSION_MIN_REQUIRED)
                    
215    userAgent = [NSString stringWithFormat:@"%@/%@ (Mac OS X %@)", [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleExecutableKey] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleIdentifierKey], [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"] ?: [[[NSBundle mainBundle] infoDictionary] objectForKey:(__bridge NSString *)kCFBundleVersionKey], [[NSProcessInfo processInfo] operatingSystemVersionString]];
                    
216#endif
                    
243
                    
244- (void)setAuthorizationHeaderFieldWithUsername:(NSString *)username password:(NSString *)password {
                    
245	NSString *basicAuthCredentials = [NSString stringWithFormat:@"%@:%@", username, password];
                    
                
AFURLConnectionOperation.m https://gitlab.com/lisit1003/test | Objective C | 793 lines
                    
66
                    
67static NSString * const kAFNetworkingLockName = @"com.alamofire.networking.operation.lock";
                    
68
                    
68
                    
69NSString * const AFNetworkingErrorDomain = @"AFNetworkingErrorDomain";
                    
70NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey";
                    
70NSString * const AFNetworkingOperationFailingURLRequestErrorKey = @"AFNetworkingOperationFailingURLRequestErrorKey";
                    
71NSString * const AFNetworkingOperationFailingURLResponseErrorKey = @"AFNetworkingOperationFailingURLResponseErrorKey";
                    
72
                    
72
                    
73NSString * const AFNetworkingOperationDidStartNotification = @"com.alamofire.networking.operation.start";
                    
74NSString * const AFNetworkingOperationDidFinishNotification = @"com.alamofire.networking.operation.finish";
                    
80
                    
81static inline NSString * AFKeyPathFromOperationState(AFOperationState state) {
                    
82    switch (state) {
                    
                
NSArray+PureLayout.m https://gitlab.com/lisit1003/TableViewCellWithAutoLayoutiOS8 | Objective C | 455 lines
                    
76 */
                    
77- (instancetype)autoIdentifyConstraints:(NSString *)identifer
                    
78{
                    
                
ALView+PureLayout.m https://gitlab.com/lisit1003/TableViewCellWithAutoLayoutiOS8 | Objective C | 1061 lines
                    
197 */
                    
198+ (NSString *)al_currentGlobalConstraintIdentifier
                    
199{
                    
215 */
                    
216+ (void)autoSetIdentifier:(NSString *)identifer forConstraints:(ALConstraintsBlock)block
                    
217{
                    
                
SPHViewController.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 800 lines
                    
67    [formatter setDateFormat:@"hh:mm a"];
                    
68    NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count];
                    
69    [self adddBubbledata:@"textByme" mtext:@"Hi!!!!!!!" mtime:[formatter stringFromDate:date] mimage:Uploadedimage.image msgstatus:@"Sending"];
                    
218       
                    
219        NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count];
                    
220        
                    
260        imgPicker.mediaTypes = [NSArray arrayWithObjects:
                    
261                                (NSString *) kUTTypeImage,
                    
262                                nil];
                    
313{
                    
314    NSString *chat_Message=textView.text;
                    
315    textView.text=@"";
                    
320    
                    
321    NSString *rowNumber=[NSString stringWithFormat:@"%d",sphBubbledata.count];
                    
322    
                    
                
HPGrowingTextView.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 539 lines
                    
133    // Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/>
                    
134    NSString *saveText = internalTextView.text, *newText = @"-";
                    
135    
                    
162	// Use internalTextView for height calculations, thanks to Gwynne <http://blog.darkrainfall.org/>
                    
163    NSString *saveText = internalTextView.text, *newText = @"-";
                    
164    
                    
322
                    
323-(void)setText:(NSString *)newText
                    
324{
                    
331
                    
332-(NSString*) text
                    
333{
                    
504- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range
                    
505 replacementText:(NSString *)atext {
                    
506	
                    
                
AsyncImageView.m https://gitlab.com/lisit1003/SPHChatBubble | Objective C | 709 lines
                    
37
                    
38NSString *const AsyncImageLoadDidFinish = @"AsyncImageLoadDidFinish";
                    
39NSString *const AsyncImageLoadDidFail = @"AsyncImageLoadDidFail";
                    
39NSString *const AsyncImageLoadDidFail = @"AsyncImageLoadDidFail";
                    
40NSString *const AsyncImageTargetReleased = @"AsyncImageTargetReleased";
                    
41
                    
41
                    
42NSString *const AsyncImageImageKey = @"image";
                    
43NSString *const AsyncImageURLKey = @"URL";
                    
43NSString *const AsyncImageURLKey = @"URL";
                    
44NSString *const AsyncImageCacheKey = @"cache";
                    
45NSString *const AsyncImageErrorKey = @"error";
                    
105	{
                    
106		NSString *path = [[_URL absoluteURL] path];
                    
107        NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
                    
                
NSArray+PureLayout.m https://gitlab.com/lisit1003/PureLayout | Objective C | 506 lines
                    
99 */
                    
100- (instancetype)autoIdentifyConstraints:(NSString *)identifier
                    
101{
                    
                
ALView+PureLayout.m https://gitlab.com/lisit1003/PureLayout | Objective C | 1088 lines
                    
222 */
                    
223+ (NSString *)al_currentGlobalConstraintIdentifier
                    
224{
                    
240 */
                    
241+ (void)autoSetIdentifier:(NSString *)identifier forConstraints:(ALConstraintsBlock)block
                    
242{
                    
                
MasterViewController.m https://gitlab.com/lisit1003/SDWebImage | Objective C | 393 lines
                    
21
                    
22- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
                    
23{
                    
                
CDVSplashScreen.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 506 lines
                    
57
                    
58- (void)observeValueForKeyPath:(NSString*)keyPath ofObject:(id)object change:(NSDictionary*)change context:(void*)context
                    
59{
                    
82
                    
83    NSString* topActivityIndicator = [self.commandDelegate.settings objectForKey:[@"TopActivityIndicator" lowercaseString]];
                    
84    UIActivityIndicatorViewStyle topActivityIndicatorStyle = UIActivityIndicatorViewStyleGray;
                    
181- (BOOL) isUsingCDVLaunchScreen {
                    
182    NSString* launchStoryboardName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchStoryboardName"];
                    
183    if (launchStoryboardName) {
                    
189
                    
190- (NSString*)getImageName:(UIInterfaceOrientation)currentOrientation delegate:(id<CDVScreenOrientationDelegate>)orientationDelegate device:(CDV_iOSDevice)device
                    
191{
                    
192    // Use UILaunchImageFile if specified in plist.  Otherwise, use Default.
                    
193    NSString* imageName = [[NSBundle mainBundle] objectForInfoDictionaryKey:@"UILaunchImageFile"];
                    
194
                    
                
CDVViewController.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 784 lines
                    
247    if (setting) {
                    
248        NSString* errorUrlString = (NSString*)setting;
                    
249        if ([errorUrlString rangeOfString:@"://"].location != NSNotFound) {
                    
251        } else {
                    
252            NSURL* url = [NSURL URLWithString:(NSString*)setting];
                    
253            NSString* errorFilePath = [self.commandDelegate pathForResource:[url path]];
                    
279
                    
280    NSString* backupWebStorageType = @"cloud"; // default value
                    
281
                    
331        } else {
                    
332            NSString* loadErr = [NSString stringWithFormat:@"ERROR: Start Page at '%@/%@' was not found.", self.wwwFolderName, self.startPage];
                    
333            NSLog(@"%@", loadErr);
                    
340            } else {
                    
341                NSString* html = [NSString stringWithFormat:@"<html><body> %@ </body></html>", loadErr];
                    
342                [self.webViewEngine loadHTMLString:html baseURL:nil];
                    
                
CDVLocalStorage.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 487 lines
                    
45
                    
46+ (NSMutableArray*)createBackupInfoWithTargetDir:(NSString*)targetDir backupDir:(NSString*)backupDir targetDirNests:(BOOL)targetDirNests backupDirNests:(BOOL)backupDirNests rename:(BOOL)rename
                    
47{
                    
132
                    
133+ (BOOL)copyFrom:(NSString*)src to:(NSString*)dest error:(NSError* __autoreleasing*)error
                    
134{
                    
137    if (![fileManager fileExistsAtPath:src]) {
                    
138        NSString* errorString = [NSString stringWithFormat:@"%@ file does not exist.", src];
                    
139        if (error != NULL) {
                    
150    CFStringRef uuidString = CFUUIDCreateString(kCFAllocatorDefault, uuidRef);
                    
151    NSString* tempBackup = [[NSTemporaryDirectory() stringByAppendingPathComponent:(__bridge NSString*)uuidString] stringByAppendingPathExtension:@"bak"];
                    
152    CFRelease(uuidString);
                    
282    NSString* bundleIdentifier = [[mainBundle infoDictionary] objectForKey:@"CFBundleIdentifier"];
                    
283    NSString* appPlistPath = [bundlePath stringByAppendingPathComponent:[NSString stringWithFormat:@"Library/Preferences/%@.plist", bundleIdentifier]];
                    
284
                    
                
CDVWhitelistTests.m https://gitlab.com/blocknotary/IonicInterviews | Objective C | 332 lines
                    
201    NSString* errorString = [whitelist errorStringForURL:testUrl];
                    
202    NSString* expectedErrorString = [NSString stringWithFormat:kCDVDefaultWhitelistRejectionString, [testUrl absoluteString]];
                    
203
                    
207    errorString = [whitelist errorStringForURL:testUrl];
                    
208    expectedErrorString = [NSString stringWithFormat:whitelist.whitelistRejectionFormatString, [testUrl absoluteString]];
                    
209    XCTAssertTrue([expectedErrorString isEqualToString:errorString], @"Customized whitelist rejection string has unexpected value.");
                    
                
GStreamerBackend.m https://gitlab.com/JamesGiller/gst-sdk-tutorials | Objective C | 387 lines
                    
77
                    
78-(void) setUri:(NSString*)uri
                    
79{
                    
102{
                    
103    NSString *string = [NSString stringWithUTF8String:message];
                    
104    if(ui_delegate && [ui_delegate respondsToSelector:@selector(gstreamerSetUIMessage:)])
                    
                
HIDRemote.m https://gitlab.com/sloshedpuppie/LetsGoRetro | Objective C | 1599 lines
                    
100		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(_handleNotifications:) name:kHIDRemoteDNHIDRemotePing	object:nil];
                    
101		[[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(_handleNotifications:) name:kHIDRemoteDNHIDRemoteRetry	object:[NSString stringWithFormat:@"%d", getpid()]];
                    
102
                    
126	[[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kHIDRemoteDNHIDRemotePing object:nil];
                    
127	[[NSDistributedNotificationCenter defaultCenter] removeObserver:self name:kHIDRemoteDNHIDRemoteRetry object:[NSString stringWithFormat:@"%d", getpid()]];
                    
128
                    
                
WebSocket.m https://gitlab.com/base.io/io | Objective C | 786 lines
                    
172			
                    
173			NSString *temp = [[NSString alloc] initWithData:requestHeaders encoding:NSUTF8StringEncoding];
                    
174			HTTPLogVerbose(@"%@[%p] Request Headers:\n%@", THIS_FILE, self, temp);
                    
310	{
                    
311		NSString *port = [NSString stringWithFormat:@"%hu", [asyncSocket localPort]];
                    
312		
                    
497		NSString *s2 = [[NSString alloc] initWithData:d2 encoding:NSASCIIStringEncoding];
                    
498		NSString *s3 = [[NSString alloc] initWithData:d3 encoding:NSASCIIStringEncoding];
                    
499		
                    
499		
                    
500		NSString *s0 = [[NSString alloc] initWithData:d0 encoding:NSASCIIStringEncoding];
                    
501		
                    
501		
                    
502		NSString *sH = [[NSString alloc] initWithData:responseBody encoding:NSASCIIStringEncoding];
                    
503		
                    
                
HTTPConnection.m https://gitlab.com/base.io/io | Objective C | 1547 lines
                    
118**/
                    
119+ (NSString *)generateNonce
                    
120{
                    
123	CFUUIDRef theUUID = CFUUIDCreate(NULL);
                    
124	NSString *newNonce = (__bridge_transfer NSString *)CFUUIDCreateString(NULL, theUUID);
                    
125	CFRelease(theUUID);
                    
245**/
                    
246- (BOOL)supportsMethod:(NSString *)method atPath:(NSString *)path
                    
247{
                    
278**/
                    
279- (BOOL)expectsRequestBodyFromMethod:(NSString *)method atPath:(NSString *)path
                    
280{
                    
385**/
                    
386- (NSString *)passwordForUser:(NSString *)username
                    
387{
                    
                
AsyncSocket.m https://gitlab.com/base.io/io | Objective C | 1632 lines
                    
48
                    
49NSString *const AsyncSocketException = @"AsyncSocketException";
                    
50NSString *const AsyncSocketErrorDomain = @"AsyncSocketErrorDomain";
                    
89- (BOOL)createStreamsFromNative:(CFSocketNativeHandle)native error:(NSError **)errPtr;
                    
90- (BOOL)createStreamsToHost:(NSString *)hostname onPort:(UInt16)port error:(NSError **)errPtr;
                    
91- (BOOL)attachStreamsToRunLoop:(NSRunLoop *)runLoop error:(NSError **)errPtr;
                    
116- (BOOL)areStreamsConnected;
                    
117- (NSString *)connectedHostFromNativeSocket4:(CFSocketNativeHandle)theNativeSocket;
                    
118- (NSString *)connectedHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket;
                    
118- (NSString *)connectedHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket;
                    
119- (NSString *)connectedHostFromCFSocket4:(CFSocketRef)socket;
                    
120- (NSString *)connectedHostFromCFSocket6:(CFSocketRef)socket;
                    
124- (UInt16)connectedPortFromCFSocket6:(CFSocketRef)socket;
                    
125- (NSString *)localHostFromNativeSocket4:(CFSocketNativeHandle)theNativeSocket;
                    
126- (NSString *)localHostFromNativeSocket6:(CFSocketNativeHandle)theNativeSocket;
                    
                
FMDatabase.m https://gitlab.com/base.io/io | Objective C | 1147 lines
                    
6
                    
7- (FMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
                    
8- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args;
                    
18
                    
19+ (id)databaseWithPath:(NSString*)aPath {
                    
20    return FMDBReturnAutoreleased([[self alloc] initWithPath:aPath]);
                    
22
                    
23+ (NSString*)sqliteLibVersion {
                    
24    return [NSString stringWithFormat:@"%s", sqlite3_libversion()];
                    
31
                    
32- (id)initWithPath:(NSString*)aPath {
                    
33    
                    
66
                    
67- (NSString *)databasePath {
                    
68    return _databasePath;
                    
                
fmdb.m https://gitlab.com/base.io/io | Objective C | 1258 lines
                    
8
                    
9void testPool(NSString *dbPath);
                    
10void FMDBReportABugFunction();
                    
17    
                    
18    NSString *dbPath = @"/tmp/tmp.db";
                    
19    
                    
100            @"hi'", // look!  I put in a ', and I'm not escaping it!
                    
101            [NSString stringWithFormat:@"number %d", i],
                    
102            [NSNumber numberWithInt:i],
                    
115         @"hi again'", // look!  I put in a ', and I'm not escaping it!
                    
116         [NSString stringWithFormat:@"number %d", i],
                    
117         [NSNumber numberWithInt:i],
                    
287    while ([rs next]) {
                    
288        NSString *aa = [rs stringForColumnIndex:0];
                    
289        NSString *b = [rs stringForColumnIndex:1];
                    
                
AppDelegate.m https://gitlab.com/base.io/io | Objective C | 545 lines
                    
43// these were really only intended as a convenience whilst testing...
                    
44static void forTrackerKeys(void(^block)(NSString *key, NSString *prefKey)) {
                    
45    NSString *prefix = @"track";
                    
102    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
                    
103    forTrackerKeys(^(NSString *key, NSString *prefKey) {
                    
104        [dict setObject:[_tracker valueForKey:key] forKey:prefKey];
                    
106    [[defs defaults] registerDefaults:dict];
                    
107    forTrackerKeys(^(NSString *key, NSString *prefKey) {
                    
108        [_tracker bind:key toObject:defs withKeyPath:[@"values." stringByAppendingString:prefKey] options:nil];
                    
327
                    
328	NSString *url = [NSString stringWithFormat:@"http://127.0.0.1:%i/index.html", HTTP_PORT];
                    
329	[webView setMainFrameURL:url];
                    
350-(void)ReloadWebView {
                    
351	//NSString *url = [NSString stringWithFormat:@"http://127.0.0.1:%i/index.html", HTTP_PORT];
                    
352	//[webView setMainFrameURL:url];
                    
                
DDFileLogger.m https://gitlab.com/base.io/mio | Objective C | 1387 lines
                    
215	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES);
                    
216	NSString *baseDir = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
                    
217	NSString *logsDirectory = [baseDir stringByAppendingPathComponent:@"Logs"];
                    
221	NSArray *paths = NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSUserDomainMask, YES);
                    
222	NSString *basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : NSTemporaryDirectory();
                    
223	NSString *logsDirectory = [[basePath stringByAppendingPathComponent:@"Logs"] stringByAppendingPathComponent:appName];
                    
401	CFStringRef fullStr = CFUUIDCreateString(NULL, uuid);
                    
402	NSString *result = (__bridge_transfer NSString *)CFStringCreateWithSubstring(NULL, fullStr, CFRangeMake(0, 6));
                    
403	
                    
427	{
                    
428		NSString *fileName = [NSString stringWithFormat:@"log-%@.txt", [self generateShortUUID]];
                    
429		
                    
477
                    
478- (NSString *)formatLogMessage:(DDLogMessage *)logMessage
                    
479{
                    
                
MultipartFormDataParser.m https://gitlab.com/base.io/mio | Objective C | 523 lines
                    
42
                    
43- (id) initWithBoundary:(NSString*) boundary formEncoding:(NSStringEncoding) _formEncoding {
                    
44    if( nil == (self = [super init]) ){
                    
                
HTTPServer.m https://gitlab.com/base.io/mio | Objective C | 784 lines
                    
148**/
                    
149- (NSString *)documentRoot
                    
150{
                    
150{
                    
151	__block NSString *result;
                    
152	
                    
159
                    
160- (void)setDocumentRoot:(NSString *)value
                    
161{
                    
166	
                    
167	if (value && ![value isKindOfClass:[NSString class]])
                    
168	{
                    
168	{
                    
169		HTTPLogWarn(@"%@: %@ - Expecting NSString parameter, received %@ parameter",
                    
170					THIS_FILE, THIS_METHOD, NSStringFromClass([value class]));
                    
                
GCDAsyncUdpSocket.m https://gitlab.com/base.io/mio | Objective C | 1936 lines
                    
130
                    
131NSString *const GCDAsyncUdpSocketException = @"GCDAsyncUdpSocketException";
                    
132NSString *const GCDAsyncUdpSocketErrorDomain = @"GCDAsyncUdpSocketErrorDomain";
                    
133
                    
134NSString *const GCDAsyncUdpSocketQueueName = @"GCDAsyncUdpSocket";
                    
135NSString *const GCDAsyncUdpSocketThreadName = @"GCDAsyncUdpSocket-CFStream";
                    
211	NSData   *cachedLocalAddress4;
                    
212	NSString *cachedLocalHost4;
                    
213	uint16_t  cachedLocalPort4;
                    
215	NSData   *cachedLocalAddress6;
                    
216	NSString *cachedLocalHost6;
                    
217	uint16_t  cachedLocalPort6;
                    
255
                    
256- (BOOL)performMulticastRequest:(int)requestType forGroup:(NSString *)group onInterface:(NSString *)interface error:(NSError **)errPtr;
                    
257
                    
                
AsyncUdpSocket.m https://gitlab.com/base.io/mio | Objective C | 1728 lines
                    
33
                    
34NSString *const AsyncUdpSocketException = @"AsyncUdpSocketException";
                    
35NSString *const AsyncUdpSocketErrorDomain = @"AsyncUdpSocketErrorDomain";
                    
39// Prior to Mac OS X 10.5 this method was not thread-safe.
                    
40static NSString *getaddrinfoLock = @"lock";
                    
41#endif
                    
68// Utilities
                    
69- (NSString *)addressHost4:(struct sockaddr_in *)pSockaddr4;
                    
70- (NSString *)addressHost6:(struct sockaddr_in6 *)pSockaddr6;
                    
70- (NSString *)addressHost6:(struct sockaddr_in6 *)pSockaddr6;
                    
71- (NSString *)addressHost:(struct sockaddr *)pSockaddr;
                    
72
                    
87// Diagnostics
                    
88- (NSString *)connectedHost:(CFSocketRef)socket;
                    
89- (UInt16)connectedPort:(CFSocketRef)socket;
                    
                
AppDelegate.m https://gitlab.com/base.io/mio | Objective C | 1185 lines
                    
110	NSDictionary *plist = [[NSBundle mainBundle] infoDictionary];
                    
111	NSString *shellVersion = [plist valueForKey:@"CFBundleShortVersionString"];
                    
112	NSString *shellBuildCode = [plist valueForKey:@"CFBundleVersion"];
                    
112	NSString *shellBuildCode = [plist valueForKey:@"CFBundleVersion"];
                    
113	MioVersion = [NSString stringWithFormat:@"Mio v.%@ (%@)", shellVersion, shellBuildCode];
                    
114	
                    
138	
                    
139	NSString *text = @"<html><span style=\"color:#222;\">Documentation </span><a style=\"color:#6685ed;\" href=\"http://github.com/baseio/mio\">github.com/baseio/mio</a></html>";
                    
140				
                    
154	NSString *app_config = [[[NSBundle mainBundle] resourcePath] stringByAppendingString:@"/app.json"];
                    
155	NSString *appjson_content = [[NSString alloc] initWithContentsOfFile:app_config encoding:NSUTF8StringEncoding error:&err];
                    
156	if( err != nil ) DDLogError(@"Count not read app.json:%@", err);
                    
163		env_app_config = [env_app_config stringByAppendingString:@"/app.json"];
                    
164		NSString *env_appjson_content = [[NSString alloc] initWithContentsOfFile:env_app_config encoding:NSUTF8StringEncoding error:&err];
                    
165		if( err != nil ){
                    
                
TextInputController.m https://gitlab.com/x33n/phantomjs | Objective C | 459 lines
                    
131
                    
132- (void)addAttribute:(NSString *)attrName value:(id)value from:(int)from length:(int)length
                    
133{
                    
136
                    
137- (void)addColorAttribute:(NSString *)attrName red:(float)red green:(float)green blue:(float)blue alpha:(float)alpha
                    
138{
                    
146
                    
147- (void)addFontAttribute:(NSString *)attrName fontName:(NSString *)fontName size:(float)fontSize
                    
148{
                    
151
                    
152- (void)addFontAttribute:(NSString *)attrName fontName:(NSString *)fontName size:(float)fontSize from:(int)from length:(int)length
                    
153{
                    
384
                    
385- (NSMutableAttributedString*)dictatedStringWithPrimaryString:(NSString*)aString alternative:(NSString*)alternative alternativeOffset:(int)offset alternativeLength:(int)length
                    
386{
                    
                
PBJVision.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 1401 lines
                    
43
                    
44NSString * const PBJVisionErrorDomain = @"PBJVisionErrorDomain";
                    
45
                    
50
                    
51static NSString * const PBJVisionFocusObserverContext = @"PBJVisionFocusObserverContext";
                    
52static NSString * const PBJVisionExposureObserverContext = @"PBJVisionExposureObserverContext";
                    
52static NSString * const PBJVisionExposureObserverContext = @"PBJVisionExposureObserverContext";
                    
53static NSString * const PBJVisionWhiteBalanceObserverContext = @"PBJVisionWhiteBalanceObserverContext";
                    
54static NSString * const PBJVisionFlashModeObserverContext = @"PBJVisionFlashModeObserverContext";
                    
54static NSString * const PBJVisionFlashModeObserverContext = @"PBJVisionFlashModeObserverContext";
                    
55static NSString * const PBJVisionTorchModeObserverContext = @"PBJVisionTorchModeObserverContext";
                    
56static NSString * const PBJVisionFlashAvailabilityObserverContext = @"PBJVisionFlashAvailabilityObserverContext";
                    
56static NSString * const PBJVisionFlashAvailabilityObserverContext = @"PBJVisionFlashAvailabilityObserverContext";
                    
57static NSString * const PBJVisionTorchAvailabilityObserverContext = @"PBJVisionTorchAvailabilityObserverContext";
                    
58static NSString * const PBJVisionCaptureStillImageIsCapturingStillImageObserverContext = @"PBJVisionCaptureStillImageIsCapturingStillImageObserverContext";
                    
                
wbVideoFeedTableView.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 396 lines
                    
68    // Google analytics
                    
69    NSString *gaString;
                    
70    if ([self currentFeed] != nil) {
                    
71        if ([[[self currentFeed] objectForKey:@"type"] isEqualToString:@"user"]) {
                    
72            gaString = [NSString stringWithFormat:@"UserFeed:user=%@",[[self currentFeed] objectForKey:@"userId"]];
                    
73        } else if ([[[self currentFeed] objectForKey:@"type"] isEqualToString:@"search"]) {
                    
73        } else if ([[[self currentFeed] objectForKey:@"type"] isEqualToString:@"search"]) {
                    
74            gaString = [NSString stringWithFormat:@"SearchFeed:feed=%@",[[self currentFeed] objectForKey:@"name"]];
                    
75        } else if ([[[self currentFeed] objectForKey:@"type"] isEqualToString:@"mission"]) {
                    
75        } else if ([[[self currentFeed] objectForKey:@"type"] isEqualToString:@"mission"]) {
                    
76            gaString = [NSString stringWithFormat:@"MissionFeed:feed=%@",[[self currentFeed] objectForKey:@"missionId"]];
                    
77        } else {
                    
77        } else {
                    
78            gaString = [NSString stringWithFormat:@"Main:feed=%@",[[self currentFeed] objectForKey:@"name"]];
                    
79        }
                    
                
wbVideoCell.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 368 lines
                    
17
                    
18//- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
                    
19- (id)initWithFrame:(CGRect)frame
                    
62{
                    
63    rankLabel = [NSString stringWithFormat:@"%ld.",(long)_rankNumber];
                    
64    rankNumber = _rankNumber;
                    
144            [videoTime setBackgroundColor:kTRANSPARENTUICOLOR];
                    
145            [videoTime setText:[NSString stringWithFormat:@"%@",[[wbAPI sharedAPI] parsePostedTime:[[self cellContent] objectForKey:@"published_at"]]]];
                    
146            
                    
164            [videoUser setBackgroundColor:kTRANSPARENTUICOLOR];
                    
165            [videoUser setText:[NSString stringWithFormat:@"%@ %@ ",[[[self cellContent] objectForKey:@"added_by"] objectForKey:@"username"],NSLocalizedString(@"MAIN_VIEWCOUNT_DELIM", @"")]];
                    
166            [videoUser sizeToFit];
                    
175            [viewCount setBackgroundColor:kTRANSPARENTUICOLOR];
                    
176            [viewCount setText:[NSString stringWithFormat:@"%@",[[self cellContent] objectForKey:@"view_count"]]];
                    
177            [viewCount sizeToFit];
                    
                
wbSingleVideoView.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 1052 lines
                    
81        }
                    
82        [videoPlayerController setVideoURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://view.vzaar.com/%@/video",[contentArray valueForKey:@"external_id"]]]];
                    
83        [videoPlayerController setVideoThumbURL:[NSURL URLWithString:[contentArray valueForKey:@"thumbnail_url"]]];
                    
108            
                    
109            NSString *shareString = [NSString stringWithFormat:NSLocalizedString(@"SINGLE_SHARE_MESSAGE", @""),[contentArray objectForKey:@"name"]];
                    
110            NSURL *shareURL = [NSURL URLWithString:[contentArray objectForKey:@"web_url"]];
                    
131{
                    
132    NSString *gaString = [NSString stringWithFormat:@"Single:video=%ld",(long)[[contentArray objectForKey:@"id"] integerValue]];
                    
133   [[wbAPI sharedAPI] registerGoogleAnalytics:gaString];
                    
146    wbLabel *title = [[wbLabel alloc] initWithFrame:CGRectMake(0, 0, 1, 1)];
                    
147    [title setText:[NSString stringWithFormat:@"%@",[[contentArray objectForKey:@"name"] uppercaseString]]];
                    
148    [title setFont:kFONT(22)];
                    
163    if ([[contentArray objectForKey:@"description"] length] > 0) {
                    
164        [description setText:[NSString stringWithFormat:@"%@",[contentArray objectForKey:@"description"]]];
                    
165        [description setFont:kFONTHelvetica(15)];
                    
                
wbSingleMissionView.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 802 lines
                    
58{
                    
59    [[wbAPI sharedAPI] registerGoogleAnalytics:[NSString stringWithFormat:@"Mission:id=%@",[mission mission_id]]];
                    
60}
                    
82            kSHOWWAIT;
                    
83            videoUrl = [[wbAPI sharedAPI] urlWithEndpoint:[NSString stringWithFormat:kMISSIONVIDEOSAPI,[mission mission_id]]];
                    
84            [self getMissionVideosWithURL:videoUrl];
                    
219    
                    
220    NSString *identifier = [NSString stringWithFormat:@"mission_%@_%ld_%ld",[mission mission_id],(long)[indexPath row],(long)[indexPath section]];
                    
221    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:identifier];
                    
320        }
                    
321        [videoPlayerController setVideoURL:[NSURL URLWithString:[NSString stringWithFormat:@"http://view.vzaar.com/%@/video",[[mission linked_video_dictionary] valueForKey:@"external_id"]]]];
                    
322        if ([[[mission mission_image_1_url] absoluteString] isEqualToString:@""]) {
                    
                
wbSettingsTableView.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 702 lines
                    
123            
                    
124            endOfLine = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@" %@",[[wbUser sharedUser] email]]];
                    
125            if ([[[wbUser sharedUser] activation_state] isEqualToString:@"NEW"]) {
                    
141            if ([[[wbUser sharedUser] birthdayString] length] > 0) {
                    
142                endOfLine = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@" %@",[[wbUser sharedUser] birthdayString]]];
                    
143            } else {
                    
143            } else {
                    
144                endOfLine = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@" %@",NSLocalizedString(@"SETTINGS_BIRTHDAY_EMPTY", @"")]];
                    
145            }
                    
166            
                    
167             endOfLine = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@" %@",NSLocalizedString([[[wbUser sharedUser] countryDictionary] objectForKey:@"name"],@"")]];
                    
168            [endOfLine addAttribute:NSForegroundColorAttributeName value:kWHITEUICOLOR range:(NSRange){0,[endOfLine length]}];
                    
408
                    
409    NSString *identifier = [NSString stringWithFormat:@"%ld%ld",(long)[indexPath 
                    
                
wbRootViewController.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 709 lines
                    
19
                    
20- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
                    
21{
                    
91        if ([dictionary objectForKey:@"video"] != nil) {
                    
92            NSString *endpoint = [NSString stringWithFormat:kVIDEOSLUGAPI,[dictionary objectForKey:@"video"]];
                    
93            [[wbAPI sharedAPI] getJSONWithURL:[[wbAPI sharedAPI] urlWithEndpoint:endpoint] response:^(id data){
                    
110        if ([[dictionary valueForKey:@"video"] integerValue] > 0) {
                    
111            NSString *endpoint = [NSString stringWithFormat:@"%@%ld/",kVIDEOAPI,(long)[[dictionary valueForKey:@"video"] integerValue]];
                    
112            [[wbAPI sharedAPI] getJSONWithURL:[[wbAPI sharedAPI] urlWithEndpoint:endpoint] response:^(id data){
                    
                
wbLoginRegisterViewController.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 505 lines
                    
45
                    
46-(NSString*)description
                    
47{
                    
54    [kROOTVC performSelector:@selector(hideSettings)];
                    
55    NSString *settingsTxt;
                    
56    if (showSettings) {
                    
145            dispatch_sync(dispatch_get_main_queue(), ^{
                    
146                NSString *guest_id = [[wbAPI sharedAPI] getSettingWithKey:@"guest_id"];
                    
147                [[wbAPI sharedAPI] authenticate:[[alertView textFieldAtIndex:0] text] password:[[alertView textFieldAtIndex:1] text] guest_id:guest_id];
                    
187        dispatch_sync(dispatch_get_main_queue(), ^{
                    
188            NSString *guest_id = [[wbAPI sharedAPI] getSettingWithKey:@"guest_id"];
                    
189            [[wbAPI sharedAPI] authenticate:userField.text password:passCheckField.text guest_id:guest_id];
                    
204                NSDictionary *userArray = [NSDictionary dictionaryWithObjectsAndKeys:
                    
205                                           [NSString stringWithFormat:@"%@",emailField.text],@"email",
                    
206                                           [NSString stringWithFormat:@"%@",userField.text],@"username",
                    
                
wbData.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 763 lines
                    
74    }
                    
75    activityString = [NSString stringWithFormat:NSLocalizedString(@"USER_ACTIVITY",@""),[NSString stringWithFormat:NSLocalizedString(@"USER_COUNT",@""),[num_of_unreadActivities integerValue]]];
                    
76    [activityLabel setText:activityString];
                    
150
                    
151-(void)getAllCountries:(NSString*)next
                    
152{
                    
166                                     [allCountriesData addObjectsFromArray:[resultArray objectForKey:@"results"]];
                    
167                                     if ([[resultArray objectForKey:@"next"] isKindOfClass:[NSString class]]) {
                    
168                                         [self getAllCountries:[resultArray objectForKey:@"next"]];
                    
214
                    
215-(void)getAllCountryMissionFeeds:(NSString*)country
                    
216{
                    
226    NSString *missionCountry;
                    
227    missionCountry = [NSString stringWithFormat:@"%@,ZZ",country];
                    
228
                    
                
wbAPI.m https://gitlab.com/urbanjunglestudio/whambush-ios | Objective C | 1155 lines
                    
182{
                    
183    NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"%@/%@",kWHAMBUSHAPIURL,endpoint]];
                    
184    return url;
                    
210    if (!no_page){
                    
211        parameters = [NSDictionary dictionaryWithObjectsAndKeys:[NSString stringWithFormat:@"%ld",(long)page_size],@"page_size", nil];
                    
212    } else {
                    
239            if ([operation.response statusCode] == 404) {
                    
240                [self performSelectorOnMainThread:@selector(showErrorWithTxt:) withObject:[NSString stringWithFormat:@"%@\nPath: %@",NSLocalizedString(@"GENERAL_ERROR_404",@""),pathString] waitUntilDone:NO];
                    
241                [kROOTVC performSelector:@selector(goHome:) withObject:nil];
                    
242            } else {
                    
243                NSString *errorTxt = [NSString stringWithFormat:@"%@\nCode: %ld %@",NSLocalizedString(@"GENERAL_ERROR_MAJOR",@""),(long)[operation.response statusCode],pathString];
                    
244                [self performSelectorOnMainThread:@selector(showErrorWithTxt:) withObject:errorTxt waitUntilDone:NO];
                    
365
                    
366-(void)authenticate:(NSString *)username password:(NSString *)password guest_id:(NSString*)guestId
                    
367{
                    
                
NXOAuth2Connection.m https://gitlab.com/duongbadu/Instagram-app-iOS-Coursera | Objective C | 590 lines
                    
40- (BOOL)isServerCertificateForAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
                    
41                                          andHostname:(NSString *)hostname
                    
42                                  matchingCertificate:(NSData *)derCertData;
                    
211{
                    
212    NSString *range = [aRequest valueForHTTPHeaderField:@"Range"];
                    
213    if (!range) {
                    
215    }
                    
216    return [NSString stringWithFormat:@"%@ [%@]", aRequest.URL.absoluteString, range];
                    
217}
                    
239            contentType = [NSString stringWithFormat:@"multipart/form-data; boundary=%@",[(NXOAuth2PostBodyStream *)postBodyStream boundary]];
                    
240            NSString *contentLength = [NSString stringWithFormat:@"%lld", [(NXOAuth2PostBodyStream *)postBodyStream length]];
                    
241            [aRequest setValue:contentType forHTTPHeaderField:@"Content-Type"];
                    
410        NSDictionary *headerFields = [(NSHTTPURLResponse *)response allHeaderFields];
                    
411        for (NSString *headerKey in headerFields.allKeys) {
                    
412            if ([[headerKey lowercaseString] isEqualToString:@"www-authenticate"]) {
                    
                
NXOAuth2Client.m https://gitlab.com/duongbadu/Instagram-app-iOS-Coursera | Objective C | 573 lines
                    
80           accessToken:(NXOAuth2AccessToken *)anAccessToken
                    
81             tokenType:(NSString *)aTokenType
                    
82         keyChainGroup:(NSString *)aKeyChainGroup
                    
133            [[NSException exceptionWithName:NSInvalidArgumentException
                    
134                                     reason:[NSString stringWithFormat:@"'%@' is not allowed as a key for additionalAuthenticationParameters", key]
                    
135                                   userInfo:nil] raise];
                    
333    if (self.customHeaderFields) {
                    
334        [self.customHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) {
                    
335            [tokenRequest addValue:obj forHTTPHeaderField:key];
                    
370    if (self.customHeaderFields) {
                    
371        [self.customHeaderFields enumerateKeysAndObjectsUsingBlock:^(NSString *key, NSString *obj, BOOL *stop) {
                    
372            [tokenRequest addValue:obj forHTTPHeaderField:key];
                    
383// User Password Flow Only
                    
384- (void)authenticateWithUsername:(NSString *)username password:(NSString *)password;
                    
385{
                    
                
NXOAuth2AccountStore.m https://gitlab.com/duongbadu/Instagram-app-iOS-Coursera | Objective C | 746 lines
                    
38NSString * const kNXOAuth2AccountStoreConfigurationClientID = @"kNXOAuth2AccountStoreConfigurationClientID";
                    
39NSString * const kNXOAuth2AccountStoreConfigurationSecret = @"kNXOAuth2AccountStoreConfigurationSecret";
                    
40NSString * const kNXOAuth2AccountStoreConfigurationAuthorizeURL = @"kNXOAuth2AccountStoreConfigurationAuthorizeURL";
                    
43NSString * const kNXOAuth2AccountStoreConfigurationScope = @"kNXOAuth2AccountStoreConfigurationScope";
                    
44NSString * const kNXOAuth2AccountStoreConfigurationTokenType = @"kNXOAuth2AccountStoreConfigurationTokenType";
                    
45NSString * const kNXOAuth2AccountStoreConfigurationTokenRequestHTTPMethod = @"kNXOAuth2AccountStoreConfigurationTokenRequestHTTPMethod";
                    
174
                    
175- (void)requestAccessToAccountWithType:(NSString *)accountType;
                    
176{
                    
198
                    
199- (void)requestAccessToAccountWithType:(NSString *)accountType username:(NSString *)username password:(NSString *)password;
                    
200{
                    
204
                    
205- (void)requestAccessToAccountWithType:(NSString *)accountType assertionType:(NSURL *)assertionType assertion:(NSString *)assertion;
                    
206{
                    
                
ViewController.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 1214 lines
                    
20#import "ExportEffects.h"
                    
21#import "NSString+Height.h"
                    
22#import "AudioViewController.h"
                    
52@property (nonatomic, copy) NSURL *videoPickURL;
                    
53@property (nonatomic, copy) NSString *audioPickFile;
                    
54
                    
91#pragma mark - File Helper
                    
92- (AVURLAsset *)getURLAsset:(NSString *)filePath
                    
93{
                    
102{
                    
103    NSString *dir = NSTemporaryDirectory();
                    
104    deleteFilesAt(dir, @"mov");
                    
111    
                    
112    NSString *videoTitle = [NSString stringWithFormat:@"%@", GBLocalizedString(@"SelectVideo")];
                    
113    JGActionSheetSection *sectionVideo = [JGActionSheetSection sectionWithTitle:videoTitle
                    
                
VideoThemesData.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 503 lines
                    
90#pragma mark - Common function
                    
91- (NSString*) getWeekdayFromDate:(NSDate*)date
                    
92{
                    
104    
                    
105    NSString *result = nil;
                    
106    switch (weekday)
                    
149
                    
150-(NSString*) getStringFromDate:(NSDate*)date
                    
151{
                    
153    [dateFormatter setDateFormat:@"yyyy/MM/dd"];
                    
154    NSString *strDate = [dateFormatter stringFromDate:date];
                    
155
                    
204    
                    
205    themeNostalgia.imageVideoBorder = [NSString stringWithFormat:@"border_25"];
                    
206    
                    
                
ExportEffects.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 938 lines
                    
111
                    
112- (NSString*)getTempOutputFilePath
                    
113{
                    
113{
                    
114    NSString *path = NSTemporaryDirectory();
                    
115    NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
                    
118    formatter.dateFormat = @"yyyyMMddHHmmssSSS";
                    
119    NSString *nowTimeStr = [formatter stringFromDate:[NSDate dateWithTimeIntervalSinceNow:0]];
                    
120    
                    
125#pragma mark - writeExportedVideoToAssetsLibrary
                    
126- (void)writeExportedVideoToAssetsLibrary:(NSString *)outputPath
                    
127{
                    
364#pragma mark - Export Video
                    
365- (void)addEffectToVideo:(NSString *)videoFilePath withAudioFilePath:(NSString *)audioFilePath
                    
366{
                    
                
UIGlossyButton.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 528 lines
                    
212
                    
213- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
                    
214{
                    
                
MBProgressHUD.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 1024 lines
                    
35	#define MB_MULTILINE_TEXTSIZE(text, font, maxSize, mode) [text length] > 0 ? [text \
                    
36		boundingRectWithSize:maxSize options:(NSStringDrawingUsesLineFragmentOrigin) \
                    
37		attributes:@{NSFontAttributeName:font} context:nil].size : CGSizeZero;
                    
362
                    
363- (void)animationFinished:(NSString *)animationID finished:(BOOL)finished context:(void*)context {
                    
364	[self done];
                    
                
KGModal.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 432 lines
                    
16
                    
17NSString *const KGModalGradientViewTapped = @"KGModalGradientViewTapped";
                    
18
                    
18
                    
19NSString *const KGModalWillShowNotification = @"KGModalWillShowNotification";
                    
20NSString *const KGModalDidShowNotification = @"KGModalDidShowNotification";
                    
20NSString *const KGModalDidShowNotification = @"KGModalDidShowNotification";
                    
21NSString *const KGModalWillHideNotification = @"KGModalWillHideNotification";
                    
22NSString *const KGModalDidHideNotification = @"KGModalDidHideNotification";
                    
                
JGActionSheet.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 1150 lines
                    
114
                    
115- (void)addAnimation:(CAAnimation *)anim forKey:(NSString *)key
                    
116{
                    
206
                    
207+ (instancetype)sectionWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles buttonStyle:(JGActionSheetButtonStyle)buttonStyle
                    
208{
                    
211
                    
212- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message buttonTitles:(NSArray *)buttonTitles buttonStyle:(JGActionSheetButtonStyle)buttonStyle
                    
213{
                    
274
                    
275+ (instancetype)sectionWithTitle:(NSString *)title message:(NSString *)message contentView:(UIView *)contentView
                    
276{
                    
279
                    
280- (instancetype)initWithTitle:(NSString *)title message:(NSString *)message contentView:(UIView *)contentView
                    
281{
                    
                
IASKAppSettingsViewController.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 969 lines
                    
33
                    
34static NSString *kIASKCredits = @"Powered by Johnny Xu"; // Leave this as-is!!!
                    
35
                    
85
                    
86- (NSString*)file {
                    
87	if (!_file) {
                    
92
                    
93- (void)setFile:(NSString *)file {
                    
94    _file = [file copy];
                    
143
                    
144- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
                    
145    if (nibNameOrNil) {
                    
145    if (nibNameOrNil) {
                    
146		NSLog (@"%@ is now deprecated, we are moving away from nibs.", NSStringFromSelector(_cmd));
                    
147		self = [super initWithStyle:UITableViewStyleGrouped];
                    
                
GPUImageMovieWriter.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 921 lines
                    
6
                    
7NSString *const kGPUImageColorSwizzlingFragmentShaderString = SHADER_STRING
                    
8(
                    
73
                    
74- (id)initWithMovieURL:(NSURL *)newMovieURL size:(CGSize)newSize fileType:(NSString *)newFileType outputSettings:(NSMutableDictionary *)outputSettings;
                    
75{
                    
118            {
                    
119                NSString *progLog = [colorSwizzlingProgram programLog];
                    
120                NSLog(@"Program link log: %@", progLog);
                    
120                NSLog(@"Program link log: %@", progLog);
                    
121                NSString *fragLog = [colorSwizzlingProgram fragmentShaderLog];
                    
122                NSLog(@"Fragment shader compile log: %@", fragLog);
                    
122                NSLog(@"Fragment shader compile log: %@", fragLog);
                    
123                NSString *vertLog = [colorSwizzlingProgram vertexShaderLog];
                    
124                NSLog(@"Vertex shader compile log: %@", vertLog);
                    
                
GPUImageVideoCamera.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 1129 lines
                    
27
                    
28NSString *const kGPUImageYUVVideoRangeConversionForRGFragmentShaderString = SHADER_STRING
                    
29(
                    
48
                    
49NSString *const kGPUImageYUVFullRangeConversionForLAFragmentShaderString = SHADER_STRING
                    
50(
                    
69
                    
70NSString *const kGPUImageYUVVideoRangeConversionForLAFragmentShaderString = SHADER_STRING
                    
71(
                    
144
                    
145- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition; 
                    
146{
                    
254                {
                    
255                    NSString *progLog = [yuvConversionProgram programLog];
                    
256                    NSLog(@"Program link log: %@", progLog);
                    
                
GPUImageToneCurveFilter.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 621 lines
                    
101#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
                    
102NSString *const kGPUImageToneCurveFragmentShaderString = SHADER_STRING
                    
103(
                    
118#else
                    
119NSString *const kGPUImageToneCurveFragmentShaderString = SHADER_STRING
                    
120(
                    
199
                    
200- (id)initWithACV:(NSString*)curveFilename
                    
201{
                    
211
                    
212- (void)setPointsWithACV:(NSString*)curveFilename
                    
213{
                    
                
GPUImageStillCamera.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 338 lines
                    
64
                    
65- (id)initWithSessionPreset:(NSString *)sessionPreset cameraPosition:(AVCaptureDevicePosition)cameraPosition;
                    
66{
                    
                
GPUImageMovie.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 759 lines
                    
109                {
                    
110                    NSString *progLog = [yuvConversionProgram programLog];
                    
111                    NSLog(@"Program link log: %@", progLog);
                    
111                    NSLog(@"Program link log: %@", progLog);
                    
112                    NSString *fragLog = [yuvConversionProgram fragmentShaderLog];
                    
113                    NSLog(@"Fragment shader compile log: %@", fragLog);
                    
113                    NSLog(@"Fragment shader compile log: %@", fragLog);
                    
114                    NSString *vertLog = [yuvConversionProgram vertexShaderLog];
                    
115                    NSLog(@"Vertex shader compile log: %@", vertLog);
                    
                
GPUImageGaussianBlurFilter.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 488 lines
                    
13
                    
14- (id)initWithFirstStageVertexShaderFromString:(NSString *)firstStageVertexShaderString firstStageFragmentShaderFromString:(NSString *)firstStageFragmentShaderString secondStageVertexShaderFromString:(NSString *)secondStageVertexShaderString secondStageFragmentShaderFromString:(NSString *)secondStageFragmentShaderString
                    
15{
                    
29{
                    
30    NSString *currentGaussianBlurVertexShader = [[self class] vertexShaderForOptimizedBlurOfRadius:4 sigma:2.0];
                    
31    NSString *currentGaussianBlurFragmentShader = [[self class] fragmentShaderForOptimizedBlurOfRadius:4 sigma:2.0];
                    
40
                    
41+ (NSString *)vertexShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma;
                    
42{
                    
90
                    
91+ (NSString *)fragmentShaderForStandardBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma;
                    
92{
                    
167
                    
168+ (NSString *)vertexShaderForOptimizedBlurOfRadius:(NSUInteger)blurRadius sigma:(CGFloat)sigma;
                    
169{
                    
                
GPUImageFilter.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 755 lines
                    
57
                    
58- (id)initWithVertexShaderFromString:(NSString *)vertexShaderString fragmentShaderFromString:(NSString *)fragmentShaderString;
                    
59{
                    
86            {
                    
87                NSString *progLog = [filterProgram programLog];
                    
88                NSLog(@"Program link log: %@", progLog);
                    
88                NSLog(@"Program link log: %@", progLog);
                    
89                NSString *fragLog = [filterProgram fragmentShaderLog];
                    
90                NSLog(@"Fragment shader compile log: %@", fragLog);
                    
120
                    
121- (id)initWithFragmentShaderFromFile:(NSString *)fragmentShaderFilename;
                    
122{
                    
123    NSString *fragmentShaderPathname = [[NSBundle mainBundle] pathForResource:fragmentShaderFilename ofType:@"fsh"];
                    
124    NSString *fragmentShaderString = [NSString stringWithContentsOfFile:fragmentShaderPathname encoding:NSUTF8StringEncoding error:nil];
                    
125
                    
                
GPUImageDilationFilter.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 431 lines
                    
4
                    
5NSString *const kGPUImageDilationRadiusOneVertexShaderString = SHADER_STRING
                    
6(
                    
28
                    
29NSString *const kGPUImageDilationRadiusTwoVertexShaderString = SHADER_STRING
                    
30(
                    
56
                    
57NSString *const kGPUImageDilationRadiusThreeVertexShaderString = SHADER_STRING
                    
58(
                    
88
                    
89NSString *const kGPUImageDilationRadiusFourVertexShaderString = SHADER_STRING
                    
90(
                    
125#if TARGET_IPHONE_SIMULATOR || TARGET_OS_IPHONE
                    
126NSString *const kGPUImageDilationRadiusOneFragmentShaderString = SHADER_STRING
                    
127(
                    
                
CustomVideoCompositor.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 500 lines
                    
66{
                    
67    return @{ (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey : @[ @(kCVPixelFormatType_32BGRA) ] };
                    
68}
                    
71{
                    
72    return @{ (__bridge NSString *)kCVPixelBufferPixelFormatTypeKey : @[ @(kCVPixelFormatType_32BGRA) ] };
                    
73}
                    
382    NSArray *arrayResult = nil;
                    
383    NSString *flag = @"ArrayPathPoints";
                    
384    NSUserDefaults *userDefaultes = [NSUserDefaults standardUserDefaults];
                    
403{
                    
404    NSString *flag = @"arrayRect";
                    
405    NSUserDefaults *userDefaultes = [NSUserDefaults standardUserDefaults];
                    
415//            {
                    
416//                NSLog(@"[arrayResult[0] CGRectValue: %@", NSStringFromCGRect(innerVideoRect));
                    
417//            }
                    
                
CameraRecorder.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 1047 lines
                    
216
                    
217- (AVCaptureConnection *)connectionWithMediaType:(NSString *)mediaType fromConnections:(NSArray *)connections;
                    
218{
                    
                
CaptureViewController.m https://gitlab.com/Mr.Tomato/VideoEffects | Objective C | 729 lines
                    
68        
                    
69        NSString *success = GBLocalizedString(@"Failed");
                    
70        ProgressBarDismissLoading(success);
                    
75        
                    
76        NSString *success = GBLocalizedString(@"Success");
                    
77        ProgressBarDismissLoading(success);
                    
134
                    
135    NSString *success = GBLocalizedString(@"Success");
                    
136    ProgressBarDismissLoading(success);
                    
151{
                    
152    NSString *outputFile = [outputFileURL path];
                    
153    NSLog(@"didRecordingVideosSuccess: %@", outputFile);
                    
154    
                    
155    NSString *success = GBLocalizedString(@"Success");
                    
156    ProgressBarDismissLoading(success);
                    
                
RxLabel.m https://gitlab.com/Mr.Tomato/RxLabel | Objective C | 459 lines
                    
170                                    (NSString*)kCTForegroundColorAttributeName:(id)self.textColor.CGColor,
                    
171                                    (NSString*)kCTParagraphStyleAttributeName:(id)style
                    
172                                    };
                    
184    NSMutableArray* urlArray = [NSMutableArray array];
                    
185    NSString* filteredText = [[NSString alloc] init];
                    
186    [RxLabel filtUrlWithOriginText:self.text urlArray:urlArray filteredText:&filteredText];
                    
204        CFAttributedStringSetAttributes((CFMutableAttributedStringRef)attrStr, CFRangeMake(range.location, range.length), (CFDictionaryRef)@{
                    
205                                                                                                                                             (NSString*)kCTRunDelegateAttributeName:(__bridge id)delegate,
                    
206                                                                                                                                             @"url":urlStr
                    
310#pragma mark - filter url and generate display text and url array
                    
311+(void)filtUrlWithOriginText:(NSString *)originText urlArray:(NSMutableArray *)urlArray filteredText:(NSString *__autoreleasing *)filterText{
                    
312    *filterText = [NSString stringWithString:originText];
                    
329        unichar objectReplacementChar = 0xFFFC;
                    
330        NSString * replaceContent = [NSString stringWithCharacters:&objectReplacementChar length:1];
                    
331        *filterText = [*filterText stringByReplacingCharactersInRange:range withString:replaceContent];
                    
                
CCTMXXMLParser.m https://gitlab.com/Mr.Tomato/smooth-drawing | Objective C | 523 lines
                    
134
                    
135+(id) formatWithXML:(NSString*)tmxString resourcePath:(NSString*)resourcePath
                    
136{
                    
139
                    
140- (void) internalInit:(NSString*)tmxFileName resourcePath:(NSString*)resourcePath
                    
141{
                    
156
                    
157-(id) initWithXML:(NSString *)tmxString resourcePath:(NSString*)resourcePath
                    
158{
                    
202
                    
203- (void) parseXMLString:(NSString *)xmlString
                    
204{
                    
220// the XML parser calls here with all the elements
                    
221-(void)parser:(NSXMLParser *)parser didStartElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName attributes:(NSDictionary *)attributeDict
                    
222{
                    
                
CCSpriteBatchNode.m https://gitlab.com/Mr.Tomato/smooth-drawing | Objective C | 663 lines
                    
80 */
                    
81+(id)batchNodeWithFile:(NSString*)fileImage capacity:(NSUInteger)capacity
                    
82{
                    
85
                    
86+(id)batchNodeWithFile:(NSString*) imageFile
                    
87{
                    
116 */
                    
117-(id)initWithFile:(NSString *)fileImage capacity:(NSUInteger)capacity
                    
118{
                    
122
                    
123- (NSString*) description
                    
124{
                    
124{
                    
125	return [NSString stringWithFormat:@"<%@ = %08X | Tag = %i>", [self class], self, tag_ ];
                    
126}
                    
                
CCSprite.m https://gitlab.com/Mr.Tomato/smooth-drawing | Objective C | 951 lines
                    
85
                    
86+(id)spriteWithFile:(NSString*)filename
                    
87{
                    
90
                    
91+(id)spriteWithFile:(NSString*)filename rect:(CGRect)rect
                    
92{
                    
100
                    
101+(id)spriteWithSpriteFrameName:(NSString*)spriteFrameName
                    
102{
                    
108
                    
109+(id)spriteWithCGImage:(CGImageRef)image key:(NSString*)key
                    
110{
                    
182
                    
183-(id) initWithFile:(NSString*)filename
                    
184{
                    
                
 

Source

Language