0

I have been working on my first ResearchKit app. Since the last time I created an archive, I have included a custom library for creating JSON strings. See my previous question.

After importing the .h file in that bridging-header file, I was able to use the package.

The project was running fine in the simulator. I even did a fresh clean and build for the "Generic iOS Device", and that completed with no errors. When I went to archive the project, during the linking stage, I get this error:

Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_ORKLocation", referenced from: objc-class-ref in ORKESerialization.o "_OBJC_CLASS_$_ORKConfirmTextAnswerFormat", referenced from: objc-class-ref in ORKESerialization.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

My Xcode version is 7.1.1. I have been searching around the web for possible answers. Apparently it might have something to do with these architecture version, but I can't seen to pinpoint the problem. Any help would be appreciated. Thanks!

Community
  • 1
  • 1
jeffery_the_wind
  • 17,048
  • 34
  • 98
  • 160
  • Does it work on device? – Jelly Mar 28 '16 at 16:34
  • Well i was archiving it in order to export to a file, and load on a device. Since the archive failed I haven't tried exporting. Should I still try to export it and install on a device? – jeffery_the_wind Mar 28 '16 at 16:37
  • 1
    You don't have to export it. Just select your device and press the play button. – Jelly Mar 28 '16 at 16:39
  • Sorry, it took a while to sort some things out. Yes i was able to plug in my iphone and run it on the device. It had a couple warnings but no errors and it ran successfully. It ran just like it did on the simulator. It still gives me the error in the question when I run try to archive... – jeffery_the_wind Mar 29 '16 at 12:33
  • How did you include the library in your project? – Jelly Mar 29 '16 at 12:36
  • Well i dragged the ORKESerialization.h and ORKESerialization.m files into my project. Xcode then created a Bridging-Header.h file, and in there i wrote one line `#import "ORKESerialization.h"`. I was then able to use the serializer function that I needed. – jeffery_the_wind Mar 29 '16 at 12:45
  • Make sure you have `arm64` set to `Architectures` in your project, and also in the frameworks that you use. Check this answer: http://stackoverflow.com/questions/19213782/undefined-symbols-for-architecture-arm64 – Jelly Mar 29 '16 at 12:54
  • Let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/107640/discussion-between-jeffery-the-wind-and-jelly). – jeffery_the_wind Mar 29 '16 at 13:04
  • @jeffery_the_wind Did you find a solution? I ran into a similar issue.. App works find on Simulator but I am unable to archive it – Khadija Daruwala Nov 25 '20 at 07:02
  • @PersianBlue I'm sorry this was such a long time ago I don't remember, but yes I did eventually get past it. Wish I remember what happened. Only thing I can think of is make sure all your versions are correct for the researchkit you are using. – jeffery_the_wind Nov 25 '20 at 10:57
  • @jeffery_the_wind Thanks for the reply. Yes, I checked everything, it all seems fine. Not sure why it is still not working – Khadija Daruwala Nov 25 '20 at 11:05
  • @PersianBlue I don't think it was a bug but yes I'm sure they can help you on the GitHub thread. I think it was something very subtle that you have do when building the dependencies of the project. Anyways, I don't do much iOS work anymore so not very fresh in my mind. Good Luck! – jeffery_the_wind Nov 25 '20 at 11:10
  • @jeffery_the_wind I have posted for help on GitHub hope to find some solution soon. Thank you! – Khadija Daruwala Nov 25 '20 at 11:15

1 Answers1

2

This sounds like a bug. Best bet is to file it on Github.

jwe
  • 436
  • 2
  • 4