Sunday, April 21, 2024
HomeiOS Developmentios - Xcode C++ the best way to learn file inside xcframework...

ios – Xcode C++ the best way to learn file inside xcframework and move it to sqlite load_extension?


I’ve an xcframework bundled in my app. Inside this xcframework there’s a framework file that accommodates a sqlite dylib I need to get the trail for after which load it into sqlite.

I’ve managed to get a path into the file by doing:

NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
NSString *crsqlitePath = [resourcePath
      stringByAppendingPathComponent:@"Frameworks/crsqlite.framework/crsqlite"];

This provides on the simulator:

/Customers/osp/Library/Developer/CoreSimulator/Gadgets/2542B85E-15F0-4262-92A8-C20FC7C9908A/information/Containers/Bundle/Utility/EDF0FBCE-FCAA-466D-89D5-FE197FF41B1D/OPSQLiteExample.app/Frameworks/crsqlite.framework/crsqlite

Then when after I create a sqlite db I attempt to load it:

char* errMsg;
const char* crsqliteEntryPoint = "sqlite3_crsqlite_init";

sqlite3_load_extension(db, crsqlitePath.c_str(), crsqliteEntryPoint, &errMsg);

I then get the error:

not approved

So I am guessing that iOS just isn’t glad accessing the file contained in the framework so willy nilly. Is there anyway I can provide entry to this file or possibly copying it to the paperwork folder is the one approach?



Supply hyperlink

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments