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

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.

Related

App Store not accepting my new app version written in React Native which was earlier written in Swift

I created an app using expo cli. I also created the build for the same using expo server and was trying to upload the app to the app store.
However, the previous version of the same app was written in Swift and I get this error.
As a result Apple is rejecting my app.
I have maintained the same bundle Id of the app.
Error :
Dear Developer,
We identified one or more issues with a recent submission for App Store review for your app, "My App Name". Please correct the following issues, then upload again.
ITMS-90433: Invalid Swift Support - The file libswiftAVFoundation.dylib doesn’t have the correct code signature. Make sure you’re using the correct signature, rebuild your app using the current public (GM) version of Xcode, and resubmit it. Don’t just modify the code signature of libswiftAVFoundation.dylib.
Best regards,
The App Store Team
I don't think that this solution works because when the application is built on Expo, using the command EAS, is the expo server who creates the IPA, and in one step copy the file libswiftCore.dylib (in my case) and is signing it using "codesign", then making changes in the local Xcode I don't expect solve this problem. ¿Maybe making some change that allows the project tell expo which signature must use in the swift support file?
thanks
solved by changing ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES to YES in my project configuration.
In XCode select your project -> Build Settings and look for "Always embed swift standard libraries". If NO is selected, switch to YES (for debug and release), and it's done.
It is recommended to clean your build in Xcode before building and submitting again, just to make sure you have no residues of your old build left!
Solution 2:
The other solution I came across is the version mix match. Make sure you are using correct version of expo. Otherwise just update it to the latest one.

How can I fix "Size Limit Exceeded" for my Apple Watch app?

Every time I try to submit an update for my app, I get this error:
I have literally removed all assets from the app except for the .Swift files, storyboard, and the plists. So I know for a fact that the app is not more than 50MB. Yet, I continue to get this error, no matter what else I remove from the app.
I have restarted Xcode, restarted my Mac, changed the build number, removed assets, and nothing is changing.
Anybody have any ideas?
I emailed Apple and they helped me to find the problem. My watchOS app was configured to have duplicate copies of the Swift runtime libraries, one in the watchOS app, and another copy in the watchOS app extension.
I had to go to the extension's project settings, and set Always Embed Swift Standard Libraries to No.

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.

iPhone app crash immediately after update

today my app update it has been released in the store, when updated or downloaded for the first time the app immediately crash on start.
I've tested the app on simulator and on device (the same where I've installed the update from the store) and I never experienced this problem.
My update it has been submitted with Organizer after the archiving, in the Distribute section.
Apple do not perform these types of controls before to release an app?
Anyone experienced a similar problem? I have no idea what could be the cause..
Thank you, Stefano.
Here's the best way to test a production build without deploying to the store:
Set your build Scheme to "iOS Device"
Do an Archive build
Select your archive and click Distribute
Choose "Save for Enterprise or Ad-Hoc Deployment"
Pick your code signing cert
After saving the ipa file, use Apple's iPhone Configuration Utility(*) to install it on your device
You should always perform two tests:
installing on a blank device after uninstalling your app *and any profiles in Settings -> General -> Profiles"
installing over the top of the previous version of your app, to make sure any files/preferences/etc are properly converted to the new format
(*) the iPhone Configuration Utility is mostly used for enterprise app deployment, but it's also useful for developers and is available as a free download for mac and windows at support.apple.com. You can also use iTunes instead, but it's convoluted.
As for why your app is crashing? No idea... it could be anything. Standard debugging advice applies.
The issue is related to the Framework. I had this exact error. It wasn't a case of logic as it was crashing before the AppDelegate was even called and my usage of NSMetadataQuery was much later in the life cycle than that.
It turns out that weak linking the Foundation framework was required.
Problem was solved by changing (under the Project Info in Xcode) the dependency option of the Foundation.framework from required to optional. Check for any such frameworks.
Try deleting any old versions of the app you have on your device, and reinstall. Also try on a different device, maybe with a different apple id to your developer account.
This happened to our app also, and apparently, other apps too.
Apple is aware of the problem and is currently working on a solution.
see this article:
http://techcrunch.com/2012/07/05/apple-responds-to-app-crashing-issues-has-a-dedicated-team-working-on-a-fix/
If you are using core data & you have updated database in your latest version without versioning core data in that case app crashes on launch after update.

Error when importing ad-hoc distribution of iPhone app into iTunes

I'm trying to make a ad-hoc beta distribution of my app, but get this error whenever I try and import it into iTunes:
'A provisioning profile named "embedded.mobileprovision" already exists on this computer. Do you want to replace it?'
If I click Replace, the profile named embedded.mobileprovision appears in the iTunes profiles folder, but the app doesn't appear in iTunes.
The app builds with no errors, and I have already imported my ad-hoc distribution provisioning profile into iTunes.
Has anyone else had this problem, or know how to solve it? I'm using iTunes 9.2, Xcode 3.2.3 and iPhone SDK 4.0
Thanks.
I had this problem as well, and got around it by selecting "Application Requires iPhone Environment" in the info.plist. (also known as "LSRequiresIPhoneOS" for raw key value)
I have solved this problem.
Even though, as I explained in one of my comments, I was not able to select "Application Requires iPhone Environment" when editing Info.plist, if I make a new project in Xcode this option does appear.
After finding this I copied the Info.plist file from the new project into the project I'm currently working on. I then deleted the original one, and renamed the new one as appropriate.
After updating some of the other settings to match my project (e.g. the Bundle identifier), and building the project, I could then import the app into iTunes.