Re: Free trial period for apps in Mac App Store (?)

2020-09-01 Thread Giacomo Tufano via Cocoa-dev
I used both for a moderately successful app, with a lite version with ads and a 
“full" version without, then I tried to add IAP to the lite app to remove ads.

IAP has been an easier path at least from the point of view of development 
effort, mainly for the reduction in QA time. Also the conversion from lite to 
pro was _way_ less frequent than the buying of an IAP to “remove ads”.

In the specific case, at the end I removed the IAP from the lite version and 
got back to 2 different version (“lite” with ads and pro) because it’s 
impossible to stop tracking from the loaded ad libraries, so I decided it was 
not worth to have an IAP to remove ads without removing tracking.

HTH,
gt


> Il giorno 1 set 2020, alle ore 22:27, Gabriel Zachmann via Cocoa-dev 
>  ha scritto:
> 
>> Make a ?Lite? version free (Price 0.00) which has either a limited life span 
>> or limited functionality or both.
>> [...]
>> The other option is to use ?In App Purchases? to upgrade the functionality.
>> 
> 
> Thanks a lot for your response.
> 
> Option 1 would mean, in my case: develop and maintain two versions,
> "Light" version includes full functionality, but expires after a month,
> "Pro" version costs.
> 
> Option 2:
> Only one version, with in-app purchase to unlock unlimited time.
> 
> 
> I was wondering: what is your experience in terms of
> - user experience
> - development effort.
> Is it more effort to develop and maintain light & pro version,
> or is it more effort to implement the in-app purchase?
> (The latter involves some purchases management, IIUC, for instance, if a user 
> buys a new Mac.)
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: iOS Drag and Drop

2017-06-14 Thread Giacomo Tufano
I think you want https://developer.apple.com/documentation/uikit/drag_and_drop 
 

> Il giorno 14 giu 2017, alle ore 12:14, Dave  ha 
> scritto:
> 
> Is there nothing I can just download?  It seems to me there used to be loads 
> of documents telling you have to do this, but they all seem to have 
> disappeared?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Unicode filenames with Apple File System and UIManagedDocument

2017-03-21 Thread Giacomo Tufano
If Apple Support says (as It said) "iOS HFS Normalized UNICODE names , APFS now 
treats all files as a bag of bytes on iOS . We are requesting that Applications 
developers call the correct Normalization routines to make sure the file name 
contains the correct representation.” then I think that the solution will be to 
decompose the bytes so that the “bag of bytes” or the “normalized names” are 
the same. From the name of the API I *suppose* that [NSString 
decomposedStringWithCanonicalMapping] will do, but it needs to be tested, 
because the point is that on APFS you need to apply the same (de)composition 
that iOS HFS does (so to have the same bytes when asking for the file name).
Btw: I think this is a significant difference in filename management that I 
think will bite many developers, it should be fixed at file system level, IMHO… 
but who knows what the other implication are… 

My 2 €cents,
Gt

