Any native API for credit/ debit card info scan

2015-08-26 Thread Devarshi Kulshreshtha
In iOS 8, Apple has a new feature in Safari that allows users to scan a credit card with the device’s camera rather than manually entering the number when making a purchase online. Does it also expose native APIs for the same to be used by developer community as well? Any ideas? -- Thanks, Deva

Re: Any native API for credit/ debit card info scan

2015-08-26 Thread Devarshi Kulshreshtha
://www.card.io > > Thanks, > Jon > > > > On Aug 26, 2015, at 12:23 AM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > > In iOS 8, Apple has a new feature in Safari that allows users to scan a > > credit card with the device’s cam

Converted mov to mp4, output file not working in default android video player

2015-09-04 Thread Devarshi Kulshreshtha
I used below code to convert an mov file to mp4 in my mac os x app: - (IBAction)convertAction:(id)sender { NSString *sampleMov = [@"~/Desktop/sample_mov.mov" stringByExpandingTildeInPath]; AVURLAsset *avAsset = [AVURLAsset URLAssetWithURL:[NSURL fileURLWithPath:sampleMov] options:nil];

Data not retained in document based core data app with cocoa bindings

2015-10-10 Thread Devarshi Kulshreshtha
I am trying to make a simple document based core data app using cocoa bindings by following below steps: *Step 1: *Selected the default template for a document based mac os x app with core data as enabled *Step 2:* It generated below files - *a*. AppDelegate.swift *b*. ViewController.swift *c.*

Re: Data not retained in document based core data app with cocoa bindings

2015-10-11 Thread Devarshi Kulshreshtha
ot showing any data in opened window. Looking for more clues :-| On Sun, Oct 11, 2015 at 11:20 AM, Richard Charles wrote: > > > On Oct 10, 2015, at 12:34 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > > I am sure that I am missing something

App Transport Security has blocked a cleartext HTTP for a local IP

2015-10-15 Thread Devarshi Kulshreshtha
Our webservices are hosted in some local IP, to bypass the App Transport Security I added this as dictionary for NSAppTransportSecurity key in my info.plist file: NSAllowsArbitraryLoads NSExceptionDomains localhost NSExceptionAllowsInsecureHTTPLoads 10.32.27.12 NSExceptionAllowsInsecureHTT

Re: App Transport Security has blocked a cleartext HTTP for a local IP

2015-10-16 Thread Devarshi Kulshreshtha
we miss to update the info.plist then it will be security vulnerability.. right? > > On Oct 15, 2015, at 3:56 PM, Marek Hrušovský wrote: > > > I read on some blogposts that ios9 GM did not support IP addresses for > ATS. > > Do not know if this has changed. > &g

Re: App Transport Security has blocked a cleartext HTTP for a local IP

2015-10-16 Thread Devarshi Kulshreshtha
> I read on some blogposts that ios9 GM did not support IP addresses for > ATS. Do not know if this has changed. > > I am testing it on iOS9 simulator :-/ > On Thu, Oct 15, 2015 at 9:06 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > >> O

Re: App Transport Security has blocked a cleartext HTTP for a local IP

2015-10-16 Thread Devarshi Kulshreshtha
On Fri, Oct 16, 2015 at 1:59 AM, Jens Alfke wrote: > What’s the exact URL that failed to load? > > —Jens http://10.32.27.12/api/Students -- Thanks, Devarshi ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests

How to comply to Disability Discrimination Act of 1995 while developing an iOS app

2016-04-17 Thread Devarshi Kulshreshtha
We have a requirement from our UK client in which he wants us to comply to Disability Discrimination Act of 1995 ( https://en.wikipedia.org/wiki/Disability_Discrimination_Act_1995) while developing the iOS app. I tried to search about it on Internet but most of the information is available on compl

Using protocol extension to dismiss keyboard on outside tap

2016-04-18 Thread Devarshi Kulshreshtha
In my project I have few view controllers which are subclasses of UITableViewController, UIViewController, on each I want to implement this behavior: > When user taps outside of a text field it should dismiss the keyboard which was visible when user tapped inside it. I can easily implement it by

Re: Using protocol extension to dismiss keyboard on outside tap

2016-04-18 Thread Devarshi Kulshreshtha
mor...@rivergatesoftware.com> wrote: > On Apr 18, 2016, at 01:07 , Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > >extension DismissKeyboardOnOutsideTap { >func configureToDismissKeyboard() { >… >

Re: Using protocol extension to dismiss keyboard on outside tap

2016-04-18 Thread Devarshi Kulshreshtha
Thanks, I ended doing exactly what you suggested. On Mon, Apr 18, 2016 at 10:41 PM, Quincey Morris < quinceymor...@rivergatesoftware.com> wrote: > On Apr 18, 2016, at 08:48 , Alex Kac wrote: > > > Protocol extensions are Swift only - not ObjC compatible I believe. > > > You’re right, and I don’t

Could not cast value of type 'Medication.Nurse' to 'MedicationTests.Nurse'

2016-08-22 Thread Devarshi Kulshreshtha
I am making an app with name - "Medication", in which I am trying to implement unit test cases for certain operations on my managed objects. Here is my entity: Entity name: Nurse attribute 1: email attribute 2: password relationship: patient In model editor by default it is

Re: Could not cast value of type 'Medication.Nurse' to 'MedicationTests.Nurse'

2016-08-22 Thread Devarshi Kulshreshtha
Found answer over here: https://forums.developer.apple.com/thread/11342 On Mon, Aug 22, 2016 at 2:41 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > I am making an app with name - "Medication", in which I am trying to > implement unit test cases for ce

Launching iOS 10 supported build using Xcode 7

2016-09-09 Thread Devarshi Kulshreshtha
We have a thoroughly tested build on iOS9 using Xcode 7 swift 2.2, we are planning to release it on 16th of this month, since iOS10 will be released on 13th wanted to know that can we still release the build (iOS10 compatible) using Xcode 7 without upgrading it to swift 2.3? Please suggest. _

Implementing own text prediction on UITextField

2016-09-29 Thread Devarshi Kulshreshtha
Currently when we type on a text field it shows text prediction over keyboard on a bar, is there any way to populate the same with say a dictionary, or a plist, etc. Basically populating it using own data source rather than system data source. Any ideas guys? Thanks in advance. __

MKMapView hybrid mode app hang problem

2017-01-19 Thread Devarshi Kulshreshtha
I have MKMapView on layout, if I enable Standard Mode and quickly perform basic operations on it such as - zoom - in / out, pan it works fine but if I perform same operations on MKMapView with hybridFlyover mode enabled CPU utilisation reaches 100% and my app hangs. Any ideas on how can resolve it

Showing keyboard on SKScene - Swift

2014-09-28 Thread Devarshi Kulshreshtha
I am trying to show keyboard over an SKScene, I followed below steps: 1. Created a subclass of UIView - KeyboardDummyView 2. Implemented protocol UIKeyInput in it 3. Added a subview to GameViewController 4. Changed class of subview added to KeyboardDummyView For some reasons it is not working as

Obtaining class of key at runtime

2014-10-06 Thread Devarshi Kulshreshtha
I have a class with below interface: @interface MyData : NSObject @property (readwrite, strong) NSString *urlToParse; @property (readwrite, strong) MappingElement *titleElement; - (instancetype)initWithPlist:(NSString *)plistPath; Its implementation is like this: - (instancetype)initWithPlist:

Re: Obtaining class of key at runtime

2014-10-06 Thread Devarshi Kulshreshtha
Scenario 1: Do not initialize instance variables in initWithPlist method > > In this case if I try to log class of key in setValue:forKey method, > it prints nil > > > That doesn't make any sense — it's illegal to pass a nil key to > setValue:ForKey:. Who is calling this method? This method is au

XPCService not getting launched from app

2014-10-09 Thread Devarshi Kulshreshtha
I am trying a simple sample app on XPCServices, in which I am following below steps: Step 1: Created a sample project and added target - XPCServices with name - HelperProcess to it. When the target is created XCode automatically generates below files: 1. HelperProcessProtocol.h 2. HelperProcess

Re: XPCService not getting launched from app

2014-10-12 Thread Devarshi Kulshreshtha
p performed its intended function nor it displayed the log message added in 'listener:shouldAcceptNewConnection:' delegate. I am clueless. Kindly suggest if I am missing any thing? Is it possible to get XPC service sample app working without a registered mac developer account? On Fri, O

Swift - Basic query regarding managedObjectContext method invocation from app delegate

2014-10-14 Thread Devarshi Kulshreshtha
I am trying to implement reset functionality in core data based sample app. I think that there are two ways to implement reset functionality: Approach 1: Delete sqlite file and then re-insert data Approach 2: Retrieve all data in managedObjectContext, delete retrieved data and then re-insert da

Re: Swift - Basic query regarding managedObjectContext method invocation from app delegate

2014-10-14 Thread Devarshi Kulshreshtha
I know about NSBatchUpdateRequest and NSAsynchronousFetchRequest, is there any other fun part in modern world which can help me in my requirement, excited to know ;) On Wed, Oct 15, 2014 at 1:13 AM, Jerry Krinock wrote: > >> On 2014 Oct 14, at 05:42, Devarshi Kulshreshtha >> wr

Keyboard notifications triggered unnecessarily upon showing UIAlertview on iOS8.3

2015-05-19 Thread Devarshi Kulshreshtha
Greetings! We are observing unusual behaviour with respect to Keyboard willshow & will hide notification on iOS 8.3. The viewcontroler (listenig to keyboard notifications) has a textfiled and upon clicking and upon tapping the submit button, the method first resigns the first responder from textf

Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Devarshi Kulshreshtha
I have an array controller which stores managed objects of entity 'Student', I am trying to iterate over its content using below code: for (index, element) in downloadingFilesArrayController.arrangedObjects{ // want to do some useful things on element } for some reasons it is showing

Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Devarshi Kulshreshtha
> > You’re trying to iterate an array of something and put each element into a > tuple of ( index, element ), that’s not going to work. > >> ok > > > Either > > for element in downlaodFileArrayController.arrangedObects {} > >> Got compilation error: Type 'AnyObject' does not conform to protocol

Re: Swift : iterating over NSArrayController arrangedObjects

2015-06-21 Thread Devarshi Kulshreshtha
Thanks for your help :) I got it working using this: for index in downloadingFilesArrayController.arrangedObjects as! [AnyObject] { } On Sun, Jun 21, 2015 at 8:01 PM, Ken Thomases wrote: > On Jun 21, 2015, at 8:44 AM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote:

EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000bbadbeef crash on UIWebview

2015-06-22 Thread Devarshi Kulshreshtha
Here is my viewDidLoad method: EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0xbbadbeef - (void)viewDidLoad { [super viewDidLoad]; [self setTitle:[self.parameters_ get:@"title"]]; whiteBGLayer = [[CALayer alloc] init]; [whiteBGLayer setBackgroundColor:[UIColor whiteColor].CGColo

Re: EXC_BAD_ACCESS KERN_INVALID_ADDRESS at 0x00000000bbadbeef crash on UIWebview

2015-06-22 Thread Devarshi Kulshreshtha
lso suggests that the bbadbeef code can mean WebKit > couldn’t allocate enough memory. Maybe you’re using too much memory in your > app in total? > > > On 22 Jun 2015, at 09:21, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > > Here

UIPageViewController not resizing its child view controllers on rotation

2015-06-30 Thread Devarshi Kulshreshtha
I am trying to use UIPageViewController with view controllers added to it, problem is if I launch the app in portrait mode it appears perfectly like this: http://i.stack.imgur.com/ryT5d.png but if I rotate the device to landscape mode it appears like this: http://i.stack.imgur.com/GnuYH.png Tho

Integrating touch Id with sign up-in process in client-server based app

2015-07-16 Thread Devarshi Kulshreshtha
Hi All, I am working on an app in which user can perform registration and then can login into it by entering his email id and password. As per the new requirements client wants us to support touch Id authentication during sign in process. After reading through the documentation what I have under

Will iOS app accepted on App Store if 80% of UI is rendered on UIWebView and 20% being native OCR

2015-08-19 Thread Devarshi Kulshreshtha
I have a mobile website which at high level provides these functionalities: 1. Sign-in 2. Sign-up 3. Few forms where user can fill his additional details 4. Providing some capabilities to user based on information provided by him Now I want to integrate OCR capabilities such as: 1. ID card

Simple PDF generation code not working as intended

2011-10-12 Thread Devarshi Kulshreshtha
Hi all, I am trying a simple application to generate pdf from contents in a text view. I am using below code: NSPrintInfo *pdfDisplayInfo = [[NSPrintInfo alloc] initWithDictionary:[NSDictionary dictionaryWithObjectsAndKeys:@"YES",NSPrintHeaderAndFooter,nil]]; [pdfDisplayInfo setV

Filling gradient in NSTableHeaderView not working properly

2011-12-13 Thread Devarshi Kulshreshtha
Hi all, I am trying to fill gradient in header of tableview. So far I am able to achieve it by subclassing NSTableHeaderView and using this code in it- - (void)drawRect:(NSRect)dirtyRect { // Drawing code here. NSGradient *gradientToFill = [[NSGradient alloc] initWithStartingColo

NSTextField subclass not working properly

2012-01-02 Thread Devarshi Kulshreshtha
Hi all, I am using below code to subclass NSTextField- - (void)drawRect:(NSRect)dirtyRect { // black outline NSRect blackOutlineFrame = NSMakeRect(0.0, 0.0, [self bounds].size.width, [self bounds].size.height-1.0); NSGradient *gradient = nil; if ([NSApp isActive]) {

How to show last name of user in text field whose first name is selected in popup button

2012-02-02 Thread Devarshi Kulshreshtha
Hi All, I have an array of dictionary which contains two keys- firstName and lastName and their values, eg. firstName/ lastName Steve/ Jobs Andre/ Agassi Christiano/ Ronaldo User interface consists of a pop up button and a text field. I am displaying first name of users in pop up button. I am

NSComboBox in NSTableView behaving strangely

2011-07-05 Thread Devarshi Kulshreshtha
Hi All, I am trying a sample application, which enlists some entities to purchase and their respective cost. In data model I created two entities: 1. Daily Transaction (Attribute: cost, Relationship: relatedEntity) 2. Entity (Attribute: name, Relationship: dailyTransactions) Controls used in XI

Re: NSComboBox in NSTableView behaving strangely

2011-07-06 Thread Devarshi Kulshreshtha
Path -> name Note: code can be found here - http://dl.dropbox.com/u/259/TableWithComboBoxExperi.zip On Wed, Jul 6, 2011 at 11:44 AM, Quincey Morris wrote: > On Jul 5, 2011, at 04:11, Devarshi Kulshreshtha wrote: > > > When I am selecting a value in dropdown list of combobox c

Storing help pages on Remote Server

2010-07-29 Thread Devarshi Kulshreshtha
Hi all, I have made a sample application in which I am able to implement help book via help viewer . Right now it is storing and displaying content from application bundle, but I want to implement Internet Primary help book content, in which it checks the server to determine whether a newer versi

Highlighting only image over button when it is clicked

2010-09-01 Thread Devarshi Kulshreshtha
Hi all, Right now when I set an image over a button and make it border-less and try to click it, it always shows a rectangular portion highlighted along with the image, which is the actual dimension of button clicked. My requirement is: I want to highlight only the image over it, not the whole re

Unable to play a .mp3 file directly using QTMovie

2010-10-05 Thread Devarshi Kulshreshtha
Hi all, I am trying to play a .mp3 file on click of a button using this code: NSString *audioFilePath=[[audioInputTextField stringValue] stringByAddingPercentEscapesUsingEncoding:NSUTF8Strin

Application crashing due to unicode characters in string

2010-12-01 Thread Devarshi Kulshreshtha
Hi all, I am making an application in which I have to store data from remote db into local sqlite3 db. Problem is - when any string to be inserted contains unicode character such as: \U00a0 or \U2022 or \U2019, it crashes. The part of code which crashes is this- NSString *insertQuery = @"insert

Core data - binding related problem in NSNumberFormatter and NSDatePicker

2010-12-14 Thread Devarshi Kulshreshtha
Hi all, I am trying a core-data sample application, from Cocoa Programming - Aaron Hillegass. In it there is an entity Car, with following properties: 1. condition - Int 16 2. datePurchased - Date 3. makeModel - String 4. onSpecial - Boolean 5. photo - Binary 6. price - Decimal There are certai

Core data - binding related problem in NSNumberFormatter and NSDatePicker

2010-12-16 Thread Devarshi Kulshreshtha
Hi Pat, Regarding: For #1, you have an non-ascii character at the front of the number formatter > (in IB). It is now working correctly when I am entering the price with $ symbol prefixed, eg. $123,00 :) I think that this is not user intuitive, user may not always know that he/ she has to prefi

Unable to pass NSString as argument in NSButton binding

2012-03-28 Thread Devarshi Kulshreshtha
Hi All, I am trying to perform an action on a button using bindings, so I declared and defined following method in my app-controller class: - (void)selectFolderAtPath:(NSString *)path; And I did following bindings on button in IB: Argument: Bind to: App Delegate Model Key Path:

Unable to edit text field on view in status bar - menu item

2012-06-26 Thread Devarshi Kulshreshtha
Hi All, In my application I have a status bar, showing a menu item. I have done binding of a view to the menu item, in XIB, such that it shows view when status item is clicked. I am showing a text field on the view. Problem is - when application is active, I am able to edit content in text field,

identifying if an application is not responding

2012-07-08 Thread Devarshi Kulshreshtha
Hi All, Is there any way to identify if an application is 'not responding' like how it shows in 'Force Quit' window when an application is unresponsive. I checked methods declared in NSApplicationDelegate, checked class reference of NSRunningApplication but I did n't get any useful method or prop

Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Devarshi Kulshreshtha
Hi All, I need some suggestions on an implementation. Say I have an employee entity and a company entity in core data. So employee and company are related to each other like this: Employee <<---> Company Now I am trying to right a manageRelationships method in each class, something like this:

Re: Managing relationships by fetching related objects within subclass of NSManagedObject

2013-02-09 Thread Devarshi Kulshreshtha
( aCompanyObject.employee == nil) then only map the relationship else not? Also can you elaborate with a simple example about how to be watchful of fault-firing? Thanks, Devarshi On Sun, Feb 10, 2013 at 12:16 AM, Keary Suska wrote: > > On Feb 9, 2013, at 10:20 AM, Devarshi Kulshreshtha wrote: > > >

Post to a particular friend or friends group on Facebook

2013-07-04 Thread Devarshi Kulshreshtha
We can post to all our friends on facebook using this key value pair: @"ACFacebookAudienceKey" : ACFacebookAudienceFriends Is there any way by which we can post to a particular friend group say - "Colleague" or "School Friends" or to post to a particular friend. Please suggest. -- Thanks, Dev

Re: Post to a particular friend or friends group on Facebook

2013-07-04 Thread Devarshi Kulshreshtha
.. without using NSSharingServicePicker or UIActivityViewController On Thu, Jul 4, 2013 at 10:31 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > We can post to all our friends on facebook using this key value pair: > > @"ACFacebookAudienceKey" :

NSSortDescriptor for A <-->> B <-->> C relationships

2013-07-10 Thread Devarshi Kulshreshtha
I am trying to initialize a NSFetchedResultsController. In the data model I have 3 entities related to each other like this: A <-->> B <-->> C Entity 'A' has a property 'name' and entity 'C' has property 'someDate'. I want to get all managedObjects belonging to entity 'A', sorted in below order

Button on side menu not working

2013-07-28 Thread Devarshi Kulshreshtha
I am able to implement side menu functionality using below code: -(IBAction)menu:(id)sender { if (!_menuView) { _menuView=[[MenuWidget alloc]init]; _menuView.view.frame=CGRectMake(-160,0,160,440); [self.view addSubview:_menuView.view];

Storyboard - container view - embed different views based on condition

2013-08-16 Thread Devarshi Kulshreshtha
In my storyboard app I have view hierarchy like this: 1. ParentViewController has a container view (dragged and dropped the container view from library on to the view of parent view controller). 2. Container view can embed one of the three view controllers, based on some condition. While impl

Modifying the default -Prefix.pch file

2013-08-25 Thread Devarshi Kulshreshtha
I would like to know how I can modify the default .pch file included with the xcode project templates. Example: to add below #define in default pch file- #define APP_DELEGATE ((AppDelegate*)[[UIApplication sharedApplication] delegate]) I tried searching for a template .pch file within xcode's p

Cocoa + Automator : service to generate text files not working

2013-08-27 Thread Devarshi Kulshreshtha
I am trying to create an automator service using cocoa, which will simply create a text file with the name of files selected, at the same path, for which I wrote below code: - (id)runWithInput:(id)input fromAction:(AMAction *)anAction error:(NSDictionary **)errorInfo { // Add your code here, retur

Re: Cocoa + Automator : service to generate text files not working

2013-08-27 Thread Devarshi Kulshreshtha
thnx tone.. you caught a silly mistake :-) On Tue, Aug 27, 2013 at 8:24 PM, Fritz Anderson wrote: > On 27 Aug 2013, at 4:02 AM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > My problem is the service created is not appearing when I am trying to >

Re: Cocoa + Automator : service to generate text files not working

2013-08-27 Thread Devarshi Kulshreshtha
I have one more question: Can we add a menu item with submenu through Automator services? On Tue, Aug 27, 2013 at 10:44 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > thnx tone.. you caught a silly mistake :-) > > > On Tue, Aug 27, 2013 at 8:24 PM, Fritz

In app purchase + redeem points as gift vouchers

2017-07-24 Thread Devarshi Kulshreshtha
We are developing a multiplayer game in which user has to buy some credit point through in app purchase, then he can multiply those points by winning multiplayer challenges with friends. On reaching a certain level of points, he can reward himself by re-deeming gift vouchers (amazon, ebay, etc) thr

dequeueReusableCellWithIdentifier bad performance in case of less number of cells?

2018-01-10 Thread Devarshi Kulshreshtha
I had a discussion with my colleagues regarding use of dequeueReusableCellWithIdentifier, few of them are under assumption that if there are less number of cells it is better to directly alloc init a UITableViewCell in place of using dequeueReusableCellWithIdentifier. They are saying that since at

CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-05 Thread Devarshi Kulshreshtha
I am trying to turn my macbook into BLE by using below code: var peripheralManager: CBPeripheralManager! let uuid = "A6C4C5FA-A8DD-4BA1-B9A8-A240584F02D3" let options = [CBCentralManagerOptionShowPowerAlertKey:0] manager = CBPeripheralManager(delegate: self, queue: nil, options: options) For som

Re: CBPeripheralManager state unsupported Mac OS 10.12.6

2018-02-05 Thread Devarshi Kulshreshtha
Tue, Feb 6, 2018 at 2:07 AM, Saagar Jha wrote: > What Mac are you using? Are you sure your Mac supports Bluetooth LE (I’m > sure you already know this, but I just wanted to make sure)? > > Saagar Jha > > On Feb 5, 2018, at 05:25, Devarshi Kulshreshtha < > devarshi.bluec...@gm

UITabBarItem selection Voice over speaks number apart from accessibility label,value

2018-04-05 Thread Devarshi Kulshreshtha
I am programmatically assigning bar button items to UITabBar using below code: -(void)setupTabs { UIImage *icon1 = [[UIImage imageNamed:@"Icon1"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; UITabBarItem *option1 = [[UITabBarItem alloc] initWithTitle:@"Option1" image: icon1

Force portrait orientation programmatically

2018-04-17 Thread Devarshi Kulshreshtha
In our app we are supporting both orientations, however on selection of one option we have to force user to remain only in portrait mode on all the screens until he toggles it. So far we have found only this workable solution: [[UIDevice currentDevice] setValue:@(UIInterfaceOrientationLandscapeLef

SFSpeechRecognizer - recognitionTaskWithRequest - result not found

2018-05-11 Thread Devarshi Kulshreshtha
I am executing SpeakToMe code ( https://developer.apple.com/library/content/samplecode/SpeakToMe/Introduction/Intro.html ) provided by apple on an iPad. Most of the time it works fine, however sometimes it does not recognize speech by user, below is the part of code which does not work as expected

Drawing boxes around each digit entered in UITextField (Number Pad)

2019-02-09 Thread Devarshi Kulshreshtha
I am trying to draw boxes around each digit entered by a user in UITextField for which keyboard type is - Number Pad. To simplify the problem statement I assumed that each of the digits (0 to 9) will have same bounding box for its glyph, which I obtained using below code: func getGlyphBoundingRec

Re: Drawing boxes around each digit entered in UITextField (Number Pad)

2019-02-09 Thread Devarshi Kulshreshtha
wing > when not editing would follow the non-boxed method. > -- > Gary L. Wade > http://www.garywade.com/ > > On Feb 9, 2019, at 12:36 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > I am trying to draw boxes around each digit entered by a

Identify extension of a file without extension

2013-09-28 Thread Devarshi Kulshreshtha
In my current application I am downloading few files from server, and storing them locally. Based on extension of file I am loading the file in appropriate view. Example: 1. file extensions: mov, 3gp, m4a, etc., => display in media player. 2. file extensions: rtf, pptx, numbers, etc., =>

Re: Identify extension of a file without extension

2013-09-28 Thread Devarshi Kulshreshtha
Thanks, will check for sure.. one more query.. will it be applicable in an ios app? Mine is an iOS app. On Sat, Sep 28, 2013 at 4:29 PM, Charles Srstka wrote: > On Sep 28, 2013, at 4:17 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > 1. Is there any

QLPreviewController - Implementation as in DocInteraction sample

2013-09-29 Thread Devarshi Kulshreshtha
I have a tab bar based app,on tap of each tab bar item, I am showing a navigation controller. In root view controller, I am showing a list of files. Once user taps a row, I am pushing a UIViewController. So content area appears between the navigation bar and the tab bar. I am trying to integrate t

Configuring bottom bar in QLPreviewController

2013-10-02 Thread Devarshi Kulshreshtha
I have integrated QLPreviewController and UIDocumentInteractionController in my app, and it is working fine. The only problem is- I want to configure the bottom toolbar, I want to remove the default toolbar items, which appear as shown in this image : http://i.stack.imgur.com/rm9fe.png Is there

Disabling copy operation in QLPreviewController

2013-10-02 Thread Devarshi Kulshreshtha
Is there any way to disable copy of content when we are viewing a text file, in QLPreviewController? I tried to sub-class it and override- canBecomeFirstResponder and returned NO, but it did not work :-( Please suggest. ___ Cocoa-dev mailing list (Coco

viewForZoomingInScrollView working but with extra blank space

2013-10-02 Thread Devarshi Kulshreshtha
I am trying to implement default photos app like functionality. I have added an image view to scroll view and implemented below method: - (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView { return self.fileDisplayImageView; } Problem is though it is zooming the

Re: viewForZoomingInScrollView working but with extra blank space

2013-10-02 Thread Devarshi Kulshreshtha
I have uploaded the sample code over here: https://db.tt/wrNjTLkV On Wed, Oct 2, 2013 at 9:26 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > I am trying to implement default photos app like functionality. > > I have added an image view to scroll view and im

txt file renamed to mp3, MPMoviePlayerPlaybackDidFinishReasonUserInfoKey returning 0

2013-10-03 Thread Devarshi Kulshreshtha
I am trying to identify if a file can be played in MPMoviePlayer or not, for this I have added below code in viewDidLoad: [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(moviePlayBackDidFinish:) name:MPMoviePlayerPlaybackDidFinishNotification object:_fileDisplayMovieP

UIActivityViewController not displaying third party apps

2013-10-06 Thread Devarshi Kulshreshtha
I am trying to use UIActivityViewController as open-in option in my app. I am using below code: - (void)displayThroughOpenIn { NSString *localFilePathString = [self generateLocalPathForFile:self.mCurrentFile]; NSURL *localFilePath = [NSURL fileURLWithPath:localFilePathString]; NSArr

UITextView created programmatically, allowing selection but no edit, ios6+

2013-10-15 Thread Devarshi Kulshreshtha
I am trying to create a UITextView programmatically using below code: - (void)setupTextView { if (!_logDetailView) { CGSize viewSize = self.view.bounds.size; CGRect frame =CGRectMake(0.0f,2.0f , viewSize.width, viewSize.height); _logDetai

Identifying complete size of file when transfer is in progress

2013-11-15 Thread Devarshi Kulshreshtha
In my iphone app, I am displaying information of files added to documents directory, in a table view, as soon as those are added. For this I am using DirectoryWatcher class provided in one of the sample codes by apple. Below is the block of code showing its use: - (void)viewDidLoad { // start

Deleting 20000 files in applicationWillTerminate

2013-11-15 Thread Devarshi Kulshreshtha
In my iPhone app, I am downloading files from server and storing them locally (user's document directory). The path of each file downloaded is subsequently updated in database. If user tries to delete a file, first the file is deleted from local path using removeItemAtPath: (NSFileManager), then c

Re: Identifying complete size of file when transfer is in progress

2013-11-15 Thread Devarshi Kulshreshtha
. >> user will be copying these files directly through iTunes. On Fri, Nov 15, 2013 at 6:08 PM, Jens Alfke wrote: > > On Nov 15, 2013, at 1:28 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > When I am trying to add a large file, such as a movie file,

Re: Identifying complete size of file when transfer is in progress

2013-11-15 Thread Devarshi Kulshreshtha
How can I poll the files? Is their any cocoa API to do so? On Fri, Nov 15, 2013 at 6:21 PM, Jens Alfke wrote: > > On Nov 15, 2013, at 4:10 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > > >> user will be copying these files directly throug

Displaying untrusted certificate information in iOS app

2013-11-16 Thread Devarshi Kulshreshtha
In my iOS app, I am trying to connect to a server, which has untrusted certificate. I am handling this situation by following the procedure as specified in this url: https://developer.apple.com/library/mac/documentation/cocoa/conceptual/urlloadingsystem/Articles/AuthenticationChallenges.html Thi

Re: Displaying untrusted certificate information in iOS app

2013-11-16 Thread Devarshi Kulshreshtha
, Nov 16, 2013 at 8:46 PM, Jens Alfke wrote: > > On Nov 16, 2013, at 6:41 PM, Devarshi Kulshreshtha < > devarshi.bluec...@gmail.com> wrote: > > Q1. How can I obtain above enlisted information? Is there any cocoa API to > provide the same? > > > SecCertificateRef >

Unable to use Managed Object Context proxy from Interface builder library

2013-11-24 Thread Devarshi Kulshreshtha
I am making a simple mac os x app, in which I will be showing some records in a table view, after retrieving those from local db. I am using core data and NSArrayController proxy for the same and I am trying to achieve it through cocoa-bindings. Now I can easily make it working, by performing this

Re: Unable to use Managed Object Context proxy from Interface builder library

2013-11-24 Thread Devarshi Kulshreshtha
Resolved this problem, by using below code :-) - (void)awakeFromNib { [self.listManagedObjectContext setPersistentStoreCoordinator:[ NSAppDelegate persistentStoreCoordinator]]; } On Sun, Nov 24, 2013 at 2:53 PM, Devarshi Kulshreshtha < devarshi.bluec...@gmail.com> wrote: > I am

Unable to use iOS framework which is internally using xib

2014-03-23 Thread Devarshi Kulshreshtha
I am trying to make a universal framework for iOS by following steps specified in this URL: http://blog.db-in.com/universal-framework-for-ios/ I have a view controller class within that framework which internally loads a xib file. Below is a part of code which shows how I am initializing that view

Share and store RSA - public key in java server and vice versa

2014-05-13 Thread Devarshi Kulshreshtha
My requirements are: Requirement 1: Share public key to java server. Steps: 1. Generate public-private keys in iOS app. 2. Store the generated keys in keychain. 3. Send generated public key to java server. 4. Java server shall be able to store shared public key in database. Requirement 2: Store

Re: Share and store RSA - public key in java server and vice versa

2014-05-13 Thread Devarshi Kulshreshtha
tem can > support PKCS or DER certificates. > > To use PGP system you need to use a PGP key server (a public one is okay) and > key exchange is done by exchanging key IDs and searching keys on the key > servers. > > Sent from my iPhone > >> On May 13, 2014, at 6:2

Re: Share and store RSA - public key in java server and vice versa

2014-05-13 Thread Devarshi Kulshreshtha
resolve my problem :-( On Tue, May 13, 2014 at 10:07 PM, Jens Alfke wrote: > On May 13, 2014, at 22:20, Devarshi Kulshreshtha > wrote: > > In CyrptoExercise sample provided by apple, we have a wrapper class: > SecKeyWrapper. > > > First, I think CryptoExercise is out of da

Re: Share and store RSA - public key in java server and vice versa

2014-05-14 Thread Devarshi Kulshreshtha
I agree with Jens, that's why we opted for creating public-private key pair on device itself. On Wed, May 14, 2014 at 8:02 PM, Jens Alfke wrote: > > On May 14, 2014, at 7:15 AM, Roland King wrote: > >> If you ask a similar question to the original poster on any of the Apple >> Developer Forums

Re: Share and store RSA - public key in java server and vice versa

2014-05-19 Thread Devarshi Kulshreshtha
This is what I am trying to achieve from some days now: Approach #1: ~ Android End ~ 1. Generated public and private key at an android device (using an openssl wrapper) 2. Got modulus and exponent from the generated public key ~ iOS End ~ 3. Generated public key from modulus and exponent, at ios

How to generate .cer file in cocoa

2014-05-21 Thread Devarshi Kulshreshtha
I am working on below scenario: 1. User A generates public key and private key 2. User A shares public key to user B 3. User B encrypts some data using shared public key 4. User B sends encrypted data to user A 5. User A decrypts data using related private key (Note: this is a part of problem whi

Re: How to generate .cer file in cocoa

2014-05-21 Thread Devarshi Kulshreshtha
I need to share generated public key to other ios device, what is the best way to share that? On Wed, May 21, 2014 at 1:34 PM, Graham Cox wrote: > > On 21 May 2014, at 5:41 pm, Devarshi Kulshreshtha > wrote: > >> am working on below scenario: >> >> 1. User A ge

NS_DESIGNATED_INITIALIZER expected : (colon)

2014-06-09 Thread Devarshi Kulshreshtha
I am trying to declare a designated initializer like this: - (instancetype)initWithDelegate:(id )delegate NS_DESIGNATED_INITIALIZER; But it is showing me this compilation error: Expected ':' Interestingly when I try to write it like this (reference link: https://developer.apple.com/library/prer

Re: Share and store RSA - public key in java server and vice versa

2014-06-11 Thread Devarshi Kulshreshtha
Because of all the problems I faced I finally decided to use a third party library - Chilkat Here is the link: http://www.chilkatsoft.com/crypt-objc.asp On Mon, May 19, 2014 at 10:56 PM, Jens Alfke wrote: > > On May 19, 2014, at 3:06 AM, Devarshi Kulshreshtha > wrote: &g

Swift function overloading - invoking func with specific parameter (in place of Any parameter) on passing Any object

2019-10-27 Thread Devarshi Kulshreshtha via Cocoa-dev
I have 3 structs: struct Address: Codable { var addressLine1: String } struct Person: Codable { var name: String } struct Order: Codable { var person: Person? var address: Address? } In my ViewController class I am using Mirror to access eac

Re: Swift function overloading - invoking func with specific parameter (in place of Any parameter) on passing Any object

2019-10-27 Thread Devarshi Kulshreshtha via Cocoa-dev
So the other thing which came to my mind was similar to what you have suggested: a. Declare Displayable protocol with func display() b. Let each Model implement this protocol c. Within forEach on children I can just bind and typecast to the protocol and invoke display method on it However this lo