iOS Question App crashes after 1-2 second [SOLVED]

ilan

Expert
Licensed User
Longtime User
hi

my userid for the hosted builder has expired (i have also a local builder but for some reason it never works well) so i renewed it and i try to run an app (b4xpages).
the problem is that the app crashes immediately after i compile it. It does not matter what i do it just crashes and all logs i get is this:

Application_Start
SignalHandler 6
*** mainpage: B4XPage_Created
*** mainpage: B4XPage_Appear [mainpage]
*** mainpage: B4XPage_Resize [mainpage]
Application_Active
*** shoppinglist: B4XPage_Created [mainpage]
even if i put breakpoints at the beginning of the app it crashes.
i tried to uninstall and install both b4i builder and app but same results.
the app runs well on b4a but b4i crashes on start and no logs.

i cannot post the whole project here.
any ideas why i am not getting anything helpful in the logs?
 

ilan

Expert
Licensed User
Longtime User
i also tried to run it on my local mac and this is the error i get

B4i Version: 8.30
Parsing code. (0.20s)
Building folders structure. (0.19s)
Running custom action. (0.04s)
Compiling code. (0.39s)
Compiling layouts code. (0.02s)
Compiling debugger engine code. (0.25s)
Building Xcode project. (0.15s)
Preparing project for builder. (0.60s)
Project size: 1.43 MB
Sending data to remote compiler. Error
Error: An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
Simulator device returned an error for the requested operation.
The request was denied by service delegate (SBMainWorkspace).
Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "www.sagital.buysmart" failed.
The request was denied by service delegate (SBMainWorkspace).
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
after few hours of investigating i can confirm that the error in post #1 is because the iAdmob library that i had to update (v4.00)
the second error on post #2 hast not been solved yet (i assume that it has something to do with xcode 15.2 and maybe b4i is not working with xcode 15.2 right now)
 
Last edited:
Upvote 0

ilan

Expert
Licensed User
Longtime User
Are you able to run it locally with a real device?
Yes, on a real device it is working

I'm able to run apps on the simulator with Xcode 15.2.

You need to make sure that a 17.2 simulator is started. You can do it with Xcode or by running this command from the terminal:
B4X:
open -a Simulator

And start a simulator instance under the File menu.

the simulator is started from b4i ide, do i need to run this commend also on my local mac?
open -a Simulator

btw, erel is it possible to have an option to download the same libraries that are on the hosted builder so i always have the same builder as the hosted builder?
it happens a lot that i dont have the updated libraries and the compile fails on my local builder but when i use the hosted builder it works.

thanks,
ilan
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
the simulator is started from b4i ide, do i need to run this commend also on my local mac?
open -a Simulator
Once you get it working, then it will work automatically.

Another thing that you can do is to create a new iOS project with Xcode and run it. It should start a 17.2 simulator.

About the libraries, v8.50 will be released soon and will include the updated libraries.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Once you get it working, then it will work automatically.

Another thing that you can do is to create a new iOS project with Xcode and run it. It should start a 17.2 simulator.
ok thank you erel i will try.

About the libraries, v8.50 will be released soon and will include the updated libraries.
will the ide also include an option to download an exact copy of the hosted builder library folder? this will be so perfect ?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
will the ide also include an option to download an exact copy of the hosted builder library folder?
No. The hosted builders include all kinds of libraries and not all of them are shareable.

I will try to make it more organized so it will be clear how to get all relevant libraries from the forum.
 
Upvote 0

Alessandro71

Well-Known Member
Licensed User
Longtime User
No. The hosted builders include all kinds of libraries and not all of them are shareable.

I will try to make it more organized so it will be clear how to get all relevant libraries from the forum.
It's understandable that it's not possible to redistribute some libraries for licensing issues, but a "build your own on-premise builder" tutorial, with detailed steps to download required components and have a working clone of a builder, would be excellent.
Or, even better, an "SDK Manager"-style executable that can build a local builder.
Many B4X developers (me first) have a Windows-based background, and dealing with a Mac installation is not so straightforward.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
hi erel i am still getting error when i try to run the app on the simulator.
i downloaded the file firebase301 and moved everything inside to the lib folder.
i am using b4i 8.5 and a fresh installation of the local builder but the error i am getting is that i am missing GoogleMobileAds
what else do i need to download? (hosted builder works fine)
 

Attachments

  • 1.txt
    55 KB · Views: 93
Upvote 0

ilan

Expert
Licensed User
Longtime User
GoogleMobileAds framework is inside the zip: https://www.b4x.com/android/forum/threads/firebase-v3-00-iadmob-v4-00-facebook-9-3.144798/

Do you see it in your Mac Libs folder?
for some reason if i download the zip and then open it in my desktop (on my mac mini running SONOMA 14.2.1) the are no folders inside like if i open it on windows pc. so i had to move the zip to download folder and open it there. now i moved all files and when i run the project (debug mode)
i am getting in the b4i server success: true but in the ide i get an error:

B4i Version: 8.50
Parsing code. (0.18s)
Building folders structure. (0.43s)
Running custom action. (0.06s)
Compiling code. (0.44s)
Compiling layouts code. (0.04s)
Compiling debugger engine code. (0.02s)
Building Xcode project. (0.11s)
Preparing project for builder. (0.22s)
Project size: 1.44 MB
Sending data to remote compiler. Error
Error: An error was encountered processing the command (domain=FBSOpenApplicationServiceErrorDomain, code=1):
Simulator device returned an error for the requested operation.
The request was denied by service delegate (SBMainWorkspace).
Underlying error (domain=FBSOpenApplicationServiceErrorDomain, code=1):
The request to open "www.sagital.buysmart" failed.
The request was denied by service delegate (SBMainWorkspace).

Simulator is running Iphone 15 ios17.2
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
Do you know where this come from: "The request to open "www.sagital.buysmart" failed." ?
i am just running the b4i ide on my windows pc and the b4i server on my macmini. when i compile the app i get this error in the ide. on the server it says success: true.
the simulator is also running on the mac mini.

i searched online and saw that others also face the same issue. are your servers running SONOMA?


EDIT: if i use the hosted builder it is working fine so there is no issue with provisions file or code. i can also install the app on a real device but only when i use the hosted builder
 
Last edited:
Upvote 0
Top