> Il giorno 21 mar 2017, alle ore 15:18, Aandi Inston  ha 
> scritto:
> 
> Is the question, what is canonical mapping? I'm going to assume it is, so I
> can share what I found when I hit much the same issue. This is mostly from
> memory so let's hope it's right.
> 
> Take the word Café. How many Unicode characters is this and what are they?
> Turns out there are two answers. The last character as seen on screen is a
> lower case e with an acute accent.
> Let's ignore C,a,f as they are the same in all answers.  First answer: é is
> 'LATIN SMALL LETTER E WITH ACUTE' (U+00E9). We'll call this "composed". In
> UTF-8 that's two bytes, 0xC3 0xA9. (This is the answer you'd often get, but
> it's not the only answer, and not the one Apple filesystems like.)
> 
> Second answer uses an accent character. These are designed to appear in the
> same space as another character. So combine "e" and an acute accent (like a
> floating, slanted apostrophe) and we have "é". This means you could get the
> same result from the two Unicode characters LATIN SMALL LETTER E (U+0065)
> COMBINING ACUTE ACCENT (U+0301). We'll call this "decomposed". In UTF-8
> that would be 0x65 0xCC 0x81: three bytes, two characters, combine to a
> single character. (This is the one Apple filesystems like).
> 
> When you're typing in a word processor, or showing an alert, it hardly
> matters how you create the e acute. Both look the same. But searching may
> be a problem (not discussed) as may showing items in alphabetical order
> (also not discussed).
> 
> Let's imagine now we have a filename Café. This could be represented in
> UTF-8 bytes as 0x41 0x61 0x66 0xC3 0xA9 (composed), or as 0x41 0x61 0x66
> 0x65 0xCC 0x81 (decomposed). But ultimately there needs to be a set of bits
> on disk, in a directory, saying the name of the file. When searching for a
> file we could have three choices (a) these two composed/decomposed are
> separate file names for two distinct files - whose name will look the same
> (b) these are the same file, which means all file access by name, and
> searching has to compose or decompose for comparison purposes (c) only one
> is allowed and the other is rejected or invalid.
> 
> Where are we? A bit of (b) and a bit of (c). Finder and file dialogs always
> decompose what is typed, and this is stored as the string of bits giving
> the file name. It seems that some APIs will automatically decompose their
> input, and others won't, and we may be in transition [to judge from the bug
> response]. So for safety, use a method that decomposes. (Unicode define at
> least two other types of de/composition, not discussed).
> 
> Apple calls decomposed "canonical". This is fine, except that Unicode
> refers to both "canonical decomposition" (what Apple filenames need) and
> "canonical composition" (the opposite). So if handling names via an Apple
> API made for filenames we are fine to talk of canonical file names. But if
> handling names with a general Unicode API, we need to understand that this
> means "canonical decomposition" rather than "canonical composition".
> 
> On 21 March 2017 at 11:03,  wrote:
> 
>> 
>>> What Apple suggested is to Unicode-normalize the filename before adding
>> it to the URL. Did you try doing that?
>> 
>> I’m trying to find out what that means.
> ___
> 
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
> 
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
> 
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/gt%40iltofa.com
> 
> This email sent to g...@iltofa.com


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

Re: Crash at iOS App Startup - What Could Have Gone Wrong?

2015-04-23 Thread Giacomo Tufano
FWIW, I successfully used for years svn on a file:// repository with the 
directory pointing to Dropbox. It works and you can check it out from different 
machines (I happened to have a desktop and a laptop).
But I also suggest to move to git...

 Il giorno 22/apr/2015, alle ore 00:17, Alex Zavatone z...@mac.com ha 
 scritto:
 
 You can set up the server locally!
 
 On Apr 21, 2015, at 4:04 PM, Michael Crawford wrote:
 
 I'm adept with svn.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: disabling Apple Crash Reporter

2015-03-09 Thread Giacomo Tufano
 Il giorno 09/mar/2015, alle ore 16:53, dangerwillrobinsondan...@gmail.com ha 
 scritto:
 Right there in the really nice Adium code you linked to. 
 You could copy and paste verbatim almost. 

The Adium code (and this one for sure, check the starting comment) is licensed 
under the GPL, you should not copy and paste it unless your code is GPL’d too.

 2  * Adium is the legal property of its developers, whose names are listed 
in the copyright file included
 3  * with this source distribution.
 4  * 
 5  * This program is free software; you can redistribute it and/or modify 
it under the terms of the GNU
 6  * General Public License as published by the Free Software Foundation; 
either version 2 of the License,
 7  * or (at your option) any later version.

Really. If we programmer don’t respect licenses I don’t really know who 
should...

Ciao,
gt


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Question on OS X app submission

2014-09-21 Thread Giacomo Tufano
 Any idea on my original question, though? If I have a helper app embedded in 
 my bundle, with a bundle ID of its own, does the app store need to know about 
 that bundle ID, or just the main one?

