Playing the MIDI at the iOS from Delphi XE - 5 - ios

is there way how to play MIDI from the Delphi at iPhone under Delphi XE-5?
I found different articles showing how to play the MIDI under ObjectC so the iOS from version 5.0 has that support, but there is missing AudioToolbox and CoreMIDI implementation at the Delphi.
Does someone have that?

I assume you're using XE-5 because you're attempting to build a cross-platform app. You're up against a fundamental problem that some of the platforms supported by XE5 don't have MIDI at all.
However you approach this, you will need to build platform specific portions of the app to handle MIDI on iOS. The AudioToolbox API is a C API and CoreMIDI is Objective-C. Either way, you need to learn how to create Objective-C and C language bindings in Delphi, and consider writing a large part of your app using the platform's native tools and language.
A quick search with google suggests that you should be looking at the OCClass bridge.

I found that there isn't any solution so far.
So I wrote my self a tool to convert the iOS .h units into the .PAS.
It's in progress but I have already first units.
http://pjstrnad.com/my-projects/delphi-implementation-missing-ios-frameworks/
I'll appreciate if you can give me feedback. My intention is to convert completely the iOS framework so Delphi developers can use all the features of the iOS.
Thanks.

Related

Audio Unit V3 Extensions: Swift vs. Objective-C

