32-bit / 64-bit roadmap

2016-01-21 Thread Aandi Inston
So far as I can see, all recent Mac OS systems are 64-bit on 64-bit
hardware and can run an app shipped in 64-bit only. And 32-bit continues to
run fine.

But what about the future? Perhaps we can only speculate about whether
32-bit apps will be deprecated, but maybe Apple have started to hint that
32-bit has a limited lifetime? It's a question of prioritising work on old
apps, and what will happen to our customers with older apps in future.
Let's assume Cocoa has been weeded out of the apps already.

Thanks in advance for your speculations (or more solid facts!)
___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread Dave
Hi All,

I have Network of Dictionaries containing “LTWNodeInfo” Classes. LTWNodeInfo 
contains a Child Dictionary which in turn contains other LTWNodeInfo. The Key 
to these dictionaries is a Unique ID string called the NodeID.

@interface LTWNodeInfo
@property (copy)NSString*   pNodeID;
@property (copy)NSString*   pNodeType;
@property (copy)NSMutableDictionary*pNodeChildDict;
@property (copy)LTWNodeInfo*pNodeParentt;

@property (copy)NSString*   
pNodePayloadString1;
@property (copy)NSString*   
pNodePayloadString2;
@property (copy)NSString*   
pNodePayloadString3;
@end


This all works great and now I’d like to save this to a plist file and load it 
later on.

My question is, what is the best way to do this? I was thinking I could make a 
dictionary out of the LTWNodeInfo Object and then create a Parallel Network 
using the dictionary versions, (I’d just use the Property names as the Key), 
but I was wondering if there is an easier way to do this?

Any suggestions greatly appreciated.

All the Best
Dave


___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread Jens Alfke

> On Jan 21, 2016, at 9:05 AM, Dave  wrote:
> 
> This all works great and now I’d like to save this to a plist file and load 
> it later on.

Does it have to be in plist format? The easiest way to persist this data would 
be to make LTWNodeInfo implement the NSCoding protocol, then use an NSArchiver 
to save it as an archive.

—Jens
___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread Fritz Anderson
On 21 Jan 2016, at 10:45 AM, Aandi Inston  wrote:
> 
> So far as I can see, all recent Mac OS systems are 64-bit on 64-bit
> hardware and can run an app shipped in 64-bit only. And 32-bit continues to
> run fine.
> 
> But what about the future? Perhaps we can only speculate about whether
> 32-bit apps will be deprecated, but maybe Apple have started to hint that
> 32-bit has a limited lifetime? It's a question of prioritising work on old
> apps, and what will happen to our customers with older apps in future.
> Let's assume Cocoa has been weeded out of the apps already.
> 
> Thanks in advance for your speculations (or more solid facts!)

The people with solid facts don’t hang around on mailing lists like this, and 
would be fired if they responded. Apple does not comment on its plans. What we 
do know is this:

We have more than hints. Apple has steadily increased the incentives for 
third-party developers to drop 32-bit products. But it hasn’t even deprecated 
it, much less cut it off. Unless I had to accommodate a market (like education) 
that hangs onto hardware for a very long time, I’d never consider anything but 
64 bits.

Apple itself has a harder decision, because it doesn’t want to break 
developers’ remaining 32-bit products. (Add the “Kind” column to Activity 
Monitor to see what I mean.)

All we can know is that deprecation will come no sooner than June (10.12 
Tehachapi), withdrawal no sooner than June of 2017 (10.13 San Quentin).

— F


___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread Dave
Hi,

It doesn’t *have* to be plist, but if it were it would be easier/possible to 
view/edit it. I need a quick solution to be honest, if its really quick to 
implement NSCoding then I could do that for how, and revisit it later on. 

For the plist solution do you know of anything available that would make 
generating the a parallel network with the LTWNodeInfo objects converted to 
dictionary easier or do I have to knife and fork my way through it?

Which method would be the fastest to load?

All the Best
Dave






> On 21 Jan 2016, at 17:32, Jens Alfke  wrote:
> 
> 
>> On Jan 21, 2016, at 9:05 AM, Dave > > wrote:
>> 
>> This all works great and now I’d like to save this to a plist file and load 
>> it later on.
> 
> Does it have to be in plist format? The easiest way to persist this data 
> would be to make LTWNodeInfo implement the NSCoding protocol, then use an 
> NSArchiver to save it as an archive.
> 
> —Jens