I have on app in the app store that auto-start. The App Store needs only to 
know about the “main app” bundle id. The helper app has to be signed, but Xcode 
took care of it automagically (surprisingly enough). Remember that the app 
cannot set automatically to autostart, the user must explicitly approve/set.
As you probably already know, you have to use SMLoginItemSetEnabled() to set 
the autostart thing, other methods don’t work for sandboxed app (cfr. 
https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLoginItems.html#//apple_ref/doc/uid/1172i-SW5-SW1).

HTH, 
gt

---
Giacomo Tufano
http://www.ilTofa.com/

Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. (S. 
Beckett)



smime.p7s
Description: S/MIME cryptographic signature
___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Cocoa and OS X Security Frameworks

2014-02-09 Thread Giacomo Tufano
Il giorno 09/feb/2014, alle ore 23:33, SevenBits sevenbitst...@gmail.com ha 
scritto:

 I’m looking to add encryption support to an application I’m developing. I 
 know that OS X includes a number of libraries and frameworks dedicated to 
 encryption (such as Security.framework and OpenSSL) but I’m not sure whether 
 I should use them as opposed to a different library like Crypto++.
 
 The idea of what I’m trying to do is create some simple encrypted files on 
 the user’s hard drive to hold secret/confidential user data related to my 
 application. The end goal of this is to ship to the Mac App Store (I’m 
 prepared to deal with export compliance), so something that would break 
 sandboxing is a no-go.
 
 I’d like to be able to interface relatively easily with Cocoa/Objective-C so 
 I don’t need to undergo writing lots of low-level C code, and I also don’t 
 want to mix Objective-C and C++. What is the recommended best practice for 
 this situation, and what have you guys done when you needed to do things like 
 this?

I successfully used RNCryptor for an easy (and relatively safe) path to 
encryption of small files in obj-c: https://github.com/RNCryptor/RNCryptor the 
framework seems to be very popular, that’s probably a good sign. :)

---
Giacomo Tufano
http://www.ilTofa.com/

Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. (S. 
Beckett)


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

[SOLVED] Re: Spotlight importer don't work anymore under Mavericks (sandbox error)

2013-10-25 Thread Giacomo Tufano
Hi, for the records (and future searchers):

As per https://developer.apple.com/library/mac/qa/qa1773/_index.html (I should 
have read this one before) the importer have to be signed with the same 
identity and entitled for com.apple.security.app-sandbox.
To check if the importer works you *must* move it in the /Applications folder 
(ie: executing the main app in the debugger is not enough).

The main issue is that under Mavericks embedded spotlight importers not signed 
don’t work anymore (correctly, in a way).

Il giorno 24/ott/2013, alle ore 23:12, Giacomo Tufano g...@iltofa.com ha 
scritto:

 Hi, I have a spotlight importer for a sandboxed coredata application, derived 
 directly from the Xcode 4.x template and working embedded in the app.
 The importer works under OS X 10.7 and 10.8 but fails in allocating the 
 NSManagedModel from the storeURL located in the sandbox at 
 containerdir/Data/Library/CoreData/LocalConfig/.support/model.mom
 
 In console I see a related sandbox error at the same time of my error:
 
 24/10/13 19:31:49,364 sandboxd[351]: ([2437]) mdworker(2437) deny 
 file-read-xattr 
 /Users/gt/Library/Containers/it.iltofa.Janus/Data/Library/CoreData/LocalConfig/.support/model.mom
  (import fstype:hfs fsflag:480D000 flags:24005F diag:0 isXCode:0 
 uti:it.iltofa.janus plugin:/Janus Notes.app/Contents/Library/Spotlight/Janus 
 NotesImporter.mdimporter - find suspect file using: sudo mdutil -t 22334033)
 
 The store is allocated in the “main” app with:
 
NSURL *cacheDirectory = [[NSFileManager defaultManager] 
 URLForDirectory:NSLibraryDirectory inDomain:NSUserDomainMask 
 appropriateForURL:nil create:YES error:localError];
cacheDirectory = [cacheDirectory 
 URLByAppendingPathComponent:@CoreData/LocalConfig/ isDirectory:YES];
