App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Bradley O'Hearne
Hello, 

I am using Xcode 6.1.1 on OS X Yosemite and have exported an archive as a Mac 
Installer Package using a Developer ID to sign it. The installer is created 
successfully, and when run, the installer executes the installation 
successfully. But when I attempt to launch the app, it crashes immediately, 
with the following in the crash dump: 

Exception Type:EXC_CRASH (Code Signature Invalid)
Exception Codes:   0x, 0x

The problem is somehow with signing, though build settings in Xcode all follow 
the documented approach to code signing using the proper Mac Developer Program 
certificates. I have no errors or warnings when building the app. I have no 
errors or warnings or problems launching and running the app in the debugger. I 
also can export the same archive as a Developer ID-signed Application and it 
exports, launches, and runs just fine. Additionally, this is not something new 
I'm doing -- in previous development cycles (and earlier in this one) I was 
able to successfully export as a Mac Installer Package and run fine -- albeit 
that was on earlier versions of Xcode (and possibly OS X too). 

In various other Internet-y places, I have found references to others having 
this same problem recently, but none of those had any resolution. A couple of 
posters commented that even after several weeks with communicating with Apple 
DTS they still hadn't been given or were able to find a resolution. So I am 
appealing to the community on the following points: 

Has anyone who has encountered this found a resolution to the problem? 
Can anyone confirm this as a legitimate Xcode bug? 
Any other suggestions to get around this? (Please note -- for reasons out of my 
control, this app has to be distributed as a Developer ID-signed Mac Installer 
Package -- we cannot distribute at this time through the Mac App Store. Perhaps 
down the road, but not at this time). 

Your help is appreciated. This is a direct show-stopper for us being able to 
ship our app to production. 

Thanks, 

Brad
___

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: ARC dealloc best pratice

2015-02-11 Thread Steve Mills
On Feb 6, 2015, at 11:34:35, Kyle Sluder k...@ksluder.com wrote:
 
 Dealloc is too late for a lot of this stuff. I try to keep -dealloc as
 pure as possible; that is, -dealloc should only be concerned with memory
 management.
 
 Removing observers, unbinding, unregistering notifications, and timer
 invalidation all happens in -viewWillMoveToWindow: or another similar
 place.

I'm curious where you put such housekeeping tasks for window controllers, if 
dealloc is the wrong place. Override close? Handle windowWillClose?

--
Steve Mills
Drummer, Mac geek


___

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: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Sandy McGuffog
Alex,

Don’t know….in my case, this was OS X

Sandy

 On Feb 11, 2015, at 8:25 PM, Alex Zavatone z...@mac.com wrote:
 
 Any idea if this only affects OS X or does it also affect iOS?
 
 Sent from my iPad. Please pardon typos.
 
 On Feb 11, 2015, at 12:55 PM, Sandy McGuffog mcguff...@gmail.com wrote:
 
 Brad,
 
 Yes, Xcode 6 breaks what used to be valid signing workflows under previous 
 versions. Unfortunately, Apple’s documentation hasn’t caught up, and most of 
 DTS is clueless on this subject. It took me literally months to get a useful 
 answer. This BTW is not a bug, it is apparently as a result of Apple 
 deliberately tightening up signing requirements.
 
 In short, the only supported workflow now is “team based signing”. Apple is 
 quite vague about what that really means, but in my case it involve setting 
 Code Signing Identity to “Developer”, and Provisioning Profile to 
 “Automatic”. Trying to override these settings with e.g., a specific 
 profile, results in bad things happening.
 
 Sandy
 
 
 On Feb 11, 2015, at 7:05 PM, Bradley O'Hearne br...@bighillsoftware.com 
 wrote:
 
 Hello, 
 
 I am using Xcode 6.1.1 on OS X Yosemite and have exported an archive as a 
 Mac Installer Package using a Developer ID to sign it. The installer is 
 created successfully, and when run, the installer executes the installation 
 successfully. But when I attempt to launch the app, it crashes immediately, 
 with the following in the crash dump: 
 
 Exception Type:EXC_CRASH (Code Signature Invalid)
 Exception Codes:   0x, 0x
 
 The problem is somehow with signing, though build settings in Xcode all 
 follow the documented approach to code signing using the proper Mac 
 Developer Program certificates. I have no errors or warnings when building 
 the app. I have no errors or warnings or problems launching and running the 
 app in the debugger. I also can export the same archive as a Developer 
 ID-signed Application and it exports, launches, and runs just fine. 
 Additionally, this is not something new I'm doing -- in previous 
 development cycles (and earlier in this one) I was able to successfully 
 export as a Mac Installer Package and run fine -- albeit that was on 
 earlier versions of Xcode (and possibly OS X too). 
 
 In various other Internet-y places, I have found references to others 
 having this same problem recently, but none of those had any resolution. A 
 couple of posters commented that even after several weeks with 
 communicating with Apple DTS they still hadn't been given or were able to 
 find a resolution. So I am appealing to the community on the following 
 points: 
 
 Has anyone who has encountered this found a resolution to the problem? 
 Can anyone confirm this as a legitimate Xcode bug? 
 Any other suggestions to get around this? (Please note -- for reasons out 
 of my control, this app has to be distributed as a Developer ID-signed Mac 
 Installer Package -- we cannot distribute at this time through the Mac App 
 Store. Perhaps down the road, but not at this time). 
 
 Your help is appreciated. This is a direct show-stopper for us being able 
 to ship our app to production. 
 
 Thanks, 
 
 Brad
 ___
 
 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/mcguffogl%40gmail.com
 
 This email sent to mcguff...@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: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Sandy McGuffog
