iOS - How to configure a new project

Configuring a new project.

Link our framework as a library:

  • After creating a new project
  • Copy the framework (BinahAI.framework) folder to the same path as your project file (e.g: company.xcodeproj)
  • Choose your target and go to Build Phases tab.
  • Expand "Link Binary With Libraries" section
  • Click on the "+" icon

Screen_Shot_2020-04-17_at_22.33.35.png

  • On the bottom drop-down list select "Add Files".

Screen_Shot_2020-04-17_at_22.33.08.png

  • Finder opens, select the framework folder and click on "Open"

Screen_Shot_2020-06-29_at_14.20.01.png

  • The framework is now linked to your project.

Screen_Shot_2020-06-29_at_14.21.48.png

  • Go to General Tab and under Framework, Libraries, and Embedded content” change the Embed Method to be "Embed & Sign".

Screen_Shot_2020-08-18_at_10.34.42.png

Copy bundle resources: (If you are in 3.0.7 and above jump to "adding support for c++ libraries")

  • On the Build Phases tab, expand the "Copy Bundle Resources" section.
  • Open finder
  • Search for our framework folder (should be located in the same path of your project file)
  • Click on the folder.
  • Drag the models.bundle outside to the xcode section.

Screen_Shot_2020-04-17_at_22.48.57.png

  • Choose "Create groups" and click on Finish

Screen_Shot_2020-04-17_at_22.49.40.png

  • Now models.bundle is copied into your project as a resource.

Screen_Shot_2020-04-17_at_22.50.59.png

Adding support for c++ libraries:

  • Go to the project's Build Settings.
  • Look for the "Apple Clang - Language - C++" and expand this section.

Screen_Shot_2020-04-18_at_22.41.16.png

  • Set the "C++ Language Dialect" to "C++ 17 [-std=c++17]"

Screen_Shot_2020-04-18_at_22.42.20.png

More support with C++ linkings:

  • Go to Project's Build Settings
  • Search for "Linking" section

Screen_Shot_2020-05-07_at_23.24.11.png

  • Look for "Other Linker Flags".
  • Edit this field and set its value to: "-lstdc++"

Screen_Shot_2020-05-07_at_23.22.13.png

  • Click on "+" sign and add also "-ObjC"
  • Click on enter.

Verify framework can be searched by xcode:

  • Choose your target
  • Go to "Build Settings"
  • Look for the "Search Paths" section or you can search for "paths"
  • Inside this section verify that "Framework Search Paths" containms the path where you put our framework (e.g: $(PROJECT_DIR))

Screen_Shot_2020-04-17_at_22.52.49.png

Adding info.plist for your SDK unique IDs

  • Add a new raw with name: BinahProductID as string and type the product ID you have
  • Add a new raw with name: BinahLicenseKey as string and type the license ID you have.

Screen_Shot_2020-05-18_at_15.44.31.png

Remember to:

Run on a real device

Was this article helpful?
2 out of 2 found this helpful

Comments

0 comments

Please sign in to leave a comment.