rabbitmq-c on iOS devices doesn't work - ios

I'm currently trying to use the rabbitmq-c library https://github.com/alanxz/rabbitmq-c on iOS. When I run my sample app on the iOS simulator, I'm able to open a socket using the amqp_socket_open . I basically get a AMQP_STATUS_OK return status from the call. However, when I run the same call on an iOS device, I get the AMQP_STATUS_SOCKET_ERROR error. I was wondering if anybody managed to open a socket through the rabbitmq-c library when run on an iOS device.
Thanks
JB

Alright. So I figured out what was wrong. The issue was that I was using "localhost" as the URI. Hence it was working on the simulator and not on device since the simulator was run on the same machine as the broker. Used a public URI instead and everything works. So rabbbitmq-c is supported on both OSX and iOS platform

Related

DriverKit driver doesn't appear in Settings when installed with iPad app

I'm working on a DriverKit driver. I have it running on macOS, including a very simple client app written in SwiftUI. Everything is working fine there. I've added iPadOS as a destination for the app as demonstrated in the WWDC video on DriverKit for iPadOS. The app builds and runs on my iPad, as expected (after a little work to conditionalize out my use of SystemExtensions.framework for installation on macOS). However, after installing and running the app on an iPad, the driver does not show up in Settings->General, nor in the app-specific settings pane triggered by the inclusion of a settings bundle in the app.
I've confirmed that the dext is indeed being included in the app bundle when built for iPadOS (in MyApp.app/SystemExtensions/com.me.MyApp.MyDriver.dext). I also can see in the build log that there's a validation step for the dext, and that seems to be succeeding.
I don't know why the driver isn't being discovered -- or in any case surfaced to the user -- when the app is installed on the iPad. Has anyone faced this problem and solved it? Are there ways to troubleshoot installation/discovery of an embedded DriverKit extensions on iOS?
Update after further debugging:
I've decided to try to get Apple's DriverKitUserClientSample sample app working on iOS, since some version of that is what was shown in the WWDC video, and it's much simpler than my driver.
I'm able to get it working on macOS, following the instructions for provisioning etc. in the page on the sample app. But I'm having the exact same problem on iPadOS where the app runs fine, but the driver doesn't show up in either general settings, nor the app's own settings page. I'm using manually, explicitly generated App IDs and provisioning profiles for the driver and container app.
Looking at the console logs on the iPad, the only thing I see that seems to have anything to do with the driver (as opposed to the container app) is this line:
debug 15:35:10.872075-0700 installd open(/var/installd/Library/Caches/com.apple.mobile.installd.staging/temp.3XF4J5/extracted/DriverKitSampleApp.app/SystemExtensions/com.openreelsoftware.dext-to-user-client.driver.dext/Info.plist,0x0,0x1b6) = 4
Not sure what that means, except that I worry that = 4 is an error code. Assuming it's the regular open() being used here, 4 is EINTR // Interrupted system call.. Not sure if that really means anything.
I've put my modified version of Apple sample project on GitHub here: https://github.com/armadsen/CommunicatingBetweenADriverKitExtensionAndAClientApp
Any help is most welcome.

Ionic 6 app getting CORS error accessing develper.google.com on iPad only

I have an ionic 6 app built with angular and cordova. I can build the app just fine for iOS and it runs on an iPhone with no issues.
But for some reason, when running the same build on an iPad I get CORS error accessing developers.google.com (I assume this is from firebase, which is in my app)
Most of the other questions I've found involve Capacitor, which I am NOT using.
Similar, but I'm not making http requests directly. I'm using AngularFire: https://forum.ionicframework.com/t/cors-issue-when-sending-request-from-ionic-to-firebase-cloud-function/185239
I've been able to repeat this scenario. If I remove the app from the iPad simulator and run it again, it works. However, if I refresh using Safari dev tools, or just re-run the app, the issue occurs. (maybe it's a timing issue?)
erorrs.
Some more information around the erorrs
The way I managed to address this was to switch from the Cordova build to the Capacitor build following the instructions here:
https://capacitorjs.com/docs/cordova/migrating-from-cordova-to-capacitor
Essentially, once I started using the newly create ios folder instead of the old platform/ios that was generated by Cordova, the error stopped.
I don't know why, but maybe this will help someone else.