Brad,

Yes, Xcode 6 breaks what used to be valid signing workflows under previous 
versions. Unfortunately, Apple’s documentation hasn’t caught up, and most of 
DTS is clueless on this subject. It took me literally months to get a useful 
answer. This BTW is not a bug, it is apparently as a result of Apple 
deliberately tightening up signing requirements.

In short, the only supported workflow now is “team based signing”. Apple is 
quite vague about what that really means, but in my case it involve setting 
Code Signing Identity to “Developer”, and Provisioning Profile to “Automatic”. 
Trying to override these settings with e.g., a specific profile, results in bad 
things happening.

Sandy


 On Feb 11, 2015, at 7:05 PM, Bradley O'Hearne br...@bighillsoftware.com 
 wrote:
 
 Hello, 
 
 I am using Xcode 6.1.1 on OS X Yosemite and have exported an archive as a Mac 
 Installer Package using a Developer ID to sign it. The installer is created 
 successfully, and when run, the installer executes the installation 
 successfully. But when I attempt to launch the app, it crashes immediately, 
 with the following in the crash dump: 
 
 Exception Type:EXC_CRASH (Code Signature Invalid)
 Exception Codes:   0x, 0x
 
 The problem is somehow with signing, though build settings in Xcode all 
 follow the documented approach to code signing using the proper Mac Developer 
 Program certificates. I have no errors or warnings when building the app. I 
 have no errors or warnings or problems launching and running the app in the 
 debugger. I also can export the same archive as a Developer ID-signed 
 Application and it exports, launches, and runs just fine. Additionally, this 
 is not something new I'm doing -- in previous development cycles (and earlier 
 in this one) I was able to successfully export as a Mac Installer Package and 
 run fine -- albeit that was on earlier versions of Xcode (and possibly OS X 
 too). 
 
 In various other Internet-y places, I have found references to others having 
 this same problem recently, but none of those had any resolution. A couple of 
 posters commented that even after several weeks with communicating with Apple 
 DTS they still hadn't been given or were able to find a resolution. So I am 
 appealing to the community on the following points: 
 
 Has anyone who has encountered this found a resolution to the problem? 
 Can anyone confirm this as a legitimate Xcode bug? 
 Any other suggestions to get around this? (Please note -- for reasons out of 
 my control, this app has to be distributed as a Developer ID-signed Mac 
 Installer Package -- we cannot distribute at this time through the Mac App 
 Store. Perhaps down the road, but not at this time). 
 
 Your help is appreciated. This is a direct show-stopper for us being able to 
 ship our app to production. 
 
 Thanks, 
 
 Brad
 ___
 
 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/mcguffogl%40gmail.com
 
 This email sent to mcguff...@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: Solved: Re: Using multiple bindings to enable a button

