mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 07:47:58 +02:00

Allocate the ImplementedInterfaces array for them and save to/load from ppu Solves #39375
32 lines
704 B
ObjectPascal
32 lines
704 B
ObjectPascal
{ %target=darwin,ios,iphonesim }
|
|
|
|
program Project1;
|
|
{$mode objfpc}{$H+}
|
|
{$ModeSwitch objectivec1}
|
|
type
|
|
CBCentralManager = pointer;
|
|
CBCentralManagerDelegateProtocol = objcprotocol external
|
|
procedure centralManagerDidUpdateState (central: CBCentralManager); message 'centralManagerDidUpdateState:';
|
|
end;
|
|
|
|
Test=objccategory(NSObject,CBCentralManagerDelegateProtocol)
|
|
procedure centralManagerDidUpdateState (central: CBCentralManager);
|
|
end;
|
|
|
|
var
|
|
called: boolean = false;
|
|
|
|
procedure Test.centralManagerDidUpdateState (central: CBCentralManager);
|
|
begin
|
|
called:=true;
|
|
end;
|
|
|
|
var
|
|
o: NSObject;
|
|
begin
|
|
o := NSObject.alloc.init;
|
|
o.centralManagerDidUpdateState(nil);
|
|
if not called then
|
|
halt(1);
|
|
end.
|