Flutter IOS reading wifi name using the connectivity or wifi plugin

This question is similar this question, but slightly different.
I am trying to retrieve the name of my currently connected wifi network using the Connectivity Plugin.
This answer works perfectly fine in android, and while it sounds like it should work for iOS, I am getting an exception:
PlatformException(UNAVAILABLE, wifi name unavailable, null)
Simple ex. of the code causing the exception (with the assumption I am connected to wifi, also not using an emulator):
Connectivity connectivity = Connectivity();
print(await (connectivity.getWifiName()));
My gut is telling me it may be permission related, but honestly I am not sure.
Cheers and thanks!
Edit:
I just realized, the exception above is thrown by the wifi plugin, which I was also experimenting with.
print(await (Wifi.ssid));
Connectivity simply returns null...
I'll see if I can fix that in the plugin's code. If so, I'll get back to this answer.
However, for now, adding the capability to your project (or simply switching it ON) on Xcode will do it: (no code change in your app required)
# on your project folder, run:
open -a xcode ./ios
In Xcode 12+
On Target > Runner > Signing & Capabilities, use the + Capability button to add the Access WiFi Information capability to your project.
In older Xcode versions
On Runner > Capabilities, switch Access WiFi Information to on.
See:

Weinre server no target for debugging webview

I'm trying to debug a webview on my phone using the weinre server. It shows up as a client but not as a target. I know that 4.4 and above have chrome debugging but I need to debug in 4.3
I've tried changing the localhost to the my ip address but it doesn't work. Any ideas as to why the target is not showing up?
I've attached a screenshot for reference.
Your server (running on your windows computer?) needs to be visible to your (android?) phone. Can you browse to the weinre server on your windows computer from your android phone - just to test that you have connectivity there?
You could also try using a public weinre server, such as: http://weinre.mybluemix.net/
Also possible there is an error in your HTML or other JS somewhere that is preventing the weinre script from running. You could try running on a 4.4 device and use a real debugger to see if you can figure out why it won't work on your 4.3 device.

Why does XCode (4.5.1, Lion) require an internet connection to connect to iOS simulator?

I am developing an ios app that doesn't need an internet connection. I'm using phonegap and jquery-mobile. I'd like to develop offline, but XCode gets stuck with a status saying 'Attaching to iosproj' (iosproj is my project name). After that I cannot stop the stuck task, and have to force-quit XCode. With an internet connection however, everything works just fine. Grateful for any clues.
Edit: XCode seems to install the app fine without a network, but it gets stuck before/durimg receiving the deviceready event.
Update 1: The app runs fine on the simulator with or without the n/w. It is purely the XCode-iOS simulator interaction.
Update 2: When using phonegap (Apache cordova), there's an easy work-around to work offline. Once the project has been built and installed (with a n/w), all subsequent updates to html/js/css/img can be made directly to the www directory in the simulator's Library (under your app folder, in ~/Library/Application Support/iPhone Simulator/6.0/Applications).
The Simulator itself attempts to make an Internet connection to Apple as it launches. In particular, the itunesstored process attempts to connect to ax.init.itunes.apple.com and phobos.apple.com.
[That information comes from LittleSnitch. You would be well advised to install LittleSnitch so that you can be sure of exactly what connection is being attempted here. No one - certainly no developer - should be without it.]
If you find this troublesome (that is, if the connection failure is causing you to be unable to run your app in the Simulator at all) you should file a bug report with Apple. However, I've had no difficulty with this, so perhaps this an Xcode bug. I'd suggest first updating to Xcode 4.5.2 in case it is fixed there.

Resources