2015-02-11 Thread Steve Mills
On Feb 11, 2015, at 13:06:20, Steve Mills sjmi...@mac.com wrote:
 
 This also sparked my understanding of the other binding attributes, like 
 Multiple Values Placeholder and such, resulting in me not needing my special 
 EnableOnlyFor1ItemXformer value transformer on the array controller 
 selectedObjects.@count binding. Duh. I guess when I decided to tackle Core 
 Data, Cocoa bindings, NSTableView, and NSArrayController all at the same 
 time, my brain quickly overflowed. :)

Wait, I guess my assumption about Multiple Values Placeholder was wrong. I 
still need my transformer. Having multiple items selected does not cause the 
Multiple Values Placeholder to be used. Reading NSPlaceholders now…

--
Steve Mills
Drummer, Mac geek


___

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: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Alex Zavatone
Any idea if this only affects OS X or does it also affect iOS?

Sent from my iPad. Please pardon typos.

On Feb 11, 2015, at 12:55 PM, Sandy McGuffog mcguff...@gmail.com wrote:

 Brad,
 
 Yes, Xcode 6 breaks what used to be valid signing workflows under previous 
 versions. Unfortunately, Apple’s documentation hasn’t caught up, and most of 
 DTS is clueless on this subject. It took me literally months to get a useful 
 answer. This BTW is not a bug, it is apparently as a result of Apple 
 deliberately tightening up signing requirements.
 
 In short, the only supported workflow now is “team based signing”. Apple is 
 quite vague about what that really means, but in my case it involve setting 
 Code Signing Identity to “Developer”, and Provisioning Profile to 
 “Automatic”. Trying to override these settings with e.g., a specific profile, 
 results in bad things happening.
 
 Sandy
 
 
 On Feb 11, 2015, at 7:05 PM, Bradley O'Hearne br...@bighillsoftware.com 
 wrote:
 
 Hello, 
 
 I am using Xcode 6.1.1 on OS X Yosemite and have exported an archive as a 
 Mac Installer Package using a Developer ID to sign it. The installer is 
 created successfully, and when run, the installer executes the installation 
 successfully. But when I attempt to launch the app, it crashes immediately, 
 with the following in the crash dump: 
 
 Exception Type:EXC_CRASH (Code Signature Invalid)
 Exception Codes:   0x, 0x
 
 The problem is somehow with signing, though build settings in Xcode all 
 follow the documented approach to code signing using the proper Mac 
 Developer Program certificates. I have no errors or warnings when building 
 the app. I have no errors or warnings or problems launching and running the 
 app in the debugger. I also can export the same archive as a Developer 
 ID-signed Application and it exports, launches, and runs just fine. 
 Additionally, this is not something new I'm doing -- in previous development 
 cycles (and earlier in this one) I was able to successfully export as a Mac 
 Installer Package and run fine -- albeit that was on earlier versions of 
 Xcode (and possibly OS X too). 
 
 In various other Internet-y places, I have found references to others having 
 this same problem recently, but none of those had any resolution. A couple 
 of posters commented that even after several weeks with communicating with 
 Apple DTS they still hadn't been given or were able to find a resolution. So 
 I am appealing to the community on the following points: 
 
 Has anyone who has encountered this found a resolution to the problem? 
 Can anyone confirm this as a legitimate Xcode bug? 
 Any other suggestions to get around this? (Please note -- for reasons out of 
 my control, this app has to be distributed as a Developer ID-signed Mac 
 Installer Package -- we cannot distribute at this time through the Mac App 
 Store. Perhaps down the road, but not at this time). 
 
 Your help is appreciated. This is a direct show-stopper for us being able to 
 ship our app to production. 
 
 Thanks, 
 
 Brad
 ___
 
 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/mcguffogl%40gmail.com
 
 This email sent to mcguff...@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

Solved: Re: Using multiple bindings to enable a button

2015-02-11 Thread Steve Mills
Thanks for the mental prodding, guys. I did some sleuthing by added an observer 
for the array controller's selectedObjects.@count in code so I could watch it 
as well as the comboStringValue property. When the selection changed and the 
combobox was empty, I noticed the comboStringValue property was nil, which 
spurred me to check the Null Placeholder for the comboStringValue binding. It 
was Unspecified. Changing it to No solved the problem.

This also sparked my understanding of the other binding attributes, like 
Multiple Values Placeholder and such, resulting in me not needing my special 
EnableOnlyFor1ItemXformer value transformer on the array controller 
selectedObjects.@count binding. Duh. I guess when I decided to tackle Core 
Data, Cocoa bindings, NSTableView, and NSArrayController all at the same time, 
my brain quickly overflowed. :)

