Configure a New Project (iOS)

Have more questions? Submit a request
Link BinahAI.framework as a library
  1. After creating a new project, copy the framework (BinahAI.framework) folder to the same path as your project file (e.g: company.xcodeproj).
  2. Choose your target, and go to Build Phases tab.
  3. Expand Link Binary With Libraries.
  4. Click +.

    Screen_Shot_2022-01-27_at_20.15.19.png
  5. In the drop down, select Add Files. Screen_Shot_2022-01-27_at_20.56.30.png
    The Finder opens.
  6. Select the framework folder, and click Open. Screen_Shot_2022-01-27_at_20.57.00.png
    The BinahAI.framework is now linked to your project.Screen_Shot_2022-01-27_at_20.57.29.png
  7. Go to General tab, and under Framework, Libraries, and Embedded content, change the Embed Method to Embed & Sign.Screen_Shot_2022-01-27_at_20.57.56.png

2. Copy Bundle Resources

Copy bundle resources

Note: If you are in version 3.0.7 or higher, skip to Adding Support for C++ Libraries.

  1. In the Build Phases tab, expand the Copy Bundle Resource.
  2. Open the Finder, and search for the BinahAI Framework folder.
    The folder is generally located under the same path as your project file.
  3. Click the folder.
  4. Drag the models.bundle to the Xcode section.Screen_Shot_2022-01-27_at_20.58.26.png
  5. Choose Create groups.
    Screen_Shot_2022-01-27_at_20.58.51.png
  6. Click Finish. The models.bundle is copied into your project as a resource.
    Screen_Shot_2022-01-27_at_20.59.14.png

3. Add Support for C++ Libraries

Add support for C++ libraries
  1. Go to the project's Build Settings.
  2. Expand Apple Clang - Language - C++.
    Screen_Shot_2022-01-27_at_20.59.42.png
  3. Set the C++ Language Dialect to C++ 17 [-std=c++17].
    Screen_Shot_2022-01-27_at_21.00.08.png

4. Additional C++ Linking Support

Additional C++ linking support
  1. Go to the project's Build Settings.
  2. Go to Linking > Other Linker Flags.
    Screen_Shot_2022-01-27_at_21.00.36.png
  3. Edit this field, and set its value to -lstdc++.
    Screen_Shot_2022-01-27_at_21.00.58.png
  4. Click +, and add -ObjC.
  5. Click Enter.

5. Make Sure Framework is Searchable

Make sure framework can be searched by Xcode
    1. Choose your target.
    2. Go to Build Settings.
    3. Either look for the Search Paths section, or search for paths.
    4. Inside this section, make sure the Framework Search Paths contains the path where you put the BinahAI Framework (e.g: $(PROJECT_DIR).
      Screen_Shot_2022-01-27_at_21.01.24.png

6. Add info.plist

Add info.plist to your SDK unique IDs
  1. Add a new raw with the name: BinahLicenseKey as string, and type the license ID you have.
    Screen_Shot_2022-01-27_at_21.01.55.png

Note

  • Run the application on a real device to test (it does not work on an emulator)

Articles in this section

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

Comments

1 comment

Please sign in to leave a comment.

  • Hi, From where I can download the sdk or your demo code ?

    0