if(![[NSFileManager defaultManager] createDirectoryAtURL:cacheDirectory 
 withIntermediateDirectories:YES attributes:nil error:localError]) {
ALog(@Error creating %@: %@, cacheDirectory, [localError 
 description]);
assert(NO);
}
NSString *externalRecordsSupportFolder = [cacheDirectory path];
NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption: 
 @YES,
  NSInferMappingModelAutomaticallyOption: @YES,
  NSExternalRecordExtensionOption: @janus,
  NSExternalRecordsDirectoryOption: 
 externalRecordsSupportFolder,
  NSExternalRecordsFileFormatOption: 
 NSXMLExternalRecordType
  };
_localStore = [_psc addPersistentStoreWithType:NSSQLiteStoreType 
 configuration:@“LocalConfig” URL:storeURL options:options error:localError];
 
 The failing call on the importer is:
   _managedObjectModel = [[NSManagedObjectModel alloc] 
 initWithContentsOfURL:self.modelURL];
 
 where self.modelURL is inited as:
NSDictionary *pathInfo = [NSPersistentStoreCoordinator 
 elementsDerivedFromExternalRecordURL:[NSURL fileURLWithPath:filePath]];   
  
self.modelURL = [NSURL fileURLWithPath:[pathInfo 
 valueForKey:NSModelPathKey]];
 
 IIRC this is the template code.
 
 I suspected a signing error, but the importer built with XCode 4 was not 
 signed at all, and it is signed on Xcode 5 with the same identity as the main 
 app. 
 The importer embedded in the app freshly downloaded from the App Store works 
 as intended under ML with no error at all and fails under Mavericks with the 
 error above.
 
 I was not able to find anything on the Internet and I’m out of ideas… It 
 seems strange to me that this is a bug because I think this is a very common 
 case (at least, I think that a core data app with a spotlight importer is not 
 *so* strange)
 
 any hint/suggestion will be appreciated… more code is available on request, 
 in case it will be useful.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Spotlight importer don't work anymore under Mavericks (sandbox error)

2013-10-24 Thread Giacomo Tufano
Hi, I have a spotlight importer for a sandboxed coredata application, derived 
directly from the Xcode 4.x template and working embedded in the app.
The importer works under OS X 10.7 and 10.8 but fails in allocating the 
NSManagedModel from the storeURL located in the sandbox at 
containerdir/Data/Library/CoreData/LocalConfig/.support/model.mom

In console I see a related sandbox error at the same time of my error:

24/10/13 19:31:49,364 sandboxd[351]: ([2437]) mdworker(2437) deny 
file-read-xattr 
/Users/gt/Library/Containers/it.iltofa.Janus/Data/Library/CoreData/LocalConfig/.support/model.mom
 (import fstype:hfs fsflag:480D000 flags:24005F diag:0 isXCode:0 
uti:it.iltofa.janus plugin:/Janus Notes.app/Contents/Library/Spotlight/Janus 
NotesImporter.mdimporter - find suspect file using: sudo mdutil -t 22334033)

The store is allocated in the “main” app with:

NSURL *cacheDirectory = [[NSFileManager defaultManager] 
URLForDirectory:NSLibraryDirectory inDomain:NSUserDomainMask 
appropriateForURL:nil create:YES error:localError];
cacheDirectory = [cacheDirectory 
URLByAppendingPathComponent:@CoreData/LocalConfig/ isDirectory:YES];
if(![[NSFileManager defaultManager] createDirectoryAtURL:cacheDirectory 
withIntermediateDirectories:YES attributes:nil error:localError]) {
ALog(@Error creating %@: %@, cacheDirectory, [localError 
description]);
assert(NO);
}
NSString *externalRecordsSupportFolder = [cacheDirectory path];
NSDictionary *options = @{NSMigratePersistentStoresAutomaticallyOption: 
@YES,
  NSInferMappingModelAutomaticallyOption: @YES,
  NSExternalRecordExtensionOption: @janus,
  NSExternalRecordsDirectoryOption: 
externalRecordsSupportFolder,
  NSExternalRecordsFileFormatOption: 
NSXMLExternalRecordType
  };
