dmsurti / AssimpKit

A library (macOS, iOS) that converts the files supported by Assimp to Scene Kit scenes.
http://assimpkit.readthedocs.io/
BSD 3-Clause "New" or "Revised" License
474 stars 54 forks source link

How to integrate AssimpKit manually #49

Closed SongJiaqiang closed 7 years ago

SongJiaqiang commented 7 years ago

I do not want use Carthage, and how to integrate AssimpKit on my project ?

dmsurti commented 7 years ago

@SongJiaqiang Just clone or fork this project. Open the workspace file.

Next choose the target, example AssimpKit-iOS and also a device if you want to build it for a device. Then build that target. Under Products you will see AssimpKit.framework. You can copy this framework and add it to your project.

screen shot 2017-03-22 at 12 10 25 pm

SongJiaqiang commented 7 years ago

@dmsurti Thank you! It's easy to copy AssimpKit framework to my Xcode project, but there are some c++ error when I build project. I guess some of the libraries may be missing, and then try to add the following libraries, eventually resolving the error. 😆😆😆

libc++.tbd libstdc++.tbd libz.tbd libiconv.tbd

dmsurti commented 7 years ago

@SongJiaqiang

I guess some of the libraries may be missing, and then try to add the following libraries,

Sorry, I haven't tried integrating manually except for the sample projects in the workspace, check those out as well, but you should not need to add those libraries. Try this and please let me know if it works:

screen shot 2017-03-24 at 1 10 39 pm

Also did you set the Enable Bit Code -> NO in the build settings; that is required for iOS projects.

Finally, add these to your linker flags: -lz -lstdc++ -ObjC -all_load as shown:

screen shot 2017-03-24 at 1 17 40 pm


If this does not work, do you mind sharing a sample project of yours where you are trying to add manually, I can then investigate. This will help us add a integrate manually section with correct instructions.

D-32 commented 7 years ago

@dmsurti I got it to work with Xcode 8.3.1 and Swift 3 with following steps:

  1. Build the iOS framework
  2. Drag & drop AssimpKit.framework into your project
  3. Build settings -> Enable Bitcode = No
  4. General -> Embedded Binaries -> Add AssimpKit.framework
  5. Add Bridging-Header and add #import <AssimpKit/SCNScene+AssimpImport.h>
dmsurti commented 7 years ago

@D-32 Thanks for the instructions to integrate manually. 👍

@SongJiaqiang You can see the steps posted by @D-32 to integrate manually.

Closing this issue now.