Can I test Handoff with Simulator and one device, or can it only be tested with two physical devices?
Apple's documentation:
API Differences
Simulator APIs don’t have all the features that are available on a
device. For example, the APIs don’t offer:
Receiving and sending Apple push notifications
Privacy alerts for access to Photos, Contacts, Calendar, and Reminders
The UIBackgroundModes key
Handoff support
In addition, Simulator doesn’t support the following frameworks:
External Accessory
Media Player
Message UI
In UIKit, the UIVideoEditorController class
As far as i know and experienced, simulator doesn't give any option to enable Handoff or pair Bluetooth device.
Due to this, I believe what you asked is not possible.
Related
I host a PWA website and I am trying to integrate push notifications to my users who may have the website open in a browser tab even if their phones are inactive. You notoriously can't send Push notifications to iPhones without using Apple Push Notifications service (APNs).
Seeing as the point of firebase cloud messaging (FCM) is to outsource the message handlers, I kinda assumed it would support sending push notifications to iPhones somehow via APNs, but the information here suggests you still can't do this from the web.
https://firebase.google.com/docs/cloud-messaging/js/client
Safari and iPhones don't support Push API.
According to this answer: https://stackoverflow.com/a/64576541/2116253
Option #2 may be possible if you know the device ID token, which is apparently very hard to get and perhaps not possible anymore because Apple are trying to make it harder to obtain due to security concerns.
I think the actual sending via APNs from server side is quite easy, the problem comes with the initial setup/registration and actually granting permissions that allow notifications to arrive.
So, in short, I don't mind registering my website with Apple, agreeing to terms and obtaining keys for the purpose of interfacing with APNs, but I don't want to make and distribute a whole native iOS app just to send notifications to devices about my website.
Does anybody know the correct way to achieve this in 2022 ?
I've been researching different options for implementing messaging, specifically sending a message from the server to the client code, in React Native apps. I have found two main options: push notifications and in-app messages.
Push notifications can be implemented with services, such as Firebase and OneSignal, and work well except there is a claim that they are not very reliable and sometimes messages can get lost. The advantage of push notifications is that they work regardless of whether the app is in the foreground or background.
In-app messages can be implemented with event-bus services, such as SignalR (Azure or standalone), AWS SNS or GraphQL subscriptions. These services are pretty reliable, but this approach only works when the app is in the foreground.
However, there appears to be another option which doesn't seem to be as popular as the first two. This option involves running a native background service/process on the mobile device which participates in in-app message exchange similar to the normal in-app messaging. The background service would subscribe to SignalR or SNS or GraphQL and display a local notification on the device when it receives a message.
What are the problems with the last approach and why not prefer it over the hybrid approach (push notifications when app is in background but in-app messages when app is in foreground) which seems to be more commonly used?
Thanks!
The main limit is that mobile devices do not allow applications to keep a long-lived connection open in the background. This limit became more strongly enforced in Android 8 (Oreo) (documented here https://developer.android.com/about/versions/oreo/background#services), and this has always been true on iOS. Exceptions are made for certain VoIP applications, but generally, this rule applies to all apps.
One of the key reasons is battery life. Keeping a connection open takes a small amount of energy and if a user had dozens of apps like this, then it would be a noticeable issue. As a result, both Google and Apple have standardized around having a single connection open to the device that all notifications are delivered through.
For what it's worth, iOS notifications are actually very reliable and consistent. Android is more problematic due to modifications made by various OEMs. (documented here: https://dontkillmyapp.com/)
One workaround is that you could distribute an application outside of the Google Play Store that bypassed this limitation by requesting special permissions, however, it would still be affected by the OEM issues just like FCM is and likely worse.
I am building mobile apps for iOS and Android using PhoneGap Build. I would like to send push notifications to both types of device using the same server-side process. Is this possible?
Apple's certification process to enable push notifications is painful, much more so than anything available for Android. Do I have to use it?
GCM (Google Cloud Messaging) says it supports both operating systems, but the more I read about it - with respect to Phonegap - the less I see iOS mentioned! And sadly the GCM/Phonegap plugin doesn't support subscribing to a topic, which is a way of sending one message out to all devices in one go via a 'global' topic.
UrbanAirship and PushWhoosh seem to integrate with Phonegap, but I am forced to use their website to create my messages. GCM looks more attractive in this respect, because I can get our own ASP.NET server to talk to GCM via HTTP and thus control messages from our databases.
Main question: Are there any options for a single server-side option which can send push notifications to both iOS and Android via a single Phonegap plugin? (Ideally I would control messages from my own server, where one message can go to all Android/iOS devices in one go, and avoid as many Apple certificates as possible.~)
Our app has quite a few notification scenarios on the iPhone App which might not make sense for the Watch App. I investigated the Watch documentation to check whether notifications can be Apple Watch specific, but did not find any details. Is didReceiveRemoteNotification in the Watch code the best way to decide whether to surface a notification on the Watch?
The OS decides where to surface the notification. You have no control over it. Your iOS/Watch app can only respond if it's the lucky recipient.
No, at least for now (iOS 8.3 + Watch OS 1.0).
The phone app and its watch extension is essentially the same app. iOS will decide which notification should be presented on which device. The 3rd party app developers have zero control over this. Users can choose if all notifications from single apps are allowed to be shown on the watch.
The basic logic is: Notifications will be only delivered to the watch when the paired iPhone is locked, the screen is off, and the watch is on the wrist.
Does flex mobile supports In-App purchases, push notification etc that can run on all supported mobile platforms (iOS, Android, Blackberry playbook).
Thanks
Currently "all" native mobile features are "supported" via AIR native extensions.
You can read about AIR native extensions here
It is quite a new feature, but the point is, you can create bridge between native code SDK and your AIR application. It means, your application will be able to make calls to native SDK, and also receive events from native SDK.
Basically, if you want to present native feature in your Flex/AIR application, you create native code to achieve what you want (does require only little coding in most cases), bridge it with ActionScript interface, and package it as .ane (air native extension). This extension behaves like actionscript library you can then reuse for all your Flex projects if interested.
Link mentioned above also presents some examples - native notification is amongst them...
Since its fairly new feature, there are only few examples presented, but its not hard to code your own native extension for native feature you want - i did it myself and it worked... (here is simple native extension tutorial)
So the result is - you can present any native feature in your Flex app, as long as you have native extension for it...
Does flex mobile supports In-App
purchases,
Not integrated with the native store "procedures". I hear you can "build your own" using PayPal w/o much trouble; but It is not something I've personally investigated.
push notification
Yeah, it should. As long you're connecting to a server that supports push notifications. BlazeDS and GraniteDS use long polling to accomplish this. WebORB and LiveCycle use RTMP.
It's hard to quantify what "etc" may mean.
A note on Apple push notifications to clear up an apparent misconception from www.Flextras.com: Apple does not allow apps to bypass APNS and implement their own push notification service. Please see point 5.1 below.
From https://developer.apple.com/appstore/resources/approval/guidelines.html#push-notifications:
5. Push notifications
5.1 Apps that provide Push Notifications without using the Apple Push
Notification (APN) API will be rejected
5.2 Apps that use the APN service without obtaining a Push Application ID from
Apple will be rejected
5.3 Apps that send Push Notifications without first obtaining user consent will
be rejected
5.4 Apps that send sensitive personal or confidential information using Push
Notifications will be rejected
5.5 Apps that use Push Notifications to send unsolicited messages, or for the
purpose of phishing or spamming will be rejected
5.6 Apps cannot use Push Notifications to send advertising, promotions, or direct
marketing of any kind
5.7 Apps cannot charge users for use of Push Notifications
5.8 Apps that excessively use the network capacity or bandwidth of the APN
service or unduly burden a device with Push Notifications will be rejected
5.9 Apps that transmit viruses, files, computer code, or programs that may harm
or disrupt the normal operation of the APN service will be rejected
I am currently using this open source iOS ANE to implement in-app purchases in Flex:
http://code.google.com/p/in-app-purchase-air-ios/wiki/APIDescription
There is a push notification ANE (both Android and iOS) as well that I'm currently investigating, although it may not support remote notifications:
http://www.adobe.com/devnet/air/native-extensions-for-air/extensions/notification.html
This iOS-only ANE for push notifications is open source:
http://flashsimulations.com/2011/12/16/apple-push-notification-service-native-extension-for-adobe-air/