WatchOS app cannot start with error Domain: "IDELaunchErrorDomain Code: 15" on Xcode 11 beta - watchos-5

Want to run app under watchOS getting error under Xcode beta:
Domain: IDELaunchErrorDomain Code: 15 Failure Reason: Build and Run launch failed as the app to run does not appear to be known by the system.

My solution was to add to watch app scheme iOS target like in screenshot:
However I reported to Apple about such behavior.

This happened to me after modifying the bundle identifier.
Following these steps works for me:
Delete all the Schemes
Select the WatchKit App target and under General > Embedded Content remove the WatchKit Extension
Select the WatchKit Extension target and under Info > NSExtension > NSExtensionAttributes > WKAppBundleIdentifier make sure it is the same identifier the WatchKit App
Clean Build (just in case)
Select again the WatchKit App target and under General > Embedded Content add the WatchKit Extension
Add a new Scheme for the WatchKit App
Edit the new Scheme and in Build add a the target for: (credits to Evgeny Zrorin)
The iOS App target if your WatchKit App is a companion of an iOS App
The iOS target generated by Xcode if your WatchKit App is a standalone App
You must have 2 targets in your Scheme > Build, run your app and good luck

With your WatchKit app selected under your targets, go to 'Build Phases', expand the 'Dependencies' and the 'Embed App Extensions' sections and make sure that the correct Watchkit App Extension is present there. If you duplicated your target, it is possible that an old unrelated WatchKit extension sitting over there is creating the problem.

Related

Different paths for companion app and extension app in same App Group

I have enabled app groups in my iOS app and watchkit app. My provisioning profile is also managed by XCode. The both apps iOS app and WatchKit App runs fine.
When I try to access the path of shared container from iOS app and watchkit extension using following statement, I get different paths.
let directory: NSURL = NSFileManager.defaultManager().containerURLForSecurityApplicationGroupIdentifier("group.com.myapp")
Does anyone have any idea, what I am doing wrong here?

AppIcon does not appear on iPhone 5S iOS 11 with Xcode 9

