I'm Developing an application. It is the Communication Between iPhone Application and a Hardware Device. in that Hardware Device We are Having SIM Card and also that Hardware Device had Some Settings. Now my task is i have to Modify that Settings By using our Mobile Application through Messaging.
I am able to send that settings in Some Message format to that Hardware Device.after settings have been changed the Hardware Device sends a response message. Now my Problem is I am Unable to Read that Message From My Application.
I Google it in Some Sources they Said:
1.There is No possibility of Reading SMS By using our Application.
2.It is Possible Only if the Phone is Jail Breaked.
is there any alternative solution for this i.e Communication Between iPhone Application and a Hardware Device through only messaging.
Why the hell are you using SMS for this? why not run a server socket on the device that listens for connection, implement some way of connecting remotely (intermediate server, static ip, UPNP etc) and connect and send data via TCP.
As you have stated in you question iOS doesn't allow you access to SMS, you will not be able to achieve this, unless the iPhone is jailbroken, there might be some level of access then but I have no experience with jailbreaking.
Related
I'm trying to write a super-simple iOS app, just for personal use (i.e. it doesn't need to conform to any App Store stuff). I want it to do the following. Assume it's installed on two devices, both of which I own/control.
On device 1, it has a button that, when pressed, will immediately cause a notification to pop up on device 2.
I'm fine with hardcoding specific apple IDs, device IDs, whatever; it's also fine if this only works when the two devices are on the same LAN/Wifi. all I want is for the above to work, in the easiest way possible, and preferably without needing anything to run on a server anywhere.
How simply can this be implemented? I've set up a whole push-notification system once before, but that required some server-side stuff. Hoping to be able to do this without any of that.
====
Update: realized I wasn't clear in the original post that I need the notification on Device 2 to pop up whether or not the app is currently open/running on that device.
I think that what you are searching for is multipeer connectivity framework.
The Multipeer Connectivity framework supports the discovery of
services provided by nearby devices and supports communicating with
those services through message-based data, streaming data, and
resources (such as files). In iOS, the framework uses infrastructure
Wi-Fi networks, peer-to-peer Wi-Fi, and Bluetooth personal area
networks for the underlying transport. In macOS and tvOS, it uses
infrastructure Wi-Fi, peer-to-peer Wi-Fi, and Ethernet.
source: https://developer.apple.com/documentation/multipeerconnectivity.
You can also check those tutorials:
https://www.ralfebert.com/ios-app-development/multipeer-connectivity/
https://www.hackingwithswift.com/example-code/networking/how-to-create-a-peer-to-peer-network-using-the-multipeer-connectivity-framework
Send sms to port is a way (the protocol will become SMS): https://developer.apple.com/documentation/foundation/nsportmessage
and Maybe Firebase Remote Config can help you: you can get your data in FCM remote config (key-value) from the app :
https://www.raywenderlich.com/17323848-firebase-remote-config-tutorial-for-ios
https://firebase.google.com/docs/remote-config/get-started?platform=ios
, and you can modify your data whenever you want, and the app can fetch it.
I have similar requirements, and it seems like APNS (Apple Push Notification Service) is required for this because it's one of the only ways to 'activate' an application that is in the background.
As a result, then the question is how to make APNS as painless as possible? It seems like combining Firebase Cloud Messaging (or FCM) (to manage APNS / sending messages), and Firebase Functions (to help manage FCM server-side requirements) is one decent option.
I'm creating an app that wants to get a JSON file (or any data) from a local web server (MAMP) without having an iPhone that communicate with the server, parse the file and eventually sends the data to the Apple Watch via WatchConnectivity.
Is it possible? Is there any API I could use?
I've seen that the apps preinstalled on the watch can get data from the Web even with the iPhone turned off relaying only on the Wifi connectivity: for example the Apple's map app.
Thank you!
Yes. As long as the watch has a network connection, via WiFi, cellular or through Bluetooth to its paired phone then you can use networking features, such as URLSession to fetch web content.
Even if the watch does piggyback off the phone's network connection, it doesn't require you to send data "through" the companion app.
As of watchOS 6.0, watch apps don't need a phone companion app; they can be stand-alone.
I've searched google and only found the MultipeerConnectivity framework in iOS but I don't know how I could make it work for my specific case.
The flow of what I want to do is like this:
Enable personal hotspot in iOS
Connect to hotspot from a raspberry pie
Once client is connected, send a message string from the iOS app.
Assuming that the raspberry pie connection is already sorted out (We're using a static SSID and Password for the hotspot)
The questions that come up are:
Which framework should I use (assuming there is one already)?
do I need to explicitly advertise the iOS device from the app?
How do I get notified when the raspberry connects to the phone?
How do I send a message to the connected client?
Although I never developed anything for Pi, I developed net service browsing for iOS devices, so can give an answer.
When you connect to iPhone hotspot, it's a usual WiFi connection, so here you can use Bonjour protocol (mDNS) to discover devices one another.
Run Avahi mDNS service on Pi, and discover it on iPhone.
Here is how to run Avahi on Pi.
Here is how to discover mDNS net service on iPhone.
After net service is discovered with NSNetServiceBrowser, you'll have IP address and port of your Pi available on your iPhone, so you can connect to it.
If you are trying to setup a IoT system, it may be useful to look into various cloud offerings to facilitate messaging between devices. Personally I have used AWS IoT core services in the past, and it is relatively easy to setup messaging between devices.
I am not sure what your exact use case is for this setup, but using a cloud based service to setup messaging between devices will remove the requirement to connect directly between devices via hotspot (the pi still needs some internet connection), and could make it easier to enable multiple devices and app clients in the system.
Can a website help a user communicate with nearby devices via bluetooth/WLAN without downloading software?
User requests that something be done on their device (which could be, for example a wirelessly connected printer or a bluetooth keyboard).
The site, which contains a repository of relevant actions, sends specific instructions for that device to the user's own machine.
Those instructions are then relayed to the correct device (with the user's permission) via the user's device's WLAN or existing bluetooth connection.
Part 3 is what I'm not sure of - is there a mechanism by which a website can contribute to a wireless/bluetooth connection held locally?
It is not possible. User browser can't interact with hardware for wireless networking.
You should force user to install some custom software to do this.
You would have to submit the "commands" first, then have the device make requests to the website server, i.e., check for any pending "commands" for the device, and then process them locally. A website is not "thing" that can directly interface with a hardware device.
I must develop simple p2p connect app.
I have:
1) database server and simple code server (php, nodejs or similar);
2) two ios devices.
How can I connected p2p between devices (for stream voice, text and photos)? Connect by IP and random port impossible, because devices may has same IP.
Devices can located on local network or different countries. Devices can has wi-fi or 3g/4g internet. Devices can stationed behind a router, NAT.
I know about openpeer and others SIP services. But it's very big and excessive solution. WebRTC not work in ios and webView. Multipeer connectivity framework is local devices only.
My question: how I can detect, uniquely identify devices and connect his?
I see this as:
1) On start app and has internet (wi-fi or 3g/4g) - application send message to server.
2) Server get from app: IP, UUID or other (I dont know what information is necessary and sufficient for p2p connect).
3) Server register app and device in DB and return now on-line devices list.
4) App get from server list of other devices.
5) User select other devices and click "connect".
6) Server send to two devices the necessary for connection information (IP's, UUID's and other).
7) Devices start connect p2p, receiving and transmitting data without using a server.
I see this arhitecture (openpeer) image:.
It is good. I must know HOW "finder" server detect devices and what data is necessary and sufficient for connect?
For me unacceptable using third-party servers for connect.
Please help me find the solution.