I have worked on Watch app. for me everything is working as expected but when other developer is testing the watch app, iOS app data is not trasnferring and hence they are not able see anything in watch app. I don't know why is it happening why iOS app data is not transferring for them.
Related
I have a IOS application with a companion WatchOS application. I am wondering if there is a way I can communicate with the IOS application in real time while it not running as a foreground application.
The best example I can think of is how your are able to use the Spotify watch app to change songs, like songs or even change the volume of the phone while the phone is locked.
How could I implement something like this for an application that could possibly send data frequently from the watch to the phone while the phone is locked.
Watch apps can launch their companion iOS apps by messaging them:. https://developer.apple.com/documentation/watchconnectivity/wcsession/1615687-sendmessage
That won’t work if the iOS device requires unlock because it’s just booted up.
I just started WatchOS development and needed to send a message to the watch app - if it's available I use sendMessage. If the watch app is backgrounded, I use transferUserInfo. Link to code snippets. I check isReachable and isPaired (on the phone, isPaired does not exist in WatchOS).
I have found a strange problem with iCloud Sync.
Situation: I have developed an iOS, iPadOS & macOS App using SwiftUI. All three Versions share the same Codebase (macOS Version is a Catalyst iPad Version). The Project does support iCloud Sync via the NSPersistenceCloudKitContainer to sync data between all 3 devices.
Problem: iCloud Sync works perfectly between my iPhone and my Mac, but when using it with my iPad, I face a really strange problem. When creating a new CoreData Object on my iPad, it will appear on my other devices after a few Seconds, which is totally fine. However, when creating the CoreData Object on my iPhone or Mac, it will not appear on the iPad (I waited 10min). Only when closing and reopening the App, the Object will appear.
Details: I not even have to fully exit the App. It is enough to just swipe up to Application Picker and select the App again.
Question: Does anyone has an idea or something what could cause this strange error? And remember: All three devices are using the same codebase.
Make sure your have enabled Push and remote notifications per the Apple Documentation
Project Settings > Signing and Capabilities
Sync CoreData with CloudKit using
try? persistentContainer.viewContext.setQueryGenerationFrom(.current)
I have 2 Apps in the AppStore since iOS 10 and both apps have iPad, iMessage Stickers and Apple Watch apps. They have been working great up until the release of all the new Apple software, Xcode 9, iOS 11 & WatchOS 4.
The apps did not need anything changed for Swift 4 but my first error occurred when I try and submit my archived apps to the AppStore. I get error messages referencing missing app icons which isn’t the case. I found a workaround here on stack overflow by editing the archived files Plist and then submit to AppStore and this works but is inconvenient and obviously I shouldn’t have to do this.
My next problem is now when I go to use the apps on my Apple Watch they crash every time on startup. I don’t have any crashes when it’s run on the simulator so I’m thinking the only thing I’ve modified since testing is the Plist of the archive.
Here is the link to the fix I was using to allow me to successfully upload my apps.
AppStore Upload Temporary Fix
I am newer one for Apple Watch development.
Can you please provide me about how to communicate from iPhone app to Watch app and from Watch app to iPhone app ?
As I can see, there is a notification controller which is related Apple Push notification. I would like to connect to Watch app directly via Bluetooth or something. For example, As soon as iPhone app sends a MGS to Watch app, the watch app shows this MSG without any delay.
Thank you.
In order to communicate with the iPhone app from your Watch extension you can use openParentApplication(_:reply:) since Beta 2.
For the other way around I have been putting a file into the shared app group folder and monitor it from the Watch extension. If the iPhone app modifies the file the Watch extension will be notified and can act on it.
I working on the LITE version of my app. The link page to the full version seems to work on my devices but not on the simulator? Is that normal? Do I need to set an option on the simulator to allow web calls?
The App Store app does not exist in the simulator, so you can only test it on an actual device.
See this question for more info.