Building with externals.
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Building with externals.
So, I have closely followed this example with no results other than crashing and the inability to build properly.
http://www.runrev.com/developers/docum ... nals-sdk/
I can test on iOS 5 only nothing older than iOS 5 will test as it breaks with a memory leak error.
If I try and just build with livecode including the files I need I get the error attached in the screenshot.
I am 99% sure that the issue is not in my obj c code as all it does is return an int when called upon and my lc stack simply has a button to call the external.
Has anyone else had issues with this? Is there anything else I can include to help explain better?
http://www.runrev.com/developers/docum ... nals-sdk/
I can test on iOS 5 only nothing older than iOS 5 will test as it breaks with a memory leak error.
If I try and just build with livecode including the files I need I get the error attached in the screenshot.
I am 99% sure that the issue is not in my obj c code as all it does is return an int when called upon and my lc stack simply has a button to call the external.
Has anyone else had issues with this? Is there anything else I can include to help explain better?
Re: Building with externals.
Does anyone have a working NSString example?
-
- VIP Livecode Opensource Backer
- Posts: 281
- Joined: Sat Jun 04, 2011 5:41 pm
- Location: Switzerland
Re: Building with externals.
Hi Kaubs,
which version of : Livecode, Livecode iOS SDK and XCode are you using ?
Let me know ...
Regards,
Guglielmo
which version of : Livecode, Livecode iOS SDK and XCode are you using ?
Let me know ...
Regards,
Guglielmo
Re: Building with externals.
Xcode 4.2, iOS SDK r10, LiveCode 5.0.0
-
- VIP Livecode Opensource Backer
- Posts: 281
- Joined: Sat Jun 04, 2011 5:41 pm
- Location: Switzerland
Re: Building with externals.
Ok,
first iOS SDK R10 has a problem and you can test ONLY on the Simulator 5.0, any other version doesn't work (on R10 they use the library /usr/lib/libc++abi.dylib which is available only for Simulator iOS 5), so, to avoid problems simulate ONLY on Simulator iOS 5.
Next, about the architecture ...
... you have to build in a consistent manner the Livecode program and the external,
So ... in the "Standalone Application Settings" of Livecode, iOS panel, in Build Type select "Universal", next, on XCode 4.2, select the project, go to the Build Settings TAB and to the "Architectures" section, in Base SDK select "Latest iOS (iOS 5.0)", go down to the "Deployment" section and, in "iOS Deployment Target", select your iOS target (e.g. iOS 4.0).
Please get a look also to the "Build Options" section to make sure that "Compiler for C/C++/Objective-C" is set to "Default Compiler (Apple LLVM compiler 3.0)". Next, still for a better debug, from the top menu -> Product -> Edit Scheme, on the Info Panel, make sure that the "Debugger" is set to LLDB and not GDB !
Normally this works for me
Ah ... don't forget ... on the "binaries" folder you should have xxxxxxxx-5_0.dylib and xxxxxxxx.lcext for the Simulator, and ONLY xxxxxxxx.dylib and xxxxxxxx.lcext when you "Save as Standalone Application" on Livecode because, with the 5.0.0, Livecode will be confused by the presence of xxxxxxxx-5_0.dylib during the "Save as Standalone Application".
Hope this help ...
Guglielmo
first iOS SDK R10 has a problem and you can test ONLY on the Simulator 5.0, any other version doesn't work (on R10 they use the library /usr/lib/libc++abi.dylib which is available only for Simulator iOS 5), so, to avoid problems simulate ONLY on Simulator iOS 5.
Next, about the architecture ...
... you have to build in a consistent manner the Livecode program and the external,
So ... in the "Standalone Application Settings" of Livecode, iOS panel, in Build Type select "Universal", next, on XCode 4.2, select the project, go to the Build Settings TAB and to the "Architectures" section, in Base SDK select "Latest iOS (iOS 5.0)", go down to the "Deployment" section and, in "iOS Deployment Target", select your iOS target (e.g. iOS 4.0).
Please get a look also to the "Build Options" section to make sure that "Compiler for C/C++/Objective-C" is set to "Default Compiler (Apple LLVM compiler 3.0)". Next, still for a better debug, from the top menu -> Product -> Edit Scheme, on the Info Panel, make sure that the "Debugger" is set to LLDB and not GDB !
Normally this works for me
Ah ... don't forget ... on the "binaries" folder you should have xxxxxxxx-5_0.dylib and xxxxxxxx.lcext for the Simulator, and ONLY xxxxxxxx.dylib and xxxxxxxx.lcext when you "Save as Standalone Application" on Livecode because, with the 5.0.0, Livecode will be confused by the presence of xxxxxxxx-5_0.dylib during the "Save as Standalone Application".
Hope this help ...
Guglielmo
Re: Building with externals.
Thanks! It seems to point me in the right direction. I will see what I can do!
Re: Building with externals.
Ok, so now that testing is working properly I am trying to figure out how to pass a nsstring to livecode. Is this a possibility? It looks like I'd use something like objc-string to make it happen but every time I write a function specifying objc-string in the lcidl file it breaks. Has anyone done this?
Thanks a ton!
Thanks a ton!
-
- VIP Livecode Opensource Backer
- Posts: 281
- Joined: Sat Jun 04, 2011 5:41 pm
- Location: Switzerland
Re: Building with externals.
Hi Kaubs,Kaubs wrote:Ok, so now that testing is working properly I am trying to figure out how to pass a nsstring to livecode. Is this a possibility? It looks like I'd use something like objc-string to make it happen but every time I write a function specifying objc-string in the lcidl file it breaks. Has anyone done this?
Thanks a ton!
if you get a look to the "rresocket" sample of "Livecode iOS SDK", maybe you can find the answer
As described in "iOS Externals SDK" web page (Home -> Developers -> Documentation -> iOS Externals), they use "objc-string - converted to/from a native NSString * object." ...
... looking into rresocket.lcdil / rresocket.mm file you have some 'command' using it (e.g. rreSocketOpen, rreSocketRead, rreSocketWrite, ...).
Work fine for me ...
Guglielmo
Re: Building with externals.
Nice, I see that in their code. There is however an issue, when I try to launch the project in the simulator (5.0) it just hangs with "attaching to test" in Xcode. Are you using the latest version of xcode, livecode sdk and livecode?
-
- VIP Livecode Opensource Backer
- Posts: 281
- Joined: Sat Jun 04, 2011 5:41 pm
- Location: Switzerland
Re: Building with externals.
Hi Kaubs,Kaubs wrote:Nice, I see that in their code. There is however an issue, when I try to launch the project in the simulator (5.0) it just hangs with "attaching to test" in Xcode. Are you using the latest version of xcode, livecode sdk and livecode?
Livecode 5.0.1 (rc1), XCode 4.2 build 4C199 (I'm on SnowLeopard), iOS Simulator 5.0 (272), Livecode iOS SDK R10 ... and all run fine
Sure you have selected "test > iPhone 5.0 Simulator" on the top-left of XCode (near the Run and Stop buttons) ?
Guglielmo
Re: Building with externals.
Yessir, It's quite strange. I've tried both the r8 and r10. I was able however to get a dumbed down version of an NSString function to work so thank a ton! I think I will be able to finish my project now.
-
- VIP Livecode Opensource Backer
- Posts: 281
- Joined: Sat Jun 04, 2011 5:41 pm
- Location: Switzerland
Re: Building with externals.
Happy to have been helpful
Guglielmo
Guglielmo
Re: Building with externals.
Yep! Everything worked and is built. Thanks again! I couldn't have done it without you!
-
- Posts: 23
- Joined: Fri Jan 31, 2014 12:09 pm
Re: Building with externals.
Dear Kaubs,
iam facing 3 errors while iam building rremicrophone, rrehardcopy on xcode5.1.1 for ios7.1, for LC6.5.2 stable versions.
these are errors:-
Users/ensis/Library/Application Support/RunRev/Components/LiveCodeSDK/tools/lclink.sh: line 34: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++: No such file or directory
error: linking step of external dylib build failed, probably due to missing framework or library references - check the contents of the rremicrophone.ios file
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
could you please guide me how to resolve this, or could u please build and give those(rremicrophone, rrehardcopy) lcext files for ios7.1.
please help me Kaubs, iam struggling alot with this.
Thanks
iam facing 3 errors while iam building rremicrophone, rrehardcopy on xcode5.1.1 for ios7.1, for LC6.5.2 stable versions.
these are errors:-
Users/ensis/Library/Application Support/RunRev/Components/LiveCodeSDK/tools/lclink.sh: line 34: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/g++: No such file or directory
error: linking step of external dylib build failed, probably due to missing framework or library references - check the contents of the rremicrophone.ios file
Command /bin/sh emitted errors but did not return a nonzero exit code to indicate failure
could you please guide me how to resolve this, or could u please build and give those(rremicrophone, rrehardcopy) lcext files for ios7.1.
please help me Kaubs, iam struggling alot with this.
Thanks