Thursday, January 19, 2017

#1 2016-08-15 07:59:21 am

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

BridgePlus in ASOC

Hey there,

i discovered Shane's BridgePlus and i love it. It works great from within pure Applescripts.
Now i try to get it to work within an ASOC XCode project, but i cant seem to get it to work.

How do i have to implement it?
Any help appreciated.

Offline

 

#2 2016-08-16 03:24:32 am

Shane Stanley
Member
From: Australia
Registered: 2002-12-07
Posts: 4885

Re: BridgePlus in ASOC

One way is to add just the framework to your project. Open the library bundle, and it's in /Contents/Frameworks. As well as linking to it, you'll probably need to add a Build Phase to copy it into your target.

That said, you can also add the full library. Add a Build Phase to copy it to Resources with a Subpath of Script Libraries, and add these two lines to the start of any script files that want to use it:

Applescript:

use script "BridgePlus"
use scripting additions


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#3 2016-08-16 08:51:18 am

FlameCoder
Member
From: USA
Registered: 2009-10-28
Posts: 79

Re: BridgePlus in ASOC

I'm trying to add BridgePlus framework to Xcode 7.3.1. I'm dragging BridgePlus.framework from within the Package Contents of the BridgePlus bundle to my Xcode project and choose to "copy items if needed" and "add to targets" checked. Link Binary with Libraries shows the BridgePlus.framework is linked and required.

What do I need to do specifically to add a build phase?

Running it now gives me an error...
dyld: Library not loaded: @rpath/BridgePlus.framework/Versions/A/BridgePlus
  Referenced from: /Users/flameCoder/Library/Developer/Xcode/DerivedData/Test-cdnoyokimsxzrmdysyhwydxkylfz/Build/Products/Debug/Test.app/Contents/MacOS/Test
  Reason: image not found

Offline

 

#4 2016-08-16 06:33:57 pm

Shane Stanley
Member
From: Australia
Registered: 2002-12-07
Posts: 4885

Re: BridgePlus in ASOC

FlameCoder wrote:

What do I need to do specifically to add a build phase?

With the Target selected, click on the Build Phases tab. Click on the + at the top-left and choose New Copy Files Phase. Expand the new Copy Files entry, change the Destination to Frameworks, and click the + button at the bottom to choose the framework.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

#5 2016-08-17 04:56:16 am

Jonathan Engelhardt
Member
Registered: 2010-06-11
Posts: 57

Re: BridgePlus in ASOC

With the Target selected, click on the Build Phases tab. Click on the + at the top-left and choose New Copy Files Phase. Expand the new Copy Files entry, change the Destination to Frameworks, and click the + button at the bottom to choose the framework.

That did it!
Great as always. Thank you.

Edit: is there a method to easily "Cocoaify" a text to NSString?

Last edited by Jonathan Engelhardt (2016-08-17 05:20:57 am)

Offline

 

#6 2016-08-17 06:44:24 am

Shane Stanley
Member
From: Australia
Registered: 2002-12-07
Posts: 4885

Re: BridgePlus in ASOC

Jonathan Engelhardt wrote:

is there a method to easily "Cocoaify" a text to NSString?

You can use the class method CocoaifyFrom:, but don't see any advantage.


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/

Offline

 

Board footer

Powered by FluxBB

[ Generated in 0.033 seconds, 10 queries executed ]

RSS (new topics) RSS (active topics)