How to enable Healthkit in watch only app - swift

Does anyone know how to enable Healthkit for an independent watchos only app ?
When i go to the projects target i can't find capabilities to add to the app.
Am i missing something ?
I tried looking for it in the project but could not find anything.

From the documentation i found following information:
In the Project navigator, select the project and in the project editor, select the target.
Choose the target from the Project/Targets pop-up menu or in the Targets section of the outline view if it appears.
In the project editor, click Signing & Capabilities.
Click All or select a specific build configuration.
For example, select Debug if you want to test a capability without adding it to a release build.
Click the + Capability button (Editor > Add Capability) to open the Capability library, .
The Capability library shows only the capabilities available to the target type and your program membership. If you are not a member of the Apple Developer Program, the capabilities you can add are limited.
I think it has to do something with the last line. I have no paid membership, and in a later project got the message that not more then 10 app'id's are allowed and i have to wait 7 days. So annoying.

Go to your project and under targets select project-name WatchKit Extension. Then under Signing and Capabilities you can tap the + icon on the top left and add HealthKit.
I recommend this series. One of the projects covers getting workouts setup for Apple Watch:
https://www.udemy.com/share/101CJkAkIbcldWQw

Related

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

Missing submodule 'homeKit' Error while building sample app on XCode6 on Mavericks

I've been trying to create a sample app using HomeKit Framework. while writing the code, everything seems fine. But while building it, IDE throughs ample number of errors and a warning "Missing subModule 'HomeKit' ".
I am using Xcode6 IDE on Mavericks.
Highlight: I tried to google it, found a sample code on github & tried to build it on my IDE n guess what, same result for that too.
Any Idea?
I have used the given sample code, its great demo app.
However, you must have "Paid Apple developer account".
After that the simplest way is, login with the apple developer account in Xcode.
(Xcode Menu->Preferances->Accounts)
Give full bundle identifier like com.myCompanyName.homekitApp
Now select project in Xcode, go to targets, In "General" tab select the "Team" it will display list of teams for accounts you have login to.
Now go to Capabilities enable Homekit, Xcode will automatically configure create application id, provisioning profile for given bundle identifier.
Varify all tick mark in Capabilities for Homekit.
without a apple developer ID you can't use the HomeKit framework .
make sure that you added the capability

Configuring Your App For OpenEars in xcode 3.2.6

i configured the Openers successfully with the help of this link. http://www.politepix.com/openears/configuring.
however they are documented "Configuring Your App For OpenEars" only in Xcode 4.
i am using xcode 3.2.6 cant able to use Openears library in my application using this document .may i knoe any other document links to explain "Configuring Your App For OpenEars" only in Xcode 3.2.6.can any one help me please.i stuck in here in the document.cant able to do this process in xcode 3.2.6.this following steps i can do with xcode 3.2.6...please help me
steps that i cant do in xcode 3.2.6
Step 2: From Xcode, select your blue project icon for your app (not the OpenEarsLibrary project) in the Project Navigator and select its target under the TARGETS header in the left-hand column in the editor. Navigate to the tab Build Phases. Click “Target Dependencies”.
Click the plus button for Target Dependencies. Then select the gray OpenEarsLibrary icon in that dialog and click “Add”.
Step 3: In the same view, with the app target still selected underneath the header TARGETS in the left-hand pane of the editor window, navigate to the Build Phases pane and select “Link Binary With Libraries”
Tapping the plus button, add the OpenEars framework libOpenEarsLibrary.a found in a folder at the top called workspace
please help by converting the above step according to the xcode 3.2.6
Go to this page: http://www.politepix.com/openears/gettingstarted and find the phrase "It is still possible to download the previous version of OpenEars and its distribution contains instructions for Xcode 3 which should be very helpful for figuring out how to install current versions of OpenEars in Xcode 3". Download the previous version of OpenEars that is linked in the phrase "download the previous version of OpenEars".
Inside this download are the entire instructions for installing that older version of OpenEars in Xcode 3, saved as PDFs. The steps in the PDFs are not all the same as the instructions for the current version, but the part about linking the library (the specific part you are asking about) is still exactly the same. This explanation is in the PDF called "Configuring Your App For OpenEars.pdf" starting on page 4.
Wondering why you are still using Xcode 3 but what you need to do from memory is look for the root level targets expander icon in the tree. It looks like a red/white archery target and was usually after the resources folder. Expand it and right click what will probably be the sole target for your project. From there you will be offered the similar opportunity to add build phases.
If that doesnt exist in the contextual menu have a dig around in the Properties section for the target. It might be one of the tabs to add link dependancies.

Uploading App - Where is the Configuration Field in XCode 4?

I'm trying to upload my first app to App Store. I'm following the instructions in the iOS Provision Portal. The problem is that all the instructions and screen shots are still relevant to XCode previous version...
I'm stuck in Distribution tab in the section called Building your Application with XCode for Distribution in instruction #4 (see screen shot attached).
It says "In the Target Info window, select the ‘Build’ tab and set the ‘Configuration’ to ‘Distribution’".
Where do I find this Configuration field in XCode 4?
In left view listing files etc in xcode, go to the top and click the project name. You'll see target etc show up on right.
Xcode 4 is different from Xcode 3 so you'll have to navigate and check it out.
Update: The configuration option has been converted into schemes. You can create schemes for debug, distribution etc and once the scheme is selected you can configure that target as well.
Info on schemes

facebook integration in iphone

i have download code from http://svn.facebook.com/svnroot/platform/clients/packages/fbconnect-iphone.zip
and i done all the thing according to seen in this tutorial
still get an error when i set path for "projects/FacebookAPI/src"
like this facebookconnect undeclared still i have include all the things necessarly.
please help me........
This type of error generate in my app....
error: There is no SDK with the name or path 'iphoneos3.1.2'
Please help me.....
use this blog to the complete facebook integration
http://www.raywenderlich.com/77/how-to-post-on-facebook-with-your-iphone-app
Your project that you are working with seems to be an older one.
As iOS is updated, newer version of the SDK are released, which don't include the older SDKs. You need to change the SDK version of your project. Right click on the blue project icon in Xcode and click "Get Info". You will want to change the "Base SDK" setting to one of the available options, from 3.1.2.
Try building yur project. If this does not work, right click on your active target (or click Project Settings->Edit Active Target) and change the "Base SDK" there as well.
Try building you project. If this does not work, right click on your project icon in the lefthand panel and click "Reveal in Finder". In Finder, right click on your xcodeproj file and click "Show Package Contents". At this point, I suggest closing Xcode. Open each of the three files and search for "iphoneos3.1.2" if you find it, replace 3.1.2 with the SDK number you want to use (probably 4.2.1). Save the file(s) which you modified and then, if you closed Xcode earlier, open it.
You should be able to build now.