• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: how to test bundle versions string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how to test bundle versions string?


  • Subject: Re: how to test bundle versions string?
  • From: phil03 <email@hidden>
  • Date: Mon, 17 Mar 2014 08:31:33 +0700

Thanks Ron.

It turns out that there's a simpler way to do it, using the vanilla AppleScript 'version' keyword:

set myVersionNum to current application's version

Best

Phil
On 17/03/2014 00:13, Ron Reuter wrote:
I think you'll need something more like this:

(current application's NSBundle's mainBundle()'s objectForInfoDictionaryKey:"CFBundleShortVersionString") as text

This works for me, on Mavericks, when I tested it as a method in a Script library. Your mileage may vary.

• Ron


On 16 Mar 2014, at 7:43 AM, phil03 <email@hidden> wrote:

So I discovered the constant "CFBundleShortVersionString" but my attempts to use it have been thwarted.

This doesn't work, for example:

       set myVersionNum to current application's CFBundleShortVersionString

I tried coercing to string and text to no avail.



On 16/03/2014 19:20, phil03 wrote:
I'm trying to implement a "check for software updates" function in my ASObjC app.

I'm more or less there, except I'm not quite sure how to query the current version number in my info.plist from within my application's script.

Suppose I have the newest version number in an html file which I call using curl. I display a dialog prompting the user to update if the version number curl returns is higher than the version number of the calling script.

How do I get the bundles current version number into a property in the script to test against what's returned by curl?


_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Fwd: how to test bundle versions string? (From: Ron Reuter <email@hidden>)

  • Prev by Date: Fwd: how to test bundle versions string?
  • Next by Date: Re: how to test bundle versions string?
  • Previous by thread: Fwd: how to test bundle versions string?
  • Next by thread: set menu item's state
  • Index(es):
    • Date
    • Thread