_localStore = [_psc addPersistentStoreWithType:NSSQLiteStoreType 
configuration:@“LocalConfig” URL:storeURL options:options error:localError];

The failing call on the importer is:
_managedObjectModel = [[NSManagedObjectModel alloc] 
initWithContentsOfURL:self.modelURL];

where self.modelURL is inited as:
NSDictionary *pathInfo = [NSPersistentStoreCoordinator 
elementsDerivedFromExternalRecordURL:[NSURL fileURLWithPath:filePath]]; 
   
self.modelURL = [NSURL fileURLWithPath:[pathInfo 
valueForKey:NSModelPathKey]];

IIRC this is the template code.

I suspected a signing error, but the importer built with XCode 4 was not signed 
at all, and it is signed on Xcode 5 with the same identity as the main app. 
The importer embedded in the app freshly downloaded from the App Store works as 
intended under ML with no error at all and fails under Mavericks with the error 
above.

I was not able to find anything on the Internet and I’m out of ideas… It seems 
strange to me that this is a bug because I think this is a very common case (at 
least, I think that a core data app with a spotlight importer is not *so* 
strange)

any hint/suggestion will be appreciated… more code is available on request, in 
case it will be useful.

Thank you in advance,
gt


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Giacomo Tufano
Il giorno 10/lug/2013, alle ore 16:43, Scott Ribe scott_r...@elevated-dev.com 
ha scritto:

 Nope, not even close. Here's mine for reference:
 
 1Password DMG Canvas  Logitech
 Remote Desktop  TurboTax
 […]

Scott, my observations do not agree with yours…

I get BundleIDs for apps from an app of mine via the NSRunningApplication 
bundleIdentifier property and, to be honest, I ever get correctly formed bundle 
identifiers.

As example I get, from your list (for the app I have) I get:
1Password: ws.agile.1Password
Acorn: com.flyingmeat.Acorn4
AddressBook: com.apple.AddressBook
Aperture: com.apple.Aperture
Fusion: com.vmware.fusion
Microsoft Word: com.microsoft.Word
Apple Pages: com.apple.iWork.Pages.

I *think* this property comes from the bundle id (at least, it comes from 
bundle id for my applications) so I deduce the convention is usually followed…

Ciao,
gt

---
Giacomo Tufano
http://www.ilTofa.com/

Ever tried. Ever failed. No matter. Try again. Fail again. Fail better. (S. 
Beckett)


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Re: Bundle Identifiers - and application support directory

2013-07-10 Thread Giacomo Tufano
Il giorno 10/lug/2013, alle ore 17:43, Scott Ribe scott_r...@elevated-dev.com 
ha scritto:

 On Jul 10, 2013, at 9:26 AM, Giacomo Tufano wrote:
 
 Scott, my observations do not agree with yours…
 I *think* this property comes from the bundle id (at least, it comes from 
 bundle id for my applications) so I deduce the convention is usually 
 followed…
 
 The convention that we're talking about is that the apps' directories in 
 Application Support should be named by bundle identifier, not by application 
 name. The list that I provided was the result of ls Application\ Support, so 
 as you can see the convention of using bundle identifiers is generally not 
 followed.

Oh. I misunderstood... Sorry for the noise. :)


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Sandboxed app record-level indexing of Core Data in Spotlight (not working)

2013-05-14 Thread Giacomo Tufano
I'm trying to create a spotlight importer for a core data application, using 
the record level indexing as descripted in the Core Data Spotlight 
Integration Programming Guide.

