iOS Question Error with B4i Library

walterf25

Expert
Licensed User
Longtime User
Hi all, I started wrapping a library, in xcode everything compiles fine, I have generated the xml library file, copied the xml file into the Additional_Libs folder, the library wrapper only has one function as of now, but when i try to compile my app I get the following error



The libiPoseLandmarker.a file has been copied to the Libs folder of my local B4iBuildServer along with the MediaPipeTasksVision.framework which is required by this library, Not sure what the error means exactly, hoping someone here with more experience can help me figure this out.

Thanks everyone in advance.

Walter
 

walterf25

Expert
Licensed User
Longtime User
Hi @Erel I just tried adding
B4X:
#AdditionalLib: iPoseLandmarker.a.3

But I get the following error, I can see that library in the Lib folder of the B4iBuildServer, but not sure why I get this error

ld: library 'iPoseLandmarker.a.3' not found
Any thoughts?
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Try:
B4X:
#AdditionalLib: iPoseLandmarker
Hi Erel, just tried that and now I get the following errors.


I have been burning the candle at both ends for almost a week now and can't seem to get this to work, I know you're a busy person but will really appreciate it if I could get some more tips here, I have also created a job post but unfortunately have not gotten any responses, I realize wrapping B4i libraries is a bit more cumbersome than Android libs, I need to get this working or I will loose a client, I really thought it wouldn't be too difficult to wrap this library since I already wrapped the Android one.

Thanks Erel, and anyone else who may have some more insight about why I get the errors I am getting.

Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
I think that you are missing protobuf. Check the library documentation. The dependencies should be listed there.
Just built the ProtocolBuffers library and added it to the Libs folder of my local builder but I still see the same errors.

This is very frustrating.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Building iOS libraries is indeed not simple. Create a new empty project with Xcode and add this framework. Get it running as an app first.
Hi Erel and thanks for enganging with me and helping me while we try to figure this out, I now see the following error, and not sure what it really means, but I feel that I'm a bit closer.


Any idea on what this error means?
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Building iOS libraries is indeed not simple. Create a new empty project with Xcode and add this framework. Get it running as an app first.
Quick update, I was finally able to compile and run the b4i project with the wrapped library, however when the app tries to be installed through B4i-Bridge, I get an error saying Unable to install app, try again later.



Thinking that maybe the issue was the new library wrapper, I unchecked it from the libraries tab in the IDE, removed any reference to the library and tried to compile the b4i project, but even so I am receiving the same error, This used to compile just fine on my local build server, now for some reason it doesn't, I tried compiling with the hosted build server and it compiles fine without any issues, would this be a direct issue with my local build server? if so how can i fix it? I am on Build Server version 8.1. and using xcode 14.2 on my mini-mac, and xcode 16.2 on my macbook pro, I have totally different problems trying to compile using xcode 16.2, but that's a different issue, for now I'd like to be able to compile my app with xcode 14.2.

Any idea why this is? I don't see any errors in the logs, or in the B4iBuildServer.

Thanks,
Walter
 
Last edited:
Upvote 0

walterf25

Expert
Licensed User
Longtime User
1. Try to change package name and see whether it makes any difference.
2. Try to compile an app with the hosted builder.
Hi Erel, I think i figured out the problem, the main issue was that the local builder was running from /MyDocuments directory which is being backed up by iCloud, so I moved it to /Users/xxxxxxx/MyLocalFiles, the other thing was that I hadn't installed the AppleConfigurator2, which is odd because I had been working without it for a while, I am now able to compile my app with the wrapped library even though for now it's only one function in it but at least I know it loads all the required dependencies.

I will post both Android and iOS libraries once I am done and my client agrees to it.

As always Thanks for all your help Erel, really appreciate your awesomeness....

Walter
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
iOS build chain is fragile. There are errors that only happen at runtime and some of them cause hard crashes with zero output. This is not something that you encounter with Java.

A useful method for such cases, is to build a release simulator app and then debug it with Xcode. It requires two steps to get the app running (I can explain if anyone is interested). You will sometimes get more information from Xcode.

This is not related to the last issue with B4i build server path.
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
I'm definitely interested in learning how to
debug a b4i app in xcode I think it will come
In handy.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…