VLCKit Swift Example

iOS, iPad, iPhone, tvOS specific usage questions
JonasVentureJr
New Cone
New Cone
Posts: 3
Joined: 17 Oct 2015 04:25

VLCKit Swift Example

Postby JonasVentureJr » 17 Oct 2015 04:26

Hey there. I'm new to vlckit. Are there any examples out there of how to use it with swift?

Thanks!

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCKit Swift Example

Postby fkuehne » 17 Oct 2015 22:12

I'm not aware of any public sample code. However, we updated all the headers so it should be as seamless to integrate as all Objective-C frameworks.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

JonasVentureJr
New Cone
New Cone
Posts: 3
Joined: 17 Oct 2015 04:25

Re: VLCKit Swift Example

Postby JonasVentureJr » 25 Oct 2015 03:54

Ok that's good to hear. I started trying to get a working example using cocoapods, but I get linker errors pages long.

Ld /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator/Subtle.app/Subtle normal x86_64
cd /Users/eric/Desktop/sub/Subtle
export IPHONEOS_DEPLOYMENT_TARGET=9.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.0.sdk -L/Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator -F/Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator -F/Users/eric/Desktop/sub/Subtle/Pods/MobileVLCKit/MobileVLCKit-binary -filelist /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -Xlinker -rpath -Xlinker @loader_path/Frameworks -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=9.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -lbz2 -liconv -lstdc++ -lxml2 -lz -framework AFNetworking -framework AVFoundation -framework AudioToolbox -framework CFNetwork -framework CoreGraphics -framework CoreText -framework MobileVLCKit -framework OpenGLES -framework QuartzCore -framework Security -L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift/iphonesimulator -Xlinker -add_ast_path -Xlinker /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle.swiftmodule -framework MobileVLCKit -framework Pods_Subtle -Xlinker -dependency_info -Xlinker /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Intermediates/Subtle.build/Debug-iphonesimulator/Subtle.build/Objects-normal/x86_64/Subtle_dependency_info.dat -o /Users/eric/Library/Developer/Xcode/DerivedData/Subtle-hkmxjwkrbublewfmchtafxrggmqm/Build/Products/Debug-iphonesimulator/Subtle.app/Subtle

Undefined symbols for architecture x86_64:
"std::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> >::find(wchar_t const*, unsigned long, unsigned long) const", referenced from:

and it goes on and on from there. Does anyone know what I might be missing?

fkuehne
Developer
Developer
Posts: 7264
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: VLCKit Swift Example

Postby fkuehne » 25 Oct 2015 16:41

You don't link against libc++ (or with the stable release, libstdc++).
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net

JonasVentureJr
New Cone
New Cone
Posts: 3
Joined: 17 Oct 2015 04:25

Re: VLCKit Swift Example

Postby JonasVentureJr » 25 Oct 2015 17:50

Ok, I gave that a shot. I tried adding -llibc++ to the "Other Linker Flags" page, but now I'm getting:

ld: library not found for -llibc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Did i do that wrong? Thanks for all the help by the way.


Return to “VLC for iOS, iPadOS and Apple TV”

Who is online

Users browsing this forum: No registered users and 40 guests