I have a working .mdimporter that works correctly if I copy the importer in 
/Library/Spotlight (it will index and spotlight find the documents). 
The problem is that the embedded importer in the application (I started with 
the Xcode template for use core data and create importer is never called by 
the system. I checked that the .mdimporter is in the app bundle inside the 
Contents/Resources/APPNAMEImported.mdimporter directory.
I'm planning to use MAS, so I *think* I cannot move anything in 
/Library/Spotlight.

I religiously read the guide many times (and especially the troubleshooting 
section) but, you know, the more you read, the same it seems. :) Any hint on 
what to look for will be appreciated, I'm out of ideas.

I strongly suspect that the problem is related to the sandboxing of the app, 
because the Guide seems to not consider sandbox. For example, I had to find by 
trial and error that the the NSExternalRecordsDirectoryOption for the 
persistent store is a tricky one for sandboxed app, at the end I use 
NSLibraryDirectory/CoreData/LocalConfig/ but the runtime raised exception for 
almost any other one, included the recommended (by the exception in itself) 
~/Library/Caches/Metadata/CoreData (sandbox error) or 
NSCacheDirectory/Metadata/CoreData (error 'should be 
~/Library/Caches/Metadata/CoreData').

If some code is needed to troubleshoot, just ask (I really have no idea of what 
could be useful and not simply noise).

Thank you in advance,
gt


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Sandboxed app record-level indexing of Core Data in Spotlight (not working)

2013-05-14 Thread Giacomo Tufano
Il giorno 14/mag/2013, alle ore 13:00, Vincent CARLIER 
vince.carl...@gmail.com ha scritto:

 I have a working .mdimporter that works correctly if I copy the importer in 
 /Library/Spotlight (it will index and spotlight find the documents).
 The problem is that the embedded importer in the application (I started 
 with the Xcode template for use core data and create importer is never 
 called by the system. I checked that the .mdimporter is in the app bundle 
 inside the Contents/Resources/APPNAMEImported.mdimporter directory.
 I'm planning to use MAS, so I *think* I cannot move anything in 
 /Library/Spotlight.
 
 If your importer is bundled into your app, it should be in :
 Appname.app/Contents/Library/Spotlight

Thank you Vincent! In Contents/Library/Spotlight works. I'm wondering where's 
documented, but it's OK (my fault, probably).

I now get errors (one for every file) in mdworker (apparently from sandboxing) 
stating:
14/05/13 13:24:43,007 sandboxd[29551]: ([29550]) mdworker(29550) deny 
file-write-create 
/Users/gt/Library/Containers/it.iltofa.Janus/Data/Documents/SharedCoreDataStores/.localStore_SUPPORT/.LINKS
 (import fstype:hfs fsflag:480D000 flags:24005F diag:0 uti:it.iltofa.janus 
plugin:/Janus.app/Contents/Library/Spotlight/JanusImporter.mdimporter - find 
suspect file using: sudo mdutil -t 17981324)
but it seems to work (records are indexed spotlight find them, etc. (now I'll 
try to understand what else is wrong).

Beside that, I'll have to understand how to convince Xcode to copy the 
.mdimporter in Library/Spotlight automatically (but this seems easier).

Thank you *very* much,
gt

btw: a test project just created with Xcode 4.6.2 cocoa app template 
generates an .mdimporter bundled under Resources. Should I file a bug or this 
is expected?

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Question about UIImage, scaling, and UIGraphicsBeginImageContextWithOptions

2012-03-27 Thread Giacomo Tufano
Il giorno 27/mar/2012, alle ore 09:38, Ray ha scritto:

 OK, so I have this iOS 3.x code base that I need to update. I have the 
 following code, to make a thumbnail image:
 Code is simplified, just for illustrative purposes. I store imageData as a 
 binary property (called listImage) in a Core Data entity and use it as a 
 thumbnail image in a UITableView, like so:
 
 But this seems kludgy and it's using programmer's knowledge, so to speak. I 
 watched WWDC2010 session 134 Optimize your iPhone App for the Retina 
 Display again, searched stackoverflow etc. but I can't find a more elegant 
 solution. What would be a more thorough approach? Maybe it's staring me in 
 the face but I don't see it...

That's what I use to generate a thumbnail of sideSize side lenght in iOS3.x 
code.
It uses iOS4+ functions for retina displays (I remember that you can assume 
iOS4+ with retina displays).

CGSize newSize = CGSizeMake(sideSize, sideSize);
#if __IPHONE_OS_VERSION_MAX_ALLOWED = __IPHONE_4_0
if(UIGraphicsBeginImageContextWithOptions != NULL)
UIGraphicsBeginImageContextWithOptions(newSize, NO, [[UIScreen 
mainScreen] scale]);
else
#endif
UIGraphicsBeginImageContext(newSize);
UIGraphicsBeginImageContext(newSize);
[self drawInRect:CGRectMake(0, 0, sideSize, sideSize)];
// Get the new image from the context
UIImage *thumbnailImage = UIGraphicsGetImageFromCurrentImageContext();
// End the context
UIGraphicsEndImageContext();

It works correctly on retina displays.
To be honest I don't remember why I use that macro to test for iOS4, there were 
a reason and that was a workaround but cannot remember why. It works, anyway. :)

HTH,
gt

---
Giacomo Tufano
Stat rosa pristina nomine, nomina nuda tenemus.




___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: Localization for nibs

2012-02-19 Thread Giacomo Tufano
I have single NIBs but I have the labels reloaded on DidLoad from 
NSLocalizedString. You still have to try every localization for text width and 
appareance but I find it somewhat less time consuming that having different 
NIBs (and reflect any change on an element in a NIB to all the localized NIBs).
Keep in mind that I localize only in Western Europe languages (and not more 
than 5), I don't think this method will be easily adapted to glyphs/languages 
that requires different layouts. Nobody stops you in using different NIBS for 
languages that requires different layouts and use label localization for 
similar ones though.
Rgds,
gt

Il giorno 16/feb/2012, alle ore 13:37, Satyanarayana Chebrolu ha scritto:

 Hi,
 currently my application supports only English. In the future versions we 
 would like to have it in around 15 languages.
 
 What is the best practice for having localized nibs.
 
 1) Common approach, different nibs for different languages.
 +ve, straight forward.
 -ve, Time consuming and maintenance effort.
 2) By using Auto layout feature.
 +ve, available only in Lion
 -ve, not in Leopard and Snow Leopard
 
 
 Appreciate your thoughts, inputs, or any.