I have a project with 5 Targets. All of these have their own .xcassets (Assets) that holds LaunchImages, AppIcons, And two more Image Assets. All of these .xcassets are given appropriate Target Membership (Properly added to Copy Bundle Resources of their own target. All of these .xcassets files have different names).
When deploying these apps on iPhone 5S, the AppIcon does not appear. I searched on google and came across this answer Missing CFBundleIconName in Xcode9 iOS11 app release. I made changes like removing CFBundleIcons and adding CFBundleIconName in my Info.plist file. But nothing seems to work.
I have also assigned AppStore iOS 1024x1024 in AppIcon for all .xcassets file.
I created ipa for AdHoc distribution and verified that appropriate AppIcon gets bundled in the archive (By extracting ipa and browsing through Payload). While distributing ipa with http://www.diawi.com the AppIcon is displayed on the device while the app is being installed (while circular progress is being shown on AppIcon on iPhone). But as the installation finishes, the AppIcon disappears.
I checked the same AdHoc build on iPhone 5 (iOS 10.x.x) and the AppIcon is displayed on it. So, what exactly is creating problem for iOS 11 on iPhone 5S.
Xcode shows AppIcon for each target and their scheme as :
My Xcode version is : Version 9.0 (9A235).Someone please confirm that I have latest stable release (not beta / GM seed).
My iPhone 5S is updated on iOS 11 via official release (I haven't installed beta of iOS 11).
Open your app icons in Preview. Go to Tools -> Assign Profile. Select sRGB IEC61966-2.1 from the dropdown. You will have to do this for all the app icons you are using for your app.
I finally found the problem with cocoapods. The shell-script located at 'Pods -> Target Support Files -> Pods-ProjectName -> Pods-ProjectName-resources.sh' contains a section (probably last) where it combines all asset catalogs into one, thus my exported archive would have assets from all the targets and results in unexpected AppIcon.
All I had to do was to remove the section in the shell script where asset catalogs were combined into one. Refer this answer if you are experiencing same issue.
What worked for me:
Go to 'TARGETS -> Build Settings' and set your icon name in 'Asset Catalog App Icon Set Name'.

How I integrate SiriExtension to my Xcode 8 app

I'm trying to add SiriExtension to my app like below steps.
I've integrated Siri capabilities in my app like this:
Adding capability:
1- In the project settings, select your iOS app target and go to Capabilities tab
2- Enable the Siri capability
Adding the extension:
1- Go to File -> New -> Target...
2- Select iOS -> Application Extension from the left pane
3- Double-click Intents Extension from right
I added Siri Usage Description key in info.plist
I added INPreferences.requestSiriAuthorization in viewDidload
But still my app name is not showing in iPhone settings->Siri->Appsupport
What's going wrong? Please help me.
I faced similar kind of problem due to deployment target setting for Intent Extension. You have to set Deployment Target according to test device's OS version. You can see my answer here

Application not running in apple watch simulator due to bundle identifier issue

I'm building an apple watch application for which i created a AppGroup and also setting the provisioning profile and the certificate.
Now the issue is while building/running the "watchkit app" xcode is throwing an error saying,
warning: Capabilities that require entitlements from “appname WatchKit Extension/appname WatchKit Extension.entitlements" may not function in the Simulator because the provisioning profile specified in your build settings (“WatchKitProfile”) has an AppID of “com.id.watchApp” which does not match your bundle identifier “com.id.watchApp.watchkitextension”.
and nothing is showing in the applewatch simulator.But application is working fine in iPhone simulator.
Even the applewatch methods are not calling WKInterfaceController.openParentApplication
One more doubt, I'm using the appgroup which already used by other members.Will this create any problem or is this the issue for this warning.
Can anyone please help me on this.
When you create an App ID, you need to regenerate your provisioning profiles because they will not have the newly created App ID listed. Xcode can do this for you automatically as a "Fix Issue" prompt.
Ensure once you have created your App ID, you add it both the main app and the watch kit app extension via the capabilities tab and click on Fix Issues until it is all ok.

Invalid WatchKit Support - The bundle contains an invalid implementation of WatchKit

I am trying to upload my apple watch app to iTunes, every time i am uploading my binary i am getting following mail from apple team.I have done with my following checklist.
Created separate App id and profile for watchapp and extension.
I have the correct set of images for apple watch as well as iOS app.
my app was initially built with Xcode 6.2 SDK and now i am submitting with 6.3 SDK.
Don't know where i am doing wrong. can anyone with experience help me out here.
We have discovered one or more issues with your recent delivery for
"XXXXX". To process your delivery, the following issues must be
corrected:
Invalid WatchKit Support - The bundle contains an invalid
implementation of WatchKit. The app may have been built or signed with
non-compliant or pre-release tools. Visit developer.apple.com for more
information.
Once these issues have been corrected, you can then redeliver the
corrected binary.
The problem for me was that the "IOS Deployment Target" in Build Settings for my WatchKit App and my WatchKit Extension were not both the same. My extension was set to 8.3 and my WatchKit App was set to 8.2. Once I set them both to 8.2 the error went away and the WatchKit App installed just fine.
While uploading apple watch app, it need to have apple watch extension into embedded binary of iOS app. But if you are habbitat to delete derived data then xcode6 will delete that target. and when you submit it to apple it will only get ios app not apple watch app.
Adding Embedded Binaries fails in Xcode
Xcode won't link framework form separate project
App crashes on device because of missing framework, works in simulator
Overview
After deleting the "DerivedData" folder (or performing a "Product > Clean") in xcode6, I cannot add CocoaTouch frameworks from another project to the "Embedded Binary" section (under General tab).
Or, Xcode hits a linker error because it cannot find a framework that if previously could.
Other symptoms
Clicking on the + under "Embedded Binaries" shows the Framework selector but selecting a framework in different project in the workspace does nothing.
I've been tearing my hair out over this one too. Here's what I've tried:
I've generated new provisioning profiles for the app, the watchkit extension, and the watchkit app, using unique bundle identifiers for each (com.example.app, com.example.app.watchkitextension & com.example.app.watchkitapp) and a distribution certificate. Downloaded, installed, and set each target to its own provisioning profile in Build Settings > Provisioning. Tried explicitly setting signing authority AND leaving it on automatic.
I've confirmed that the xcarchive contains a WatchKitSupport directory and WK file when I Show Package Contents of the archive
I've ensured that WatchKit Extension, WatchKit app, and IOS app all have matching build and version numbers
I ran Edit > Convert > To Latest Swift Syntax... on the app, extension, and watchkit targets (no source changes were required in my case..)
I've compiled from scratch, cleaned, built, & archived, rinsed and repeated, restarted system and looped again.
In my case, none of those worked. Hope one of them helps you. And if any other kind soul out there has fixed this without going bald, share the hair, man, share the hair.