Dive into the world of programming languages used for app development.

Posts under General subtopic

Post

Replies

Boosts

Views

Activity

using Swift Library from c++ code - calllbacks ?
Hello, Im developing an app entirely with C++, and I need to call various swift functions because it requires the Swift library. Ive seen several posts on forums about C++ callbacks and honestly I dont understand how its done exactly. I get the general idea but I am not able to understand it and make it work. I feel like people throw vague ideas and weird function names and everything gets confusing. Could anyone give me the smallest example that works please ? Just to make sure you know what I mean, here is an example of what I want to do, but you dont have to generate the code exactly for this, I want an example that I can understand please, but the swift code has to depend on a swift library. I dont want to simply call a swift function that returns x*2 ... {1} notif.swift file : coded in swift language include <UserNotifications/UserNotifications.h> function A that show notification in swift code. {2} mainwindow.cpp file : coded in C++ language import notif.swift ?? button connected to slot/function mybuttonclicked. MainWindow::mybuttonclicked(){ std::string my_result = call function A_from_swift_file(argument_1); } --The end --- I wrote the notif.swift with '?' because I dont know how you include the swift file from your cpp code and I could not find that anywhere. Maybe it is obvious, but I would really appreciate getting some help on this, Thank you everyone
5
0
1.1k
Nov ’24
Missing libclang_rt.osx.a library on OSX
I tried to install the flang-new compiler from Homebrew on Sequoia OSX. Complex division is broken because file divdc3 is missing. This file comes from libclang_rt.osx.a, a standard LLVM library. This library is missing on OSX. program test integer, parameter :: n=2 complex(kind=8), dimension(n,n) :: V complex(kind=8) :: PER V(1,1)=cmplx(4.0,2.0) V(2,2)=cmplx(5.0,3.0) V(1,2)=0.0 V(2,1)=0.5 PER=cmplx(1.2,1.2) V(:,:)=V(:,:)/PER end program test alainhebert@Alains-MacBook-Air-2 test_complex % flang-new test.f90 Undefined symbols for architecture arm64: “___divdc3”, referenced from: __QQmain in test-fc2bb3.o ld: symbol(s) not found for architecture arm64 flang-new: error: linker command failed with exit code 1 (use -v to see invocation)
2
0
658
Dec ’24
Best way to convert HTML to PDF in a C# app on macOS?
I'm working on a cross-platform C# application that converts HTML content to PDF. The goal is to render dynamic HTML pages (including CSS and JavaScript) as high-quality, printable PDF files. Additionally, I need to support features like adding headers/footers, securing PDFs with passwords, and controlling user permissions. While everything works well on Windows, I need some help rendering consistency and handling permissions on MacOS.
6
0
868
Dec ’24
Instance methods don't work on iOS18.2.
I am using CHCSVParser in objective-c to use the CSVString extension of the Array instance method. When I installed a new app on iOS18.1.1, the correct value (@"Application,"abc,def"") was returned for both the first and second turns, but when I installed a new app on iOS18.2, the correct value was returned for the first turn, but @"" was returned for the second turn. Even when I debug with step into, I can enter the CSVString for the first turn, but I cannot enter it for the second turn and after. It's as if the instance method is not being generated. There are in-app purchases between the first and second turns, but the view controllers that are called are also the same. Is there any change between iOS18.1.1 and iOS18.2? [Code] NSArray *application = [NSArray arrayWithObjects:KEY_APPLICATION, @"abc,def", nil]; NSString *applistring = [application CSVString]; NSString *appliStr = [application CSVString]; [Debug window 18.1.1 First] application __NSArrayI * @"2 elements" 0x0000000302118c00 [0] __NSCFConstantString * @"Application" 0x00000001005deab8 [1] __NSCFConstantString * @"abc,def" 0x00000001005deb78 applistring __NSCFString * @"Application,"abc,def"" 0x0000000302f7d050 appliStr __NSCFString * @"Application,"abc,def"" 0x0000000302f706f0 [18.1.1 Second] application __NSArrayI * @"2 elements" 0x00000003021b5200 [0] __NSCFConstantString * @"Application" 0x00000001005deab8 [1] __NSCFConstantString * @"abc,def" 0x00000001005deb78 applistring __NSCFString * @"Application,"abc,def"" 0x0000000302ff6dc0 appliStr __NSCFString * @"Application,"abc,def"" 0x0000000302fa4d20 [18.2 First] sapplication __NSArrayI * @"2 elements" 0x00000003019d7e80 [0] __NSCFConstantString * @"Application" 0x00000001041c6ab8 [1] __NSCFConstantString * @"abc,def" 0x00000001041c6b78 applistring __NSCFString * @"Application,"abc,def"" 0x000000030179e430 appliStr __NSCFString * @"Application,"abc,def"" 0x000000030179e5e0 [18.2 Second] application __NSArrayI * @"2 elements" 0x00000003019679a0 [0] __NSCFConstantString * @"Application" 0x00000001041c6ab8 [1] __NSCFConstantString * @"abc,def" 0x00000001041c6b78 applistring __NSCFConstantString * @"" 0x00000001efa04768 appliStr __NSCFConstantString * @"" 0x00000001efa04768
0
0
487
Dec ’24
Inquiry about WebRTC camera access when using Chrome browser and WKWebView API on iPadOS
We are Java application developers and we have a question regarding camera access via WebRTC on iPadOS. Specifically, on iPadOS 17.1, we are encountering an issue when trying to access the camera via the WKWebView API in the Chrome browser, where an error occurs and the camera capture fails. Our investigation suggests that device access through the navigator.mediaDevices property via the WKWebView API may not work in Chrome. However, it works as expected in the Safari browser, leading us to wonder if this is a Chrome-specific limitation, or if it's due to an iPadOS setting or specification. At this point, we are unsure if this issue is related to the WKWebView and WebRTC specifications on iPadOS 17.1, or if there are specific limitations in Chrome. We would appreciate any insights or solutions regarding camera access in iPadOS 17.1 with WKWebView and WebRTC, especially in relation to Chrome.
1
0
533
Dec ’24
Xcode: Duplicate Symbols Error
Hello, I have a problem with Xcode, in C++ language. When I create a new project, I put my program in a file and click Build. It works correctly and without any problems, but when I enter a second file in the same project and click build, it says build failed. In the log it says, duplicate symbols appear.
1
0
630
Dec ’24
Is it possible to Add Reply of Push Notification from Airpod using Voice ?
We want to do below addition to iOS Mobile App. Airpod announces Push notification = which is workking now we want to use voice command that "Reply to this" and sending Reply to that notification but it is saying it is not supported in your app. So basically we need to use feature - Listen and respond to messages with AirPods Do we need to add any integration inside app for this or it will directly worked with Siri settings ? Is it possible to do in non messaging App? Is it possible to do without syncing contacts ?
0
0
481
Dec ’24