Dear Gnoga Community,
 
I have some problems to finish building my App for Mac OSX.
1) When I generate my App with Xcode, it launches properly and I can run it, 
the interface is working fine.
However I have an error in xcode debug which is as follows:
2020-12-16 21:40:25.169243+0100 CelticChess[3666:184089] Metal API Validation 
Enabled
2020-12-16 21:40:25.338926+0100 CelticChess[3666:184089] NSString JSONObject 
error: The data couldn’t be read because it isn’t in the correct format.
 
This is probably a MAcGap issue.
 
2) When I try to generate my App for Appstore publication (using an Apple 
Distribution Signing Certificate), the App is not running properly anymore.
I get the additional errors bellow:
2020-12-16 21:40:25.510272+0100 CelticChess[3666:184453] [] 
nw_socket_handle_socket_event [C1:2] Socket SO_ERROR [61: Connection refused]
2020-12-16 21:40:25.511026+0100 CelticChess[3666:184453] Connection 1: received 
failure notification
2020-12-16 21:40:25.511110+0100 CelticChess[3666:184453] Connection 1: failed 
to connect 1:61, reason -1
2020-12-16 21:40:25.511162+0100 CelticChess[3666:184453] Connection 1: 
encountered error(1:61)
2020-12-16 21:40:25.512691+0100 CelticChess[3666:184453] Task .<0> HTTP load 
failed, 0/0 bytes (error code: -1004 [1:61])
2020-12-16 21:40:25.512901+0100 CelticChess[3666:184453] NSURLConnection 
finished with error - code -1004
 
THis is an issue with the access to the singleton server of the Unix/Ada 
executable file I think.
Maybe this second issue is a consequence of the first one?
 
Any idea on how to solve these issues?
 
Thanks for your comments.
Best Regards
 
Fred D
 
> Message du 30/10/20 22:57
> De : "Frederic Desnoes" 
> A : "Gnoga support list" 
> Copie à : "Dubois" , "blady com" 
> Objet : Portability of ADA Gnoga code to Mac OS X App
> 
>
>  
> Hello to the Gnoga community,
>  
> I have tested the following procedure and Mac_gap code to implement a Gnoga 
> based application into MAc OSX App:
>  
> https://sourceforge.net/p/gnoga/code/ci/dev_1.5/tree/docs/native_mac_apps.md
>  
>  

Create a singleton app using Gnoga

> This requires some tuning if you want to migrate from multi_connect to 
> singleton as singleton is not a specific case of multiconnect.
> Both commands 
> "Gnoga.Application.Singleton.Initialize;"
>  
> and "Gnoga.Application.Singleton.Message_Loop;"
> should be in the same package as the GUI code.
> This is my experience.
>  
> 2. Make native support for Mac using
> make native_osx
> This command should be launched in the root directory ./gnoga-code
>  
> 3.Copy your project's individual bin, js, etc. directories to 
> deps/MacGap2/public
> Ok.
> It is not clear if the name of the project can be changed from MG to any name.
>  
> 4. Modify the index.html file in deps/MacGap2/public to contain the following 
> lines:
html
// <![CDATA[
var p = MacGap.resourcePath + "/public/bin/YOUR_GNOGA_APP_NAME"; MacGap.launch 
(p); window.open("http://127.0.0.1:8080","_self";) 
// ]]>

Note: The index.html page can be used to display some sort of "loading"
message if desired, although usually loading is instant.
It works for me but loading is not instant in the App.

5. From the deps directory run - open MacGap2/MG.xcodeproj/
It works fine, I'm using XCode 11.4.1 on Mac OSX 10.15.4 (Catalina).
Mac OS deployment target for the project is 10.9, and Xcode asks me if I want 
to update to recommended settings.
If I do so, it generates many errors in the code, so I stayed with current 
settings.

6. Build as you would any native Mac OS X application for XCode
This is what I'm doing, I get a working App. I'm struggling with the background 
color of the main window which appears black whereas my original background 
color was white.
Appart from that, the interface is functionnal, all buttons and mous clicks are 
operationnal, the look of the interface is fine.
> Let me know what you think.
> I will update you on my progress.
>  
> Best regards
>  
> Frederic Desnoes
_______________________________________________
Gnoga-list mailing list
Gnoga-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gnoga-list

Reply via email to