0

I just created a framework, I created a sample app to test the framework. Everything works fine in Xcode 9 after upgrading the Xcode getting like Undefined symbols for architecture x86_64. Also I tested the available architectures in terminal by using the command lipo -info framework and also using command file framework, showing available Architectures are: i386 x86_64 armv7 arm64. I don't know why I am getting this error. Please suggest me if I am doing anything wrong. You can see the error attached screenshot.

screenshot

aduguid
  • 3,099
  • 6
  • 18
  • 37
  • If you open the build window, you'll see which symbols are missing. – zneak Jun 19 '18 at 15:40
  • zneak thanks for your reply, you are saying that valid architectures right. If yes, also I tried but didn't worked for me.. – Naveen Reddy Jun 19 '18 at 15:46
  • Did you try deleting the derived data? [How can I delete derived data?](https://stackoverflow.com/a/40278559/8346251) – Kevinosaurio Jun 19 '18 at 15:54
  • No. I'm talking about the [build log](https://stackoverflow.com/questions/19014359/how-do-i-view-the-full-build-log-on-xcode5). – zneak Jun 19 '18 at 15:54
  • Yes, I did deleting the derived data and removing the references and re-added..But didn't work.. – Naveen Reddy Jun 20 '18 at 05:57
  • and also in build logs I didn't find any changes..... – Naveen Reddy Jun 20 '18 at 06:22
  • If I disable **Build Active Archive** getting the above error and When I enable getting **Undefined symbols for architecture i386**. Its working fine when I archiving the build... – Naveen Reddy Jun 20 '18 at 06:50
  • also I tried to combine the debug and release frameworks using **lipo -create -output "YourFrameworkName" "Debug-iphonesimulator/YourFrameworkName.framework/YourFrameworkName" "Debug-iphoneos/YourFrameworkName.framework/YourFrameworkName"** but no use. If I import debug framework, its working fine in simulator. – Naveen Reddy Jun 20 '18 at 09:28

1 Answers1

0

I am not sure this works for others, for me, I merged the debug and release framework using lipo -create -output "YourFrameworkName" "Debug-iphonesimulator/YourFrameworkName.framework/YourFrameworkName" "Debug-iphoneos/YourFrameworkName.framework/YourFrameworkName" and also I merged the swiftmodules under modules. Framework can only work on simulator, but not device and http://www.openradar.me/radar?id=6409498411401216 these two posts helps for me...