Re: Need for Swift

2019-10-15 Thread David Brittain via Cocoa-dev
Swift / C++ inter-op is being worked on. It's important to many (including
Apple I would guess)...

https://forums.swift.org/t/c-objective-c-interop/9989/2

https://mobile.twitter.com/jeremyphoward/status/1154974115893149696

On Tue, 15 Oct 2019 at 09:41, Richard Charles via Cocoa-dev <
cocoa-dev@lists.apple.com> wrote:

>
> > On Oct 15, 2019, at 7:57 AM, Turtle Creek Software via Cocoa-dev <
> cocoa-dev@lists.apple.com> wrote:
> >
> > TurtleSoft has a big investment in C++ source code that's full of
> construction business logic. Unfortunately, with the death of Carbon its
> future value is in doubt.
>
>
> I have found your comments enlightening. So if I understand correctly you
> have three choices for a native UI on the Mac.
>
> 1. Objective-C which would integrate nicely with your C++ business logic
> using Objective-C++. One problem is you have very little experience with
> the Cocoa frameworks. Another problem is you are hesitant to pursue this
> path fearful that down the road Apple may abandon Objective-C.
>
> 2. Another option is Swift but it has zero integration with C++. So this
> is really not a choice at all.
>
> 3. A third option would be to combine all three. Keep your business logic
> in C++ and combine with Objective-C using Objective-C++ and then bridge to
> Swift. That does sound like a nightmare.
>
> Looks like you are in a pickle.
>
> --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/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


Re: iOS Drag and Drop

2017-06-14 Thread David Brittain
The resources tab for each session has downloadable content. e.g. for
"Introducing Drag and Drop"
https://developer.apple.com/videos/play/wwdc2017/203/

There are downloadable slides...

https://devstreaming-cdn.apple.com/videos/wwdc/2017/203atfalwz52js/203/203_introducing_drag_and_drop.pdf

and demo app...

https://developer.apple.com/sample-code/wwdc/2017/Drag-and-Drop-Demo-App.zip

On 14 June 2017 at 07:23, Giacomo Tufano <g...@iltofa.com> wrote:
> I think you want 
> https://developer.apple.com/documentation/uikit/drag_and_drop 
> <https://developer.apple.com/documentation/uikit/drag_and_drop>
>
>> Il giorno 14 giu 2017, alle ore 12:14, Dave <d...@looktowindward.com> ha 
>> scritto:
>>
>> Is there nothing I can just download?  It seems to me there used to be loads 
>> of documents telling you have to do this, but they all seem to have 
>> disappeared?
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
> https://lists.apple.com/mailman/options/cocoa-dev/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


Re: Documentation Workflow

2016-11-17 Thread David Brittain
Dash for iOS has just been open sourced. It's a doc viewer for
iPad/iPhone... https://github.com/Kapeli/Dash-iOS

On 17 November 2016 at 11:23, Laurent Daudelin <laur...@nemesys-soft.com>
wrote:

> What’s the 2 “gist” files you are mentioning?
>
> -Laurent.
> --
> Laurent Daudelin
> laur...@nemesys-soft.com <mailto:laur...@nemesys-soft.com>
> AIM/iChat/Skype:LaurentDaudelin
> http://www.nemesys-soft.com/ <http://www.nemesys-soft.com/>
> Logiciels Nemesys Software
>
> > On Nov 17, 2016, at 10:13, Slipp Douglas Thompson <
> apple+cocoa-...@slippyd.com> wrote:
> >
> > No, you don't need to know HTML or CSS to get this to work.
> >
> > Here's a basic step-by-step:
> >
> > 1. Download & install the Stylish plugin/add-on/extension for your
> browser of choice.  The official userstyles.org Stylish is available for
> Chrome ( https://chrome.google.com/webstore/detail/stylish/
> fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en ) and Firefox (
> https://addons.mozilla.org/en-us/firefox/addon/stylish/ ), though it
> looks like someone else made a Safari version ( http://sobolev.us/stylish/
> ).
> > 2. Download the 2 files from that gist.
> > 3. Open up the Stylish plugin/add-on/extension's UI and click the import
> button, choose one file, then click import and choose the other file.
> > 4. Enjoy better layout/styling whenever you visit a URL matching
> `http[s]://developer.apple.com/reference/*`.  ;-)
> > 5 (optional). Stylish for Chrome allows you to toggle styles on & off
> for the current page by clicking the toolbar icon for the extension (to the
> right of the address bar; the Stylish extension's icon is an “S” in a
> 4-colored square), so you can decide on-the-fly if you really want to use
> these changes or not.  I'd imagine Stylish for other browsers works
> similarly.
> > 6 (optional). Modify the CSS to your liking.  The most obvious point of
> customization would be the `font-size: 10pt !important;` line— you can
> change the `10pt` to `12pt` or `24pt` or `6pt` or whatever other numerical
> font size you please.
> >
> > 
> >
> > Also, I'm not sure if those images went through, so here they are again,
> hosted externally:
> >
> > Turns this: https://cl.ly/0m1c462d1z40
> > Into this: https://cl.ly/2b03340B3F2y
> >
> > — Slipp
> >
> >
> >> On Nov 17, 2016, at 8:55 AM, Richard Charles <rcharles...@gmail.com>
> wrote:
> >>
> >>
> >>> On Nov 17, 2016, at 6:45 AM, Slipp Douglas Thompson <
> apple+cocoa-...@slippyd.com> wrote:
> >>
> >> [snip]
> >>
> >>> I got tired of the layout issues and cooked up some quick Stylish CSS
> to rectify developer.apple.com/reference/* pages.
> >>
> >> [snip]
> >>
> >>> My Stylish CSS (in Mozilla Format) can be found at:
> https://gist.github.com/capnslipp/208d50e8a6c630d053b4f22e704f28a5
> >>>
> >>> — Slipp
> >>
> >> How about some simple instructions for those of us who don’t know html
> and are not web developers on how to get this to work? Do you do something
> like this?
> >>
> >> http://stackoverflow.com/questions/7173096/how-to-
> apply-default-css-styling-to-all-html-pages
> >>
> >> --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/
> laurent%40nemesys-soft.com
> >
> > This email sent to laur...@nemesys-soft.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/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

Re: Extra logging in Simulators for iOS 10 & for macOS Sierra?

2016-10-06 Thread David Brittain
You can set the environment variable OS_ACTIVITY_MODE=disable on the
scheme's Run page in the arguments tab. In the simulator that stops all the
stuff from the system and NSLog in your app still works. Unfortunately on
device this also suppresses NSLogs from your own code.

On 6 October 2016 at 12:06, Eric E. Dolecki <edole...@gmail.com> wrote:

> When I build to device for iOS - I get the expected logging. If I build to
> an iOS Simulated device, I am getting a bunch of logging to the console.
>
> 2016-10-06 15:02:35.138443 testBars[59267:10948290] subsystem:
> com.apple.UIKit, category: HIDEventFiltered, enable_level: 0,
> persist_level: 0, default_ttl: 0, info_ttl: 0, debug_ttl: 0,
> generate_symptoms: 0, enable_oversize: 1, privacy_setting: 2,
> enable_private_data: 0
> ...
>
> The same goes for when I build a macOS application - I am getting all kinds
> of extra logging (not the same as for iOS).
>
> Is there a way to turn this off for Xcode 8.0? Is this new and to be
> expected? Did an Apple Engineer mistakenly leave some flags on prior to
> release?
>
> Thank you,
> Eric
> ___
>
> 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

Re: Limiting app installation

2016-09-05 Thread David Brittain
A consumable in-app purchase could be used for this. They are not restored
to other devices. However if the user deleted the app and reinstalled it
then the purchase would be lost unless you tracked it via some form of
online account.

On Monday, September 5, 2016, Rick Mann <rm...@latencyzero.com> wrote:

> Does Apple allow a developer to limit the number of devices on which an
> app can run? I have an app that requires you to pay more to install it on
> more than one iPhone and two iPads. It should go without saying these are
> all on the same Apple ID.
>
> I thought Apple didn't allow this. But maybe they just don't provide a
> mechanism for imposing this limitation, but don't prevent developers from
> implementing their own?
>
> TIA,
>
> --
> Rick Mann
> rm...@latencyzero.com <javascript:;>
>
>
>
> ___
>
> Cocoa-dev mailing list (Cocoa-dev@lists.apple.com <javascript:;>)
>
> 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 <javascript:;>



-- 
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

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 <a...@webis.net> 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 <jche...@gmail.com> 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 <li...@lastonepicked.com>
>> 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 <jche...@gmail.com> 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

Re: iOS version check

2015-06-12 Thread David Brittain
You can use NSProcessInfo isOperatingSystemAtLeastVersion

On 12 June 2015 at 06:22, Steve Christensen puns...@mac.com wrote:
 How about something like this?

 NSInteger majorSystemVersion = UIDevice.mainDevice.systemVersion.integerValue;

 if (majorSystemValue == 8)
 AVSpeechUtterance.rate = the wrong value that used to work
 else
 AVSpeechUtterance.rate = the right value


 On Jun 11, 2015, at 10:23 PM, Quincey Morris 
 quinceymor...@rivergatesoftware.com wrote:

 There’s a particular API that’s broken in iOS 8 (AVSpeechUtterance.rate), 
 but not broken in iOS 7, and fixed in iOS 9. Using Xcode 7, therefore, I get 
 the iOS 9 simulator, which means different speech behavior running in the 
 simulator from running on an actual device (still running 8.3).

 So I’m looking for a version check that will allow me to set the property 
 based on the running iOS version, something like this:

 if (floor(NSFoundationVersionNumber) = NSFoundationVersionNumber_iOS_8_0 
  floor (NSFoundationVersionNumber)  NSFoundationVersionNumber_iOS_9_0)
  AVSpeechUtterance.rate = the wrong value that used to work
 else
  AVSpeechUtterance.rate = the right value

 but there’s no definition of NSFoundationVersionNumber_iOS_9_0 in the iOS 9 
 SDK. In fact, there’s nothing higher than NSFoundationVersionNumber_iOS_8_1 
 in the iOS 9 SDK. That means there’s no definition that lets me test against 
 8.2, 8.3 or 8.4.

 I’m confused about what to do here. The iOS 8.3 SDK itself has no 
 NSFoundationVersionNumber_iOS_8_x definitions at all, so going back to Xcode 
 6 wouldn't solve the problem, except that the simulator would be 8.x, so the 
 problem wouldn’t show up again until iOS 9 is released.

 I must be missing something really obvious here.

 (The app’s deployment target is currently set to 8.1, but I don’t think that 
 makes any difference, except that I don’t care about iOS 7, which is 
 unfortunately the one version I *could* check for.)


 ___

 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

UIImage to jpeg results change between 32-bit 64-bit

2015-04-22 Thread David Brittain
In our app we create a UIImage and set its scale. It is then saved to
a jpeg using  UIImageJPEGRepresentation(image, 0.8);

I am converting the app to 64-bit and the generated image has junk in
the ppi block of the resulting jpeg. Below are examples of the data
(output using ImageMagick identify) from an iPad Air 2 (I see similar
behavior in the Simulator comparing the results from iPad Retina 
iPad Air)

32-bit build:

  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 2048x1536+0+0
  Resolution: 376.736x376.736
  Print size: 5.43617x4.07713
  Units: PixelsPerInch

64-bit build:

  Format: JPEG (Joint Photographic Experts Group JFIF format)
  Mime type: image/jpeg
  Class: DirectClass
  Geometry: 2048x1536+0+0
  Resolution: -1x-1
  Print size: -2048x-1536
  Units: PixelsPerInch

Any suggestions appreciated for workarounds/solutions.

Thanks

Dave

-- 
David Brittain
___

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: UIImage to jpeg results change between 32-bit 64-bit

2015-04-22 Thread David Brittain
Thanks for the suggestion. In the meantime I had implemented my own
version of UIImageJPEGRepresentation using ImageIO... painful, but it
works.

(by the way this is happening on iOS 8.2, I don't have a 64-bit device
with 8.3 at the moment)

Dave

On Wed, Apr 22, 2015 at 9:42 PM, Michael Crawford mdcrawf...@gmail.com wrote:
 Would it work for you to convert the image using libjpeg?  It is open source.
 --
 Michael David Crawford, Consulting Software Engineer
 mdcrawf...@gmail.com
 http://www.warplife.com/mdc/

Available for Software Development in the Portland, Oregon Metropolitan
 Area.
 ___

 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

Re: Copy test docs to Simulator App's Documents folder?

2015-04-20 Thread David Brittain
One way to do this is through the Application Data setting on a
scheme... In the scheme, if you go to the Options tab for Run, you can
choose Application Data and select any xcappdata file that is in
your project. I find the easiest way to generate these is by
downloading the container of your app (using the Devices window,
select a device, then select your app, and then clicking the settings
icon and selecting Download Container). Once downloaded it is pretty
easy to open up the bundle and change the files that matter.

Dave

On Mon, Apr 20, 2015 at 7:08 PM, Michael Crawford mdcrawf...@gmail.com wrote:
 I have a few test documents that I need to have copied to my App's
 Documents folder whenever I build it.  This is now problematic as it
 seems the app gets put into a different place each time it is built.

 I tried using a Build Phase for each but it doesn't put them into the
 Documents folder.  I don't see a way to do that; is there?

 Alternatively I could copy them into my app's Library folder, but I
 don't see a way to do that either.

 --
 Michael David Crawford, Consulting Software Engineer
 mdcrawf...@gmail.com
 http://www.warplife.com/mdc/

Available for Software Development in the Portland, Oregon Metropolitan
 Area.
 ___

 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

Re: Copy test docs to Simulator App's Documents folder?

2015-04-20 Thread David Brittain
For the simulator specifically a great app is:

http://simpholders.com

Which gives fast access to the most recently used app container
folders in the simulator.

Dave

On Mon, Apr 20, 2015 at 7:38 PM, David Brittain websi...@paperetto.com wrote:
 One way to do this is through the Application Data setting on a
 scheme... In the scheme, if you go to the Options tab for Run, you can
 choose Application Data and select any xcappdata file that is in
 your project. I find the easiest way to generate these is by
 downloading the container of your app (using the Devices window,
 select a device, then select your app, and then clicking the settings
 icon and selecting Download Container). Once downloaded it is pretty
 easy to open up the bundle and change the files that matter.

 Dave

 On Mon, Apr 20, 2015 at 7:08 PM, Michael Crawford mdcrawf...@gmail.com 
 wrote:
 I have a few test documents that I need to have copied to my App's
 Documents folder whenever I build it.  This is now problematic as it
 seems the app gets put into a different place each time it is built.

 I tried using a Build Phase for each but it doesn't put them into the
 Documents folder.  I don't see a way to do that; is there?

 Alternatively I could copy them into my app's Library folder, but I
 don't see a way to do that either.

 --
 Michael David Crawford, Consulting Software Engineer
 mdcrawf...@gmail.com
 http://www.warplife.com/mdc/

Available for Software Development in the Portland, Oregon Metropolitan
 Area.
 ___

 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



-- 
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

Re: Can an use introspection to determine if its a production app from the App Store?

2014-10-30 Thread David Brittain
The following seems to work from experimentation...

For an application installed through TestFlight Beta the receipt file
is named StoreKit\sandboxReceipt vs the usual StoreKit\receipt. Using
[NSBundle appStoreReceiptURL] you can look for sandboxReceipt at the
end of the URL.

NSURL *receiptURL = [[NSBundle mainBundle] appStoreReceiptURL];
NSString *receiptURLString = [receiptURL path];
BOOL isRunningTestFlightBeta =  ([receiptURLString
rangeOfString:@sandboxReceipt].location != NSNotFound);

sandboxReceipt is also the name of the receipt file when running builds locally.

On Thu, Oct 30, 2014 at 10:38 AM, David Hoerl dho...@mac.com wrote:
 Can an iOS app examine some property to determine if its been installed as a
 development style app (ie Test Flight, or Xcode, etc), or was installed via
 the App Store.

 [I support a library where the app is suppose to pass a flag, but clients
 are making errors...]

 David
 ___

 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

Re: Deferred purchase testing in the App Store sandbox?

2014-09-29 Thread David Brittain
The best I could come up with was to change the build I was testing so
that on receiving SKPaymentTransactionStatePurchased I store the
transactions, replace the state with SKPaymentTransactionStateDeferred
and then

  [self performSelector:@selector(deferredPaymentQueue:)
withObject:_savedTransactions afterDelay:10.0f];

with:

 - (void)deferredPaymentQueue:(NSArray *)transactions
 {
 [self paymentQueue:nil updatedTransactions:transactions];
 }


This at least proves that my UI behaves the right way in the event of
SKPaymentTransactionStateDeferred. It's a hack but helped me feel
somewhat better that the code worked.

Dave

On Mon, Sep 29, 2014 at 12:03 PM, Steve Christensen puns...@mac.com wrote:
 I'm trying to figure out how to test deferred purchases 
 (SKPaymentTransactionStateDeferred) in the sandbox but thus far have not been 
 able to find any guidance. In chatting with The Google I see questions in 
 Apple's developer forums, stack overflow.com, etc., but no answers. Has 
 anybody had success in this area?

 Thanks,
 Steve


 ___

 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

UIButton issue in ios7.1/xcode5.1

2014-03-20 Thread David Brittain
I am seeing an issue in our app where setTitle:forState: is not
working when a UIButton is in the selected state (the same happens
with setImage:forState:). Specifically I am calling:

 [self.button setTitle:@New name forState:UIControlStateNormal];

The call has no effect until the user taps the button. So, it seems
that it is not being redrawn.

This only happens in iOS7.1; iOS 7.0 and earlier is fine. It also only
seems to happen when the app is built with Xcode 5.1, I don't have 5.0
any more so can't test this directly. But our live app works fine and
it was built with 5.0, also others have reported the same thing...
(https://devforums.apple.com/message/950802#950802
https://devforums.apple.com/message/951921#951921)

The documentation states At a minimum, you should set the value for
the normal state. If a title is not specified for a state, the default
behavior is to use the title associated with the UIControlStateNormal
state
Therefore, I would not expect to have to set state for UIControlStateSelected.

So, a few questions:
- am I correct that I should not have to call  [self.button
setTitle:@New name forState:UIControlStateSelected];
- any suggestions for workarounds?
- any ideas how this could happen when building with xcode 5.1 but not
xcode 5.0?

Thanks

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: Advanced Techniques

2013-07-15 Thread David Brittain

Have you looked at ImageKit:

https://developer.apple.com/library/mac/#documentation/GraphicsImaging/Conceptual/ImageKitProgrammingGuide/Introduction/Introduction.html

|IKImageBrowserView |may do what you need.

Dave

On 7/13/13 4:09 PM, Arved von Brasch wrote:

Hello list,

I'm hoping the list might have some recommendations on books or other sources.  
My web searches aren't turning up too much that is helpful, as so much is 
geared towards iOS these days.

I have a MacOS X app that was written quite naively some time ago (small, 
non-public release, for MacOS 10.5).  Data sets have grown considerably since 
it was written, and the problem of responsive interface is now quite glaring.  
It is a Core Data based app that makes heavy use of stored images and large 
amounts of text.  The images, at least, aren't stored in the Core Data 
database, rather a file system link is saved to them.  This is also true for 
the larger text stores.

The troubles are particularly with the length of time it takes to open the 
views that show the images.  This is an NSTableView and NSCollectionView that 
are loaded from the nib at the same time.  Saving changes to the text files 
also takes a lot longer than it should, given the speed that TextEdit can save.

The way I understand it, the NSTableView is probably not the problem, as 
NSTableViews already loads lazily.  NSCollectionView, however, loads everything 
up front.  Looking at other class options, I think what's going to be required 
is writing a modified NSCollectionView that does lazy loading.  I haven't had 
to do something like that before, and I'm not sure how to approach it.

The other optimisation steps that are required is otherwise mostly going to fall in the 
taking advantage of multiple threads variety.  At the moment everything is 
done on the main thread.  Saving and disk heavy access should definitely be done on 
background threads.  I don't have much experience with GCD, and it isn't clear to me how 
to retrofit this into the existing code.  Some architectural changes may be necessary, in 
order to better take advantage of threads, and the improvements to the OS since Leopard.

So, I'm looking for resources that can help guide from the naive approach to 
more advanced techniques.  I'd appreciate any suggestions.

Thank you,
Arved
___

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


___

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 a document bundle file type with core data

2013-01-16 Thread David Brittain
The code in this blog article enables saving core data files to a package:

http://cutecoder.org/featured/asynchronous-core-data-document/

Take a look at the writeSafelyToURL implementation in the gist at the
bottom. I haven't tried saving to a bundle myself, but found the
article helped me solve some problems with core data and documents.

Dave

On Wed, Jan 16, 2013 at 7:25 PM, Eric Gorr mail...@ericgorr.net wrote:
 I've got a sample project at:

 http://ericgorr.net/cocoadev/docbundleCD.zip

 Basically, what I am attempting to do should be fairly standard and simple, 
 but I am apparently missing something obvious. I only want to be able to 
 define my document type as a document bundle and place a Core Data file 
 inside.

 Clearly, my sample project is incomplete, but the start of any such project 
 would require that the -fileWrapperOfType:error: method be called and it 
 isn't despite the fact that I have set LSTypeIsPackage to YES for my document 
 type - which is what I have done in the past for situations such as this, but 
 they did not involve Core Data.

 Any thoughts?

 If there are any sample projects or tutorials, I would be interested as well.

 Thank you.







 ___

 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


Re: Remote control desktop from iPhone

2012-12-07 Thread David Brittain
It's not directly what you need, but NSLogger might be worth looking
at. It sends realtime logs from an iOS device to the desktop:

https://github.com/fpillet/NSLogger


On Thu, Dec 6, 2012 at 10:59 AM, Eric E. Dolecki edole...@gmail.com wrote:
 I'm about to embark on a local project that requires an iOS app to be able
 to send string commands to a running OS X application. Essentially a remote
 control for the OS X app.

 Without having to do a lot of research and the banging of my head against
 the fact that there is currently no way to use GameKit on OS X to comm with
 an iOS app using GameKit, is there a known project on github or elsewhere
 that simply sets this stuff up? I realize it may require a socket server or
 something - but I am no networking/Bonjour guru.

 Looking for the communication stuff if I can find it so I can concentrate
 on what I'll be doing with it instead.

 Any known stuff out in the wild I might be able to use? I'll be Googling
 and StackOverflow'ing in the mean time.

 Thanks for any help,
 Eric
 ___

 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