0
我已經使用appgroup在手錶應用程序和iphone應用程序之間發送數據,但我無法將數據從watchapp發送回iphone應用程序。此問題駐留在手錶操作系統中。當我在手錶中使用應用程序組時,無法將數據從手錶應用程序發送到手機os1
我的代碼是:
@implementation InterfaceController
@synthesize MedText,MedImage,selImage;
- (void)awakeWithContext:(id)context {
[super awakeWithContext:context];
// Configure interface objects here.
// Configure interface objects here.
NSUserDefaults *userDefaultVIT=[[NSUserDefaults alloc] initWithSuiteName:@"group.Medapp"];
[userDefaultVIT synchronize];
NSString *str= [userDefaultVIT stringForKey:@"MedOrgWatchVIT"];
MedText.text=str;
NSLog(@"%@",str);
i=0;
MedArr=[[NSArray alloc] init];
MedImageArr=[[NSArray alloc] init];
}