Re: Programmatically change screen saver settings

2015-03-01 Thread Juanjo Conti
I was able to do it this way.

Reading:

var moduleDict = CFPreferencesCopyAppValue("moduleDict",
"com.apple.screensaver") as NSDictionary
var saverName = moduleDict["moduleName"] as String!

Writing:

var moduleDict = CFPreferencesCopyAppValue("moduleDict",
"com.apple.screensaver") as NSDictionary
var mutable = moduleDict.mutableCopy() as NSMutableDictionary
mutable["moduleName"] = "MyScreenSaver"
mutable["path"] = mySaverPath
CFPreferencesSetValue("moduleDict", mutable as CFPropertyList,
"com.apple.screensaver", kCFPreferencesCurrentUser,
kCFPreferencesCurrentHost)
CFPreferencesAppSynchronize("com.apple.screensaver")

On Sat, Feb 28, 2015 at 10:50 PM, 
wrote:

> You should read the docs and expect that some domains may require admin
> rights or even possibly not be accessible by design.
>
> From CFPreferences docs
>
> Note that modification of some preferences domains (those not belonging to
> the “Current User”) requires root privileges (or Admin privileges prior to
> OS X v10.6)—see *Authorization Services Programming Guide
> *
>  for
> information on how to gain suitable privileges.
>
> Sent from my iPhone
>
> On 2015/03/01, at 10:23, Juanjo Conti  wrote:
>
> Sorry, my code is Swift. There is no @"strings".
>
> On Sat, Feb 28, 2015 at 10:14 PM, Graham Cox 
> wrote:
>
>
> On 1 Mar 2015, at 12:46 am, Juanjo Conti 
>
> wrote:
>
>
> This settings are not accesibles via NSUserDefaults but they are via CF.
>
>
> I was able to do this by code
>
>
> var moduleDict = CFPreferencesCopyAppValue("moduleDict",
>
> "com.apple.screensaver") as CFDictionary
>
>
> but when I try to get one value from that "dict" the program crash in
>
> this
>
> line:
>
>
> var saverName = CFDictionaryGetValue(moduleDict, "moduleName")
>
>
>
>
> You're trying to use a C string as a key, not a CFString. Try
>
> @"moduleDict" instead.
>
>
>
> --Graham
>
>
>
>
>
>
> --
>
> Juanjo Conti http://goog_2023646312>@carouselapps.com
> >
>
> Software Engineer - Carousel Apps 
>
> --
> Carousel Apps Limited, registered in England & Wales with registered
> number
> 7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket
> Street, London SE1 3HN. Any communication sent by or on behalf of Carousel
> App Ltd or any of its subsidiary, holding or affiliated companies or
> entities (together "Watu") is confidential and may be privileged or
> otherwise protected. If you receive it in error please inform us and then
> delete it from your system. You should not copy it or disclose its
> contents
> to anyone. Messages sent to and from Watu may be monitored to ensure
> compliance with our internal policies and to protect our business. Emails
> are not secure and cannot be guaranteed to be error free. Anyone who
> communicates with us by email is taken to accept these risks.
> ___
>
> 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/dangerwillrobinsondanger%40gmail.com
>
> This email sent to dangerwillrobinsondan...@gmail.com
>
>


-- 

Juanjo Conti http://goog_2023646312>@carouselapps.com
>

Software Engineer - Carousel Apps 

-- 
Carousel Apps Limited, registered in England & Wales with registered number 
7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket 
Street, London SE1 3HN. Any communication sent by or on behalf of Carousel 
App Ltd or any of its subsidiary, holding or affiliated companies or 
entities (together "Watu") is confidential and may be privileged or 
otherwise protected. If you receive it in error please inform us and then 
delete it from your system. You should not copy it or disclose its contents 
to anyone. Messages sent to and from Watu may be monitored to ensure 
compliance with our internal policies and to protect our business. Emails 
are not secure and cannot be guaranteed to be error free. Anyone who 
communicates with us by email is taken to accept these risks.
___

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: NSTask & pseudo-TTY troubles

