{"action":"created","issue":{"url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/380","labels_url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/380/labels{/name}","comments_url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/380/comments","events_url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/380/events","html_url":"https://github.com/NativeScript/ios-runtime/issues/380","id":112732361,"number":380,"title":"CocoaPods and Built in Dynlib Libraries","user":{"login":"NathanaelA","id":850871,"avatar_url":"https://avatars.githubusercontent.com/u/850871?v=3","gravatar_id":"","url":"https://api.github.com/users/NathanaelA","html_url":"https://github.com/NathanaelA","followers_url":"https://api.github.com/users/NathanaelA/followers","following_url":"https://api.github.com/users/NathanaelA/following{/other_user}","gists_url":"https://api.github.com/users/NathanaelA/gists{/gist_id}","starred_url":"https://api.github.com/users/NathanaelA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NathanaelA/subscriptions","organizations_url":"https://api.github.com/users/NathanaelA/orgs","repos_url":"https://api.github.com/users/NathanaelA/repos","events_url":"https://api.github.com/users/NathanaelA/events{/privacy}","received_events_url":"https://api.github.com/users/NathanaelA/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-22T05:10:51Z","updated_at":"2015-10-22T07:24:07Z","closed_at":null,"body":"Ok, several versions of NativeScript back, #156 was the solution for using Dylib's.   Well, I've attempted to update my nativescript-sqlite for cocoapod support and I can't seem to get it working properly.\r\n\r\nAny chance you have someone on staff that has a LOT of experience with cocoapod's that I can pick their brain.   This is totally frustrating as the pod framework file it is building does not seem to have my header or an updated modulemap from the podspec file it is using.\r\n\r\nThe issue appears to be that for NativeScript to work, I need to reference the spec.library='sqlite3', however; this podspec file does NOT  need to compile anything, since the sqlite3 file is a built in dynamic library on ios.  So basically I need a podspec that tells the xcode project to include another framework library and that is it.   \r\n\r\n1. So, I've twisted the podspec file to be able to manage this and the actual compiled file actually looks like it have libsqlite built into the app properly.  (Multiple references inside the compiled emulator app to libsqlite3.dylib).  However, no metadata is being generated.  And my import .h file isn't being copied to the public headers location.   So I have no idea what might be causing the issue.\r\n\r\n2. If I manually move my modulemap file into a folder that will get processed by the metagenerator; then the cocoapod works mostly.   By mostly;  The sqlite calls works but throws an error to the console the first time you access a sqlite call:\r\n```\r\nNativeScript could not load library /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/sqlite3.dylib, error: dlopen(/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/usr/lib/sqlite3.dylib, 5): image not found\r\n```\r\n\r\nTo be honest I'm about to just create a simple npm post install script that will automate the install steps I originally used and and documented in #156 to just eliminate the user from having to do anything rather than use cocoapod as cocoapod doesn't seem to be up to the task...\r\n\r\nOh, the podspec is:\r\n```\r\n Pod::Spec.new do |s|\r\n  s.name     = 'nativescript-sqlite'\r\n  s.version  = '1.0.0'\r\n  s.license  = 'MIT'\r\n  s.summary  = 'SQLite is and embedded SQL database'\r\n  s.authors  = { 'Nathanael Anderson' => 'nathan@master-technology.com' }\r\n  s.requires_arc = false\r\n  s.module_map = 'module.modulemap'\r\n  s.library = 'sqlite3'\r\n  s.platform = :ios\r\n  s.homepage = 'https://github.com/NathanaelA/nativescript-sqlite'\r\n  s.requires_arc = false\r\n  s.source_files = 'platforms/ios/**/*.h'\r\n  s.public_header_files = 'platforms/ios/**/*.h'\r\n  s.source = { :git => 'https://github.com/NathanaelA/nativescript-sqlite.git' }\r\nend\r\n```\r\n\r\nAny pointers on how to get this to work without manually moving the modulemap file and how to get this to work so it doesn't throw an error to the console the first time it uses a sqlite call?   Or is this such a edge case that I should just not worry about cocoapod'izing it and just create a npm post install script that adds it to the project file and manually moves the modulemap file."},"comment":{"url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/comments/150130236","html_url":"https://github.com/NativeScript/ios-runtime/issues/380#issuecomment-150130236","issue_url":"https://api.github.com/repos/NativeScript/ios-runtime/issues/380","id":150130236,"user":{"login":"jasssonpet","id":305639,"avatar_url":"https://avatars.githubusercontent.com/u/305639?v=3","gravatar_id":"","url":"https://api.github.com/users/jasssonpet","html_url":"https://github.com/jasssonpet","followers_url":"https://api.github.com/users/jasssonpet/followers","following_url":"https://api.github.com/users/jasssonpet/following{/other_user}","gists_url":"https://api.github.com/users/jasssonpet/gists{/gist_id}","starred_url":"https://api.github.com/users/jasssonpet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jasssonpet/subscriptions","organizations_url":"https://api.github.com/users/jasssonpet/orgs","repos_url":"https://api.github.com/users/jasssonpet/repos","events_url":"https://api.github.com/users/jasssonpet/events{/privacy}","received_events_url":"https://api.github.com/users/jasssonpet/received_events","type":"User","site_admin":false},"created_at":"2015-10-22T07:24:07Z","updated_at":"2015-10-22T07:24:07Z","body":"Hello, @NathanaelA,\r\n\r\nRegarding this error:\r\n```\r\nNativeScript could not load library sqlite3.dylib, error: dlopen(sqlite3.dylib, 5): image not found\r\n```\r\n\r\nit seems that in the newer versions of the iOS SDK, the `sqlite3.dylib` file is renamed to `sqlite3.tbd`.\r\n\r\nI found the following quote from Apple:\r\n> For those who are curious, the .tbd files are new \"text-based stub libraries\", that provide a much more compact version of the stub libraries for use in the SDK, and help to significantly reduce its download size.\r\n\r\nIt's a bug on our side and we update our symbol loader to search for this file extension as well, so that it can be successfully loaded.\r\n\r\nThank you for reaching us!"}}