My Apple Watch project is in Swift. I used CocoaPods to install MMWormhole, and I created the bridge header as described in these links:
http://bencoding.com/2015/04/15/adding-a-swift-bridge-header-manually/
How to call Objective-C code from Swift
When I created the bridge header, I aimed it at my iphone application and also looked at the extension.
Modification of header.h, I have this:
#import "MMWormhole.h"
In my application for viewing iPhone applications, I have the following:
import UIKit
import Foundation
let wormhole = MMWormhole(applicationGroupIdentifier: "group.cocoShareData", optionalDirectory: "wormhole")
and no complaint.
However, in my watch interface controller, I have the following:
import WatchKit
import Foundation
...
override func willActivate() {
// This method is called when watch view controller is about to be visible to user
super.willActivate()
let wormhole = MMWormhole(applicationGroupIdentifier: "group.cocoShareData", optionalDirectory: "wormhole")
}
And he complains about "Using an unauthorized MMWormhole identifier."
#import "MMWormholeClient.h", .
, iphone. ... .
pod 'MMWormhole', '~ > 1.2.0' podfile WatchExtension. MMWormhole WatchController
- ?
: https://www.dropbox.com/s/tsajeoopnghyl1g/MyTestCocoData.zip?dl=0