- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我试图将制造商 Sensoro 的 obj-c 库绑定(bind)到我的 mac 上的 Xamarin.ios,但我一直陷入问题主题中所宣传的奇怪构建错误。我使用 sharpie 3 扫描头文件。令我感到奇怪的是,NSUuid 是 Xamarin 自己的 Foundation 命名空间中的类类型,因此应该支持它,所以我不知道为什么构建过程会提示它。这是 ApiDefinition.cs
using System;
using CoreBluetooth;
using CoreLocation;
using Foundation;
using ObjCRuntime;
namespace SensoroBeaconKit
{
[Static]
//[Verify (ConstantsInterfaceAssociation)]
partial interface Constants
{
// extern NSString *const SBKBeaconInRangeStatusUpdatedNotification;
[Field ("SBKBeaconInRangeStatusUpdatedNotification", "__Internal")]
NSString SBKBeaconInRangeStatusUpdatedNotification { get; }
// extern NSUuid * SBKSensoroDefaultProximityUUID;
[Field ("SBKSensoroDefaultProximityUUID", "__Internal")]
NSUuid SBKSensoroDefaultProximityUUID { get; }
// extern NSString *const SBKErrorDomain;
[Field ("SBKErrorDomain", "__Internal")]
NSString SBKErrorDomain { get; }
// extern NSString *const SBKBeaconBaseSettingsTransmitPowerKey;
[Field ("SBKBeaconBaseSettingsTransmitPowerKey", "__Internal")]
NSString SBKBeaconBaseSettingsTransmitPowerKey { get; }
// extern NSString *const SBKBeaconBaseSettingsAdvertisingIntervalKey;
[Field ("SBKBeaconBaseSettingsAdvertisingIntervalKey", "__Internal")]
NSString SBKBeaconBaseSettingsAdvertisingIntervalKey { get; }
// extern NSString *const SBKBeaconBaseSettingsEnergySavingModeKey;
[Field ("SBKBeaconBaseSettingsEnergySavingModeKey", "__Internal")]
NSString SBKBeaconBaseSettingsEnergySavingModeKey { get; }
// extern NSString *const SBKBeaconBaseSettingsMeasuredPowerKey;
[Field ("SBKBeaconBaseSettingsMeasuredPowerKey", "__Internal")]
NSString SBKBeaconBaseSettingsMeasuredPowerKey { get; }
// extern NSString *const SBKBeaconSensorSettingsTemperatureSamplingIntervalKey;
[Field ("SBKBeaconSensorSettingsTemperatureSamplingIntervalKey", "__Internal")]
NSString SBKBeaconSensorSettingsTemperatureSamplingIntervalKey { get; }
// extern NSString *const SBKBeaconSensorSettingsLightSamplingIntervalKey;
[Field ("SBKBeaconSensorSettingsLightSamplingIntervalKey", "__Internal")]
NSString SBKBeaconSensorSettingsLightSamplingIntervalKey { get; }
// extern NSString *const SBKBeaconSensorSettingsAccelerometerSensitivityKey;
[Field ("SBKBeaconSensorSettingsAccelerometerSensitivityKey", "__Internal")]
NSString SBKBeaconSensorSettingsAccelerometerSensitivityKey { get; }
}
// @interface SBKBeaconID : NSObject <NSCopying>
[BaseType (typeof(NSObject))]
interface SBKBeaconID : INSCopying
{
// +(instancetype)beaconIDWithProximityUUID:(NSUuid *)proximityUUID;
[Static]
[Export ("beaconIDWithProximityUUID:")]
SBKBeaconID BeaconIDWithProximityUUID (NSUuid proximityUUID);
// +(instancetype)beaconIDWithProximityUUID:(NSUuid *)proximityUUID major:(CLBeaconMajorValue)major;
[Static]
[Export ("beaconIDWithProximityUUID:major:")]
SBKBeaconID BeaconIDWithProximityUUID (NSUuid proximityUUID, ushort major);
// +(instancetype)beaconIDWithProximityUUID:(NSUuid *)proximityUUID major:(CLBeaconMajorValue)major minor:(CLBeaconMinorValue)minor;
[Static]
[Export ("beaconIDWithProximityUUID:major:minor:")]
SBKBeaconID BeaconIDWithProximityUUID (NSUuid proximityUUID, ushort major, ushort minor);
// -(BOOL)isEqualToBeaconID:(SBKBeaconID *)aBeaconID;
[Export ("isEqualToBeaconID:")]
bool IsEqualToBeaconID (SBKBeaconID aBeaconID);
// @property (readonly, nonatomic) NSUuid * proximityUUID;
[Export ("proximityUUID")]
NSUuid ProximityUUID { get; }
// @property (readonly, nonatomic) NSNumber * major;
[Export ("major")]
NSNumber Major { get; }
// @property (readonly, nonatomic) NSNumber * minor;
[Export ("minor")]
NSNumber Minor { get; }
// -(CLBeaconRegion *)CLBeaconRegion;
[Export ("CLBeaconRegion")]
//[Verify (MethodToProperty)]
CLBeaconRegion CLBeaconRegion { get; }
// +(instancetype)beaconIDFromCLBeaconRegion:(CLBeaconRegion *)region;
[Static]
[Export ("beaconIDFromCLBeaconRegion:")]
SBKBeaconID BeaconIDFromCLBeaconRegion (CLBeaconRegion region);
// -(NSString *)stringRepresentation;
[Export ("stringRepresentation")]
//[Verify (MethodToProperty)]
string StringRepresentation { get; }
// +(instancetype)beaconIDWithString:(NSString *)string;
[Static]
[Export ("beaconIDWithString:")]
SBKBeaconID BeaconIDWithString (string @string);
}
// typedef void (^SBKBeaconCompletionBlock)(NSError *);
delegate void SBKBeaconCompletionBlock (NSError arg0);
// @interface SBKBeacon : NSObject
[BaseType (typeof(NSObject))]
interface SBKBeacon
{
[Wrap ("WeakDelegate")]
[NullAllowed]
SBKBeaconDelegate Delegate { get; set; }
// @property (readwrite, nonatomic, weak) id<SBKBeaconDelegate> _Nullable delegate;
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
// @property (readonly, copy, nonatomic) SBKBeaconID * beaconID;
[Export ("beaconID", ArgumentSemantic.Copy)]
SBKBeaconID BeaconID { get; }
// @property (readonly, copy, nonatomic) NSString * serialNumber;
[Export ("serialNumber")]
string SerialNumber { get; }
// @property (readonly, assign, nonatomic) BOOL inRange;
[Export ("inRange")]
bool InRange { get; }
// @property (assign, readwrite, nonatomic) NSInteger inRangeMinimumRssiWhileEntering;
[Export ("inRangeMinimumRssiWhileEntering")]
nint InRangeMinimumRssiWhileEntering { get; set; }
// @property (assign, readwrite, nonatomic) NSInteger inRangeMinimumRssiWhileLeaving;
[Export ("inRangeMinimumRssiWhileLeaving")]
nint InRangeMinimumRssiWhileLeaving { get; set; }
// @property (readonly, assign, nonatomic) NSInteger rssi;
[Export ("rssi")]
nint Rssi { get; }
// @property (readonly, assign, nonatomic) CLProximity proximity;
[Export ("proximity", ArgumentSemantic.Assign)]
CLProximity Proximity { get; }
// @property (readonly, nonatomic) CLLocationAccuracy accuracy;
[Export ("accuracy")]
double Accuracy { get; }
// @property (readonly, copy, nonatomic) NSNumber * batteryLevel;
[Export ("batteryLevel", ArgumentSemantic.Copy)]
NSNumber BatteryLevel { get; }
// @property (readonly, copy, nonatomic) NSString * hardwareModelName;
[Export ("hardwareModelName")]
string HardwareModelName { get; }
// @property (readonly, copy, nonatomic) NSString * firmwareVersion;
[Export ("firmwareVersion")]
string FirmwareVersion { get; }
// @property (readonly, nonatomic) SBKBeaconWorkMode workModel;
[Export ("workModel")]
SBKBeaconWorkMode WorkModel { get; }
// -(void)connectWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("connectWithCompletion:")]
void ConnectWithCompletion (SBKBeaconCompletionBlock completion);
// -(void)disconnect;
[Export ("disconnect")]
void Disconnect ();
// -(SBKBeaconConnectionStatus)connectionStatus;
[Export ("connectionStatus")]
//[Verify (MethodToProperty)]
SBKBeaconConnectionStatus ConnectionStatus { get; }
// @property (readonly, nonatomic) NSDictionary * baseSettings;
[Export ("baseSettings")]
NSDictionary BaseSettings { get; }
// @property (readonly, nonatomic) NSDictionary * sensorSettings;
[Export ("sensorSettings")]
NSDictionary SensorSettings { get; }
// @property (readonly, nonatomic) SBKBeaconSecureBroadcastInterval secureBroadcastInterval;
[Export ("secureBroadcastInterval")]
SBKBeaconSecureBroadcastInterval SecureBroadcastInterval { get; }
// -(BOOL)writeProximityUUID:(NSUuid *)proximityUUID completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeProximityUUID:completion:")]
bool WriteProximityUUID (NSUuid proximityUUID, SBKBeaconCompletionBlock completion);
// -(BOOL)writeMajor:(NSNumber *)major minor:(NSNumber *)minor completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeMajor:minor:completion:")]
bool WriteMajor (NSNumber major, NSNumber minor, SBKBeaconCompletionBlock completion);
// -(BOOL)writeBaseSettings:(NSDictionary *)settings completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeBaseSettings:completion:")]
bool WriteBaseSettings (NSDictionary settings, SBKBeaconCompletionBlock completion);
// -(BOOL)writeSensorSettings:(NSDictionary *)settings completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeSensorSettings:completion:")]
bool WriteSensorSettings (NSDictionary settings, SBKBeaconCompletionBlock completion);
// -(BOOL)resetToFactorySettingsWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("resetToFactorySettingsWithCompletion:")]
bool ResetToFactorySettingsWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)writeSecureBroadcastInterval:(SBKBeaconSecureBroadcastInterval)interval completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeSecureBroadcastInterval:completion:")]
bool WriteSecureBroadcastInterval (SBKBeaconSecureBroadcastInterval interval, SBKBeaconCompletionBlock completion);
// -(BOOL)writeBroadcastKey:(NSString *)key completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeBroadcastKey:completion:")]
bool WriteBroadcastKey (string key, SBKBeaconCompletionBlock completion);
// -(BOOL)clearBroadcastKeyWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("clearBroadcastKeyWithCompletion:")]
bool ClearBroadcastKeyWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)disableiBeaconWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("disableiBeaconWithCompletion:")]
bool DisableiBeaconWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)enableiBeaconWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("enableiBeaconWithCompletion:")]
bool EnableiBeaconWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)disableAliBeaconWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("disableAliBeaconWithCompletion:")]
bool DisableAliBeaconWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)enableAliBeaconWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("enableAliBeaconWithCompletion:")]
bool EnableAliBeaconWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)disableEnhanceBroadcastWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("disableEnhanceBroadcastWithCompletion:")]
bool DisableEnhanceBroadcastWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)enableEnhanceBroadcastWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("enableEnhanceBroadcastWithCompletion:")]
bool EnableEnhanceBroadcastWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)flashLightWithCommand:(UInt8)command repeat:(UInt8)repeatCount completion:(SBKBeaconCompletionBlock)completion;
[Export ("flashLightWithCommand:repeat:completion:")]
bool FlashLightWithCommand (byte command, byte repeatCount, SBKBeaconCompletionBlock completion);
// @property (readonly, nonatomic) SBKBeaconWritePermissionStatus writePermissionStatus;
[Export ("writePermissionStatus")]
SBKBeaconWritePermissionStatus WritePermissionStatus { get; }
// -(BOOL)requireWritePermissionWithPassword:(NSString *)password completion:(SBKBeaconCompletionBlock)completion;
[Export ("requireWritePermissionWithPassword:completion:")]
bool RequireWritePermissionWithPassword (string password, SBKBeaconCompletionBlock completion);
// -(BOOL)updateWritePassword:(NSString *)password completion:(SBKBeaconCompletionBlock)completion;
[Export ("updateWritePassword:completion:")]
bool UpdateWritePassword (string password, SBKBeaconCompletionBlock completion);
// -(BOOL)clearWritePasswordWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("clearWritePasswordWithCompletion:")]
bool ClearWritePasswordWithCompletion (SBKBeaconCompletionBlock completion);
// -(SBKBeaconEnergySavingMode)availableEnergySavingMode;
[Export ("availableEnergySavingMode")]
//[Verify (MethodToProperty)]
SBKBeaconEnergySavingMode AvailableEnergySavingMode { get; }
// -(BOOL)reloadSensorDataWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("reloadSensorDataWithCompletion:")]
bool ReloadSensorDataWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)isTemperatureSensorAvailable;
[Export ("isTemperatureSensorAvailable")]
//[Verify (MethodToProperty)]
bool IsTemperatureSensorAvailable { get; }
// -(BOOL)isLightSensorAvailable;
[Export ("isLightSensorAvailable")]
//[Verify (MethodToProperty)]
bool IsLightSensorAvailable { get; }
// -(BOOL)isAccelerometerAvailable;
[Export ("isAccelerometerAvailable")]
//[Verify (MethodToProperty)]
bool IsAccelerometerAvailable { get; }
// -(BOOL)isBeacon;
[Export ("isBeacon")]
//[Verify (MethodToProperty)]
bool IsBeacon { get; }
// -(BOOL)isSensor;
[Export ("isSensor")]
//[Verify (MethodToProperty)]
bool IsSensor { get; }
// @property (readonly, copy, nonatomic) NSNumber * temperature;
[Export ("temperature", ArgumentSemantic.Copy)]
NSNumber Temperature { get; }
// @property (readonly, copy, nonatomic) NSNumber * light;
[Export ("light", ArgumentSemantic.Copy)]
NSNumber Light { get; }
// @property (readonly, nonatomic) NSNumber * broadcastTransmitPower;
[Export ("broadcastTransmitPower")]
NSNumber BroadcastTransmitPower { get; }
// @property (readonly, nonatomic) NSNumber * broadcastInterval;
[Export ("broadcastInterval")]
NSNumber BroadcastInterval { get; }
// @property (readonly, nonatomic) NSNumber * inEnergySaving;
[Export ("inEnergySaving")]
NSNumber InEnergySaving { get; }
// @property (readonly, nonatomic) NSNumber * aliBeacon;
[Export ("aliBeacon")]
NSNumber AliBeacon { get; }
// @property (readonly, nonatomic) NSNumber * enhanceBroadcast;
[Export ("enhanceBroadcast")]
NSNumber EnhanceBroadcast { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneEnabled;
[Export ("eddystoneEnabled")]
NSNumber EddystoneEnabled { get; }
// @property (readonly, copy, nonatomic) NSNumber * accelerometerCount;
[Export ("accelerometerCount", ArgumentSemantic.Copy)]
NSNumber AccelerometerCount { get; }
// @property (readonly, getter = isMoving, copy, nonatomic) NSNumber * moving;
[Export ("moving", ArgumentSemantic.Copy)]
NSNumber Moving { [Bind ("isMoving")] get; }
// @property (readonly, nonatomic) NSNumber * shakeToLightOn;
[Export ("shakeToLightOn")]
NSNumber ShakeToLightOn { get; }
// -(BOOL)resetAccelerometerCountWithCompletion:(SBKBeaconCompletionBlock)completion;
[Export ("resetAccelerometerCountWithCompletion:")]
bool ResetAccelerometerCountWithCompletion (SBKBeaconCompletionBlock completion);
// -(BOOL)writeShakeToLightOnState:(BOOL)state completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeShakeToLightOnState:completion:")]
bool WriteShakeToLightOnState (bool state, SBKBeaconCompletionBlock completion);
// @property (readonly, nonatomic, strong) CBPeripheral * assignedPeripheral;
[Export ("assignedPeripheral", ArgumentSemantic.Strong)]
CBPeripheral AssignedPeripheral { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneUIDEnabled;
[Export ("eddystoneUIDEnabled")]
NSNumber EddystoneUIDEnabled { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneURLEnabled;
[Export ("eddystoneURLEnabled")]
NSNumber EddystoneURLEnabled { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneTLMEnabled;
[Export ("eddystoneTLMEnabled")]
NSNumber EddystoneTLMEnabled { get; }
// @property (readonly, nonatomic) NSData * eddystoneNID;
[Export ("eddystoneNID")]
NSData EddystoneNID { get; }
// @property (readonly, nonatomic) NSData * eddystoneBID;
[Export ("eddystoneBID")]
NSData EddystoneBID { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneTLMInterval;
[Export ("eddystoneTLMInterval")]
NSNumber EddystoneTLMInterval { get; }
// @property (readonly, nonatomic) NSString * eddystoneUrl;
[Export ("eddystoneUrl")]
string EddystoneUrl { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneBatteryVoltage;
[Export ("eddystoneBatteryVoltage")]
NSNumber EddystoneBatteryVoltage { get; }
// @property (readonly, nonatomic) NSNumber * eddystonePduCount;
[Export ("eddystonePduCount")]
NSNumber EddystonePduCount { get; }
// @property (readonly, nonatomic) NSNumber * eddystoneWorkedTime;
[Export ("eddystoneWorkedTime")]
NSNumber EddystoneWorkedTime { get; }
// -(BOOL)writeEddystoneUrl:(NSString *)url completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeEddystoneUrl:completion:")]
bool WriteEddystoneUrl (string url, SBKBeaconCompletionBlock completion);
// -(BOOL)eddystonePackage:(EddystonePackageType)package enable:(BOOL)enable completion:(SBKBeaconCompletionBlock)completion;
[Export ("eddystonePackage:enable:completion:")]
bool EddystonePackage (EddystonePackageType package, bool enable, SBKBeaconCompletionBlock completion);
// -(BOOL)writeEddystoneTLMInterval:(EddystoneTLMInterval)interval completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeEddystoneTLMInterval:completion:")]
bool WriteEddystoneTLMInterval (EddystoneTLMInterval interval, SBKBeaconCompletionBlock completion);
// -(BOOL)writeEddystoneNID:(NSString *)nidString completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeEddystoneNID:completion:")]
bool WriteEddystoneNID (string nidString, SBKBeaconCompletionBlock completion);
// -(BOOL)writeEddystoneBID:(NSString *)bidString completion:(SBKBeaconCompletionBlock)completion;
[Export ("writeEddystoneBID:completion:")]
bool WriteEddystoneBID (string bidString, SBKBeaconCompletionBlock completion);
}
// @protocol SBKBeaconDelegate <NSObject>
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface SBKBeaconDelegate
{
// @optional -(void)sensoroBeaconDidConnect:(SBKBeacon *)beacon;
[Export ("sensoroBeaconDidConnect:")]
void SensoroBeaconDidConnect (SBKBeacon beacon);
// @optional -(void)sensoroBeaconRequirePassword:(SBKBeacon *)beacon;
[Export ("sensoroBeaconRequirePassword:")]
void SensoroBeaconRequirePassword (SBKBeacon beacon);
// @optional -(void)sensoroBeaconDidDisconnect:(SBKBeacon *)beacon error:(NSError *)error;
[Export ("sensoroBeaconDidDisconnect:error:")]
void SensoroBeaconDidDisconnect (SBKBeacon beacon, NSError error);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateSensorSetting:(NSDictionary *)settings;
[Export ("sensoroBeacon:didUpdateSensorSetting:")]
void SensoroBeaconDidUpdateSensorSetting (SBKBeacon beacon, NSDictionary settings);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateRSSI:(NSInteger)rssi;
[Export ("sensoroBeacon:didUpdateRSSI:")]
void SensoroBeaconDidUpdateRSSI (SBKBeacon beacon, nint rssi);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateTemperatureData:(NSNumber *)temperature;
[Export ("sensoroBeacon:didUpdateTemperatureData:")]
void SensoroBeaconDidUpdateTemperatureData (SBKBeacon beacon, NSNumber temperature);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateLightData:(NSNumber *)light;
[Export ("sensoroBeacon:didUpdateLightData:")]
void SensoroBeaconDidUpdateLightData (SBKBeacon beacon, NSNumber light);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateAccelerometerCount:(NSNumber *)accelerometerCount;
[Export ("sensoroBeacon:didUpdateAccelerometerCount:")]
void SensoroBeaconDidUpdateAccelerometerCount (SBKBeacon beacon, NSNumber accelerometerCount);
// @optional -(void)sensoroBeacon:(SBKBeacon *)beacon didUpdateMovingState:(NSNumber *)isMoving;
[Export ("sensoroBeacon:didUpdateMovingState:")]
void SensoroBeaconDidUpdateMovingState (SBKBeacon beacon, NSNumber isMoving);
}
// typedef void (^SBKBeaconWatcher)(SBKBeacon *, SBKBeacon_Action);
delegate void SBKBeaconWatcher (SBKBeacon arg0, SBKBeacon_Action arg1);
// @interface SBKBeaconManager : NSObject
[BaseType (typeof(NSObject))]
interface SBKBeaconManager
{
// +(SBKBeaconManager *)sharedInstance;
[Static]
[Export ("sharedInstance")]
//[Verify (MethodToProperty)]
SBKBeaconManager SharedInstance { get; }
[Wrap ("WeakDelegate")]
[NullAllowed]
SBKBeaconManagerDelegate Delegate { get; set; }
// @property (nonatomic, weak) id<SBKBeaconManagerDelegate> _Nullable delegate;
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
// -(void)requestAlwaysAuthorization;
[Export ("requestAlwaysAuthorization")]
void RequestAlwaysAuthorization ();
// -(void)requestWhenInUseAuthorization;
[Export ("requestWhenInUseAuthorization")]
void RequestWhenInUseAuthorization ();
// -(void)startRangingBeaconsWithID:(SBKBeaconID *)beaconID wakeUpApplication:(BOOL)wakeUpApplication;
[Export ("startRangingBeaconsWithID:wakeUpApplication:")]
void StartRangingBeaconsWithID (SBKBeaconID beaconID, bool wakeUpApplication);
// -(void)stopRangingBeaconsWithID:(SBKBeaconID *)beaconID;
[Export ("stopRangingBeaconsWithID:")]
void StopRangingBeaconsWithID (SBKBeaconID beaconID);
// -(void)stopRangingAllBeacons;
[Export ("stopRangingAllBeacons")]
void StopRangingAllBeacons ();
// -(BOOL)addBroadcastKey:(NSString *)secretInfo;
[Export ("addBroadcastKey:")]
bool AddBroadcastKey (string secretInfo);
// -(void)registerBeaconAppearWatcher:(NSString *)identifier type:(u_int8_t)type watcher:(SBKBeaconWatcher)watcher;
[Export ("registerBeaconAppearWatcher:type:watcher:")]
void RegisterBeaconAppearWatcher (string identifier, byte type, SBKBeaconWatcher watcher);
// -(NSSet *)rangedBeaconIDs;
[Export ("rangedBeaconIDs")]
//[Verify (MethodToProperty)]
NSSet RangedBeaconIDs { get; }
// -(SBKBeacon *)beaconWithID:(SBKBeaconID *)beaconID;
[Export ("beaconWithID:")]
SBKBeacon BeaconWithID (SBKBeaconID beaconID);
// -(SBKBeacon *)beaconWithCLBeacon:(CLBeacon *)beacon;
[Export ("beaconWithCLBeacon:")]
SBKBeacon BeaconWithCLBeacon (CLBeacon beacon);
// -(NSArray *)beaconsInRange;
[Export ("beaconsInRange")]
//[Verify (MethodToProperty), Verify (StronglyTypedNSArray)]
NSObject[] BeaconsInRange { get; }
// -(NSArray *)allBeacons;
[Export ("allBeacons")]
//[Verify (MethodToProperty), Verify (StronglyTypedNSArray)]
NSObject[] AllBeacons { get; }
// -(void)disableBLEPowerAlert;
[Export ("disableBLEPowerAlert")]
void DisableBLEPowerAlert ();
// @property (readwrite, nonatomic) NSTimeInterval outOfRangeDelay;
[Export ("outOfRangeDelay")]
double OutOfRangeDelay { get; set; }
// @property (readonly, nonatomic) NSString * version;
[Export ("version")]
string Version { get; }
// @property (readwrite, nonatomic) BOOL duplicateKeyBLE;
[Export ("duplicateKeyBLE")]
bool DuplicateKeyBLE { get; set; }
// -(void)setDebugModeActive:(BOOL)active;
[Export ("setDebugModeActive:")]
void SetDebugModeActive (bool active);
}
// @protocol SBKBeaconManagerDelegate <NSObject>
[Protocol, Model]
[BaseType (typeof(NSObject))]
interface SBKBeaconManagerDelegate
{
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager didRangeNewBeacon:(SBKBeacon *)beacon;
[Export ("beaconManager:didRangeNewBeacon:")]
void DidRangeNewBeacon (SBKBeaconManager beaconManager, SBKBeacon beacon);
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager beaconDidGone:(SBKBeacon *)beacon;
[Export ("beaconManager:beaconDidGone:")]
void BeaconDidGone (SBKBeaconManager beaconManager, SBKBeacon beacon);
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager scanDidFinishWithBeacons:(NSArray *)beacons;
[Export ("beaconManager:scanDidFinishWithBeacons:")]
//[Verify (StronglyTypedNSArray)]
void ScanDidFinishWithBeacons (SBKBeaconManager beaconManager, NSObject[] beacons);
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager didRangeBeacons:(NSArray *)beacons inRegion:(SBKBeaconID *)region;
[Export ("beaconManager:didRangeBeacons:inRegion:")]
//[Verify (StronglyTypedNSArray)]
void DidRangeBeacons (SBKBeaconManager beaconManager, NSObject[] beacons, SBKBeaconID region);
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager didChangeAuthorizationStatus:(CLAuthorizationStatus)status;
[Export ("beaconManager:didChangeAuthorizationStatus:")]
void DidChangeAuthorizationStatus (SBKBeaconManager beaconManager, CLAuthorizationStatus status);
// @optional -(void)beaconManager:(SBKBeaconManager *)beaconManager didDetermineState:(SBKRegionState)state forRegion:(SBKBeaconID *)region;
[Export ("beaconManager:didDetermineState:forRegion:")]
void DidDetermineState (SBKBeaconManager beaconManager, SBKRegionState state, SBKBeaconID region);
}
// @interface Cloud (SBKBeaconManager)
[Category]
[BaseType (typeof(SBKBeaconManager))]
interface SBKBeaconManager_Cloud
{
// -(void)setCloudServiceEnable:(BOOL)set;
[Export ("setCloudServiceEnable:")]
void SetCloudServiceEnable (bool set);
}
// @interface SBKUnitConvertHelper : NSObject
[BaseType (typeof(NSObject))]
interface SBKUnitConvertHelper
{
// +(float)rangeRadiusOfBeacon:(SBKBeacon *)beacon;
[Static]
[Export ("rangeRadiusOfBeacon:")]
float RangeRadiusOfBeacon (SBKBeacon beacon);
// +(short)transmitPowerToRawValue:(SBKBeacon *)beacon;
[Static]
[Export ("transmitPowerToRawValue:")]
short TransmitPowerToRawValue (SBKBeacon beacon);
// +(float)frequencyToRawValue:(SBKBeacon *)beacon;
[Static]
[Export ("frequencyToRawValue:")]
float FrequencyToRawValue (SBKBeacon beacon);
// +(NSString *)transmitPowerToString:(SBKBeacon *)beacon;
[Static]
[Export ("transmitPowerToString:")]
string TransmitPowerToString (SBKBeacon beacon);
// +(NSString *)frequencyToString:(SBKBeacon *)beacon;
[Static]
[Export ("frequencyToString:")]
string FrequencyToString (SBKBeacon beacon);
// +(BOOL)isMicroTX:(SBKBeacon *)beacon;
[Static]
[Export ("isMicroTX:")]
bool IsMicroTX (SBKBeacon beacon);
// +(NSData *)urlToEddystoneEncodeURL:(NSString *)url;
[Static]
[Export ("urlToEddystoneEncodeURL:")]
NSData UrlToEddystoneEncodeURL (string url);
}
}
最佳答案
尝试将其注释掉以使错误消失:
// extern NSUuid * SBKSensoroDefaultProximityUUID;
[Field ("SBKSensoroDefaultProximityUUID", "__Internal")]
NSUuid SBKSensoroDefaultProximityUUID { get; }
然后 file a bug解决问题。
关于c# - Xamarin Studio btouch 不支持字段类型 : NSUuid,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37693246/
我正在使用 SWIFT 在 iOS 中使用 iBeacon。当我尝试使用字符串创建 NSUUID 时。 XCode 给出一个奇怪的错误 ViewController.Type doesn't have
我需要在安装应用程序时为设备生成唯一 ID,并将此值存储在设备上,然后需要使用此 UUID 与服务器通信。似乎NSSUUD适合这种情况,但我很困惑是否有可能从多个设备复制 UUID。我已经找到答案了h
比较两个 NSUUID 的最佳(最少代码、最快、最可靠)方法是什么? 这是一个例子: -(BOOL)isUUID:(NSUUID*)uuid1 equalToUUID:(NSUUID*)uuid2 {
我在我的应用程序中使用 NSUUID 作为唯一 ID,如下所示: [[NSUUID UUID] UUIDString] 正如预期的结果一样,我得到一个像这样的ID:102A21AD-7216-4517
如何将 NSUUID 转换为 NSString? NSString *url = [self mysql_process:ESTIMOTE_PROXIMITY_UUID]; - (NSString*)
我目前正在尝试使用我的代码将蓝牙设备的 NSUUID 保存到核心数据中,如下所示: let appDel: AppDelegate = UIApplication.sharedApplication(
我需要从手机获取 NSString 格式的 deviceUUID。现在我有这个: NSString *deviceId = [UIDevice currentDevice].identifierFor
最近(审查一些代码)我偶然发现了一个奇怪的现象,它导致我们的程序出现错误。 我们正在使用的 API 具有以下实现(我将用 Swift 编写,即使原始代码是在 Objective-C 中) intern
我正在制作一个函数来检索 url 作为用户图像。但是,我的上传图片名称功能是由NSUUID 创建的。因此,我不知道每个用户个人资料图片的名称是什么。我如何改进我的代码以获得每个用户的用户 imgae
我正在开发 iOS Swift。 我已将 NSUUID 转换为 String,如下所示: var bdAddr: NSUUID? var text: String = bdAddr!.UUIDStri
我正在尝试创建一个具有指定值的 NSUUID: let uuidString = "000000-0000-0000-0000-000000000000" let beaconUUID:
如何从 NSString 转换为 NSUUID ?我得到了将 NSUUID 转换为 NSString 的答案,但找不到反之亦然。就像这是我的字符串 @"12033030303"alloc NSUUID
随着 Swift 3 的更新,getUUIDBytes 和 getBytes 在 UUID 对象上似乎都不可用。 let uuid = UIDevice.current.identifierForVe
我试图将制造商 Sensoro 的 obj-c 库绑定(bind)到我的 mac 上的 Xamarin.ios,但我一直陷入问题主题中所宣传的奇怪构建错误。我使用 sharpie 3 扫描头文件。令我
** 重写 ** 好吧,原来我真的在问一个不同的问题。我了解 hashValue 和 ==,所以这不相关。 我希望我的包装器类 BUUID 能够“做正确的事”并且就像 NSUUID 在字典中的行为一样
维基百科页面 https://en.wikipedia.org/wiki/Universally_unique_identifier声明在 UUID 规范的第 3 版(因此可能是第 5 版)中:“六位
我了解到 UUIDString 是一个唯一值,但我不知道这些值是否仍然相同,在 Xcode 上,当我运行该应用程序时,该值发生了变化, 通常是 ? 编辑: func application(a
我需要从 vendorIdentifier 获取 NSData 而不转换为 NSString,清除字节。如何使用 getUUIDBytes: 将 NSUUID 转换为 NSData? 最佳答案 NSU
我正在使用 Sprite Kit 编写 iOS 游戏(因此针对 iOS 7+),并且在初始化 gameObject (自定义类)时遇到问题。 如果我尝试为游戏 ID 设置 UUID,则构建会失败(请参
任何人都可以让我知道通过下面给出的这两种实现创建唯一 ID 之间的区别是什么 1) CFUUIDRef cfuuid = CFUUIDCreate(kCFAllocatorDefault);
我是一名优秀的程序员,十分优秀!