I have 3 targets, including the main target, WatchKit app and WatchKit extension.
The project doesn't have any build error in Xcode 9.2 but when I build it in Xcode 10 it has these error:
unable to resolve product type
'com.apple.product-type.application.watchapp' for platform 'watchos'
unable to resolve product type
'com.apple.product-type.watchkit-extension' for platform 'watchos'
I set the "supported platforms" and "base sdk" to watchOS, for both watchapp and extension. but it did not fix this issue.
also I can mention that my app cannot run in watchOS 5.
The developer of this app needs to update it to work with watchOS 5
Related
I working on a flutter app that interacts with a similar smaller version as watch app.
For Android I'm not faceing probelms. But I'm still struggling with iOS.
After I created the default flutter app and added a watch as target, I tried to test validate this. I archived my project with
flutter build ipa
and validated the created archive. For that I opened
My App > build > ios > archive > Runner.xcarchive
by double clicking on it. That opend Xcode and the 'archive manager'. Here I clicked on 'Validate'.
I also tried it by the 'Transproter' app.
Both validation ways are ending with this error:
Missing Info.plist value. A value for the key “WKApplication“, or “WKWatchKitApp“ if your project has a WatchKit App Extension target, is required in “Runner.app/Watch/XXXXX App.app“ bundle. For details, see: https://developer.apple.com/documentation/watchkit/creating_independent_watchos_apps/setting_up_a_watchos_project
I have no idea how I can fix this.
My current setup is:
Flutter 3.3.2 - channel stable
Dart 2.18.1
DevTools 2.15.0
Android Studio Dolphin | 2021.3.1
Xcode Version 14.0
What I also tried is: I created a new project with a normal iOS App (not flutter) and added a watch as target. This validated without any problems.
I'm facing the same issue when I want to archive and release a test version of my flutter project with a watch app in Xcode 14. I can run the whole project locally without any problem. I have no idea how to deal with it so far.
I tried to add the WKWatchKitApp key to the info.plist of the WatchKit App, but I got more errors saying that I'm missing the WatchKit App Extension' target. I'm confused about it since the Xcode 14 Release Notes said:
Xcode 14 includes a default template for watchOS apps that combines the WatchKit App and WatchKit App Extension targets into a single Watch App target, simplifying code, asset, and localization management. You can deploy single-target watchOS apps to watchOS 7 and later. (83222217)
I'm developing with:
Flutter 3.3.0
Dart 2.18.0
DevTools 2.15.0
Xcode 14.0
I'm wondering if it is caused by Xcode or the old version of Flutter.
Update: 20230211
I tried to upgrade my Flutter to 3.7.3, delete the build cache by running flutter clean, and clean the Xcode build folder. Then update and reinstall all the flutter and pod dependencies I'm using and recompile the whole project. The project can now archive and release to Testflight.
I have been trying and trying to enable App Check for the iOS version of my app. The Android version is working fine.
I have followed the instructions at: https://firebase.google.com/docs/app-check
Here is my build output:
flutter build ipa
💪 Building with sound null safety 💪
Archiving [bundle ID]...
Updating project for Xcode compatibility.
Upgrading Runner.xcscheme
Automatically signing iOS for device deployment using specified development team in Xcode project: [team ID]
Running pod install... 10.6s
Running Xcode build...
└─Compiling, linking and signing... 10.8s
Xcode archive done. 358.4s
Built .../build/ios/archive/Runner.xcarchive.
Building App Store IPA... 4.2s
Encountered error while creating the IPA:
error: exportArchive: "Runner.app" requires a provisioning profile with the Push Notifications and App Attest features.
Try distributing the app in Xcode: "open .../build/ios/archive/Runner.xcarchive"
My provisioning profile looks like:
My XCode Signing & Capabilities:
I used Xcode to distribute the app archive to App Store Connect, which was successful.
When my son loads the app via TestFlight on his iPhone, he cannot use any function that reads/writes to Firebase (in enforcement mode). I can see in the Firebase console that the requests from his iPhone are invalid and are being rejected.
Anyone got any suggestions? I feel like I've tried everything.
Thanks,
Luke
I want to run app that have watch target but when try to build on xCode 11.4 This error is raised
"WatchKit is not available when building for iOS Simulator."
Currently I have watch app targets in my project. But a library added to this watchapp targets was build for device only. So I cannot build the watchapp target in simulator. In my project I am using multiple build configuration. So I want to enable the watchapp while taking production buils for actual device. While running the iOS app in Simulator , the watchapp target is building along with iOS app, since it is added in the target dependancy section. So how can I avoid the watchapp target while running app in simulator ? If yes, is it possible to disable the watchapp for a particular build configuration ?
I just updated my project from 8.2. to 8.3 (using the latest xCode Version 6.3 6D570).
Now i get this error
error: WatchKit apps must have a deployment target equal to iOS 8.2
(was 8.3).
The project and all targets are set to Latest SDK 8.3
What did I miss?
I resolved this by:
Right-clicking my PROJECTNAME.xcodeproj file and choosing "Show Package Contents".
Opening project.pbxproj in a text editor.
Changing all instances of "IPHONEOS_DEPLOYMENT_TARGET = 8.3;" to "IPHONEOS_DEPLOYMENT_TARGET = 8.2;"
After this change my project compiled and ran fine.
Build successful.
I just changed the iOS Deployment Target of the Watch App Target to 8.2.
Why is that?
Ok , just select watch app -> go to build settings ->search for watchOS Deployment Target-> select lower version there based on the one of the watch you're using.