0

I am trying to build the project using this as basis : GitHub code

but it is giving me error when i am trying to archive the project, while running it directly on device is okay. If i turn bitcode to off it makes the build but exit with some error on the iphone because dlib library is not being added needed for detection.

ld: bitcode bundle could not be generated because 'path/lib/libdlib.a(threads_kernel_shared.o)' was built without full bitcode. All object files and libraries for bitcode must be generated from Xcode Archive or Install build for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I can see there is some problem in generation of dlib library but have no idea how to solve it up. If anyone can guide me through it, i will be really thankful for the guidance. Thank you.

Hadi
  • 307
  • 6
  • 20
  • 1
    Do you have any dynamic framework files in your project? If so, is the framework built just for simulator (generally devices are of arm64 architecture)? – Lohith Korupolu Jul 05 '17 at 06:46
  • I have downloaded the whole code from the github and it is using dlib library which was build but while archiving it is giving me this error. – Hadi Jul 05 '17 at 06:50
  • @hadi-raja : May be that dlib library that was pre build in ur git code was build with arm64 architecture device selected. So if u have access to the source code rebuild the lib this time select generic iOS device and re add it to the project and archive – Sandeep Bhandari Jul 05 '17 at 07:12
  • I dont have access to that source code.. i downloaded the latest one and tried building it up and link it to the existing project.. but i got the following error Showing Recent Messages "_USER_ERROR__missing_dlib_all_source_cpp_file__OR__inconsistent_use_of_DEBUG_or_ENABLE_ASSERTS_preprocessor_directives_", referenced from: – Hadi Jul 05 '17 at 07:35

2 Answers2

1

Select Generic iOS Device while archiving

enter image description here

Sandeep Bhandari
  • 19,999
  • 5
  • 45
  • 78
  • selected generic IOS device for archiving it is giving me this error while archiving. – Hadi Jul 05 '17 at 06:49
1

Try this - Worked for me

Goto Build Settings -> Enable Bitcode -> Select 'No'

And Archive with Generic Device selected.

Lohith Korupolu
  • 1,066
  • 1
  • 18
  • 52
  • hi i tried this but the build i made did not work on iphone but if i attach my device with mac and directly run on it.. it is running fine from xcode directly buy not from the ipa – Hadi Jul 05 '17 at 09:23
  • ah! Ok. Is the device that you are installing the app registered in the developer portal? Once you register the device, the provisioning profile will contain your device UDID and only from then, you can install the iPA on the device. – Lohith Korupolu Jul 05 '17 at 09:43
  • yes it is registered on the development portal.. the installed app starts but terminates right away. The ipa is installed on the device but terminates on running it but if i run it directly it is running smoothly from xcode – Hadi Jul 05 '17 at 10:45
  • In that case you need to monitor crashes. You can do that by going to Window -> Organizer -> Crashes tab. Select the app look for the crash report. You may get some help – Lohith Korupolu Jul 05 '17 at 10:59
  • the crash happens when the app is run without xcode if it is running with xcode it runs smoothly :( – Hadi Jul 05 '17 at 11:46