___

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: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Dave

> On 21 Jan 2016, at 23:04, Quincey Morris 
>  wrote:
> 
> On Jan 21, 2016, at 13:47 , Dave  > wrote:
>> 
>> myObjectCopy. pNodeIndexPath = self. pNodeIndexPath; //Copy 
>> Attribute on Property
> 
> You have to be careful, depending on what’s already happened. If the object 
> was copied with NSCopyObject, which might have happened in NSObjet’s 
> copyWithZone method even if you didn’t call it directly, instance variables 
> will contain valid but unretained pointers. Because you’re assigning to a 
> property, the existing underlying instance variable will have its retain 
> count decremented, which probably isn’t the right thing to do.
> 
> Your copyWithZone method is more like an init method than a regular method. 
> In general, like in inits, you will want to assign directly to instance 
> variables rather than use property setters. In addition, you may have to deal 
> manually with retain counts. 
> 
> Yes, copyWithZone is a potential nightmare. In many cases, it’s easier not to 
> copy anything really, but to create a new object whose instance variables you 
> set up in a proper ‘initAsCopyOf:’ method that follows normal init 
> conventions.
> 

Yes, I came to that conclusion too and I added a initWithIndexPath method to an 
NSIndexPath Category and it works!

I was manually copying the dictionaries and arrays anyway - [x mutableCopy];

I did that and Bang it Crashed about, but this time with another bug which was 
easy to find since malloc guard caught it this time, that one was a flakey 
method for converting an NSString “xx.yy.zz" type string an Array of 
NSUInteger’s to call initWithIndexs with!

Fixed that one and now it work!

Thanks a lot Jens and Qunicey………

One quick question, I’m relying of the copy attribute for the NSString’s, do I 
need to change these to do a [xxx copy] too or is NSString OK?

All the Best
Dave
 
___

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: Faster scrolling after resizing window

2016-01-21 Thread corbin dunn
That doesn’t make much sense. Try comparing samples before and after. What is 
different?

corbin

