watchkit

Watch OS app not able to connect with iOS app

十年热恋 提交于 2020-07-18 17:44:07
问题 I am trying to connect my Watch OS app with iOS app and fetch some data but I am getting following error when I try to connect with iOS app: [WC] __28-[WCSession activateSession]_block_invoke_2 sessionReadyForInitialStateWithCompletionHandler failed due to NSXPCConnectionInterrupted __44-[WCSession updateApplicationContext:error:]_block_invoke failed due to WCErrorCodeSessionNotActivated WatchConnectivity session has not been activated. iOS app Code: - (void) startSession{ if ([WCSession

update CFBundleShortVersionString with script gives error in Xcode 11

China☆狼群 提交于 2020-06-29 05:05:12
问题 I am trying to update with this script my extension app which is inside the main app. In general when i commit with svn, the version of my main app update, now i need to update the extension version also. I am trying to use the following script but seems it gives error. any idea? this is the example: version_number=$1 build_number=$2 # echo "version_number is $version_number" echo "build_number is $build_number" pruvitInfoPlist="ServiceExtension/Info.plist" /usr/libexec/PlistBuddy -c "Set

Building an embedded framework for WatchOS and iOS in Xcode 8 with Swift 3

人盡茶涼 提交于 2020-06-27 08:45:06
问题 I am in the process of porting an all iOS + WatchOS 1 app written originally in Swift 1, to the latest Xcode 8, WatchOS 3, Swift 3. My app has an embedded framework with some common functionality that used to compile and run file for both the watchkit extension target and the ios app target. With Xcode 8 I can no longer seem to get this to work. When I try to import the framework in the watchkit extension code, I get the module not found error. Is it still possible to compile and use one

WatchOS app not detecting companion iOS app

烂漫一生 提交于 2020-05-27 12:51:06
问题 I am making an independent Apple Watch app (but with a companion iPhone app which is not necessary for the watch app to function.) The app uses WatchConnectivity to sync data between devices if iPhone companion app is installed. I am able to call session.updateApplicationContext() on the iOS app and receive session(didReceiveApplicationContext) on the Watch app. But going the other way is not possible. I always get an NSError code of 7018 which means the iOS companion app is not installed. I

How to update Watch Complication only when the watch is awake, to not use up the daily budget

我与影子孤独终老i 提交于 2020-05-10 18:49:33
问题 I have a server that keeps 2 booleans. These booleans change every 15 seconds. Whenever I wake my Apple Watch, I want the complication to show the current state. How can I do it withough exhausting the budget early on? The best way would be to fetch the newest state into the complication whenever I wake my watch. The only possible way I see would be to poll the server (either directly or via my phone) every 15 seconds. The problem is that I'd soon use up all the allotted time. It would be

Invalid Swift Support - The SwiftSupport folder is empty

故事扮演 提交于 2020-03-03 07:13:35
问题 My build is successfully uploaded but Not shown on testflight due to below issue sent by apple. App detail : I am having iPhone app in React Native and watchOS app in swift langauge. Xcode version : 11.3 Issue reported by apple - ITMS-XXXX: Invalid Swift Support - The SwiftSupport folder is empty. Rebuild your app using the current public (GM) version of Xcode and resubmit it. I searched and tried lot of things but nothing work. Also tried below link The SwiftSupport folder is missing.

Scheduling complication updates

本秂侑毒 提交于 2020-02-28 09:46:42
问题 I have a custom complication on Apple Watch that I am trying to get to update once an hour. Each hour it should ping an API endpoint and if the data has changed from the last check, the complication should be updated. Here is what I currently have that only seems to work once in a blue moon. When it DOES work, it does indeed ping my server and update the complication. It appears WatchOS just isn't calling my scheduled tasked once per hour. Is there a better standard practice that I'm missing?

Scheduling complication updates

北慕城南 提交于 2020-02-28 09:46:17
问题 I have a custom complication on Apple Watch that I am trying to get to update once an hour. Each hour it should ping an API endpoint and if the data has changed from the last check, the complication should be updated. Here is what I currently have that only seems to work once in a blue moon. When it DOES work, it does indeed ping my server and update the complication. It appears WatchOS just isn't calling my scheduled tasked once per hour. Is there a better standard practice that I'm missing?