@property (nonatomic, copy) void (^callEventHandler)(CTCall*);
括弧の中に ^ と宣言したい名前を書くと。はい、覚えましたね。
copy じゃなくて retain でもいいんだろうか?
関心空間作ってます。他には駅ベル, NoMeMo Busters, Ramblin, TapBar, など。 興味あるのは Mac, Newton, iPhone, Django, nginx, PHP, CakePHP, Python, Objective-C, Smalltalk, Programmer, Dog, 阪神Tigers
まぁ、自分のアプリケーションだったらコードもコントロールできるけど、使っているライブラリなんかがブロック使い出したら、iPhone OS 3向けのビルドはもう作れないと言うことですな。Tue Aug 10 12:48:26 unknown UIKitApplication:xxx[0xd506][2007]: dyld: Symbol not found: __NSConcreteStackBlock Tue Aug 10 12:48:26 unknown UIKitApplication:xxx[0xd506][2007]: Referenced from: /var/mobile/Applications/5DBA5BE0-0517-4ABB-AF15-C4006334BF74/Xxx.app/xxx Tue Aug 10 12:48:26 unknown UIKitApplication:xxx[0xd506][2007]: Expected in: /usr/lib/libSystem.B.dylib
We've completed the review of your application; however, because no audible content is played when the application is in the background, we cannot post this version to the App Store. We have included additional details below to help explain the issue. We hope you’ll consider revising and resubmitting your application.iOS4向けのマルチタスキング対応アプリケーションの一つの機能、バックグラウンドでの音声再生機能を使いたいためにフラグを付けたんだけど、それが裏目になった模様。おまえのアプリケーションは音を出して内じゃないか、と。ふーむ。
Dear review team,
My application uses audio to notify user as alarm sound. My application has to play sound in background mode, and I have no idea without adding "audio" flag.
The Apple engineer I met at the WWDC Lab said, only way to play sound is to add "audio" flag in UIBackgroundModes. If still you reject my app, please tell another way to play alarm sound in background. I think that's not fair.
- My app plays audio when the device close to the station.
- Playing audio in background needs "audio" flag in UIBackgroundModes.
Other audio application can be paused. My application is also paused until it reaches to destination, isn't it?
Please re-think about this.
Yosuke Suzukiで、その晩はMOSA entranceがあったので、その場でリジェクトくらったーとネタにしてたりしていたんですが、裏ではことが進んでおり、今朝になってメールが届いてました。
Thank you for you email and clarification. We are proceeding with the review and will update you with further status as soon as we are able.
Thank you for your continued patience.短い。あまりに短いが、そしてアメリカ人、決してわびの言葉はないが、ちゃんとスムーズに対応してくれました。
| 未対応 | iOS 4テスト済み | iOS 4対応 | |
|---|---|---|---|
| ビルドするSDK※1 | ~ SDK 3.2 | ~ SDK 3.2 | SDK 4.0 ~ |
| iOS 4で動作するか? | わからん | する | する |
| OS 3.1で動作するか? | する | する | する※2 |
| バックグラウンドで動作 | しない | しない | 可能※3 |
| サスペンドするか? | しない | しない | する |
| アプリ切り替えリスト※4に並ぶ | 並ぶ | 並ぶ | 並ぶ |
| 高速アプリ切替 | 非対応 | 非対応 | 対応 |
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sayHello:) name:HelloWorldNotification object:nil];
[[SupportCenter sharedCenter] alertError:error];
// // SharedCenter.h // Ramblin // // Created by Yosuke Suzuki on 10/03/27. // Copyright 2010 Kanshin, Inc.. All rights reserved. // #import <foundation/foundation.h> @interface SharedCenter : NSObject + (id)center:(Class)cls; + (void)registerCenter:(id)center forClass:(Class)cls; @end
//
// SharedCenter.m
// Ramblin
//
// Created by Yosuke Suzuki on 10/03/27.
// Copyright 2010 Kanshin, Inc.. All rights reserved.
//
#import "SharedCenter.h"
@implementation SharedCenter
static NSMutableDictionary *sharedCenters = nil;
+ (void)initialize {
sharedCenters = [[NSMutableDictionary alloc] init];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(closeCenters:) name:UIApplicationWillTerminateNotification object:nil];
}
+ (id)center:(Class)cls {
id center = nil;
@synchronized(sharedCenters) {
NSString *className = NSStringFromClass(cls);
center = [sharedCenters objectForKey:className];
if (!center) {
center = [[cls alloc] init];
[sharedCenters setObject:center forKey:className];
[center release];
}
}
return center;
}
+ (void)registerCenter:(id)center forClass:(Class)cls {
@synchronized(sharedCenters) {
[sharedCenters setObject:center forKey:NSStringFromClass(cls)];
}
}
+ (void)closeCenters:(NSNotification *)notification {
[sharedCenters release];
sharedCenters = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
}
@end
@interface SupportCenter : NSObject {
...
}
+ (SupportCenter *)sharedCenter; // 定義を追加
...
#import "SupportCenter.m.h"
#import "SharedCenter.h"
@implementation ActivityCenter
// 実装を追加
+ (ActivityCenter *)sharedCenter {
return [SharedCenter center:[self class]];
}
...