diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/accounts/ACAccountStore.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/accounts/ACAccountStore.java index d4b5c7375..a404629b9 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/accounts/ACAccountStore.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/accounts/ACAccountStore.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public NSObjectProtocol observeDidChange(final Runnable block) { + public NSObject observeDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/assetslibrary/ALAssetsLibrary.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/assetslibrary/ALAssetsLibrary.java index 9ff585593..86170df20 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/assetslibrary/ALAssetsLibrary.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/assetslibrary/ALAssetsLibrary.java @@ -43,7 +43,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeChanged(ALAssetsLibrary object, final VoidBlock2 block) { + public static NSObject observeChanged(ALAssetsLibrary object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/audiotoolbox/AudioComponent.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/audiotoolbox/AudioComponent.java index 9cb856f48..38ba4484e 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/audiotoolbox/AudioComponent.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/audiotoolbox/AudioComponent.java @@ -46,7 +46,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeRegistrationsChanged(final Runnable block) { + public static NSObject observeRegistrationsChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(RegistrationsChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAsset.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAsset.java index 3c15f7079..24d54ca1f 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAsset.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAsset.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeDurationDidChange(AVAsset object, final VoidBlock1 block) { + public static NSObject observeDurationDidChange(AVAsset object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DurationDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -63,7 +63,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeChapterMetadataGroupsDidChange(AVAsset object, final VoidBlock1 block) { + public static NSObject observeChapterMetadataGroupsDidChange(AVAsset object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ChapterMetadataGroupsDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -74,7 +74,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeMediaSelectionGroupsDidChange(AVAsset object, final VoidBlock1 block) { + public static NSObject observeMediaSelectionGroupsDidChange(AVAsset object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(MediaSelectionGroupsDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAssetTrack.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAssetTrack.java index 0f336304a..4943a2a1f 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAssetTrack.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAssetTrack.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeTrackAssociationsDidChange(AVAssetTrack object, final VoidBlock1 block) { + public static NSObject observeTrackAssociationsDidChange(AVAssetTrack object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TrackAssociationsDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioEngine.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioEngine.java index c39f7cf73..108e4a40a 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioEngine.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioEngine.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeConfigurationChange(AVAudioEngine object, final VoidBlock1 block) { + public static NSObject observeConfigurationChange(AVAudioEngine object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ConfigurationChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioSession.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioSession.java index c452357f3..d26c3cf05 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioSession.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioSession.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeInterruption(final VoidBlock1 block) { + public static NSObject observeInterruption(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(InterruptionNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -69,7 +69,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeRouteChange(final VoidBlock1 block) { + public static NSObject observeRouteChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(RouteChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -85,7 +85,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeMediaServicesWereLost(final Runnable block) { + public static NSObject observeMediaServicesWereLost(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(MediaServicesWereLostNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -96,7 +96,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeMediaServicesWereReset(final Runnable block) { + public static NSObject observeMediaServicesWereReset(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(MediaServicesWereResetNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -107,7 +107,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeSilenceSecondaryAudioHint(final VoidBlock1 block) { + public static NSObject observeSilenceSecondaryAudioHint(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(SilenceSecondaryAudioHintNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioUnitComponent.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioUnitComponent.java index 966336639..96627ff31 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioUnitComponent.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVAudioUnitComponent.java @@ -54,7 +54,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeTagsDidChange(AVAudioUnitComponent object, final VoidBlock1 block) { + public static NSObject observeTagsDidChange(AVAudioUnitComponent object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TagsDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureDevice.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureDevice.java index e5781567c..3f45aab23 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureDevice.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureDevice.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeWasConnected(final VoidBlock1 block) { + public static NSObject observeWasConnected(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WasConnectedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -63,7 +63,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeWasDisconnected(final VoidBlock1 block) { + public static NSObject observeWasDisconnected(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WasDisconnectedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -74,7 +74,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeSubjectAreaDidChange(AVCaptureDevice object, final VoidBlock1 block) { + public static NSObject observeSubjectAreaDidChange(AVCaptureDevice object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(SubjectAreaDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureInputPort.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureInputPort.java index 848b2fff3..55902db01 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureInputPort.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureInputPort.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeFormatDescriptionDidChange(AVCaptureInputPort object, final VoidBlock1 block) { + public static NSObject observeFormatDescriptionDidChange(AVCaptureInputPort object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(FormatDescriptionDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureSession.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureSession.java index 05c5c1350..cdba9d477 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureSession.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVCaptureSession.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeRuntimeError(AVCaptureSession object, final VoidBlock2 block) { + public static NSObject observeRuntimeError(AVCaptureSession object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(RuntimeErrorNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -68,7 +68,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeDidStartRunning(AVCaptureSession object, final VoidBlock1 block) { + public static NSObject observeDidStartRunning(AVCaptureSession object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidStartRunningNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -79,7 +79,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeDidStopRunning(AVCaptureSession object, final VoidBlock1 block) { + public static NSObject observeDidStopRunning(AVCaptureSession object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidStopRunningNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -90,7 +90,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeWasInterrupted(AVCaptureSession object, final VoidBlock2 block) { + public static NSObject observeWasInterrupted(AVCaptureSession object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WasInterruptedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -109,7 +109,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeInterruptionEnded(AVCaptureSession object, final VoidBlock1 block) { + public static NSObject observeInterruptionEnded(AVCaptureSession object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(InterruptionEndedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVPlayerItem.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVPlayerItem.java index c07e151a9..f5767c9ec 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVPlayerItem.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVPlayerItem.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeTimeJumped(AVPlayerItem object, final VoidBlock1 block) { + public static NSObject observeTimeJumped(AVPlayerItem object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TimeJumpedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -63,7 +63,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeDidPlayToEndTime(AVPlayerItem object, final VoidBlock1 block) { + public static NSObject observeDidPlayToEndTime(AVPlayerItem object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidPlayToEndTimeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -74,7 +74,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 4.3 and later. */ - public static NSObjectProtocol observeFailedToPlayToEndTime(AVPlayerItem object, final VoidBlock2 block) { + public static NSObject observeFailedToPlayToEndTime(AVPlayerItem object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(FailedToPlayToEndTimeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -90,7 +90,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observePlaybackStalled(AVPlayerItem object, final VoidBlock1 block) { + public static NSObject observePlaybackStalled(AVPlayerItem object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(PlaybackStalledNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -101,7 +101,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeNewAccessLogEntry(AVPlayerItem object, final VoidBlock1 block) { + public static NSObject observeNewAccessLogEntry(AVPlayerItem object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NewAccessLogEntryNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { @@ -112,7 +112,7 @@ public void invoke(NSNotification notification) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeNewErrorLogEntry(AVPlayerItem object, final VoidBlock1 block) { + public static NSObject observeNewErrorLogEntry(AVPlayerItem object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NewErrorLogEntryNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification notification) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVSampleBufferDisplayLayer.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVSampleBufferDisplayLayer.java index f875ae8a4..4127e5907 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVSampleBufferDisplayLayer.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/avfoundation/AVSampleBufferDisplayLayer.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeFailedToDecode(AVSampleBufferDisplayLayer object, final VoidBlock2 block) { + public static NSObject observeFailedToDecode(AVSampleBufferDisplayLayer object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(FailedToDecodeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/cloudkit/CKContainer.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/cloudkit/CKContainer.java index 463ea3a43..6535c61bf 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/cloudkit/CKContainer.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/cloudkit/CKContainer.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeAccountChanged(final Runnable block) { + public static NSObject observeAccountChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(AccountChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/contacts/CNContactStore.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/contacts/CNContactStore.java index 3de2476da..f05988f95 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/contacts/CNContactStore.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/contacts/CNContactStore.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeDidChange(CNContactStore object, final Runnable block) { + public static NSObject observeDidChange(CNContactStore object, final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSManagedObjectContext.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSManagedObjectContext.java index 96498b4d8..713093789 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSManagedObjectContext.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSManagedObjectContext.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeWillSave(NSManagedObject object, final VoidBlock1 block) { + public static NSObject observeWillSave(NSManagedObject object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillSaveNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -56,7 +56,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeDidSave(NSManagedObject object, final VoidBlock2 block) { + public static NSObject observeDidSave(NSManagedObject object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidSaveNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeObjectsDidChange(NSManagedObject object, final VoidBlock3 block) { + public static NSObject observeObjectsDidChange(NSManagedObject object, final VoidBlock3 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ObjectsDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSPersistentStoreCoordinator.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSPersistentStoreCoordinator.java index 94310de49..c4a453597 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSPersistentStoreCoordinator.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coredata/NSPersistentStoreCoordinator.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeStoresWillChange(NSPersistentStoreCoordinator object, final VoidBlock2 block) { + public static NSObject observeStoresWillChange(NSPersistentStoreCoordinator object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NotificationKeys.CoordinatorStoresWillChange(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -61,7 +61,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeStoresDidChange(NSPersistentStoreCoordinator object, final VoidBlock2 block) { + public static NSObject observeStoresDidChange(NSPersistentStoreCoordinator object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NotificationKeys.CoordinatorStoresDidChange(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -77,7 +77,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeWillRemoveStore(NSPersistentStoreCoordinator object, final VoidBlock1 block) { + public static NSObject observeWillRemoveStore(NSPersistentStoreCoordinator object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NotificationKeys.CoordinatorWillRemoveStore(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -88,7 +88,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidImportUbiquitousContentChanges(NSPersistentStoreCoordinator object, final VoidBlock2 block) { + public static NSObject observeDidImportUbiquitousContentChanges(NSPersistentStoreCoordinator object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NotificationKeys.DidImportUbiquitousContentChanges(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFLocale.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFLocale.java index f162d73b8..d986cfb2a 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFLocale.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFLocale.java @@ -43,7 +43,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeCurrentLocaleDidChange(final Runnable block) { + public static NSObject observeCurrentLocaleDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(CurrentLocaleDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFTimeZone.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFTimeZone.java index 318f54ded..19e5b96df 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFTimeZone.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/corefoundation/CFTimeZone.java @@ -43,7 +43,7 @@ /**//**/ { public static class Notifications { - public NSObjectProtocol observeSystemTimeZoneDidChangeNotification(final Runnable block) { + public NSObject observeSystemTimeZoneDidChangeNotification(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(SystemTimeZoneDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMSampleBuffer.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMSampleBuffer.java index 978ea2726..b3b29b13b 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMSampleBuffer.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMSampleBuffer.java @@ -47,7 +47,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeDataBecameReady(CMSampleBuffer object, final VoidBlock1 block) { + public static NSObject observeDataBecameReady(CMSampleBuffer object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DataBecameReadyNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -58,7 +58,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeDataFailed(CMSampleBuffer object, final VoidBlock2 block) { + public static NSObject observeDataFailed(CMSampleBuffer object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DataFailedNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeInhibitOutputUntil(CMSampleBuffer object, final VoidBlock2 block) { + public static NSObject observeInhibitOutputUntil(CMSampleBuffer object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(InhibitOutputUntilConduitNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -86,7 +86,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeResetOutput(CMSampleBuffer object, final VoidBlock1 block) { + public static NSObject observeResetOutput(CMSampleBuffer object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ResetOutputConduitNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -97,7 +97,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.3 and later. */ - public static NSObjectProtocol observeUpcomingOutputPTSRangeChanged(CMSampleBuffer object, final VoidBlock4 block) { + public static NSObject observeUpcomingOutputPTSRangeChanged(CMSampleBuffer object, final VoidBlock4 block) { return NSNotificationCenter.getDefaultCenter().addObserver(UpcomingOutputPTSRangeChangedConduitNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -115,7 +115,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeBufferConsumed(CMSampleBuffer object, final VoidBlock2> block) { + public static NSObject observeBufferConsumed(CMSampleBuffer object, final VoidBlock2> block) { return NSNotificationCenter.getDefaultCenter().addObserver(BufferConsumedConsumerNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMTimebase.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMTimebase.java index 4b519bbd4..899c5b3ee 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMTimebase.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coremedia/CMTimebase.java @@ -47,7 +47,7 @@ public static class Notifications { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeEffectiveRateChanged(CMTimebase object, final VoidBlock2 block) { + public static NSObject observeEffectiveRateChanged(CMTimebase object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(EffectiveRateChangedNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -65,7 +65,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeTimeJumped(CMTimebase object, final VoidBlock2 block) { + public static NSObject observeTimeJumped(CMTimebase object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TimeJumpedNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTSubscriber.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTSubscriber.java index c49b4be07..098f3d6f2 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTSubscriber.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTSubscriber.java @@ -43,7 +43,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeTokenRefreshed(CTSubscriber object, final VoidBlock1 block) { + public static NSObject observeTokenRefreshed(CTSubscriber object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TokenRefreshedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTTelephonyNetworkInfo.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTTelephonyNetworkInfo.java index a9628c25b..c750a9d38 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTTelephonyNetworkInfo.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretelephony/CTTelephonyNetworkInfo.java @@ -40,7 +40,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeRadioAccessTechnologyDidChange(CTTelephonyNetworkInfo object, final VoidBlock1 block) { + public static NSObject observeRadioAccessTechnologyDidChange(CTTelephonyNetworkInfo object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(RadioAccessTechnologyDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretext/CTFontManager.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretext/CTFontManager.java index dcedf9c5f..a5909dd32 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/coretext/CTFontManager.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/coretext/CTFontManager.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeRegisteredFontsChanged(final Runnable block) { + public static NSObject observeRegisteredFontsChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(RegisteredFontsChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/corevideo/CVPixelBufferPool.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/corevideo/CVPixelBufferPool.java index 4ceed7bdb..91b40fbdd 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/corevideo/CVPixelBufferPool.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/corevideo/CVPixelBufferPool.java @@ -46,7 +46,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeFreeBuffer(CVPixelBufferPool object, final VoidBlock1 block) { + public static NSObject observeFreeBuffer(CVPixelBufferPool object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(FreeBufferNotification(), object.as(NSObject.class), NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/eventkit/EKEventStore.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/eventkit/EKEventStore.java index a467cb704..bf6ce1d98 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/eventkit/EKEventStore.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/eventkit/EKEventStore.java @@ -46,7 +46,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeChanged(EKEventStore object, final VoidBlock1 block) { + public static NSObject observeChanged(EKEventStore object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/externalaccessory/EAAccessoryManager.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/externalaccessory/EAAccessoryManager.java index bd068b370..4aba11b4a 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/externalaccessory/EAAccessoryManager.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/externalaccessory/EAAccessoryManager.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeAccessoryDidConnect(EAAccessoryManager object, final VoidBlock3 block) { + public static NSObject observeAccessoryDidConnect(EAAccessoryManager object, final VoidBlock3 block) { return NSNotificationCenter.getDefaultCenter().addObserver(AccessoryDidConnectNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -64,7 +64,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeAccessoryDidDisconnect(EAAccessoryManager object, final VoidBlock2 block) { + public static NSObject observeAccessoryDidDisconnect(EAAccessoryManager object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(AccessoryDidDisconnectNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundle.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundle.java index fe06f4287..62f5e07ab 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundle.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundle.java @@ -47,7 +47,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeDidLoad(NSBundle object, final VoidBlock2> block) { + public static NSObject observeDidLoad(NSBundle object, final VoidBlock2> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidLoadNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @SuppressWarnings("unchecked") @Override diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundleResourceRequest.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundleResourceRequest.java index 6a691e2e8..31025d9ee 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundleResourceRequest.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSBundleResourceRequest.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeLowDiskSpace(final Runnable block) { + public static NSObject observeLowDiskSpace(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(LowDiskSpaceNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSCalendar.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSCalendar.java index 99272bcae..60d9371c0 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSCalendar.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSCalendar.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeDayChanged(final Runnable block) { + public static NSObject observeDayChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DayChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSDate.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSDate.java index 3047f9ad6..e8f46c8fd 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSDate.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSDate.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeSystemClockDidChange(final Runnable block) { + public static NSObject observeSystemClockDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(SystemClockDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSExtensionContext.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSExtensionContext.java index becce9e76..8546de3b5 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSExtensionContext.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSExtensionContext.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 8.2 and later. */ - public static NSObjectProtocol observeHostWillEnterForeground(NSExtensionContext object, final VoidBlock1 block) { + public static NSObject observeHostWillEnterForeground(NSExtensionContext object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(HostWillEnterForegroundNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -61,7 +61,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.2 and later. */ - public static NSObjectProtocol observeHostDidEnterBackground(NSExtensionContext object, final VoidBlock1 block) { + public static NSObject observeHostDidEnterBackground(NSExtensionContext object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(HostDidEnterBackgroundNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.2 and later. */ - public static NSObjectProtocol observeHostWillResignActive(NSExtensionContext object, final VoidBlock1 block) { + public static NSObject observeHostWillResignActive(NSExtensionContext object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(HostWillResignActiveNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -83,7 +83,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.2 and later. */ - public static NSObjectProtocol observeHostDidBecomeActive(NSExtensionContext object, final VoidBlock1 block) { + public static NSObject observeHostDidBecomeActive(NSExtensionContext object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(HostDidBecomeActiveNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileHandle.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileHandle.java index 9133c12be..e087ac73a 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileHandle.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileHandle.java @@ -47,7 +47,7 @@ /**/implements NSSecureCoding/**/ { public static class Notifications { - public static NSObjectProtocol observeReadCompletion(NSFileHandle object, final VoidBlock2 block) { + public static NSObject observeReadCompletion(NSFileHandle object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ReadCompletionNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -60,7 +60,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeReadToEndOfFileCompletion(NSFileHandle object, final VoidBlock2 block) { + public static NSObject observeReadToEndOfFileCompletion(NSFileHandle object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ReadToEndOfFileCompletionNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -73,7 +73,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeConnectionAccepted(NSFileHandle object, final VoidBlock2 block) { + public static NSObject observeConnectionAccepted(NSFileHandle object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ConnectionAcceptedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -86,7 +86,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDataAvailable(NSFileHandle object, final VoidBlock1 block) { + public static NSObject observeDataAvailable(NSFileHandle object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DataAvailableNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileManager.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileManager.java index a4ae9ecac..e8c8a4ed0 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileManager.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSFileManager.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeUbiquityIdentityDidChange(final Runnable block) { + public static NSObject observeUbiquityIdentityDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UbiquityIdentityDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSHTTPCookieStorage.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSHTTPCookieStorage.java index 1e3a4d4c0..5890fd5c1 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSHTTPCookieStorage.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSHTTPCookieStorage.java @@ -47,7 +47,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeAcceptPolicyChanged(NSHTTPCookieStorage object, final VoidBlock1 block) { + public static NSObject observeAcceptPolicyChanged(NSHTTPCookieStorage object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(AcceptPolicyChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -55,7 +55,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeCookiesChanged(NSHTTPCookieStorage object, final VoidBlock1 block) { + public static NSObject observeCookiesChanged(NSHTTPCookieStorage object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(CookiesChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSLocale.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSLocale.java index f8a1099aa..d130e4bf9 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSLocale.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSLocale.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 2.0 and later. */ - public static NSObjectProtocol observeCurrentLocaleDidChange(final Runnable block) { + public static NSObject observeCurrentLocaleDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(CurrentLocaleDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSMetadataQuery.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSMetadataQuery.java index f24a904e0..f1af128bd 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSMetadataQuery.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSMetadataQuery.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidStartGathering(NSMetadataQuery object, final VoidBlock2 block) { + public static NSObject observeDidStartGathering(NSMetadataQuery object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidStartGatheringNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -61,7 +61,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeGatheringProgress(NSMetadataQuery object, final VoidBlock2 block) { + public static NSObject observeGatheringProgress(NSMetadataQuery object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(GatheringProgressNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidFinishGathering(NSMetadataQuery object, final VoidBlock2 block) { + public static NSObject observeDidFinishGathering(NSMetadataQuery object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidFinishGatheringNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -83,7 +83,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidUpdate(NSMetadataQuery object, final VoidBlock2 block) { + public static NSObject observeDidUpdate(NSMetadataQuery object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidUpdateNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSNotificationCenter.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSNotificationCenter.java index f778fce79..9bcd70e16 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSNotificationCenter.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSNotificationCenter.java @@ -86,7 +86,7 @@ public void removeObserver(NSObject observer, String name, NSObject object) { /** * @since Available in iOS 4.0 and later. */ - public NSObjectProtocol addObserver(String name, NSObject object, NSOperationQueue queue, @Block VoidBlock1 block) { + public NSObject addObserver(String name, NSObject object, NSOperationQueue queue, @Block VoidBlock1 block) { return addObserver(new NSString(name), object, queue, block); } /**/ diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSPort.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSPort.java index e825f9c47..2a1d5eadd 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSPort.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSPort.java @@ -47,7 +47,7 @@ /**/implements NSCoding/**/ { public static class Notifications { - public static NSObjectProtocol observeDidBecomeInvalid(NSPort object, final VoidBlock1 block) { + public static NSObject observeDidBecomeInvalid(NSPort object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeInvalidNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSProcessInfo.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSProcessInfo.java index 68b580ee6..9691c0533 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSProcessInfo.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSProcessInfo.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observePowerStateDidChange(final Runnable block) { + public static NSObject observePowerStateDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(PowerStateDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSThread.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSThread.java index 67f19039e..e8fad1b9c 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSThread.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSThread.java @@ -47,7 +47,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeWillBecomeMultiThreaded(final Runnable block) { + public static NSObject observeWillBecomeMultiThreaded(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillBecomeMultiThreadedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -55,7 +55,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidBecomeSingleThreaded(final Runnable block) { + public static NSObject observeDidBecomeSingleThreaded(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeSingleThreadedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -63,7 +63,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillExit(NSThread object, final VoidBlock1 block) { + public static NSObject observeWillExit(NSThread object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillExitNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSTimeZone.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSTimeZone.java index 7e1f845cd..c15b90670 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSTimeZone.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSTimeZone.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 2.0 and later. */ - public static NSObjectProtocol observeDidChange(final Runnable block) { + public static NSObject observeDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSURLCredentialStorage.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSURLCredentialStorage.java index da6206530..a4fdd540b 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSURLCredentialStorage.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSURLCredentialStorage.java @@ -47,7 +47,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeChanged(NSURLCredentialStorage object, final VoidBlock1 block) { + public static NSObject observeChanged(NSURLCredentialStorage object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUbiquitousKeyValueStore.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUbiquitousKeyValueStore.java index 3f5a15d06..d17ec90eb 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUbiquitousKeyValueStore.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUbiquitousKeyValueStore.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidChangeExternally(NSUbiquitousKeyValueStore object, final VoidBlock3> block) { + public static NSObject observeDidChangeExternally(NSUbiquitousKeyValueStore object, final VoidBlock3> block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeExternallyNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUndoManager.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUndoManager.java index d111bed5f..719bfa504 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUndoManager.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUndoManager.java @@ -50,7 +50,7 @@ public static class Notifications { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeCheckpoint(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeCheckpoint(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(CheckpointNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -61,7 +61,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeWillUndoChange(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeWillUndoChange(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillUndoChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeWillRedoChange(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeWillRedoChange(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillRedoChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -83,7 +83,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeDidUndoChange(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeDidUndoChange(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidUndoChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -94,7 +94,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeDidRedoChange(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeDidRedoChange(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidRedoChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -105,7 +105,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeDidOpenUndoGroup(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeDidOpenUndoGroup(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidOpenUndoGroupNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -116,7 +116,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeWillCloseUndoGroup(NSUndoManager object, final VoidBlock2 block) { + public static NSObject observeWillCloseUndoGroup(NSUndoManager object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillCloseUndoGroupNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -133,7 +133,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeDidCloseUndoGroup(NSUndoManager object, final VoidBlock1 block) { + public static NSObject observeDidCloseUndoGroup(NSUndoManager object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidCloseUndoGroupNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUserDefaults.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUserDefaults.java index 62660b35b..70d6177b6 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUserDefaults.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/foundation/NSUserDefaults.java @@ -47,7 +47,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeDidChange(NSUserDefaults object, final VoidBlock1 block) { + public static NSObject observeDidChange(NSUserDefaults object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/gamecontroller/GCController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/gamecontroller/GCController.java index d483a6c04..a3c5c29e3 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/gamecontroller/GCController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/gamecontroller/GCController.java @@ -42,7 +42,7 @@ /**/implements GCDevice/**/ { public static class Notifications { - public static NSObjectProtocol observeDidConnect(final VoidBlock1 block) { + public static NSObject observeDidConnect(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidConnectNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -50,7 +50,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidDisconnect(final VoidBlock1 block) { + public static NSObject observeDidDisconnect(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidDisconnectNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/healthkit/HKHealthStore.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/healthkit/HKHealthStore.java index 19e3b0338..82d106701 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/healthkit/HKHealthStore.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/healthkit/HKHealthStore.java @@ -42,7 +42,7 @@ public static class Notifications { /** * @since Available in iOS 8.2 and later. */ - public static NSObjectProtocol observeUserPreferencesDidChange(HKHealthStore object, final VoidBlock1 block) { + public static NSObject observeUserPreferencesDidChange(HKHealthStore object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(UserPreferencesDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMediaLibrary.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMediaLibrary.java index 4a407ec26..176e76051 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMediaLibrary.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMediaLibrary.java @@ -42,7 +42,7 @@ /**/implements NSSecureCoding/**/ { public static class Notifications { - public static NSObjectProtocol observeDidChange(final Runnable block) { + public static NSObject observeDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMoviePlayerController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMoviePlayerController.java index 91eb8ada0..71a8f7ab4 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMoviePlayerController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMoviePlayerController.java @@ -48,7 +48,7 @@ public static class Notifications { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeIsPreparedToPlayDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeIsPreparedToPlayDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(IsPreparedToPlayDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -59,7 +59,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeDurationAvailable(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeDurationAvailable(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DurationAvailableNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -70,7 +70,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeMediaTypesAvailable(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeMediaTypesAvailable(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(MediaTypesAvailableNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -81,7 +81,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeNaturalSizeAvailable(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeNaturalSizeAvailable(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NaturalSizeAvailableNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -92,7 +92,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeDidEnterFullscreen(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeDidEnterFullscreen(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidEnterFullscreenNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -103,7 +103,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeDidExitFullscreen(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeDidExitFullscreen(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidExitFullscreenNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -114,7 +114,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeIsAirPlayVideoActiveDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeIsAirPlayVideoActiveDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(IsAirPlayVideoActiveDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -125,7 +125,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeLoadStateDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeLoadStateDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(LoadStateDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -136,7 +136,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeNowPlayingMovieDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeNowPlayingMovieDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NowPlayingMovieDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -144,7 +144,7 @@ public void invoke (NSNotification a) { } }); } - public static NSObjectProtocol observePlaybackDidFinish(MPMoviePlayerController object, final VoidBlock3 block) { + public static NSObject observePlaybackDidFinish(MPMoviePlayerController object, final VoidBlock3 block) { return NSNotificationCenter.getDefaultCenter().addObserver(PlaybackDidFinishNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -158,7 +158,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observePlaybackStateDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observePlaybackStateDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(PlaybackStateDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -169,7 +169,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeScalingModeDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeScalingModeDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ScalingModeDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -180,7 +180,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeThumbnailImageRequestDidFinish(MPMoviePlayerController object, final VoidBlock2 block) { + public static NSObject observeThumbnailImageRequestDidFinish(MPMoviePlayerController object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ThumbnailImageRequestDidFinishNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -191,7 +191,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeWillEnterFullscreen(MPMoviePlayerController object, final VoidBlock2 block) { + public static NSObject observeWillEnterFullscreen(MPMoviePlayerController object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillEnterFullscreenNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -202,7 +202,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeWillExitFullscreen(MPMoviePlayerController object, final VoidBlock2 block) { + public static NSObject observeWillExitFullscreen(MPMoviePlayerController object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillExitFullscreenNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -213,7 +213,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeNewSourceTypeAvailable(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeNewSourceTypeAvailable(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(SourceTypeAvailableNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -224,7 +224,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeReadyForDisplayDidChange(MPMoviePlayerController object, final VoidBlock1 block) { + public static NSObject observeReadyForDisplayDidChange(MPMoviePlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ReadyForDisplayDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -235,7 +235,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeTimedMetadataUpdated(MPMoviePlayerController object, final VoidBlock2> block) { + public static NSObject observeTimedMetadataUpdated(MPMoviePlayerController object, final VoidBlock2> block) { return NSNotificationCenter.getDefaultCenter().addObserver(TimedMetadataUpdatedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @SuppressWarnings("unchecked") @Override diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMusicPlayerController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMusicPlayerController.java index 40b7f43a4..396e2ea72 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMusicPlayerController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPMusicPlayerController.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeIsPreparedToPlayDidChange(MPMusicPlayerController object, final VoidBlock1 block) { + public static NSObject observeIsPreparedToPlayDidChange(MPMusicPlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(IsPreparedToPlayDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -53,7 +53,7 @@ public void invoke (NSNotification a) { } }); } - public static NSObjectProtocol observePlaybackStateDidChange(MPMusicPlayerController object, final VoidBlock1 block) { + public static NSObject observePlaybackStateDidChange(MPMusicPlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(PlaybackStateDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -61,7 +61,7 @@ public void invoke (NSNotification a) { } }); } - public static NSObjectProtocol observeNowPlayingItemDidChange(MPMusicPlayerController object, final VoidBlock1 block) { + public static NSObject observeNowPlayingItemDidChange(MPMusicPlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(NowPlayingItemDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -69,7 +69,7 @@ public void invoke (NSNotification a) { } }); } - public static NSObjectProtocol observeVolumeDidChange(MPMusicPlayerController object, final VoidBlock1 block) { + public static NSObject observeVolumeDidChange(MPMusicPlayerController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(VolumeDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPVolumeView.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPVolumeView.java index ff917bec9..2affdb26c 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPVolumeView.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/mediaplayer/MPVolumeView.java @@ -45,7 +45,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeWirelessRoutesAvailableDidChange(MPVolumeView object, final VoidBlock1 block) { + public static NSObject observeWirelessRoutesAvailableDidChange(MPVolumeView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WirelessRoutesAvailableDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -56,7 +56,7 @@ public void invoke (NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeWirelessRouteActiveDidChange(MPVolumeView object, final VoidBlock1 block) { + public static NSObject observeWirelessRouteActiveDidChange(MPVolumeView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WirelessRouteActiveDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/messageui/MFMessageComposeViewController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/messageui/MFMessageComposeViewController.java index 341900367..2cf0526ec 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/messageui/MFMessageComposeViewController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/messageui/MFMessageComposeViewController.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeTextMessageAvailabilityDidChange(final VoidBlock1 block) { + public static NSObject observeTextMessageAvailabilityDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(TextMessageAvailabilityDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNConnection.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNConnection.java index a34c2695b..8e9620968 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNConnection.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNConnection.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeStatusDidChange(NEVPNConnection object, final VoidBlock1 block) { + public static NSObject overseStatusDidChange(NEVPNConnection object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(StatusDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNManager.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNManager.java index 8996f009f..d805986f5 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNManager.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/networkextension/NEVPNManager.java @@ -44,7 +44,7 @@ public static class Notifications { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeConfigurationChange(final Runnable block) { + public static NSObject observeConfigurationChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(ConfigurationChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/newsstandkit/NKIssue.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/newsstandkit/NKIssue.java index b4cc32a89..d76f8ac34 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/newsstandkit/NKIssue.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/newsstandkit/NKIssue.java @@ -41,7 +41,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeDownloadCompleted(NKIssue object, final VoidBlock1 block) { + public static NSObject observeDownloadCompleted(NKIssue object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DownloadCompletedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/passkit/PKPassLibrary.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/passkit/PKPassLibrary.java index 71c8a21ea..9886197c5 100644 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/passkit/PKPassLibrary.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/passkit/PKPassLibrary.java @@ -44,7 +44,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeDidChange(final VoidBlock1 block) { + public static NSObject observeDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { @@ -57,7 +57,7 @@ public void invoke (NSNotification a) { } }); } - public static NSObjectProtocol observeRemotePaymentPassesDidChange(final VoidBlock1 block) { + public static NSObject observeRemotePaymentPassesDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(RemotePaymentPassesDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke (NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/NSTextStorage.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/NSTextStorage.java index 316593b07..857567a41 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/NSTextStorage.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/NSTextStorage.java @@ -53,7 +53,7 @@ public static class Notifications { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeWillProcessEditing(NSTextStorage object, final VoidBlock1 block) { + public static NSObject observeWillProcessEditing(NSTextStorage object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillProcessEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -64,7 +64,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeDidProcessEditing(NSTextStorage object, final VoidBlock1 block) { + public static NSObject observeDidProcessEditing(NSTextStorage object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidProcessEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIAccessibility.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIAccessibility.java index 5794e18cd..6db805cbe 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIAccessibility.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIAccessibility.java @@ -52,7 +52,7 @@ public static class Notifications { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeElementFocused(final Runnable block) { + public static NSObject observeElementFocused(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.ElementFocusedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -63,7 +63,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeAnnouncementDidFinish(final VoidBlock2 block) { + public static NSObject observeAnnouncementDidFinish(final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.AnnouncementDidFinishNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -77,7 +77,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeMonoAudioStatusDidChange(final Runnable block) { + public static NSObject observeMonoAudioStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.MonoAudioStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -88,7 +88,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeClosedCaptioningStatusDidChange(final Runnable block) { + public static NSObject observeClosedCaptioningStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.ClosedCaptioningStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -99,7 +99,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeInvertColorsStatusDidChange(final Runnable block) { + public static NSObject observeInvertColorsStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.InvertColorsStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -110,7 +110,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 6.0 and later. */ - public static NSObjectProtocol observeGuidedAccessStatusDidChange(final Runnable block) { + public static NSObject observeGuidedAccessStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.GuidedAccessStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -121,7 +121,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeVoiceOverStatusChanged(final Runnable block) { + public static NSObject observeVoiceOverStatusChanged(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.VoiceOverStatusChangedNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -132,7 +132,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeBoldTextStatusDidChange(final Runnable block) { + public static NSObject observeBoldTextStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.BoldTextStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -143,7 +143,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeGrayscaleStatusDidChange(final Runnable block) { + public static NSObject observeGrayscaleStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.GrayscaleStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -154,7 +154,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeReduceTransparencyStatusDidChange(final Runnable block) { + public static NSObject observeReduceTransparencyStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.ReduceTransparencyStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -165,7 +165,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeReduceMotionStatusDidChange(final Runnable block) { + public static NSObject observeReduceMotionStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.ReduceMotionStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -176,7 +176,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeDarkerSystemColorsStatusDidChange(final Runnable block) { + public static NSObject observeDarkerSystemColorsStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.DarkerSystemColorsStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -187,7 +187,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeSwitchControlStatusDidChange(final Runnable block) { + public static NSObject observeSwitchControlStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.SwitchControlStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -198,7 +198,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeSpeakSelectionStatusDidChange(final Runnable block) { + public static NSObject observeSpeakSelectionStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.SpeakSelectionStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -209,7 +209,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeSpeakScreenStatusDidChange(final Runnable block) { + public static NSObject observeSpeakScreenStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.SpeakScreenStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -220,7 +220,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 9.0 and later. */ - public static NSObjectProtocol observeShakeToUndoDidChange(final Runnable block) { + public static NSObject observeShakeToUndoDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UIAccessibilityGlobals.ShakeToUndoDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIApplication.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIApplication.java index 2b940c9ae..657a73590 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIApplication.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIApplication.java @@ -53,7 +53,7 @@ public static class Notifications { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeDidEnterBackground(final Runnable block) { + public static NSObject observeDidEnterBackground(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidEnterBackgroundNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -64,7 +64,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeWillEnterForeground(final Runnable block) { + public static NSObject observeWillEnterForeground(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillEnterForegroundNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidFinishLaunching(final VoidBlock1 block) { + public static NSObject observeDidFinishLaunching(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidFinishLaunchingNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -84,7 +84,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidBecomeActive(final Runnable block) { + public static NSObject observeDidBecomeActive(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeActiveNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -92,7 +92,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillResignActive(final Runnable block) { + public static NSObject observeWillResignActive(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillResignActiveNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -100,7 +100,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidReceiveMemoryWarning(final Runnable block) { + public static NSObject observeDidReceiveMemoryWarning(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidReceiveMemoryWarningNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -108,7 +108,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillTerminate(final Runnable block) { + public static NSObject observeWillTerminate(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillTerminateNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -116,7 +116,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeSignificantTimeChange(final Runnable block) { + public static NSObject observeSignificantTimeChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(SignificantTimeChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -124,7 +124,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillChangeStatusBarOrientation(final VoidBlock1 block) { + public static NSObject observeWillChangeStatusBarOrientation(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillChangeStatusBarOrientationNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -133,7 +133,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidChangeStatusBarOrientation(final VoidBlock1 block) { + public static NSObject observeDidChangeStatusBarOrientation(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeStatusBarOrientationNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -142,7 +142,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillChangeStatusBarFrame(final VoidBlock1 block) { + public static NSObject observeWillChangeStatusBarFrame(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillChangeStatusBarFrameNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -151,7 +151,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidChangeStatusBarFrame(final VoidBlock1 block) { + public static NSObject observeDidChangeStatusBarFrame(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeStatusBarFrameNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -163,7 +163,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeBackgroundRefreshStatusDidChange(final Runnable block) { + public static NSObject observeBackgroundRefreshStatusDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(BackgroundRefreshStatusDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -174,7 +174,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeProtectedDataWillBecomeUnavailable(final Runnable block) { + public static NSObject observeProtectedDataWillBecomeUnavailable(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(ProtectedDataWillBecomeUnavailableNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -185,7 +185,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 4.0 and later. */ - public static NSObjectProtocol observeProtectedDataDidBecomeAvailable(final Runnable block) { + public static NSObject observeProtectedDataDidBecomeAvailable(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(ProtectedDataDidBecomeAvailableNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -196,7 +196,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeContentSizeCategoryDidChange(final VoidBlock1 block) { + public static NSObject observeContentSizeCategoryDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ContentSizeCategoryDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -208,7 +208,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 7.0 and later. */ - public static NSObjectProtocol observeUserDidTakeScreenshot(final Runnable block) { + public static NSObject observeUserDidTakeScreenshot(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(UserDidTakeScreenshotNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDevice.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDevice.java index 34ae2fb5f..6788daf3e 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDevice.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDevice.java @@ -50,7 +50,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeOrientationDidChange(final Runnable block) { + public static NSObject observeOrientationDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(OrientationDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -61,7 +61,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeBatteryStateDidChange(final Runnable block) { + public static NSObject observeBatteryStateDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(BatteryStateDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -72,7 +72,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeBatteryLevelDidChange(final Runnable block) { + public static NSObject observeBatteryLevelDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(BatteryLevelDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -83,7 +83,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.0 and later. */ - public static NSObjectProtocol observeProximityStateDidChange(final Runnable block) { + public static NSObject observeProximityStateDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(ProximityStateDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDocument.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDocument.java index 56ed183a3..c48f1ecbd 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDocument.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIDocument.java @@ -53,7 +53,7 @@ public static class Notifications { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeStateChanged(UIDocument object, final VoidBlock1 block) { + public static NSObject observeStateChanged(UIDocument object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(StateChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIMenuController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIMenuController.java index 378d0450a..0c35b88f0 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIMenuController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIMenuController.java @@ -50,7 +50,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeWillShowMenu(final Runnable block) { + public static NSObject observeWillShowMenu(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillShowMenuNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -58,7 +58,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidShowMenu(final Runnable block) { + public static NSObject observeDidShowMenu(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidShowMenuNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -66,7 +66,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeWillHideMenu(final Runnable block) { + public static NSObject observeWillHideMenu(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(WillHideMenuNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -74,7 +74,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidHideMenu(final Runnable block) { + public static NSObject observeDidHideMenu(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidHideMenuNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -82,7 +82,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeMenuFrameDidChange(final Runnable block) { + public static NSObject observeMenuFrameDidChange(final Runnable block) { return NSNotificationCenter.getDefaultCenter().addObserver(MenuFrameDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIPasteboard.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIPasteboard.java index 504feaf52..6127699e0 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIPasteboard.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIPasteboard.java @@ -50,7 +50,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeChanged(UIPasteboard object, final VoidBlock2 block) { + public static NSObject observeChanged(UIPasteboard object, final VoidBlock2 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ChangedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -64,7 +64,7 @@ public void invoke(NSNotification a) { }); } - public static NSObjectProtocol observeRemoved(UIPasteboard object, final VoidBlock1 block) { + public static NSObject observeRemoved(UIPasteboard object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(RemovedNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIScreen.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIScreen.java index 400834eb0..7f5b22a96 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIScreen.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIScreen.java @@ -53,7 +53,7 @@ public static class Notifications { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeDidConnect(final VoidBlock1 block) { + public static NSObject observeDidConnect(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidConnectNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -64,7 +64,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeDidDisconnect(final VoidBlock1 block) { + public static NSObject observeDidDisconnect(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidDisconnectNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -75,7 +75,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 3.2 and later. */ - public static NSObjectProtocol observeModeDidChange(final VoidBlock1 block) { + public static NSObject observeModeDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ModeDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -86,7 +86,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeBrightnessDidChange(final VoidBlock1 block) { + public static NSObject observeBrightnessDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(BrightnessDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITableView.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITableView.java index 6a17de677..c463160b2 100644 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITableView.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITableView.java @@ -50,7 +50,7 @@ /**/implements NSCoding, UIDataSourceTranslating, UISpringLoadedInteractionSupporting/**/ { public static class Notifications { - public static NSObjectProtocol observeSelectionDidChange(UITableView object, final VoidBlock1 block) { + public static NSObject observeSelectionDidChange(UITableView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(SelectionDidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextField.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextField.java index 5fead2f94..14c3900b6 100644 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextField.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextField.java @@ -52,7 +52,7 @@ /**/implements UITextInput, NSCoding, UIContentSizeCategoryAdjusting, UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting/**/ { public static class Notifications { - public static NSObjectProtocol observeDidBeginEditing(UITextField object, final VoidBlock1 block) { + public static NSObject observeDidBeginEditing(UITextField object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBeginEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -60,7 +60,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidEndEditing(UITextField object, final VoidBlock1 block) { + public static NSObject observeDidEndEditing(UITextField object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidEndEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -68,7 +68,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeTextDidChange(UITextField object, final VoidBlock1 block) { + public static NSObject observeTextDidChange(UITextField object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextInputMode.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextInputMode.java index 0285c425c..9272f96ba 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextInputMode.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextInputMode.java @@ -53,7 +53,7 @@ public static class Notifications { /** * @since Available in iOS 4.2 and later. */ - public static NSObjectProtocol observeCurrentModeDidChange(final VoidBlock1 block) { + public static NSObject observeCurrentModeDidChange(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(CurrentInputModeDidChange(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextView.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextView.java index 3114b2443..4b2ba29d0 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextView.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UITextView.java @@ -52,7 +52,7 @@ /**/implements UITextInput, UIContentSizeCategoryAdjusting, UITextDraggable, UITextDroppable, UITextPasteConfigurationSupporting/**/ { public static class Notifications { - public static NSObjectProtocol observeDidBeginEditing(UITextView object, final VoidBlock1 block) { + public static NSObject observeDidBeginEditing(UITextView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBeginEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -60,7 +60,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeTextDidChangeEditing(UITextView object, final VoidBlock1 block) { + public static NSObject observeTextDidChangeEditing(UITextView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidChangeNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -68,7 +68,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidEndEditing(UITextView object, final VoidBlock1 block) { + public static NSObject observeDidEndEditing(UITextView object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidEndEditingNotification(), object, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIViewController.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIViewController.java index 280aec36c..fa6f713a4 100755 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIViewController.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIViewController.java @@ -55,7 +55,7 @@ public static class Notifications { /** * @since Available in iOS 8.0 and later. */ - public static NSObjectProtocol observeDidEnterBackground(UIViewController object, final VoidBlock1 block) { + public static NSObject observeDidEnterBackground(UIViewController object, final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(ShowDetailTargetDidChangeNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIWindow.java b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIWindow.java index 7d59ea7fa..8e9b49ec1 100644 --- a/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIWindow.java +++ b/compiler/cocoatouch/src/main/java/org/robovm/apple/uikit/UIWindow.java @@ -50,7 +50,7 @@ /**//**/ { public static class Notifications { - public static NSObjectProtocol observeDidBecomeVisible(final VoidBlock1 block) { + public static NSObject observeDidBecomeVisible(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeVisibleNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -58,7 +58,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidBecomeHidden(final VoidBlock1 block) { + public static NSObject observeDidBecomeHidden(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeHiddenNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -66,7 +66,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidBecomeKey(final VoidBlock1 block) { + public static NSObject observeDidBecomeKey(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidBecomeKeyNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -74,7 +74,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeDidResignKey(final VoidBlock1 block) { + public static NSObject observeDidResignKey(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(DidResignKeyNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -82,7 +82,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeKeyboardWillShow(final VoidBlock1 block) { + public static NSObject observeKeyboardWillShow(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardWillShowNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -90,7 +90,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeKeyboardDidShow(final VoidBlock1 block) { + public static NSObject observeKeyboardDidShow(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardDidShowNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -98,7 +98,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeKeyboardWillHide(final VoidBlock1 block) { + public static NSObject observeKeyboardWillHide(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardWillHideNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -106,7 +106,7 @@ public void invoke(NSNotification a) { } }); } - public static NSObjectProtocol observeKeyboardDidHide(final VoidBlock1 block) { + public static NSObject observeKeyboardDidHide(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardDidHideNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -117,7 +117,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeKeyboardWillChangeFrame(final VoidBlock1 block) { + public static NSObject observeKeyboardWillChangeFrame(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardWillChangeFrameNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { @@ -128,7 +128,7 @@ public void invoke(NSNotification a) { /** * @since Available in iOS 5.0 and later. */ - public static NSObjectProtocol observeKeyboardDidChangeFrame(final VoidBlock1 block) { + public static NSObject observeKeyboardDidChangeFrame(final VoidBlock1 block) { return NSNotificationCenter.getDefaultCenter().addObserver(KeyboardDidChangeFrameNotification(), null, NSOperationQueue.getMainQueue(), new VoidBlock1() { @Override public void invoke(NSNotification a) { diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/TrampolineCompiler.java b/compiler/compiler/src/main/java/org/robovm/compiler/TrampolineCompiler.java index 79059dcfa..6faecbbd1 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/TrampolineCompiler.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/TrampolineCompiler.java @@ -31,6 +31,7 @@ import org.robovm.compiler.clazz.Clazz; import org.robovm.compiler.config.Config; import org.robovm.compiler.llvm.*; +import org.robovm.compiler.plugin.CompilerPlugin; import org.robovm.compiler.trampoline.Anewarray; import org.robovm.compiler.trampoline.Checkcast; import org.robovm.compiler.trampoline.FieldAccessor; @@ -609,6 +610,15 @@ private SootMethod resolveMethod(SootClass clazz, String name, String desc) { c = !c.isInterface() && c.hasSuperclass() ? c.getSuperclass() : null; } } + + // allow compiler plugin to resolve method + // its possible that method was added during de-sugaring + for (CompilerPlugin plugin: config.getCompilerPlugins()) { + SootMethod method = plugin.resolveMethod(config, clazz, name, desc); + if (method != null) + return method; + } + return null; } diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/config/Config.java b/compiler/compiler/src/main/java/org/robovm/compiler/config/Config.java index abc2f175f..9754e31c2 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/config/Config.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/config/Config.java @@ -1284,6 +1284,9 @@ public Builder archs(List archs) { } config.archs.clear(); config.archs.addAll(archs); + + // initialization of sliceArch is needed for IBXcodeProjects where build() is not invoked + config.sliceArch = config.archs.isEmpty() ? null : config.archs.get(0); return this; } diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/AbstractCompilerPlugin.java b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/AbstractCompilerPlugin.java index 75006692d..31294db86 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/AbstractCompilerPlugin.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/AbstractCompilerPlugin.java @@ -29,6 +29,7 @@ import org.robovm.compiler.llvm.Function; import org.robovm.llvm.ObjectFile; +import soot.SootClass; import soot.SootMethod; /** @@ -63,6 +64,11 @@ public void afterClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder) public void afterMethod(Config config, Clazz clazz, SootMethod method, ModuleBuilder moduleBuilder, Function function) throws IOException {} + @Override + public SootMethod resolveMethod(Config config, SootClass sootClass, String name, String desc) { + return null; + } + @Override public void afterClassDependenciesResolved(Config config, Clazz clazz) {} diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/CompilerPlugin.java b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/CompilerPlugin.java index 79d9a2560..ecbe84d3c 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/CompilerPlugin.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/CompilerPlugin.java @@ -111,6 +111,20 @@ public abstract void afterClass(Config config, Clazz clazz, ModuleBuilder module public abstract void afterMethod(Config config, Clazz clazz, SootMethod method, ModuleBuilder moduleBuilder, Function function) throws IOException; + /** + * Called by TrampolineCompiler when method is not resolved but this method might be added + * by de-sugaring plugin (for ex. ByteBuffer methods are added during class compilation. + * but next session when ByteBuffer is not processed -- other classes don't know about + * these changes + * + * @param config the current {@link Config}. + * @param sootClass to resolve method in + * @param name name of method + * @param desc its signature + * @return generated method + */ + public abstract SootMethod resolveMethod(Config config, SootClass sootClass, String name, String desc); + /** * Called after dependencies resolved and added to the list. It is the moment when all work with * clazz is finished (machine code generation pending) and all associated resources might be released diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/desugar/ByteBufferJava9ApiPlugin.java b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/desugar/ByteBufferJava9ApiPlugin.java index be755edba..60f12b906 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/plugin/desugar/ByteBufferJava9ApiPlugin.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/plugin/desugar/ByteBufferJava9ApiPlugin.java @@ -19,6 +19,7 @@ import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Collections; import java.util.List; @@ -42,6 +43,9 @@ public class ByteBufferJava9ApiPlugin extends AbstractCompilerPlugin { private static final String JAVA_NIO_BYTEBUFFER = "java.nio.ByteBuffer"; private static final String JAVA_NIO_BUFFER = "java.nio.Buffer"; private static final String ARG_KEY_ENABLE_PLUGIN = "enableJdk9ByteBufferApi"; + private static final List ZERO_PARAM_METHODS = Arrays.asList( + "flip", "clear", "mark", "reset", "rewind"); + private static final List INT_PARAM_METHODS = Arrays.asList("position", "limit"); private Boolean enabled; @Override @@ -71,19 +75,43 @@ public void beforeClass(Config config, Clazz clazz, ModuleBuilder moduleBuilder) if (isEnabled(config) && isAcceptableByteBuffer(clazz.getSootClass())) { // injects JDK9 compatible trampolines SootClass sootClass = clazz.getSootClass(); - injectMethod(sootClass, "flip", false); - injectMethod(sootClass, "clear", false); - injectMethod(sootClass, "mark", false); - injectMethod(sootClass, "reset", false); - injectMethod(sootClass, "rewind", false); - injectMethod(sootClass, "position", true); - injectMethod(sootClass, "limit", true); + for (String name : ZERO_PARAM_METHODS) + injectMethod(sootClass, name, false); + for (String name : INT_PARAM_METHODS) + injectMethod(sootClass, name, true); // remove this class from vtable cache as it has to be rebuilt to include new methods config.getVTableCache().remove(sootClass); } } + @Override + public SootMethod resolveMethod(Config config, SootClass sootClass, String name, String desc) { + if (isEnabled(config) && isAcceptableByteBuffer(sootClass)) { + SootMethod method = null; + if ("(I)Ljava/nio/ByteBuffer;".equals(desc)) { + // probably target method with int parameter + if (INT_PARAM_METHODS.contains(name)) { + method = new SootMethod(name, Collections.singletonList(IntType.v()), + sootClass.getType(), Modifier.PUBLIC); + } + } else if ("()Ljava/nio/ByteBuffer;".equals(desc)) { + // probably target method without parameters + if (ZERO_PARAM_METHODS.contains(name)) { + method = new SootMethod(name, Collections.EMPTY_LIST, sootClass.getType(), Modifier.PUBLIC); + } + } + + if (method != null) { + method.setDeclaringClass(sootClass); + method.setDeclared(true); + return method; + } + } + + return null; + } + private boolean isAcceptableByteBuffer(SootClass sootClass) { return JAVA_NIO_BYTEBUFFER.equals(sootClass.getName()) && JAVA_NIO_BUFFER.equals(sootClass.getSuperclass().getName()); diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/target/framework/FrameworkTarget.java b/compiler/compiler/src/main/java/org/robovm/compiler/target/framework/FrameworkTarget.java index 3b3d89390..fea93798c 100644 --- a/compiler/compiler/src/main/java/org/robovm/compiler/target/framework/FrameworkTarget.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/target/framework/FrameworkTarget.java @@ -358,7 +358,7 @@ private void installFramework(File frameworkDir, File dsymDir, File binary, Stri if (dsymDir.exists()) FileUtils.deleteDirectory(dsymDir); dsymDir.mkdirs(); - new Executor(config.getLogger(), "xcrun").args("dsymutil", "-o", dsymDir, executable).exec(); + ToolchainUtil.generateDsym(config, dsymDir, executable); if (!config.isDebug()) { config.getLogger().info("Striping framework binary: %s", executable); diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/target/ios/IOSTarget.java b/compiler/compiler/src/main/java/org/robovm/compiler/target/ios/IOSTarget.java index 385b39cd6..711c1e1a5 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/target/ios/IOSTarget.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/target/ios/IOSTarget.java @@ -335,7 +335,7 @@ protected void doBuild(File outFile, List ccArgs, protected void prepareInstall(File installDir) throws IOException { createInfoPList(installDir); - generateDsym(installDir, getExecutable(), false); + generateDsym(getDsymDir(installDir), new File(installDir, getExecutable())); if (isDeviceArch(arch)) { // strip local symbols @@ -388,7 +388,8 @@ public void prepareLaunch() throws IOException { protected void prepareLaunch(File appDir) throws IOException { super.doInstall(appDir, getExecutable(), appDir); createInfoPList(appDir); - generateDsym(appDir, getExecutable(), true); + generateDsym(getDsymDir(appDir), new File(appDir, getExecutable())); + copyToIndexedDir(appDir, getExecutable(), getDsymDir(appDir), new File(appDir, getExecutable())); // strip symbols to reduce application size, all debugger symbols converted into globals strip(appDir, getExecutable()); @@ -760,25 +761,17 @@ private File getOrCreateEntitlementsPList(boolean getTaskAllow, String bundleId) } } - private void generateDsym(final File dir, final String executable, boolean copyToIndexedDir) throws IOException { - final File dsymDir = new File(dir.getParentFile(), dir.getName() + ".dSYM"); - final File exePath = new File(dir, executable); + private File generateDsym(final File dsymDir, final File exePath) throws IOException { FileUtils.deleteDirectory(dsymDir); - final Process process = new Executor(config.getLogger(), "xcrun") - .args("dsymutil", "-o", dsymDir, exePath) - .execAsync(); - if (copyToIndexedDir) { - new Thread() { - public void run() { - try { - process.waitFor(); - } catch (InterruptedException e) { - return; - } - copyToIndexedDir(dir, executable, dsymDir, exePath); - } - }.start(); - } + ToolchainUtil.generateDsym(config, dsymDir, exePath); + return dsymDir; + } + + private void dsymToSymbols(File symbolsDir, File dsymDir, String executable) throws IOException { + final File dsymExecutable = new File(dsymDir, "/Contents/Resources/DWARF/" + executable); + FileUtils.deleteDirectory(symbolsDir); + symbolsDir.mkdirs(); + ToolchainUtil.dsymToSymbols(config, dsymExecutable, symbolsDir); } private void strip(File dir, String executable) throws IOException { @@ -834,6 +827,9 @@ private void packageApplication(File appDir) throws IOException { .args("-Rp", appDir, payloadDir) .exec(); + config.getLogger().info("Generating Symbols from dsym"); + dsymToSymbols(new File(tmpDir, "Symbols"), getDsymDir(appDir), getExecutable()); + File frameworksDir = new File(appDir, "Frameworks"); if (frameworksDir.exists() && config.hasSwiftSupport() && config.getSwiftSupport().shouldCopySwiftLibs()){ String[] swiftLibs = frameworksDir.list(new AndFileFilter( @@ -1025,6 +1021,10 @@ protected String getBundleId() { return config.getMainClass() != null ? config.getMainClass() : config.getExecutableName(); } + protected File getDsymDir(File appDir) { + return new File(appDir.getParentFile(), appDir.getName() + ".dSYM"); + } + protected String getMinimumOSVersion() { if (config.getIosInfoPList() != null) { String minVersion = config.getIosInfoPList().getMinimumOSVersion(); diff --git a/compiler/compiler/src/main/java/org/robovm/compiler/util/ToolchainUtil.java b/compiler/compiler/src/main/java/org/robovm/compiler/util/ToolchainUtil.java index 69a9ae61e..14d1bd7c2 100755 --- a/compiler/compiler/src/main/java/org/robovm/compiler/util/ToolchainUtil.java +++ b/compiler/compiler/src/main/java/org/robovm/compiler/util/ToolchainUtil.java @@ -52,6 +52,8 @@ public class ToolchainUtil { private static String NM; private static String OTOOL; private static String FILE; + private static String DSYMUTIL; + private static String SYMBOLS; private static String getIOSDevClang() throws IOException { if (IOS_DEV_CLANG == null) { @@ -144,6 +146,20 @@ private static String getPackageApplication() throws IOException { return PACKAGE_APPLICATION; } + private static String getDsymutil() throws IOException { + if (DSYMUTIL == null) { + DSYMUTIL = findXcodeCommand("dsymutil", "iphoneos"); + } + return DSYMUTIL; + } + + private static String getSymbols() throws IOException { + if (SYMBOLS == null) { + SYMBOLS = findXcodeCommand("symbols", "iphoneos"); + } + return SYMBOLS; + } + private static void handleExecuteException(ExecuteException e) { if (e.getExitValue() == 2) { throw new IllegalArgumentException("No Xcode is selected. Is Xcode installed? " @@ -352,6 +368,15 @@ public static void packageApplication(Config config, File appDir, File outFile) new Executor(config.getLogger(), getPackageApplication()).args(appDir, "-o", outFile).exec(); } + public static void generateDsym(Config config, File dsymDir, File exePath) throws IOException { + new Executor(config.getLogger(), getDsymutil()).args("-o", dsymDir, exePath).exec(); + } + + public static void dsymToSymbols(Config config, File dsymExecutable, File outDir) throws IOException { + new Executor(config.getLogger(), getSymbols()).args("-noTextInSOD", "-noDaemon", "-arch", "all", + "-symbolsPackageDir", outDir, dsymExecutable).exec(); + } + private static List writeObjectsFiles(Config config, List objectFiles, int maxObjectsPerFile, boolean quote) throws IOException { diff --git a/compiler/vm/bc/src/aligned.h b/compiler/vm/bc/src/aligned.h index 9a031723e..f9d53faf1 100755 --- a/compiler/vm/bc/src/aligned.h +++ b/compiler/vm/bc/src/aligned.h @@ -16,9 +16,11 @@ #ifndef ALIGNED_H #define ALIGNED_H +#include #include -#define ALIGN(pp, t) (void*)(((uintptr_t) (pp) + sizeof(t) - 1) & ~(sizeof(t) - 1)) +#define ALIGN_OF(t) offsetof(struct { char c; t m; }, m) +#define ALIGN(pp, t) (void*)(((uintptr_t) (pp) + ALIGN_OF(t) - 1) & ~(ALIGN_OF(t) - 1)) static inline jbyte readByte(void** p) { jbyte v = *(jbyte*) *p; diff --git a/compiler/vm/core/src/attribute.c b/compiler/vm/core/src/attribute.c index df33fefc0..44b34d18d 100755 --- a/compiler/vm/core/src/attribute.c +++ b/compiler/vm/core/src/attribute.c @@ -13,6 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +#include #include #include @@ -52,7 +53,8 @@ static jboolean throwFormatError(Env* env, char* expectedType) { return FALSE; } -#define ALIGN(pp, t) (void*)(((uintptr_t) (pp) + sizeof(t) - 1) & ~(sizeof(t) - 1)) +#define ALIGN_OF(t) offsetof(struct { char c; t m; }, m) +#define ALIGN(pp, t) (void*)(((uintptr_t) (pp) + ALIGN_OF(t) - 1) & ~(ALIGN_OF(t) - 1)) static inline jbyte getByte(void** attributes) { jbyte v = *(jbyte*) *attributes; diff --git a/plugins/idea/src/main/java/org/robovm/idea/ibxcode/RoboVmIbXcodeProjectTask.java b/plugins/idea/src/main/java/org/robovm/idea/ibxcode/RoboVmIbXcodeProjectTask.java index 770072b23..93876f0ba 100644 --- a/plugins/idea/src/main/java/org/robovm/idea/ibxcode/RoboVmIbXcodeProjectTask.java +++ b/plugins/idea/src/main/java/org/robovm/idea/ibxcode/RoboVmIbXcodeProjectTask.java @@ -30,6 +30,7 @@ import com.intellij.openapi.roots.OrderEnumerator; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.robovm.compiler.config.Arch; import org.robovm.compiler.config.Config; import org.robovm.ibxcode.IBXcodeProject; import org.robovm.idea.RoboVmPlugin; @@ -244,7 +245,19 @@ static class IBConfigBuilder extends Config.Builder { @Override public Config build() { - // do not build any complex config as it is time consuming and not required at all for this task + // if arch is not set -- setup with empty + if (config.getArch() == null) { + Arch arch; + if (config.getArchs().isEmpty()) { + // there is no information about arch -- use Arm64 + arch = Arch.arm64; + } else { + arch = config.getArchs().get(0); + } + arch(arch); + } + + // do not build any complex config as it is time-consuming and not required at all for this task return this.config; } } diff --git a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java index 09bb02339..7955236d4 100755 --- a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java +++ b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmIOSRunConfigurationSettingsEditor.java @@ -31,6 +31,7 @@ import org.robovm.idea.running.RoboVmRunConfiguration.EntryType; import javax.swing.*; +import java.util.HashSet; import java.util.List; import java.util.Set; import java.util.function.Predicate; @@ -41,7 +42,7 @@ public class RoboVmIOSRunConfigurationSettingsEditor extends SettingsEditor { private static final CpuArch[] DEVICE_ARCHS = {CpuArch.arm64, CpuArch.thumbv7}; - private static final CpuArch[] SIMULATOR_ARCHS = {CpuArch.x86_64, CpuArch.x86, CpuArch.arm64}; + private static final CpuArch[] SIMULATOR_ARCHS = {CpuArch.arm64, CpuArch.x86_64, CpuArch.x86}; public static final String AUTO_SIMULATOR_IPHONE_TITLE = "Auto (prefers '" + DeviceType.PREFERRED_IPHONE_SIM_NAME + "')"; public static final String AUTO_SIMULATOR_IPAD_TITLE = "Auto (prefers '" + DeviceType.PREFERRED_IPAD_SIM_NAME + "')"; @@ -154,20 +155,24 @@ private CpuArch populateSimulatorArch(SimTypeDecorator simulator, CpuArch arch) CpuArch result = null; simArch.removeAllItems(); if (simulator != null) { + Set simArches; if (simulator == simulatorAutoIPad || simulator == simulatorAutoIPhone){ - // auto simulator, use default OS arch (x86_64 or arm64 on m1)is allowed, if arch doesn't match -- override - simArch.addItem(DeviceType.DEFAULT_HOST_ARCH); - result = DeviceType.DEFAULT_HOST_ARCH; + simArches = new HashSet<>(); + // auto simulator, use default OS arch (x86_64 or arm64 on m1) is allowed, if arch doesn't match -- override + simArches.add(DeviceType.DEFAULT_HOST_ARCH); + // also allow to have x86_64 on m1 to allow old projects without arm64 support to run on auto sim + if (DeviceType.DEFAULT_HOST_ARCH == CpuArch.arm64) + simArches.add(CpuArch.x86_64); } else { - Set simArches = simulator.data.getArchs().stream() + simArches = simulator.data.getArchs().stream() .map(Arch::getCpuArch) .collect(Collectors.toSet()); - for (CpuArch a : SIMULATOR_ARCHS) { - if (simArches.contains(a)) { - simArch.addItem(a); - if (a == arch) - result = a; - } + } + for (CpuArch a : SIMULATOR_ARCHS) { + if (simArches.contains(a)) { + simArch.addItem(a); + if (a == arch) + result = a; } } } diff --git a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmRunConfiguration.java b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmRunConfiguration.java index cb2ab2bc6..cbe9e99f7 100755 --- a/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmRunConfiguration.java +++ b/plugins/idea/src/main/java/org/robovm/idea/running/RoboVmRunConfiguration.java @@ -325,8 +325,13 @@ private void validateAndFix() { if (targetType != TargetType.Device && targetType != TargetType.Simulator) targetType = TargetType.Device; - if (simulatorType == EntryType.AUTO || simulatorType == EntryType.AUTO2) - simulatorArch = DeviceType.DEFAULT_HOST_ARCH; + if (simulatorType == EntryType.AUTO || simulatorType == EntryType.AUTO2) { + // allow x86_64 on m1 host + if (simulatorArch != DeviceType.DEFAULT_HOST_ARCH + && !(DeviceType.DEFAULT_HOST_ARCH == CpuArch.arm64 && simulatorArch == CpuArch.x86_64)) { + simulatorArch = DeviceType.DEFAULT_HOST_ARCH; + } + } // migrate simulator to new code if legacy found if (AUTO_SIGNING_IDENTITY_LEGACY.equals(simulator))