___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Trying to start up a Rome (Italy) cocoaheads chapter (so looking for interested parties)

2011-03-30 Thread Giacomo Tufano
Subject says all, we're trying to start a cocoaheads chapter in Rome (Italy). 
If you're interested please get back (off list) to me and/or Ugo.
Have a nice day all,
gt

---
Giacomo Tufano
Stat rosa pristina nomine, nomina nuda tenemus.



___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


Re: loading French strings being in English language

2010-07-22 Thread Giacomo Tufano
Il giorno 22/lug/2010, alle ore 11.15, cocoa learner ha scritto:

 I have localized my app in English and French languages.
 But I want to load French strings being in English language based on radio
 button input (English and French).
 
 Is it possible?
 Is there any cocoa way of doing this?

I tried the same (and asked this very list some months ago) but had no luck. I 
resorted writing some code to load the right localization (and not using 
NSLocalizedString() and friends). But I'm still interested in knowing if a 
blessed way to do that exists. My problem was on iPhoneOS but AFAIK there 
should be no differences with OS X in localization support.
Regards,
gt

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com


There is an equivalent to NSLocalizedString with selectable locale?

2009-06-18 Thread Giacomo Tufano
I have a CocoaTouch app that's localized using NSLocalizedString() and  
NSLocalizedStringFromTable().
I would like to give the user the option to change language on some  
part of the program but I couldn't find any call or function for  
selecting the locale into the program. I found that I can get the  
current preferred locale with [NSUserDefaults standardUserDefaults]  
@AppleLanguages key, but that's all...


Should I rewrite the routines to read directly from the string tables  
or there is some function/method I didn't find to do this?


TIA,
gt

___

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com