I want to create an Audio Unit Extension for iOS using the new AU Extentions v3 framework. The documentation and sample code provided by Apple is sparse and only available in Swift format.
Does this mean it's only possible to create AU Extensions using Swift, or is it theoretically also possible using Objective-C? In other words: will I run into something blocking when I attempt to port the sample code into Objective-C?
My understanding from the session at WWDC 2015 (session 508) was that Objective-C is actually the recommended language for Audio Unit Extensions. This is because the Swift ABI has not yet stabilized, so if you built an extension with one version of Swift, and it is hosted inside an application built with a different Swift version, you'll run into problems.
This thread discusses the Swift ABI in more detail.
Update: I went back and searched asciiwwdc.com to find the comment I was thinking of (this is from session 508 of 2015 WWDC):
So if you are going to build a framework to be loaded in process on OS X, despite what we are doing here with Swift, we can't recommend that you do this on OS X because the Swift API is subject to change.
(I'm pretty sure he said ABI, but someone transcribed it as API.)

With Zxing retiring for iOS, which barcode-scanner to switch to?

I have implemented ZXing to my iOS-app, however I am questioning it's maintainability as not long ago it was announced that ZXing to iOS is retiring:
Retiring C++, Objective C code
I've also read that there might be compatibility issues with the newer phones iPhone 5S..
Also running Xcode's static code analysis on the Zxing-library reveals memory errors, I'm not sure if these errors are false positive or not, but they make me doubt Zxing even more. Further, the performance of Zxing compared to other barcode scanners feels subpar.
So my question is, what is the best alternative? I hear a lot of good stuff about Zbar, however I'm not sure how updated it is either.
iOS 7 SDK now includes a QR code reader, AVCaptureMetaDataOutput. You can read about it at
i​OS 7 NSHipster.
The latest and updated zXing for iOS 6 and later is available here... https://github.com/TheLevelUp/ZXingObjC
It's not going to retire... :)
try zbar sdk, it's compatible with ios 7 sdk
http://zbar.sourceforge.net/iphone/sdkdoc/index.html
or
http://www.scandit.com/barcode-scanner-sdk/features/platforms/
You can try PDF417.mobi. It is commercial but can be used for free for educational and non-commercial purposes.
PS. I'm working for the team that developed PDF417.mobi SDK.

UPnP library for iOS, binary light switch

I'm intermediary at Objective-C and I'm current trying to make an app that control an device using UPnP, the app is a control point and the device is a Binary Light Switch.
For UPnP I have to parse XML and I'm using UPnPx library but it seems a little old, because I don't stop getting those LLVM 5.0 error, and can't use Auto Layout. I've searched a lot for others libraries but the one that seems more easy is UPnPx. Could you guys help me with some example code for binary light switch or other libraries? Thx!
As far as I know, there are few well-known UPnP libraries can be easily integrated into your iOS project.
CyberLink4C
It is implemented by C, but with Objective-C wrapper.
Here are some examples https://github.com/cybergarage/CyberLink4C/tree/master/examples.
Platinum
It is implemented by C++, with Objective-C wrapper, too.
Beware, it is a dual license library, GPL or commercial, read http://www.plutinosoft.com/platinum/ for detail information.
UPnPx
It is implemented by Objective-C, but the performance of searching device is poor.

Embedding Mono on iOS

I want to embed mono into my iOS application. I do not want to use MonoTouch. I want to embed mono manually like this:
http://www.mono-project.com/Embedding_Mono
I've have done this successfully on windows, using the above guide and various online examples, here's a good Windows one:
https://github.com/inkdev/Embedded-Mono-Sample
However I'm having trouble getting started on iOS. I know it can be done, companies like Unity3d use it to power their game engine tech. I can't work out how to compile and link mono for iOS nor can I find any good instructions to do so. I've not found any help using search engines, they exclusively seem to turn up articles about MonoTouch (Xamarin's own commercial wrapper around embedding mono into iOS).
Here's a few more noteworthy links:
http://www.mono-project.com/Mono:ARM
http://web.archive.org/web/20090106023130/http://mono-project.com./Mono:Iphone
Is there somewhere I can get precompiled libraries and headers for Mono for iOS, so in my C code I can simply link and include?
Could someone provide and example of how to compile mono for iOS ARM CPUs?
MonoTouch provides a great wrapper around all of the iOS Objective C APIs, however you don't necessarily need all of that, as I understand it should be possible to compile and then embed mono yourself and then use pInvoke to call the few native functions you will need.
Any help would be greatly appreciated, ty!
While not exactly what you are asking for, iOS 7 has added support for scripting with JavaScript. Many people finding this post may want to use this new capability to achieve what you are attempting. Link
As Rolf said, you need to read Mono Licensing document first. Embedding mono on iOS requires special permission from Xamarin.
You need to change several build settings from XCode, and here's what I did.
Open (or Create) iOS project
Add libmonoboehm-2.0.a to your project(You can use another version of .a file)
It's in Library/Frameworks/Mono.framework/Versions/{version}/lib folder
Project -> Build Settings -> Header Search
Add path: /Library/Frameworks/Mono.frameworks/Versions/{version}/include/mono-2.0
Project -> Build Settings -> Library Search
Add path: /Library/Frameworks/Mono.frameworks/Versions/{version}/lib
And, code like this in your iOS application
#include <mono/jit/jit.h>
#include <mono/metadata/mono-config.h>
#include <mono/metadata/assembly.h>
#include <mono/metadata/environment.h>
// ....
const char* dllFile = "ABSOLUTE_PATH_TO_DLL_OR_EXE";
domain = mono_jit_init(dllFile);
mAssembly = mono_domain_assembly_open(domain, dllFile);
// ... Do whatever you want :)
Please remember. You need to get license from Xamarin when embedding mono on iOS.
Enjoy :)

Corona SDK and IBOutlets

Somebody correct me if im wrong.
There is no way (at least no supported way) to create a View/Windows based iPhone app using the Corona SDK?
I say this mainly because i see no way to work with IBOutlets (anything related to the interface builder). Which makes me believe Corona is not converting anything to Objective C, but rather converts the Lua script to C/C++.
Thanks!
The latest new feature in Corona (currently available only to subscribers) is Corona UI, which emulates most of the native UI components:
http://www.youtube.com/watch?v=9UHNSRilB-0
Note that I say "emulated." It's still not connecting to IBOutlets but it may accomplish what you want.
Corona UI supports most of the native UI components, you can also include widget_iOS for other native components of iOS otherwise you can create your own custom objects.
We can achieve it using Corona Enterprise edition. It has all the option to bridging between LUA and C/C++, lua and objective-C or LUA AND JAVA.
Corona Enterprise provides feature to work in Xcode- objective-C environment to execute same functionalities in corona apps.
http://docs.coronalabs.com/native/enterprise/index.html
Hope this helps for your question.

Resources