iOS Question Library creation issue

walterf25

Expert
Licensed User
Longtime User
Hi all, it's been a very long time I haven't done anything with B4i, I recently just renewed my license for both B4i and Apple developer, I decided to continue working on a library I had started working on a while back, I have set everything up, the library files have compiled just fine without any errors, the problem is that when I try to use it and I try to compile a small sample app I get the following error.

While building module 'Charts' imported from /Users/walter.flores/Desktop/B4iBuildServer/Libs/iCharts.h:23:
In file included from <module-includes>:2:
../../Libs/Charts.framework/Headers/Charts-Swift.h:4721:2: error: unsupported Swift architecture
#error unsupported Swift architecture
^

Does anyone have any idea what this means and how to fix it?

I have copied the framework and the libCharts.a files to the Libs folder in my local b4iBuildserver folder.

Any ideas?

Walter
 

JordiCP

Expert
Licensed User
Longtime User
Quick check: Try to increase the project's MinVersion to 14 just to see if it makes any difference
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Quick check: Try to increase the project's MinVersion to 14 just to see if it makes any difference
I think that did the trick, I also installed the Apple Configurator 2, now I am getting a different error, when trying to compile with the library.

UploadedProjects/<user id>/Payload/B4i\ Example.app/B4i\ Example
ld: warning: ignoring file ../../Libs/libiCharts.a, building for iOS-arm64 but attempting to link with file built for iOS Simulator-x86_64
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_iCharts", referenced from:
objc-class-ref in b4i_b4xmainpage.o
"_OBJC_CLASS_$_iLineChartDataSet", referenced from:
objc-class-ref in b4i_b4xmainpage.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any ideas?
 
Upvote 0

JordiCP

Expert
Licensed User
Longtime User
Not sure, but is it possible that the lib was built only for simulator?
Try to rebuildthe lib selecting a generic iOs device instead of simulator on the top XCode bar if I remember correctly
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Not sure, but is it possible that the lib was built only for simulator?
Try to rebuildthe lib selecting a generic iOs device instead of simulator on the top XCode bar if I remember correctly
Yes that was it, it works good now.

Check it out.
 

Attachments

  • IMG_F63E81AD47D6-1.jpeg
    IMG_F63E81AD47D6-1.jpeg
    382.1 KB · Views: 164
Upvote 0
Top