--
Steve Mills
Drummer, Mac geek


___

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: Solved: Re: Using multiple bindings to enable a button

2015-02-11 Thread Ken Thomases
On Feb 11, 2015, at 1:25 PM, Steve Mills sjmi...@mac.com wrote:

 On Feb 11, 2015, at 13:06:20, Steve Mills sjmi...@mac.com wrote:
 
 This also sparked my understanding of the other binding attributes, like 
 Multiple Values Placeholder and such, resulting in me not needing my special 
 EnableOnlyFor1ItemXformer value transformer on the array controller 
 selectedObjects.@count binding. Duh. I guess when I decided to tackle Core 
 Data, Cocoa bindings, NSTableView, and NSArrayController all at the same 
 time, my brain quickly overflowed. :)
 
 Wait, I guess my assumption about Multiple Values Placeholder was wrong. I 
 still need my transformer. Having multiple items selected does not cause the 
 Multiple Values Placeholder to be used. Reading NSPlaceholders now…

The selectedObjects property never returns those placeholders.  Only the 
selection property does that.  However, that wouldn't support @count, I don't 
think.

I believe it should work to bind to selection.self or something similarly 
innocuous.  Use the NSIsNotNil transformer to get a YES result by default.  
Then set the Multiple Values and No Selection placeholders to produce a 
different result for those cases.

You probably want to enable Always Use Multi Value Marker on the array 
controller.  By default, it compares the result of applying the model key path 
to all of the selected elements to see if they actually differ from each other. 
 If they're all the same, it produces the single value.  You've probably seen 
UIs where, if all selected objects have the same value, a checkbox reflects 
that one value.  If they have different values, the checkbox shows the mixed 
state ([-]).  This is what that's about.  You don't care about that and, 
anyway, the self key is never going to be the same across multiple elements.  
You avoid a performance hit by enabling Always Use Multi Value Marker.

However, this affects the array controller globally.  You can't restrict it to 
just this one binding.  So, be sure you don't want the default behavior 
anywhere else in your UI.

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: Solved: Re: Using multiple bindings to enable a button

2015-02-11 Thread Steve Mills
On Feb 11, 2015, at 13:51:29, Ken Thomases k...@codeweavers.com wrote:
 
 The selectedObjects property never returns those placeholders.  Only the 
 selection property does that.  However, that wouldn't support @count, I don't 
 think.

@count appears to work on selection when I tested it, FYI.

 I believe it should work to bind to selection.self or something similarly 
 innocuous.  Use the NSIsNotNil transformer to get a YES result by default.  
 Then set the Multiple Values and No Selection placeholders to produce a 
 different result for those cases.
 
 You probably want to enable Always Use Multi Value Marker on the array 
 controller.  By default, it compares the result of applying the model key 
 path to all of the selected elements to see if they actually differ from each 
 other.  If they're all the same, it produces the single value.  You've 
 probably seen UIs where, if all selected objects have the same value, a 
 checkbox reflects that one value.  If they have different values, the 
 checkbox shows the mixed state ([-]).  This is what that's about.  You don't 
 care about that and, anyway, the self key is never going to be the same 
 across multiple elements.  You avoid a performance hit by enabling Always Use 
 Multi Value Marker.
 
 However, this affects the array controller globally.  You can't restrict it 
 to just this one binding.  So, be sure you don't want the default behavior 
 anywhere else in your UI.

Aha, yes, these changes produce the desired effect. Cool beans! Thanks again!

--
Steve Mills
Drummer, Mac geek


___

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

Core Data To-Many Relationship KVO

2015-02-11 Thread Richard Charles
I have a Core Data in-memory store. There is a managed object which uses KVO on 
a to-many relationship property of itself.

When an object at the other end of the relationship is deleted using 
[managedObjectContext deleteObject:object] the KVO change notification is not 
sent right away.

What triggers or will trigger the KVO change notification?

Richard 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: Core Data To-Many Relationship KVO