2015-03-01 Thread SevenBits
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 02/25/2015 04:15 PM, Kyle Sluder wrote:
> On Wed, Feb 25, 2015, at 01:15 PM, SevenBits wrote:
>> Here’s an example of the session when output is printed (notice
>> the echoing):
>> 
>> Insane BF Interactive Console 1.0 (Dec 18 2014, 16:22:05) Current
>> memory size: 3 cells, each 4 bytes : , , A A
>> 
>> : : . . A :
>> 
>> And here’s what it shows when I disable echoing using the code
>> above. Nothing else has been changed:
>> 
>> Insane BF Interactive Console 1.0 (Dec 18 2014, 16:22:05) Current
>> memory size: 3 cells, each 4 bytes : , A
>> 
>> : : .
>> 
>> 
>> :
>> 
>> Any ideas?
> 
> It's not at all clear what your issue is. You could be more
> descriptive, but this is most likely not going to be the most
> helpful place to ask terminal emulation questions.

My apologies. I will take my question elsewhere.

> 
> --Kyle Sluder
> 
> ___
> 
> 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/sevenbitstech%40gmail.com
>
>  This email sent to sevenbitst...@gmail.com
> 
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQEcBAEBAgAGBQJU827mAAoJEFbRvtGxmFPEmw4H/jgZmbHVZ/zqMszYFgitFz9S
6eHcNOb1+/og+py7qR/O3QeJgOeApBC6Df/fGa2NYgkDOmRUqbomOxcZu8BZLQmf
AmB1VyPExQMjtbEfQLBEc2R7aTxL9dgEQjHIQBQPoJMGzhgdY+54Ka9nbufcKz6s
z1kUBN9gyzVNpditjCfqa+s536DDHSUbzk5gCM/4gB9B5uKyt1wyF370/R4t3JOy
+/yivh5f5gxFL0VvHoZhyZFwjWy0QWozfrDH0RVowJAewpo8UK6OHN+SBVrKmlpP
+sB6K3kTSzh1/KVTo+qM2NEfy47axso3f8qaoUrK+H5/a7ZWenV9zQ4Pknudrok=
=HLHw
-END PGP 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

How to copy one project product to another project Resources on build (relative path)

2015-03-01 Thread Juanjo Conti
Hi!

I have a project, let' call it A which contains another one, let's call it
B.

A producto of B is used by A, so I'm copying it in A build phase to
Resources folder.

The problem is that in A.xcodeproj/project.pbxproj I see the absolute path
of the product been copied:

81CBEDD41A9FA5740015BEE2 /* ProductName */ = {isa = PBXFileReference;
explicitFileType = wrapper.cfbundle; name = ProductName; path =
"/Users/xxx/Library/Developer/Xcode/DerivedData/Worspace-dygmdtnwaxtdegfcwjuatbfcygfg/Build/Products/Debug/ProductName";
sourceTree = ""; };

The problem with this is that if I want to build A in another machine, it
fails.

How can I achieve this in a way not dependent of my machine?

Thanks in advance,

-- 

Juanjo Conti http://goog_2023646312>@carouselapps.com
>

Software Engineer - Carousel Apps 

-- 
Carousel Apps Limited, registered in England & Wales with registered number 
7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket 
Street, London SE1 3HN. Any communication sent by or on behalf of Carousel 
App Ltd or any of its subsidiary, holding or affiliated companies or 
entities (together "Watu") is confidential and may be privileged or 
otherwise protected. If you receive it in error please inform us and then 
delete it from your system. You should not copy it or disclose its contents 
to anyone. Messages sent to and from Watu may be monitored to ensure 
compliance with our internal policies and to protect our business. Emails 
are not secure and cannot be guaranteed to be error free. Anyone who 
communicates with us by email is taken to accept these risks.
___

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: How to copy one project product to another project Resources on build (relative path)

