B4J Question Mac OSX problem

tufanv

Expert
Licensed User
Longtime User
Hello,

I didnt have any problem with the app review for my macos app. Lately , someitmes my app gets rejected because review team claims that app is launching to a blank page altough I am testing it on my mac , I dont see anything like that.

I am testing it on yosemite but they are testing it on high sierra I believe. Because I cant reproduce it i cant find a solution.

What should I Do about this ?

TY
 

MikeH

Well-Known Member
Licensed User
Longtime User
Couldnt you upgrade your Mac to High Sierra? If not, you could ask someone that has HS to test it for you
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Couldnt you upgrade your Mac to High Sierra? If not, you could ask someone that has HS to test it for you
I have an old one around mid 2009 , but looks like I have to do that.
In the meantime if someone has that ,I would be glad if he can send a pm to me i can send the link of the pkg file for testing.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
My macbook pro 2009 is not able to upgrade to sierra high. I would be happy if someone with the latest osx can test it for me.
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
B4X:
Mikes-Mac-mini:dropbox mike$ java -jar btcdesktop.jar

keyvaluestore._initialize (java line: 129)

java.sql.SQLException: path to '/Users/mike/Library/Containers/ct.bitcoindesktop/Data/Library/UserData/datastoremycoins': '/Users/mike' does not exist

at org.sqlite.Conn.open(Conn.java:103)

at org.sqlite.Conn.<init>(Conn.java:57)

at org.sqlite.JDBC.createConnection(JDBC.java:77)

at org.sqlite.JDBC.connect(JDBC.java:64)

at java.sql.DriverManager.getConnection(DriverManager.java:664)

at java.sql.DriverManager.getConnection(DriverManager.java:247)

at anywheresoftware.b4j.objects.SQL.Initialize2(SQL.java:56)

at anywheresoftware.b4j.objects.SQL.Initialize(SQL.java:45)

at anywheresoftware.b4j.objects.SQL.InitializeSQLite(SQL.java:117)

at ct.bitcoindesktop.keyvaluestore._initialize(keyvaluestore.java:129)

at ct.bitcoindesktop.main._appstart(main.java:494)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at anywheresoftware.b4a.BA.raiseEvent2(BA.java:90)

at anywheresoftware.b4a.BA.raiseEvent(BA.java:77)

at ct.bitcoindesktop.main.start(main.java:38)

at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)

at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)

at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)

at java.security.AccessController.doPrivileged(Native Method)

at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)

at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)

this is the error on high sierra normally I was using this to get file location and it worked till high sierra :

B4X:
Sub GetDir(SubFolder As String) As String
    Dim JO As JavaObject
    JO.InitializeStatic("anywheresoftware.b4a.BA")
    Dim PackName As String = JO.GetField("packageName")
    Dim UsrName As String = GetSystemProperty("user.name", "")
    UsrName = UsrName.Replace(" ","\ ")
    Dim LibDir As String = "/Users/" & UsrName & "/Library/Containers/" & PackName &"/Data/Library/"
  
    If Not(File.Exists(LibDir & SubFolder,"")) Then
        File.MakeDir(LibDir,SubFolder)
    End If
  
    Return LibDir & SubFolder
End Sub

maybe file system locations changed on high sierra so i get this error ?
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
According to some more digiing file locations is not changed but above error shows that maybe non standard users dir maybe ( I dont even know if that is possible ) is causing an error. Is there a safer way to locate a safer place than :
Dim LibDir As String = "/Users/" & UsrName & "/Library/Containers/" & PackName &"/Data/Library/"

like for example if the user changed home dir stg else than users/username the app crashes. Is there a way to get the home dir on osx with b4j ?
 
Last edited:
Upvote 0

MikeH

Well-Known Member
Licensed User
Longtime User
Have you tried:

B4X:
Log("User.Home Folder: " & GetSystemProperty("user.home","") )
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
Hi,
Log("User.Home Folder: " & GetSystemProperty("user.home","") )

This will probably not work with the store package, as you only have file access inside the sandbox. With the normal jar it will work fine.
I need to update my MacOS version and will report my findings here.

Jan
 
Upvote 0

MikeH

Well-Known Member
Licensed User
Longtime User
Hi,


This will probably not work with the store package, as you only have file access inside the sandbox. With the normal jar it will work fine.
I need to update my MacOS version and will report my findings here.

Jan
Pretty sure its worked for me
 
Upvote 0

tufanv

Expert
Licensed User
Longtime User
Thanks

Hi,


This will probably not work with the store package, as you only have file access inside the sandbox. With the normal jar it will work fine.
I need to update my MacOS version and will report my findings here.

Jan
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…