2015-02-11 Thread Roland King

 On 12 Feb 2015, at 07:27, Richard Charles rcharles...@gmail.com wrote:
 
 I have a Core Data in-memory store. There is a managed object which uses KVO 
 on a to-many relationship property of itself.
 
 When an object at the other end of the relationship is deleted using 
 [managedObjectContext deleteObject:object] the KVO change notification is not 
 sent right away.
 
 What triggers or will trigger the KVO change notification?
 
 Richard Charles
 


committing the core data changes removes them from all the relationships and 
fires KVO changes. see propagatesDeletesAtEndOfEvent: and commitPendingChanges. 
In AppKit usually deletes are propagated once around the event loop, in other 
places they won’t propagate until there’s a save or commitPendingChanges: is 
called. 
___

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: Core Data To-Many Relationship KVO

2015-02-11 Thread Richard Charles

 On Feb 11, 2015, at 4:51 PM, Roland King r...@rols.org wrote:
 
 committing the core data changes removes them from all the relationships and 
 fires KVO changes. see propagatesDeletesAtEndOfEvent: and 
 commitPendingChanges. In AppKit usually deletes are propagated once around 
 the event loop, in other places they won’t propagate until there’s a save or 
 commitPendingChanges: is called.


What “event” does propagatesDeletesAtEndOfEvent refer to? An event loop, some 
type of Core Data event? The documentation as I read it is unclear.

Also commitPendingChanges: does not appear to be in any method of the Cocoa 
frameworks.

Richard 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: Core Data To-Many Relationship KVO

2015-02-11 Thread Roland King

 On 12 Feb 2015, at 08:27, Richard Charles rcharles...@gmail.com wrote:
 
 
 On Feb 11, 2015, at 4:51 PM, Roland King r...@rols.org wrote:
 
 committing the core data changes removes them from all the relationships and 
 fires KVO changes. see propagatesDeletesAtEndOfEvent: and 
 commitPendingChanges. In AppKit usually deletes are propagated once around 
 the event loop, in other places they won’t propagate until there’s a save or 
 commitPendingChanges: is called.
 
 
 What “event” does propagatesDeletesAtEndOfEvent refer to? An event loop, some 
 type of Core Data event? The documentation as I read it is unclear.

No idea - why don’t you put a breakpoint in your KVO handler and see where it’s 
being called from, my guess would be the end of the event loop. If you want it 
earlier try calling the method to process pending changes, or remove it from 
the relationship yourself as well as deleting it. 

 
 Also commitPendingChanges: does not appear to be in any method of the Cocoa 
 frameworks.

processPendingChanges:, it’s on NSManagedObjectContext

 
 Richard 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: App crashes on launch when using Developer ID-signed Mac Installer Package

2015-02-11 Thread Bradley O'Hearne
All, 

Thank you to those who replied — I really appreciate it. The problem is solved, 
so I thought I’d pass it on for anyone else that runs into this issue.

I opened a tech support incident with DTS, and received a fairly prompt 
response from Apple DTS, who directed me to the following resource: 
https://developer.apple.com/library/mac/qa/qa1884/_index.html 
https://developer.apple.com/library/mac/qa/qa1884/_index.html

It is a little ambiguous in the document, but here’s the deal: the problem is 
not a bug in Xcode, but a reflection of the tightening of security on the Mac 
(I think another poster said the same). Xcode will no longer create Mac 
installer packages signed with a Developer ID (which is how you have to sign 
anything not distributed via the Mac App Store): you can only create a Mac 
installer package destined for the Mac App Store. Attempting to run an app 
created and installed this way is designed to crash immediately (which is the 
behavior we were experiencing). 
The solution was to export as a Developer ID-signed Mac Application, and then 
use the productbuild command-line tool to create the installer package. Details 
are in the page referenced by the URL above. 

Thanks again for responses,