2015-03-01 Thread Joar Wingfors
Select the reference to project B in project A. Open the File inspector. Change 
the "Location" pop-up from "Absolute" to "Relative to Project". 

Joar


> On 1 mar 2015, at 19:27, Juanjo Conti  wrote:
> 
> Hi!
> 
> I have a project, let' call it A which contains another one, let's call it
> B.
> 
> A producto of B is used by A, so I'm copying it in A build phase to
> Resources folder.
> 
> The problem is that in A.xcodeproj/project.pbxproj I see the absolute path
> of the product been copied:
> 
> 81CBEDD41A9FA5740015BEE2 /* ProductName */ = {isa = PBXFileReference;
> explicitFileType = wrapper.cfbundle; name = ProductName; path =
> "/Users/xxx/Library/Developer/Xcode/DerivedData/Worspace-dygmdtnwaxtdegfcwjuatbfcygfg/Build/Products/Debug/ProductName";
> sourceTree = ""; };
> 
> The problem with this is that if I want to build A in another machine, it
> fails.
> 
> How can I achieve this in a way not dependent of my machine?
> 
> Thanks in advance,
> 
> -- 
> 
> Juanjo Conti http://goog_2023646312>@carouselapps.com
> >
> 
> Software Engineer - Carousel Apps 
> 
> -- 
> Carousel Apps Limited, registered in England & Wales with registered number 
> 7689440 and registered office Unit 2 Artbrand Studios, 7 Leathermarket 
> Street, London SE1 3HN. Any communication sent by or on behalf of Carousel 
> App Ltd or any of its subsidiary, holding or affiliated companies or 
> entities (together "Watu") is confidential and may be privileged or 
> otherwise protected. If you receive it in error please inform us and then 
> delete it from your system. You should not copy it or disclose its contents 
> to anyone. Messages sent to and from Watu may be monitored to ensure 
> compliance with our internal policies and to protect our business. Emails 
> are not secure and cannot be guaranteed to be error free. Anyone who 
> communicates with us by email is taken to accept these risks.
> ___
> 
> 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/joar%40joar.com
> 
> This email sent to j...@joar.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: How to copy one project product to another project Resources on build (relative path)

2015-03-01 Thread Steve Mills
> On Mar 1, 2015, at 21:27, Juanjo Conti  wrote:
> 
> I have a project, let' call it A which contains another one, let's call it
> B.
> 
> A producto of B is used by A, so I'm copying it in A build phase to
> Resources folder.
> 
> The problem is that in A.xcodeproj/project.pbxproj I see the absolute path
> of the product been copied:
> 
> The problem with this is that if I want to build A in another machine, it
> fails.
> 
> How can I achieve this in a way not dependent of my machine?

Change the path to relative. You also need to ensure that the two projects will 
always remain relative to each other in that formation on all machines.

Steve via iPad


___

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

Application windows are expected to have a root view controller at the end of application launch

2015-03-01 Thread Rick Mann
I'm adding background downloading on remote notification, so I removed all my 
UI code from appDidFinishLaunching. Now I get this error: "Application windows 
are expected to have a root view controller at the end of application launch"

So, I have to create UI even though I won't be displaying it?

-- 
Rick Mann
rm...@latencyzero.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Re: Application windows are expected to have a root view controller at the end of application launch

2015-03-01 Thread Rick Mann
I guess that's the way it's supposed to be. Seems wasteful.

> On Mar 1, 2015, at 22:36 , Rick Mann  wrote:
> 
> I'm adding background downloading on remote notification, so I removed all my 
> UI code from appDidFinishLaunching. Now I get this error: "Application 
> windows are expected to have a root view controller at the end of application 
> launch"
> 
> So, I have to create UI even though I won't be displaying it?
> 
> -- 
> Rick Mann
> rm...@latencyzero.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:
> https://lists.apple.com/mailman/options/cocoa-dev/rmann%40latencyzero.com
> 
> This email sent to rm...@latencyzero.com


-- 
Rick Mann
rm...@latencyzero.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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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