tvOS build

64 views
Skip to first unread message

wbi...@attic.nl

unread,
Nov 29, 2015, 2:30:51 PM11/29/15
to Couchbase Mobile
I'm trying to create a test tvOS Couchbase app. Folllowing the instructions on the wiki:
- I cloned the repo, branch 'release/1.1.1-appleTV'. 
- the wiki mentions using scheme 'CBL tvOS' but that generates a .a library - i use 'Continuous AppleTV' instead.
- I added the generated couchbase framework to my app and the frameworks CFNetwork, Security, SystemConfiguration as well as libsqlite3.tbd and libz.tbd (note the new extension).

When I then build for simulator I get a list of "std:" errors the first of which is:

Undefined symbols for architecture x86_64:

  "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:

      std::__1::vector<forestdb::revidBuffer, std::__1::allocator<forestdb::revidBuffer> >::__append(unsigned long) in CouchbaseLite(CBL_ForestDBStorage.o)

      void std::__1::vector<forestdb::revidBuffer, std::__1::allocator<forestdb::revidBuffer> 


I tried using the "lib*.dylib" files from /var/lib but that didnt help.

What am I doing wrong ?
How can I build the listener framework for tvOS ?

Thanks !
 

Jens Alfke

unread,
Nov 29, 2015, 7:59:41 PM11/29/15
to mobile-c...@googlegroups.com

> On Nov 29, 2015, at 11:30 AM, wbi...@attic.nl wrote:
>
> When I then build for simulator I get a list of "std:" errors the first of which is:
> Undefined symbols for architecture x86_64:
>
> "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:

Those are part of the C++ standard library. Add the “libc++.tbd” library.

(IIRC I included both the SQLite and ForestDB storage modules in the tvOS build, and the ForestDB glue is written in C++.)

—Jens

wbi...@attic.nl

unread,
Dec 6, 2015, 5:33:17 AM12/6/15
to Couchbase Mobile


Op maandag 30 november 2015 01:59:41 UTC+1 schreef Jens Alfke:

> On Nov 29, 2015, at 11:30 AM, wbi...@attic.nl wrote:
>
> When I then build for simulator I get a list of "std:" errors the first of which is:
> Undefined symbols for architecture x86_64:
>
>   "std::__1::__vector_base_common<true>::__throw_length_error() const", referenced from:

Those are part of the C++ standard library. Add the “libc++.tbd” library.

That works - thanks; 
What are the steps required to build a Listener framework for Apple TV ? 

Jens Alfke

unread,
Dec 7, 2015, 12:28:05 AM12/7/15
to mobile-c...@googlegroups.com

On Dec 6, 2015, at 2:33 AM, wbi...@attic.nl wrote:

What are the steps required to build a Listener framework for Apple TV ? 

I don’t think I got as far as building targets for that. Honestly, it’s exactly the same as building for iOS, you just change the SDK in the build settings from iOS to tvOS, and change any imported libraries to their tvOS equivalents.

(You can even, currently, link iOS frameworks/libraries into a tvOS app target. They work fine, you just get a warning from the linker about the mismatch, with a threat that this may break “in the future”.)

—Jens
Reply all
Reply to author
Forward
0 new messages