Brad

 On Feb 11, 2015, at 10:05 AM, Bradley O'Hearne br...@bighillsoftware.com 
 wrote:
 
 Hello, 
 
 I am using Xcode 6.1.1 on OS X Yosemite and have exported an archive as a Mac 
 Installer Package using a Developer ID to sign it. The installer is created 
 successfully, and when run, the installer executes the installation 
 successfully. But when I attempt to launch the app, it crashes immediately, 
 with the following in the crash dump: 
 
 Exception Type:EXC_CRASH (Code Signature Invalid)
 Exception Codes:   0x, 0x
 
 The problem is somehow with signing, though build settings in Xcode all 
 follow the documented approach to code signing using the proper Mac Developer 
 Program certificates. I have no errors or warnings when building the app. I 
 have no errors or warnings or problems launching and running the app in the 
 debugger. I also can export the same archive as a Developer ID-signed 
 Application and it exports, launches, and runs just fine. Additionally, this 
 is not something new I'm doing -- in previous development cycles (and earlier 
 in this one) I was able to successfully export as a Mac Installer Package and 
 run fine -- albeit that was on earlier versions of Xcode (and possibly OS X 
 too). 
 
 In various other Internet-y places, I have found references to others having 
 this same problem recently, but none of those had any resolution. A couple of 
 posters commented that even after several weeks with communicating with Apple 
 DTS they still hadn't been given or were able to find a resolution. So I am 
 appealing to the community on the following points: 
 
 Has anyone who has encountered this found a resolution to the problem? 
 Can anyone confirm this as a legitimate Xcode bug? 
 Any other suggestions to get around this? (Please note -- for reasons out of 
 my control, this app has to be distributed as a Developer ID-signed Mac 
 Installer Package -- we cannot distribute at this time through the Mac App 
 Store. Perhaps down the road, but not at this time). 
 
 Your help is appreciated. This is a direct show-stopper for us being able to 
 ship our app to production. 
 
 Thanks, 
 
 Brad

___

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: Connecting a button to MyView zeros integers

2015-02-11 Thread N!K
Control-clicking the button in .xib does show the outlet panel but it does not 
list an IBAction, so it cannot connect to the IBAction entered into the 
MyView.h and .m files. Also, control-dragging from the button to MyView (in 
.xib, not in editor) sets up the position constraints. Control-dragging from 
the button to any icon does nothing.


I haven’t needed a control for quite some time, and I found that things have 
changed in Xcode 6.1.1.  I’m attempting to follow Apple’s current instruction.

Here’s the instruction from Apple’s Xcode_Overview.pdf, 2014-03-10, pp 64-65. 
The pictures have to be omitted here due to space constraints of this forum.

Control-drag from the control in Interface Builder to the implementation file. 
(In the screenshot, the assistant editor displays the implementation file of 
the view controller for the Warrior button.) Xcode indicates where you can 
insert an action method in your code.

[picture shows a line with a leading circle in a space in .m]

Release the Control-drag. The assistant editor displays a Connection menu. In 
this menu, type the name of the action method (chooseWarrior in the screenshot 
below), and click Connect. 

[picture shows a menu with space to enter name of action]

Connect User Interface Objects to Code

In the implementation file, Xcode inserts a skeletal definition for the new 
method, as shown below. The IBAction return type is a special keyword 
indicating that this instance method can be connected to your storyboard or xib 
file. Xcode also sets the action selector for the control to this method. As a 
result, the method gets invoked whenever the control receives an action 
message. 

[picture shows - (IBAction)chooseWarrior:(id)sender { }  ]


This Xcode_Overview example uses an implementation file, not AppDelegate. It 
does not add an empty object in IB.

Xcode is not allowing connection to my MyView file. Insertion of  - 
(IBAction)act:(id)sender { } occurs only in my AppDelegate, which of course 
responds to the button. Clicking the button in the View initiates the IBAction, 
which indicates that I’m following the instruction correctly.  I do the same 
steps when  I try it with my MyView file, which fails.

Might this be a bug? Or a defective copy of Xcode? Has anyone observed the same 
behavior?

Nick