> Il giorno 17 gen 2016, alle ore 5:16 AM, Martin Huber  
> ha scritto:
> 
> I have a strange problem in my application (on 10.11, but I don't know 
> whether that's important). After opening a document, scrolling in the 
> document is a bit sluggish. But after resizing the document window with the 
> mouse or maximizing it by Alt+click on the green title bar button, scrolling 
> is a lot faster.
> 
> Resizing the window by code with -[NSWindow zoom:] and -[NSWindow 
> setFrame:display:animate:YES] speeds up scrolling, too, but -[NSWindow 
> setFrame:display:animate:NO] doesn't.
> 
> The document window uses a subclass of NSView for displaying its content and 
> doesn't have any layers.
> 
> Does anybody know what  -[NSWindow zoom:] and -[NSWindow 
> setFrame:display:animate:YES] might change at the window, so that following 
> scrolls are faster?
> 
> Martin
> ___
> 
> 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/corbind%40apple.com
> 
> This email sent to corb...@apple.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

Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Dave
Hi,

I’ve got it working using NSCoding for now and I can review to later.

I have one crashing problem though, I’m getting a crash when one of the 
properties in my LTWNodeInfo is dealloc. It’s an NSIndexPath class, the rest 
seem to be ok. i’m wondering if it is to do with the way in which I’m 
creating/copying it:



@property (nonatomic,copy)  NSIndexPath*
pNodeIndexPath;


in initWithCoder:

self.pNodeIndexPath = [theCoder decodeObjectForKey:@"pNodeIndexPath”];


in encodeWithCoder:

[theCoder encodeObject:self. pNodeIndexPath forKey:@"pNodeIndexPath”];

in copyWithZone:

myObjectCopy. pNodeIndexPath = self. pNodeIndexPath;//Copy 
Attribute on Property



In order to work around it, I added an extra property:

@property (nonatomic,copy)  NSString*   
pNodeIndexPathString;


Added to: initWithCoder:

self.pNodeIndexPathString = [theCoder 
decodeObjectForKey:@"pNodeIndexPathString”];

myIndexPath = [NSIndexPath 
newIndexPathWithPathString:self.pUIElementInfoIndexPathString];
self.pUIElementInfoIndexPath = myIndexPath;


Added to: encodeWithCoder:

[theCoder encodeObject:self. pNodeIndexPathString 
forKey:@"pNodeIndexPathString”];

and removed the encodeObject: self.pNodeIndexPath

in copyWithZone:


myObjectCopy. pNodeIndexPath = self. pNodeIndexPath;
//Copy Attribute on Property
myObjectCopy. pNodeIndexPathString = self. pNodeIndexPathString;
//Copy Attribute on Property

But I still get a crash on the dealloc of pNodeIndexPath. 

in dealloc:

self.pNodeIndexPath = nil;

Anyone have any ideas what I’m doing wrong?

Thanks in Advance
Dave



___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread SevenBits

> On Jan 21, 2016, at 1:32 PM, Fritz Anderson  wrote:
> 
> On 21 Jan 2016, at 10:45 AM, Aandi Inston  wrote:
>> 
>> So far as I can see, all recent Mac OS systems are 64-bit on 64-bit
>> hardware and can run an app shipped in 64-bit only. And 32-bit continues to
>> run fine.
>> 
>> But what about the future? Perhaps we can only speculate about whether
>> 32-bit apps will be deprecated, but maybe Apple have started to hint that
>> 32-bit has a limited lifetime? It's a question of prioritising work on old
>> apps, and what will happen to our customers with older apps in future.
>> Let's assume Cocoa has been weeded out of the apps already.
>> 
>> Thanks in advance for your speculations (or more solid facts!)
> 
> The people with solid facts don’t hang around on mailing lists like this, and 
> would be fired if they responded. Apple does not comment on its plans. What 
> we do know is this:
> 
> We have more than hints. Apple has steadily increased the incentives for 
> third-party developers to drop 32-bit products. But it hasn’t even deprecated 
> it, much less cut it off. Unless I had to accommodate a market (like 
> education) that hangs onto hardware for a very long time, I’d never consider 
> anything but 64 bits.
> 
> Apple itself has a harder decision, because it doesn’t want to break 
> developers’ remaining 32-bit products. (Add the “Kind” column to Activity 
> Monitor to see what I mean.)
> 
> All we can know is that deprecation will come no sooner than June (10.12 
> Tehachapi), withdrawal no sooner than June of 2017 (10.13 San Quentin).

Unrelated, but… are these the official code names?

> 
>   — F
> 
> 
> ___
> 
> 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



signature.asc
Description: Message signed with OpenPGP using GPGMail
___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread Jens Alfke

> On Jan 21, 2016, at 1:57 PM, SevenBits  wrote:
> 
> Unrelated, but… are these the official code names?

Yup, the road map got leaked last month. And 10.14 will be Rancho Cucamonga and 
10.15 is Manteca*.

—Jens

* sure to be a big hit in Spanish-speaking countries!
___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread Charles Srstka
> On Jan 21, 2016, at 3:57 PM, SevenBits  wrote:
> 
>> On Jan 21, 2016, at 1:32 PM, Fritz Anderson  wrote:
>> 
>> On 21 Jan 2016, at 10:45 AM, Aandi Inston  wrote:
>>> 
>>> So far as I can see, all recent Mac OS systems are 64-bit on 64-bit
>>> hardware and can run an app shipped in 64-bit only. And 32-bit continues to
>>> run fine.
>>> 
>>> But what about the future? Perhaps we can only speculate about whether
>>> 32-bit apps will be deprecated, but maybe Apple have started to hint that
>>> 32-bit has a limited lifetime? It's a question of prioritising work on old
>>> apps, and what will happen to our customers with older apps in future.
>>> Let's assume Cocoa has been weeded out of the apps already.
>>> 
>>> Thanks in advance for your speculations (or more solid facts!)
>> 
>> The people with solid facts don’t hang around on mailing lists like this, 
>> and would be fired if they responded. Apple does not comment on its plans. 
>> What we do know is this:
>> 
>> We have more than hints. Apple has steadily increased the incentives for 
>> third-party developers to drop 32-bit products. But it hasn’t even 
>> deprecated it, much less cut it off. Unless I had to accommodate a market 
>> (like education) that hangs onto hardware for a very long time, I’d never 
>> consider anything but 64 bits.
>> 
>> Apple itself has a harder decision, because it doesn’t want to break 
>> developers’ remaining 32-bit products. (Add the “Kind” column to Activity 
>> Monitor to see what I mean.)
>> 
>> All we can know is that deprecation will come no sooner than June (10.12 
>> Tehachapi), withdrawal no sooner than June of 2017 (10.13 San Quentin).
> 
> Unrelated, but… are these the official code names?

Yes it is. You can even check the product page:

http://www.apple.com/osx/tehachapi/ 

From the looks of it, we’re going to get 404 new features this time around.

Charles

___

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: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Graham Cox

> On 22 Jan 2016, at 10:04 AM, Quincey Morris 
>  wrote:
> 
> In general, like in inits, you will want to assign directly to instance 
> variables rather than use property setters


Same applies to -initWithCoder: If you call a lot of property setters there, 
performance is slow. It might not matter, but for big graphs (10,000+ objects) 
it can be a killer. If any setters have side effects it can be suicidal.


—Graham
___

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: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 13:47 , Dave  wrote:
> 
> myObjectCopy. pNodeIndexPath = self. pNodeIndexPath;  //Copy 
> Attribute on Property

You have to be careful, depending on what’s already happened. If the object was 
copied with NSCopyObject, which might have happened in NSObjet’s copyWithZone 
method even if you didn’t call it directly, instance variables will contain 
valid but unretained pointers. Because you’re assigning to a property, the 
existing underlying instance variable will have its retain count decremented, 
which probably isn’t the right thing to do.

Your copyWithZone method is more like an init method than a regular method. In 
general, like in inits, you will want to assign directly to instance variables 
rather than use property setters. In addition, you may have to deal manually 
with retain counts. 

Yes, copyWithZone is a potential nightmare. In many cases, it’s easier not to 
copy anything really, but to create a new object whose instance variables you 
set up in a proper ‘initAsCopyOf:’ method that follows normal init conventions.

___

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: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 15:22 , Dave  wrote:
> 
> I’m relying of the copy attribute for the NSString’s, do I need to change 
> these to do a [xxx copy] too

If you’re writing the setter yourself, you must do the copy yourself. If you’re 
using the synthesized setter, it’s done for you.

In your own code, you may as well be liberal with ‘copy’. It’s basically free 
(in run-time cost) in situations where you don’t need it. You don’t save 
anything by leaving it out.

___

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: Problem Archiving/Un-archiving Custom Objects

2016-01-21 Thread Jens Alfke
No, that’s weird, your code looks ok to me.
Have you tried using the static analyzer? Or the address sanitizer? Or running 
with NSZombies?

—Jens
___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread John McCall
> On Jan 21, 2016, at 1:57 PM, SevenBits  wrote:
>> On Jan 21, 2016, at 1:32 PM, Fritz Anderson  wrote:
>> 
>> On 21 Jan 2016, at 10:45 AM, Aandi Inston  wrote:
>>> 
>>> So far as I can see, all recent Mac OS systems are 64-bit on 64-bit
>>> hardware and can run an app shipped in 64-bit only. And 32-bit continues to
>>> run fine.
>>> 
>>> But what about the future? Perhaps we can only speculate about whether
>>> 32-bit apps will be deprecated, but maybe Apple have started to hint that
>>> 32-bit has a limited lifetime? It's a question of prioritising work on old
>>> apps, and what will happen to our customers with older apps in future.
>>> Let's assume Cocoa has been weeded out of the apps already.
>>> 
>>> Thanks in advance for your speculations (or more solid facts!)
>> 
>> The people with solid facts don’t hang around on mailing lists like this, 
>> and would be fired if they responded. Apple does not comment on its plans. 
>> What we do know is this:
>> 
>> We have more than hints. Apple has steadily increased the incentives for 
>> third-party developers to drop 32-bit products. But it hasn’t even 
>> deprecated it, much less cut it off. Unless I had to accommodate a market 
>> (like education) that hangs onto hardware for a very long time, I’d never 
>> consider anything but 64 bits.
>> 
>> Apple itself has a harder decision, because it doesn’t want to break 
>> developers’ remaining 32-bit products. (Add the “Kind” column to Activity 
>> Monitor to see what I mean.)
>> 
>> All we can know is that deprecation will come no sooner than June (10.12 
>> Tehachapi), withdrawal no sooner than June of 2017 (10.13 San Quentin).
> 
> Unrelated, but… are these the official code names?

Well, not anymore. :)

John.
___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread Jens Alfke

> On Jan 21, 2016, at 4:36 PM, dangerwillrobinsondan...@gmail.com wrote:
> 
> I'm surprised nobody has mentioned JSON. 
> You might later look at it. 

From the perspective of Dave’s question, JSON is the same thing as a plist 
except it doesn’t support NSData or NSDate. It’s not going to offer any 
benefits.*

—Jens

* Obviously I’m aware that JSON does have the benefits of interoperability and 
readability, but neither of those are relevant to what Dave is asking for, 
which is just to archive some objects.
___

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 record screen in iOS

2016-01-21 Thread ico
Hi,
I know I can do this with QuickTime, but the problem is you need a computer
with you to do so, I want the users can do it whenever they want.
ReplayKit maybe the choice, I will take a look.

For the sandboxing reason, I know it possibly not to get it done. However,
what if there is some dark magic like private API, I use them to develop
the app and not to upload it
to app store, I just distribute the app to the users who want to use it, is
there any chance?

Thank you.


On Thu, 21 Jan 2016 at 00:41 Hunter Hillegas 
wrote:

> Building a general purpose iOS app to do this is not possible for
> sandboxing/privacy reasons.
>
> For your own apps, you can embed ReplayKit or you can connect to the Mac
> and use QuickTime to record the screen.
>
> > On Jan 20, 2016, at 1:21 AM, ico  wrote:
> >
> > Hi All,
> > Is it possible to develop an app that can run in the background and
> record
> > the user's device screen. For example, user can use this app to record a
> > video how they play a game and post the video on the web etc.
> >
> > Anyone can point me to the right direction to get it done?
> > Thanks a lot.
>
>
> ___
>
> 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/jche128%40gmail.com
>
> This email sent to jche...@gmail.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 record screen in iOS

2016-01-21 Thread Doug Hill
Hello,

The feature you’re proposing sounds like malware to me, or could easily be 
repurposed for malware. Discussing ways to do this with undocumented APIs is 
borderline ethical and probably not acceptable use on an official Apple mailing 
list.

I think the real answer is there’s no documented way to do this and almost 
certainly isn’t a feature you can legitimately implement on iOS.

Doug


> On Jan 21, 2016, at 6:45 PM, ico  wrote:
> 
> Hi,
> I know I can do this with QuickTime, but the problem is you need a computer
> with you to do so, I want the users can do it whenever they want.
> ReplayKit maybe the choice, I will take a look.
> 
> For the sandboxing reason, I know it possibly not to get it done. However,
> what if there is some dark magic like private API, I use them to develop
> the app and not to upload it
> to app store, I just distribute the app to the users who want to use it, is
> there any chance?
> 
> Thank you.
> 
> 
> On Thu, 21 Jan 2016 at 00:41 Hunter Hillegas 
> wrote:
> 
>> Building a general purpose iOS app to do this is not possible for
>> sandboxing/privacy reasons.
>> 
>> For your own apps, you can embed ReplayKit or you can connect to the Mac
>> and use QuickTime to record the screen.
>> 
>>> On Jan 20, 2016, at 1:21 AM, ico  wrote:
>>> 
>>> Hi All,
>>> Is it possible to develop an app that can run in the background and
>> record
>>> the user's device screen. For example, user can use this app to record a
>>> video how they play a game and post the video on the web etc.
>>> 
>>> Anyone can point me to the right direction to get it done?
>>> Thanks a lot.


___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread Alex Zavatone
You can use NSCoding to write the object out to disk and read it back.

If you want to convert it to a dictionary, you can save it as a pList

I’m spent right now, but if you’re interested I can send you my code for saving 
and restoring my lists of CLLocations using NSCoding.  It will have to wait for 
tomorrow though.

I’d google around for NSCoding examples if you need something before then.

There’s also a good link to state restoration in this post:

https://www.reddit.com/r/iOSProgramming/comments/41wnxs/ios_data_serialization_ipc_vs_android/

https://www.reddit.com/r/iOSProgramming/comments/41wnxs/ios_data_serialization_ipc_vs_android/cz5r0p3

In any case, let me know if you want to take a look at the stuff I’ve got and 
I’ll send when I’m conscious.

GL.

Alex Zavatone


On Jan 21, 2016, at 7:36 PM, dangerwillrobinsondan...@gmail.com wrote:

> I'm surprised nobody has mentioned JSON. 
> You might later look at it. 
> It can help sometimes by showing where a model is over engineered and can be 
> simpler and more flexible and reusable, but it also might not fit. 
> 
> Sent from my iPhone
> 
>> On Jan 22, 2016, at 2:05 AM, Dave  wrote:
>> 
>> Hi All,
>> 
>> I have Network of Dictionaries containing “LTWNodeInfo” Classes. LTWNodeInfo 
>> contains a Child Dictionary which in turn contains other LTWNodeInfo. The 
>> Key to these dictionaries is a Unique ID string called the NodeID.
>> 
>> @interface LTWNodeInfo
>> @property (copy)NSString*pNodeID;
>> @property (copy)NSString*pNodeType;
>> @property (copy)NSMutableDictionary*pNodeChildDict;
>> @property (copy)LTWNodeInfo*pNodeParentt;
>> 
>> @property (copy)NSString*pNodePayloadString1;
>> @property (copy)NSString*pNodePayloadString2;
>> @property (copy)NSString*pNodePayloadString3;
>> @end
>> 
>> 
>> This all works great and now I’d like to save this to a plist file and load 
>> it later on.
>> 
>> My question is, what is the best way to do this? I was thinking I could make 
>> a dictionary out of the LTWNodeInfo Object and then create a Parallel 
>> Network using the dictionary versions, (I’d just use the Property names as 
>> the Key), but I was wondering if there is an easier way to do this?
>> 
>> Any suggestions greatly appreciated.
>> 
>> All the Best
>> Dave
>> 
>> 
>> ___
>> 
>> 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
> 
> ___
> 
> 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/zav%40mac.com
> 
> This email sent to z...@mac.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: Using an anchor in NSURL file url

2016-01-21 Thread Jeff Evans
Thanks - 
Here's what I'm doing: Assume a directory called book and a file called 
chapter1, and an anchor called #page3

NSString *filePath = [[NSBundle mainBundle] pathForResource: chapter1 
ofType: @"html" inDirectory: book];

//That file path gets converted to a base url:

NSURL *baseURL =  [NSURL fileURLWithPath:filePath];

//I then create a combined url that includes the anchor, following a 
suggestion I saw elsewhere:

NSURL *fullURL  = [NSURL URLWithString: #page3 relativeToURL:baseURL];

//Then I create a url request with that:

NSURLRequest *nsrequest = [NSURLRequest requestWithURL: fullURL];

//And pass it to the WKWebView:

[webView loadRequest:nsrequest];

//Which loads the chapter file very nicely, but ignoring the anchor.

//The full url appears to have the anchor prepended, plus a couple of 
dashes:

#page3-- [pathtobook is here]/book/chapter1.html

//Instead of what I'd expect,

[pathtobook is here]/book/chapter1.html#page3

So I don't quite understand that format. I expect I'm missing something 
basic here. The chapter does contain the anchor  page 3> 

Yours, Jeff

On Jan 21, 2016, at 5:32 PM, Quincey Morris wrote:

On Jan 21, 2016, at 17:17 , Jeff Evans  wrote:
> 
>   In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works 
> fine unless I try to add an anchor to the path, for example,
> 
> [path]/filename.html#anchorname
> 
> The problem appears to be that the # gets escaped to %23. 

Can you show what APIs you’re using for this? Are you appending the anchor to 
an existing string or URL? Are you explicitly creating a file URL, or a generic 
URL? 

Looking at NSURL documentation, it looks like NSURL recognizes the anchor as a 
piece called “fragment”.

> I tried [NSURL URLWithString: anchorname relativeToURL: baseURL] but this 
> produces a url with the form 

This doesn’t seem likely to work. In this API, the first parameter is assumed 
to *be* a URL, albeit in relative form, not a URL piece, which is what you have.


If this email is spam, report it to www.OnlyMyEmail.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: Using an anchor in NSURL file url

2016-01-21 Thread Ken Thomases
On Jan 21, 2016, at 7:17 PM, Jeff Evans  wrote:
> 
> Colleagues,
> 
>   In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works 
> fine unless I try to add an anchor to the path, for example,
> 
> [path]/filename.html#anchorname

The most correct way would be to use NSURLComponents to append the fragment:

NSURL* fileURL = [NSURL fileURLWithPath:somePathString]; // or, even better, an 
API that gives file URLs directly, skipping the path string
NSURLComponents* components = [NSURLComponents componentsWithURL:fileURL 
resolvingAgainstBaseURL:YES];
components.fragment = @"anchorname";
NSURL* urlWithFragment = components.URL;


If you can't use NSURLComponents because you're targeting releases of OS X 
before 10.9, you should just use string operations:

NSURL* fileURL = // … as above …
NSString* urlString = fileURL.absoluteString;
urlString = [urlString stringByAppending:@"#anchorname"];
NSURL* urlWithFragment = [NSURL URLWithString:urlString];

Regards,
Ken


___

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 record screen in iOS

2016-01-21 Thread Alex Kac
Is there a reason you can’t use ReplayKit:

https://developer.apple.com/library/ios/documentation/ReplayKit/Reference/RPScreenRecorder_Ref/index.html#//apple_ref/occ/cl/RPScreenRecorder

I’ve been thinking of exploring this for support purposes (i.e let the user hit 
a button to record the screen and send us the video), but to be honest I 
haven’t even spent 2 seconds looking at ReplayKit beyond what I saw at WWDC…so 
not sure if that’s possible. 

> On Jan 21, 2016, at 7:45 PM, ico  wrote:
> 
> Hi,
> I know I can do this with QuickTime, but the problem is you need a computer
> with you to do so, I want the users can do it whenever they want.
> ReplayKit maybe the choice, I will take a look.
> 
> For the sandboxing reason, I know it possibly not to get it done. However,
> what if there is some dark magic like private API, I use them to develop
> the app and not to upload it
> to app store, I just distribute the app to the users who want to use it, is
> there any chance?
> 
> Thank you.
> 
> 
> On Thu, 21 Jan 2016 at 00:41 Hunter Hillegas 
> wrote:
> 
>> Building a general purpose iOS app to do this is not possible for
>> sandboxing/privacy reasons.
>> 
>> For your own apps, you can embed ReplayKit or you can connect to the Mac
>> and use QuickTime to record the screen.
>> 
>>> On Jan 20, 2016, at 1:21 AM, ico  wrote:
>>> 
>>> Hi All,
>>> Is it possible to develop an app that can run in the background and
>> record
>>> the user's device screen. For example, user can use this app to record a
>>> video how they play a game and post the video on the web etc.
>>> 
>>> Anyone can point me to the right direction to get it done?
>>> Thanks a lot.
>> 
>> 
>> ___
>> 
>> 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/jche128%40gmail.com
>> 
>> This email sent to jche...@gmail.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/alex%40webis.net
> 
> This email sent to a...@webis.net


Alex Kac - El capitán


___

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: 32-bit / 64-bit roadmap

2016-01-21 Thread Bill Cheeseman

> On Jan 21, 2016, at 5:04 PM, Jens Alfke  wrote:
> 
> Yup, the road map got leaked last month. And 10.14 will be Rancho Cucamonga 
> and 10.15 is Manteca*.


and 10.16 Death Valley.

-- 

Bill Cheeseman - wjcheese...@comcast.net

___

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 save a Dictionary Network to a plist file?

2016-01-21 Thread dangerwillrobinsondanger
I'm surprised nobody has mentioned JSON. 
You might later look at it. 
It can help sometimes by showing where a model is over engineered and can be 
simpler and more flexible and reusable, but it also might not fit. 

Sent from my iPhone

> On Jan 22, 2016, at 2:05 AM, Dave  wrote:
> 
> Hi All,
> 
> I have Network of Dictionaries containing “LTWNodeInfo” Classes. LTWNodeInfo 
> contains a Child Dictionary which in turn contains other LTWNodeInfo. The Key 
> to these dictionaries is a Unique ID string called the NodeID.
> 
> @interface LTWNodeInfo
> @property (copy)NSString*pNodeID;
> @property (copy)NSString*pNodeType;
> @property (copy)NSMutableDictionary*pNodeChildDict;
> @property (copy)LTWNodeInfo*pNodeParentt;
> 
> @property (copy)NSString*pNodePayloadString1;
> @property (copy)NSString*pNodePayloadString2;
> @property (copy)NSString*pNodePayloadString3;
> @end
> 
> 
> This all works great and now I’d like to save this to a plist file and load 
> it later on.
> 
> My question is, what is the best way to do this? I was thinking I could make 
> a dictionary out of the LTWNodeInfo Object and then create a Parallel Network 
> using the dictionary versions, (I’d just use the Property names as the Key), 
> but I was wondering if there is an easier way to do this?
> 
> Any suggestions greatly appreciated.
> 
> All the Best
> Dave
> 
> 
> ___
> 
> 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

___

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

Using an anchor in NSURL file url

2016-01-21 Thread Jeff Evans
Colleagues,

In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works 
fine unless I try to add an anchor to the path, for example,

[path]/filename.html#anchorname

The problem appears to be that the # gets escaped to %23. 

I tried [NSURL URLWithString: anchorname relativeToURL: baseURL] but this 
produces a url with the form 

#anchorname--[path]/filename.html

and that doesn't work (opens the file, but ignores the anchor).

Is there any way to use an anchor in a file url for WKWebView?

Thanks, Jeff



___

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: Using an anchor in NSURL file url

2016-01-21 Thread Quincey Morris
On Jan 21, 2016, at 17:17 , Jeff Evans  wrote:
> 
>   In OSX I'm using an NSURLRequest to load a file url in WKWebView. Works 
> fine unless I try to add an anchor to the path, for example,
> 
> [path]/filename.html#anchorname
> 
> The problem appears to be that the # gets escaped to %23. 

Can you show what APIs you’re using for this? Are you appending the anchor to 
an existing string or URL? Are you explicitly creating a file URL, or a generic 
URL? 

Looking at NSURL documentation, it looks like NSURL recognizes the anchor as a 
piece called “fragment”.

> I tried [NSURL URLWithString: anchorname relativeToURL: baseURL] but this 
> produces a url with the form 

This doesn’t seem likely to work. In this API, the first parameter is assumed 
to *be* a URL, albeit in relative form, not a URL piece, which is what you have.

___

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 record screen in iOS

2016-01-21 Thread David Brittain
If a 3rd party solution will meet your needs the take a look at
https://lookback.io

Dave

On 21 January 2016 at 19:14, Alex Kac  wrote:
> Is there a reason you can’t use ReplayKit:
>
> https://developer.apple.com/library/ios/documentation/ReplayKit/Reference/RPScreenRecorder_Ref/index.html#//apple_ref/occ/cl/RPScreenRecorder
>
> I’ve been thinking of exploring this for support purposes (i.e let the user 
> hit a button to record the screen and send us the video), but to be honest I 
> haven’t even spent 2 seconds looking at ReplayKit beyond what I saw at 
> WWDC…so not sure if that’s possible.
>
>> On Jan 21, 2016, at 7:45 PM, ico  wrote:
>>
>> Hi,
>> I know I can do this with QuickTime, but the problem is you need a computer
>> with you to do so, I want the users can do it whenever they want.
>> ReplayKit maybe the choice, I will take a look.
>>
>> For the sandboxing reason, I know it possibly not to get it done. However,
>> what if there is some dark magic like private API, I use them to develop
>> the app and not to upload it
>> to app store, I just distribute the app to the users who want to use it, is
>> there any chance?
>>
>> Thank you.
>>
>>
>> On Thu, 21 Jan 2016 at 00:41 Hunter Hillegas 
>> wrote:
>>
>>> Building a general purpose iOS app to do this is not possible for
>>> sandboxing/privacy reasons.
>>>
>>> For your own apps, you can embed ReplayKit or you can connect to the Mac
>>> and use QuickTime to record the screen.
>>>
 On Jan 20, 2016, at 1:21 AM, ico  wrote:

 Hi All,
 Is it possible to develop an app that can run in the background and
>>> record
 the user's device screen. For example, user can use this app to record a
 video how they play a game and post the video on the web etc.

 Anyone can point me to the right direction to get it done?
 Thanks a lot.
>>>
>>>
>>> ___
>>>
>>> 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/jche128%40gmail.com
>>>
>>> This email sent to jche...@gmail.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/alex%40webis.net
>>
>> This email sent to a...@webis.net
>
>
> Alex Kac - El capitán
>
>
> ___
>
> 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/websites%40paperetto.com
>
> This email sent to websi...@paperetto.com



-- 
David Brittain
da...@paperetto.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