Closed LinusGeffarth closed 7 years ago
UnsafeMutablePointer<MYSQL>
is used with C mysql header includes.
You would use this library via Package Manager and follow Installation
of README.md.
Ok, I've never used Package Manager, so I thought I might get around it 😄. Will try and report back. Thanks for the quick response!
So I installed Swift Package Manager, cd
'd into the project directory, ran swift package init
, opened and modified the packages.swift file as described in the readme, and ran swift package resolve
(resolve is new for fetch). It says "fetching ..." and "cloning..." the urls. Then, I open the project (.xcworkspace, since I'm also using cocoapods) and try to import mysql-swift, but it doesn't know the module.
What am I doing wrong?
Use $ swift package generate-xcodeproj
for generating Xcode project of your app. Cocoapods or other package manager might be not working together.
Note that Swift Package Manager imports mysql-swift automatically. No need import that manually.
I have imported all the files inside "Sources", into my Xcode project.
Xcode's giving me multiple errors:
Same for
mysql_init
,MYSQL_OPT_CONNECT_TIMEOUT
,my_bool
,mysql_real_connect
,MYSQL_OPT_RECONNECT
, etc. ...Am I missing something? Thanks!