On Feb 7, 2015, at 10:27 PM, Uli Kusterer witness.of.teacht...@gmx.net wrote:

 So quick to discount Stack Overflow. What they’re suggesting is simply how to 
 create a new object and define a new outlet on it that points to an object in 
 a quick way. Seems like a perfectly good answer to a problem to me, and my 
 guess is the OP might not have quite matched it up to the right question. 
 Without a link to the answer, it’s hard to tell.
 
 My guess is the OP is experiencing a common beginners’ confusion about how 
 NIB files work and is creating a second object while all they want to do is 
 really just hook something up to an existing object in the NIB, likely to 
 File’s Owner. Creating a new object instead of using an existing one of 
 course means that all ivars get new (likely default) values, which would be 
 completely consistent with the observed behaviour of “everything going to 0”.
 
 Cheers,
 -- Uli Kusterer
 “The Witnesses of TeachText are everywhere...”
 http://zathras.de
 
 On 07 Feb 2015, at 03:43, Roland King r...@rols.org wrote:
 
 I have no idea what stackoverflow is suggesting here but it looks entirely 
 wrong as usual for that junky site. You're just creating a standalone I 
 referenced object. 
 
 Right click your view in IB then wait a second and right click it again. I 
 think it's right clicks. You will then get the outlet panel which is the 
 grey HUD display with all the outlets and actions. You can drag connect to 
 your buttons. There's some ctrl alt shift cmd combo which does this too but 
 I never remember it. You can still connect view outlets as before, just that 
 ctrl-drag was repurposed a couple of xcodes ago for auto layout so you have 
 to work a little harder to get the inspector up. 
 
 
 
 On 7 Feb 2015, at 10:22, N!K pu56ucl...@alumni.purdue.edu wrote:
 
 
 I would like to connect a button to MyView class, but Xcode 6.1.1 only 
 allows control-dragging a button to AppDelegate to create an IBAction. I 
 have not encountered this previously. Looking for a workaround, I found 
 this recommendation in a couple of Stack Overflow and other web pages as 
 well as a YouTube video. It enables the button to work, but unfortunately 
 it zeros all the integers in MyView.
 
 The recommendation is:
 1. Drag an empty Object from the IB library to the column of blue icons.
 2. Set its class to MyView.
 3. Control-drag from the button to MyView.m
 4. Fill in the name (“act”) in the popup.
 This puts the IBAction template into MyView, ready to fill in.
 
 #import MyView.h
 
 @implementation MyView
 
 - (id)initWithCoder:(NSCoder *)aDecoder
 {
  self = [super initWithCoder:aDecoder];
  if (self) {
  

Re: Disable Text Replacement

2015-02-11 Thread Andreas Höschler
Hi Andy,

 
  NSLog(@isAutomaticTextReplacementEnabled %d, [NSSpellChecker 
 isAutomaticTextReplacementEnabled]);
  NSLog(@isAutomaticSpellingCorrectionEnabled %d, [NSSpellChecker 
 isAutomaticSpellingCorrectionEnabled]);
 
 but no corresponding set methods!?
 
 
 Note that you're messaging the NSSpellChecker class and not your NSTextView 
 instance.

I do both and realised in the meanwhile that the SpellChecker class methods 
reflect back the System Preferences settings. This is neat. I can’t use the 
since I don’t want to change anything system wide, only application specific.

   So you can do this:
 
   [_textView setAutomaticTextReplacementEnabled:NO];

So what I currently do and what works is

   #ifdef __APPLE__
   [self setAutomaticQuoteSubstitutionEnabled:NO];
   [self setContinuousSpellCheckingEnabled:NO];
   [self setAutomaticTextReplacementEnabled:NO];
   [self setEnabledTextCheckingTypes:NO];  //  -- this is critical and 
required to get rid of the unwanted text replacements
   #endif
   
However, the “setEnabledTextCheckingTypes:NO” line is necessary. If I commit 
that I still get replacements, e.g. two minus signs — are replaced with “?”. I 
for sure haven’t implemented this replacement!? It does not happen, if I paste 
the two characters into the textview, only if I type them!? Who is doing that 
and why? Shouldn’t this be suppressed with 
setAutomaticTextReplacementEnabled:NO!??

Thanks,

 Andreas







___

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: Connecting a button to MyView zeros integers

2015-02-11 Thread Roland King

 On 12 Feb 2015, at 13:36, N!K pu56ucl...@alumni.purdue.edu wrote:
 
 Control-clicking the button in .xib does show the outlet panel but it does 
 not list an IBAction, so it cannot connect to the IBAction entered into the 
 MyView.h and .m files. Also, control-dragging from the button to MyView (in 
 .xib, not in editor) sets up the position constraints. Control-dragging from 
 the button to any icon does nothing.
 

Ctrl click the view, not the button. When you ctrl-click the view you will see 
the actions listed and you can drag BACK to the button. Or you can go find the 
‘connections inspector’ (View-Utilities-Show Connections Inspector) panel for 
the button and drag ‘selector’ to the view you want to perform the action on 
and then you can select the action performed. Either way works, there’s 
probably a load more ways like the connections inspector on the view which you 
can probably drag the IBAction to whatever button you want. 

 
 This Xcode_Overview example uses an implementation file, not AppDelegate. It 
 does not add an empty object in IB.
 
 Xcode is not allowing connection to my MyView file. Insertion of  - 
 (IBAction)act:(id)sender { } occurs only in my AppDelegate, which of course 
 responds to the button. Clicking the button in the View initiates the 
 IBAction, which indicates that I’m following the instruction correctly.  I do 
 the same steps when  I try it with my MyView file, which fails.
 
 Might this be a bug? Or a defective copy of Xcode? Has anyone observed the 
 same behavior?

No somehow you are just flapping at it and failing. Not a bug, not a defective 
copy of Xcode. 

Go to your view header file and type in the IBAction, you will then find it 
listed either on ctrl-click on the view (assuming you have the view in your NIB 
set to the right class, you do right, you did set the view class in IB) or by 
going to the connection inspector for the button and dragging the ‘selector’ to 
the view, when it will list only the IBActions. 

 
 Nick
 
 
 
 On Feb 7, 2015, at 10:27 PM, Uli Kusterer witness.of.teacht...@gmx.net 
 mailto:witness.of.teacht...@gmx.net wrote:
 
 So quick to discount Stack Overflow. What they’re suggesting is simply how 
 to create a new object and define a new outlet on it that points to an 
 object in a quick way. Seems like a perfectly good answer to a problem to 
 me, and my guess is the OP might not have quite matched it up to the right 
 question. Without a link to the answer, it’s hard to tell.
 
 My guess is the OP is experiencing a common beginners’ confusion about how 
 NIB files work and is creating a second object while all they want to do is 
 really just hook something up to an existing object in the NIB, likely to 
 File’s Owner. Creating a new object instead of using an existing one of 
 course means that all ivars get new (likely default) values, which would be 
 completely consistent with the observed behaviour of “everything going to 0”.
 
 Cheers,
 -- Uli Kusterer
 “The Witnesses of TeachText are everywhere...”
 http://zathras.de http://zathras.de/
 
 On 07 Feb 2015, at 03:43, Roland King r...@rols.org wrote:
 
 I have no idea what stackoverflow is suggesting here but it looks entirely 
 wrong as usual for that junky site. You're just creating a standalone I 
 referenced object. 
 
 Right click your view in IB then wait a second and right click it again. I 
 think it's right clicks. You will then get the outlet panel which is the 
 grey HUD display with all the outlets and actions. You can drag connect to 
 your buttons. There's some ctrl alt shift cmd combo which does this too but 
 I never remember it. You can still connect view outlets as before, just 
 that ctrl-drag was repurposed a couple of xcodes ago for auto layout so you 
 have to work a little harder to get the inspector up. 
 
 
 
 On 7 Feb 2015, at 10:22, N!K pu56ucl...@alumni.purdue.edu wrote:
 
 
 I would like to connect a button to MyView class, but Xcode 6.1.1 only 
 allows control-dragging a button to AppDelegate to create an IBAction. I 
 have not encountered this previously. Looking for a workaround, I found 
 this recommendation in a couple of Stack Overflow and other web pages as 
 well as a YouTube video. It enables the button to work, but unfortunately 
 it zeros all the integers in MyView.
 
 The recommendation is:
 1. Drag an empty Object from the IB library to the column of blue icons.
 2. Set its class to MyView.
 3. Control-drag from the button to MyView.m
 4. Fill in the name (“act”) in the popup.
 This puts the IBAction template into MyView, ready to fill in.
 
 #import MyView.h
 
 @implementation MyView
 
 - (id)initWithCoder:(NSCoder *)aDecoder
 {
  self = [super initWithCoder:aDecoder];
  if (self) {
  iii=1000;
  k=99;
  }
  return self;
 }
 
 - (IBAction)act:(id)sender {
  iii=iii+1;
  NSLog(@  iba i= %i,iii);
 }
 
 
 In MyView.m, iii=1000 is initialized in initWithCoder. At the breakpoint 
 after IBAction, iii is seen in both places to have 

Re: Core Data To-Many Relationship KVO

2015-02-11 Thread Richard Charles

 On Feb 11, 2015, at 5:36 PM, Roland King r...@rols.org wrote:
 
 processPendingChanges:, it’s on NSManagedObjectContext

That’s what I was looking for.

Thanks for your help.

Richard 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