Commit64dde9cf by developer33

v1.1 - NDEF functions updated, UI updated

parent 7e4093c5
File deleted
... ... @@ -18,7 +18,6 @@
343BFF6A26DE0668008645E7/* FunctionCell.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6726DE0668008645E7/* FunctionCell.swift */;};
343BFF6B26DE0668008645E7/* HelperFunc.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6826DE0668008645E7/* HelperFunc.swift */;};
343BFF6C26DE0668008645E7/* iOSDevCenters+GIF.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6926DE0668008645E7/* iOSDevCenters+GIF.swift */;};
343BFF7E26DE0677008645E7/* BluetoothViewController.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6D26DE0676008645E7/* BluetoothViewController.swift */;};
343BFF7F26DE0677008645E7/* ContactViewController.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6E26DE0676008645E7/* ContactViewController.swift */;};
343BFF8026DE0677008645E7/* EmailViewController.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF6F26DE0676008645E7/* EmailViewController.swift */;};
343BFF8126DE0677008645E7/* LocationViewController.swift in Sources */={isa=PBXBuildFile;fileRef=343BFF7026DE0676008645E7/* LocationViewController.swift */;};
... ... @@ -42,6 +41,7 @@
343BFF9926DE08E3008645E7/* Loader.gif in Resources */={isa=PBXBuildFile;fileRef=343BFF9726DE08E2008645E7/* Loader.gif */;};
343BFF9A26DE08E3008645E7/* nfc_reading.gif in Resources */={isa=PBXBuildFile;fileRef=343BFF9826DE08E2008645E7/* nfc_reading.gif */;};
343BFF9B26DE0F2A008645E7/* libuFCoder-ios-static.a in Frameworks */={isa=PBXBuildFile;fileRef=343BFF5E26DD1EAF008645E7/* libuFCoder-ios-static.a */;};
34DC94002733C43000EEAC49/* BTViewController.swift in Sources */={isa=PBXBuildFile;fileRef=34DC93FF2733C43000EEAC49/* BTViewController.swift */;};
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
... ... @@ -58,7 +58,6 @@
343BFF6726DE0668008645E7/* FunctionCell.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=FunctionCell.swift;path="ufr-examples-ios-ndef/src/helpers/FunctionCell.swift";sourceTree="";};
343BFF6826DE0668008645E7/* HelperFunc.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=HelperFunc.swift;path="ufr-examples-ios-ndef/src/helpers/HelperFunc.swift";sourceTree="";};
343BFF6926DE0668008645E7/* iOSDevCenters+GIF.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name="iOSDevCenters+GIF.swift";path="ufr-examples-ios-ndef/src/helpers/iOSDevCenters+GIF.swift";sourceTree="";};
343BFF6D26DE0676008645E7/* BluetoothViewController.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=BluetoothViewController.swift;path="ufr-examples-ios-ndef/src/writeTabs/BluetoothViewController.swift";sourceTree="";};
343BFF6E26DE0676008645E7/* ContactViewController.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=ContactViewController.swift;path="ufr-examples-ios-ndef/src/writeTabs/ContactViewController.swift";sourceTree="";};
343BFF6F26DE0676008645E7/* EmailViewController.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=EmailViewController.swift;path="ufr-examples-ios-ndef/src/writeTabs/EmailViewController.swift";sourceTree="";};
343BFF7026DE0676008645E7/* LocationViewController.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=LocationViewController.swift;path="ufr-examples-ios-ndef/src/writeTabs/LocationViewController.swift";sourceTree="";};
... ... @@ -82,6 +81,7 @@
343BFF9726DE08E2008645E7/* Loader.gif */={isa=PBXFileReference;lastKnownFileType=image.gif;name=Loader.gif;path="ufr-examples-ios-ndef/res/drawable/Loader.gif";sourceTree="";};
343BFF9826DE08E2008645E7/* nfc_reading.gif */={isa=PBXFileReference;lastKnownFileType=image.gif;name=nfc_reading.gif;path="ufr-examples-ios-ndef/res/drawable/nfc_reading.gif";sourceTree="";};
346825A026D399A50062D80F/* ufr-examples-ios-ndef.app */={isa=PBXFileReference;explicitFileType=wrapper.application;includeInIndex=0;path="ufr-examples-ios-ndef.app";sourceTree=BUILT_PRODUCTS_DIR;};
34DC93FF2733C43000EEAC49/* BTViewController.swift */={isa=PBXFileReference;lastKnownFileType=sourcecode.swift;name=BTViewController.swift;path="ufr-examples-ios-ndef/src/writeTabs/BTViewController.swift";sourceTree="";};
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
... ... @@ -99,6 +99,7 @@
3468259726D399A50062D80F={
isa=PBXGroup;
children=(
34DC93FF2733C43000EEAC49/* BTViewController.swift */,
343BFF9726DE08E2008645E7/* Loader.gif */,
343BFF9826DE08E2008645E7/* nfc_reading.gif */,
343BFF9326DE088B008645E7/* DLRadioButton.h */,
... ... @@ -108,7 +109,6 @@
343BFF7126DE0676008645E7/* AddressViewController.swift */,
343BFF7C26DE0676008645E7/* ApplicationViewController.swift */,
343BFF7526DE0676008645E7/* BitcoinViewController.swift */,
343BFF6D26DE0676008645E7/* BluetoothViewController.swift */,
343BFF6E26DE0676008645E7/* ContactViewController.swift */,
343BFF7B26DE0676008645E7/* DestinationViewController.swift */,
343BFF6F26DE0676008645E7/* EmailViewController.swift */,
... ... @@ -227,11 +227,11 @@
isa=PBXSourcesBuildPhase;
buildActionMask=2147483647;
files=(
34DC94002733C43000EEAC49/* BTViewController.swift in Sources */,
343BFF9526DE088B008645E7/* DLRadioButton.h in Sources */,
343BFF9626DE088C008645E7/* DLRadioButton.m in Sources */,
343BFF9126DE06B7008645E7/* SceneDelegate.swift in Sources */,
343BFF9226DE06B7008645E7/* AppDelegate.swift in Sources */,
343BFF7E26DE0677008645E7/* BluetoothViewController.swift in Sources */,
343BFF7F26DE0677008645E7/* ContactViewController.swift in Sources */,
343BFF8026DE0677008645E7/* EmailViewController.swift in Sources */,
343BFF8126DE0677008645E7/* LocationViewController.swift in Sources */,
... ... @@ -398,6 +398,7 @@
"$(inherited)",
"$(PROJECT_DIR)/ufr-examples-ios-ndef/lib",
);
MARKETING_VERSION=1.1;
PRODUCT_BUNDLE_IDENTIFIER=com.digital.logic.DOO.nfcndeftool;
PRODUCT_NAME="$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER="$(PROJECT_NAME)/include/uFCoder-bridging-header.h";
... ... @@ -426,6 +427,7 @@
"$(inherited)",
"$(PROJECT_DIR)/ufr-examples-ios-ndef/lib",
);
MARKETING_VERSION=1.1;
PRODUCT_BUNDLE_IDENTIFIER=com.digital.logic.DOO.nfcndeftool;
PRODUCT_NAME="$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER="$(PROJECT_NAME)/include/uFCoder-bridging-header.h";
... ...
{
"images":[
{
"filename":"bluetooth_icon.png",
"filename":"link_icon.png",
"idiom":"universal",
"scale":"1x"
},
... ...
... ... @@ -398,7 +398,7 @@
destination="n4g-cr-5fQ"kind="show"identifier="showWifiWrite"id="T9b-md-DBh"/>
destination="x8j-yw-ZPI"kind="show"identifier="showURIWrite"id="BAW-xY-lrG"/>
destination="xlJ-Ea-uO8"kind="show"identifier="showBluetoothWrite"id="pAo-x9-ZXw"/>
destination="xlJ-Ea-uO8"kind="show"identifier="showBTWrite"id="pAo-x9-ZXw"/>
destination="8oP-sZ-yTt"kind="show"identifier="showSMSWrite"id="agt-f0-Kjl"/>
destination="vKS-69-jOZ"kind="show"identifier="showLocationWrite"id="caV-Dh-vZw"/>
destination="jiF-hf-g2t"kind="show"identifier="showDestinationWrite"id="djC-Yz-Ycs"/>
... ... @@ -504,16 +504,16 @@
key="canvasLocation"x="598.46153846153845"y="2706.3981042654027"/>
sceneID="Pfd-Fu-PgG">
id="xlJ-Ea-uO8"customClass="BluetoothViewController"customModule="ndef_ios_nfc_ufr"customModuleProvider="target"sceneMemberID="viewController">
id="xlJ-Ea-uO8"customClass="BTViewController"customModule="ufr_examples_ios_ndef"sceneMemberID="viewController">
key="view"contentMode="scaleToFill"id="PPw-g8-t8y">
key="frame"x="0.0"y="0.0"width="390"height="756"/>
key="autoresizingMask"widthSizable="YES"heightSizable="YES"/>
opaque="NO"userInteractionEnabled="NO"contentMode="left"horizontalHuggingPriority="251"verticalHuggingPriority="251"fixedFrame="YES"text="Bluetooth"textAlignment="natural"lineBreakMode="tailTruncation"baselineAdjustment="alignBaselines"adjustsFontSizeToFit="NO"translatesAutoresizingMaskIntoConstraints="NO"id="fLP-zi-xCO">
key="frame"x="20"y="20"width="80"height="21"/>
opaque="NO"userInteractionEnabled="NO"contentMode="left"horizontalHuggingPriority="251"verticalHuggingPriority="251"fixedFrame="YES"text="BT"textAlignment="natural"lineBreakMode="tailTruncation"baselineAdjustment="alignBaselines"adjustsFontSizeToFit="NO"translatesAutoresizingMaskIntoConstraints="NO"id="fLP-zi-xCO">
key="frame"x="20"y="20"width="23"height="21"/>
key="autoresizingMask"flexibleMaxX="YES"flexibleMaxY="YES"/>
key="fontDescription"type="boldSystem"pointSize="17"/>
key="textColor"red="0.56078431370000004"green="0.78039215689999997"blue="0.26274509800000001"alpha="1"colorSpace="custom"customColorSpace="sRGB"/>
... ... @@ -554,7 +554,7 @@
key="tintColor"white="1"alpha="1"colorSpace="custom"customColorSpace="genericGamma22GrayColorSpace"/>
key="normal"title="WRITE"/>
selector="writeBluetooth:"destination="xlJ-Ea-uO8"eventType="touchUpInside"id="gf4-7P-raB"/>
selector="writeBT:"destination="xlJ-Ea-uO8"eventType="touchUpInside"id="C6A-9m-2ZW"/>
... ... @@ -1709,7 +1709,7 @@
name="book"catalog="system"width="128"height="102"/>
name="delete_icon"width="36"height="36"/>
name="iphone"catalog="system"width="108"height="128"/>
name="iphone"catalog="system"width="32"height="32"/>
name="pencil"catalog="system"width="128"height="113"/>
name="picker"width="248"height="72"/>
name="tagemulation_icon"width="36"height="36"/>
... ...
... ... @@ -19,7 +19,7 @@
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>$(MARKETING_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>LSRequiresIPhoneOS</key>
... ...
/*
* uFCoder.h
*
* library version: 5.0.51
* library version: 5.0.55
*
* Created on: 2009-01-14
* Last edited: 2021-03-26
* Last edited: 2021-10-30
*
* Author: D-Logic
*/
... ... @@ -143,6 +143,11 @@ typedef void * UFR_HANDLE;
#define DLSigner10 0xA3
#define DLSigner145 0xAA
enumE_CARD_IN_SAM_SLOT{
SAM_SLOT_MIFARE_SAM_AV2=1,
SAM_SLOT_GENERIC=4
};
// DLJavaCardSignerAlgorithmTypes:
enumE_SIGNER_CIPHERS{
SIG_CIPHER_RSA=0,
... ... @@ -788,6 +793,11 @@ typedef enum E_PCD_MGR_STATES
PCD_MGR_CE_COMBO_IN_FIELD
}pcd_states_t;
enumE_RGB_PORT_NAMES
{
EXTERNAL_RGB_PORT,
INTERNAL_RGB_PORT
};
#ifdef __cplusplus
extern"C"
... ... @@ -1298、6 + 1308,7 @@ UFR_STATUS DL_API UfrXrcRelayState(uint8_t state);
UFR_STATUSDL_APIUfrXrcGetIoState(VARuint8_t*intercom,VARuint8_t*door,VARuint8_t*relay_state);
UFR_STATUSDL_APIUfrRedLightControl(uint8_tlight_status);
UFR_STATUSDL_APIUfrRgbLightControl(uint8_tred,uint8_tgreen,uint8_tblue,uint8_tintensity,uint8_tenable);
UFR_STATUSDL_APIRgbControl(uint8_tred,uint8_tgreen,uint8_tblue);
UFR_STATUSDL_APIUfrRgbExtLightControl(uint8_tenable);
UFR_STATUSDL_APIUfrSetBadSelectCardNrMax(uint8_tbad_select_nr_max);
... ... @@ -1311,9 +1322,12 @@ UFR_STATUS DL_API AutoSleepGet(VAR uint8_t *seconds_wait);
UFR_STATUSDL_APISetSpeedPermanently(unsignedchartx_speed,unsignedcharrx_speed);
UFR_STATUSDL_APIGetSpeedParameters(VARunsignedchar*tx_speed,VARunsignedchar*rx_speed);
UFR_STATUSDL_APISetDisplayData(INuint8_t*display_data,uint8_tdata_length);
UFR_STATUSDL_APISetRgbData(INuint8_t*display_data,uint8_tdata_length,uint8_tport_name);
UFR_STATUSDL_APISetSpeakerFrequency(uint16_tfrequency);
UFR_STATUSDL_APISetDisplayIntensity(uint8_tintensity);
UFR_STATUSDL_APIGetDisplayIntensity(VARuint8_t*intensity);
UFR_STATUSDL_APISetRgbIntensity(uint8_tintensity);
UFR_STATUSDL_APIGetRgbIntensity(VARuint8_t*intensity);
// DESFIRE functions **************************************************************
/**
... ... @@ -1360,6 +1374,7 @@ UFR_STATUS DL_API uart_transceive(IN uint8_t *send_data, uint8_t send_len, OUT u
VARuint32_t*rcv_len);
UFR_STATUSDL_APIopen_ISO7816_interface(OUTuint8_t*atr_data,VARuint8_t*atr_len);
UFR_STATUSDL_APIOpen_ISO7816_Generic(OUTuint8_t*atr_data,VARuint8_t*atr_len);
UFR_STATUSDL_APIAPDU_switch_to_ISO7816_interface(void);
UFR_STATUSDL_APIclose_ISO7816_interface_no_APDU(void);
UFR_STATUSDL_APIclose_ISO7816_interface_APDU_ISO14443_4(void);
... ... @@ -3891,6 +3906,8 @@ UFR_STATUS DL_API UfrRedLightControlM(UFR_HANDLE hndUFR, uint8_t light_status);
UFR_STATUSDL_APIUfrRgbLightControlM(UFR_HANDLEhndUFR,uint8_tred,uint8_tgreen,uint8_tblue,uint8_tintensity,uint8_tenable);
UFR_STATUSDL_APIRgbControlM(UFR_HANDLEhndUFR,uint8_tred,uint8_tgreen,uint8_tblue);
UFR_STATUSDL_APIUfrRgbExtLightControlM(UFR_HANDLEhndUFR,uint8_tenable);
UFR_STATUSDL_APIUfrSetBadSelectCardNrMaxM(UFR_HANDLEhndUFR,uint8_tbad_select_nr_max);
... ... @@ -3911,6 +3928,8 @@ UFR_STATUS DL_API GetSpeedParametersM(UFR_HANDLE hndUFR, VAR unsigned char *tx_s
UFR_STATUSDL_APISetDisplayDataM(UFR_HANDLEhndUFR,INuint8_t*display_data,uint8_tdata_length);
UFR_STATUSDL_APISetRgbDataM(UFR_HANDLEhndUFR,uint8_t*display_data,uint8_tdata_length,uint8_tport_name);
UFR_STATUSDL_APISetSpeakerFrequencyM(UFR_HANDLEhndUFR,uint16_tfrequency);
UFR_STATUSDL_APISetDisplayIntensityM(UFR_HANDLEhndUFR,uint8_tintensity);
... ... @@ -3965,6 +3984,8 @@ UFR_STATUS DL_API uart_transceiveM(UFR_HANDLE hndUFR, IN uint8_t *send_data, uin
UFR_STATUSDL_APIopen_ISO7816_interfaceM(UFR_HANDLEhndUFR,OUTuint8_t*atr_data,VARuint8_t*atr_len);
UFR_STATUSDL_APIOpen_ISO7816_GenericM(UFR_HANDLEhndUFR,OUTuint8_t*atr_data,VARuint8_t*atr_len);
UFR_STATUSDL_APIAPDU_switch_to_ISO7816_interfaceM(UFR_HANDLEhndUFR);
UFR_STATUSDL_APIclose_ISO7816_interface_no_APDUM(UFR_HANDLEhndUFR);
... ... @@ -6047,7 +6068,7 @@ UFR_STATUS DL_API EspSetReaderTime(IN uint8_t *password, IN uint8_t *time);
UFR_STATUSDL_APIEspSetIOState(uint8_tpin,uint8_tstate);
UFR_STATUSDL_APIEspGetIOState(OUTuint8_t*state);
UFR_STATUSDL_APIEspSetTransparentReader(uint8_treader);
UFR_STATUSDL_APIEspGetReaderSerialNumber(uint32_t*SerialNumber);
UFR_STATUSDL_APIEspGetReaderSerialNumber(VARuint32_t*SerialNumber);
//NDEF MESSAGES
//----------------------------------------------------------
... ... @@ -6082,7 +6103,7 @@ enum WIFI_ENC_TYPE {
UFR_STATUSDL_APIWriteNdefRecord_WiFi(uint8_tndef_storage,INconstchar*ssid,uint8_tauth_type,uint8_tencryption_type,
INconstchar*password);
UFR_STATUSDL_APIWriteNdefRecord_Bluetooth(uint8_tndef_storage,INconstchar*bt_mac_address);
UFR_STATUSDL_APIWriteNdefRecord_BT(uint8_tndef_storage,INconstchar*bt_mac_address);
UFR_STATUSDL_APIWriteNdefRecord_SMS(uint8_tndef_storage,INconstchar*phone_number,INconstchar*message);
UFR_STATUSDL_APIWriteNdefRecord_Bitcoin(uint8_tndef_storage,INconstchar*bitcoin_address,INconstchar*amount,
INconstchar*message);
... ... @@ -6102 7 + 6123 7 @@ UFR_STATUS DL_API WriteNdefRecord_Phone(uint8_t ndef_storage, IN const char *pho
UFR_STATUSDL_APIWriteNdefRecord_WiFiM(UFR_HANDLEhndUFR,uint8_tndef_storage,INconstchar*ssid,uint8_tauth_type,
uint8_tencryption_type,INconstchar*password);
UFR_STATUSDL_APIWriteNdefRecord_BluetoothM(UFR_HANDLEhndUFR,uint8_tndef_storage,INconstchar*bt_mac_address);
UFR_STATUSDL_APIWriteNdefRecord_BTM(UFR_HANDLEhndUFR,uint8_tndef_storage,INconstchar*bt_mac_address);
UFR_STATUSDL_APIWriteNdefRecord_SMSM(UFR_HANDLEhndUFR,uint8_tndef_storage,INconstchar*phone_number,INconstchar*message);
UFR_STATUSDL_APIWriteNdefRecord_BitcoinM(UFR_HANDLEhndUFR,uint8_tndef_storage,INconstchar*bitcoin_address,INconstchar*amount,
INconstchar*message);
... ... @@ -6136,7 +6157,7 @@ UFR_STATUS DL_API ReadNdefRecord_Viber(OUT char *message);
UFR_STATUSDL_APIReadNdefRecord_Contact(OUTchar*vCard);
UFR_STATUSDL_APIReadNdefRecord_Phone(OUTchar*phone_number);
UFR_STATUSDL_APIReadNdefRecord_SMS(OUTchar*phone_number,OUTchar*message);
UFR_STATUSDL_APIReadNdefRecord_Bluetooth(OUTchar*bt_mac_address);
UFR_STATUSDL_APIReadNdefRecord_BT(OUTchar*bt_mac_address);
UFR_STATUSDL_APIReadNdefRecord_WiFiM(UFR_HANDLEhndUFR,OUTchar*ssid,OUTchar*auth_type,OUTchar*encryption_type,
OUTchar*password);
... ... @@ -6154,7 +6175,7 @@ UFR_STATUS DL_API ReadNdefRecord_ViberM(UFR_HANDLE hndUFR, OUT char *message);
UFR_STATUSDL_APIReadNdefRecord_ContactM(UFR_HANDLEhndUFR,OUTchar*vCard);
UFR_STATUSDL_APIReadNdefRecord_PhoneM(UFR_HANDLEhndUFR,OUTchar*phone_number);
UFR_STATUSDL_APIReadNdefRecord_SMSM(UFR_HANDLEhndUFR,OUTchar*phone_number,OUTchar*message);
UFR_STATUSDL_APIReadNdefRecord_BluetoothM(UFR_HANDLEhndUFR,OUTchar*bt_mac_address);
UFR_STATUSDL_APIReadNdefRecord_BTM(UFR_HANDLEhndUFR,OUTchar*bt_mac_address);
c_stringDL_APIParseNdefMessage(INuint8_t*type_record,uint8_ttype_len,INuint8_t*payload,uint32_tpayload_len);
... ...
... ... @@ -287,9 +287,9 @@ class ReadViewController: UIViewController {
{
imgPayload.image=UIImage(named:"wifi_icon")
btnPayload.setTitle(payloadStr,for:.normal)
}elseif(payloadStr.starts(with:"Bluetooth"))
}elseif(payloadStr.starts(with:"BT"))
{
imgPayload.image=UIImage(named:"bluetooth_icon")
imgPayload.image=UIImage(named:"link_icon")
btnPayload.setTitle(payloadStr,for:.normal)
}elseif(payloadStr.starts(with:"Package"))
{
... ...
... ... @@ -86,8 +86,8 @@ extension WriteViewController: UITableViewDelegate, UITableViewDataSource
performSegue(withIdentifier:"showURIWrite",sender:self)
break
case2:
//print("Bluetooth selected")
performSegue(withIdentifier:"showBluetoothWrite",sender:self)
performSegue(withIdentifier:"showBTWrite",sender:self)
break
case3:
//print("SMS selected")
... ... @@ -162,7 +162,7 @@ extension WriteViewController
{
letWifiItem=FunctionItem(image:UIImage(named:"wifi_icon")!,title:"WiFi")
letUriItem=FunctionItem(image:UIImage(named:"uri_icon")!,title:"URI")
letBlueToothItem=FunctionItem(image:UIImage(named:"bluetooth_icon")!,title:"Bluetooth")
letBTItem=FunctionItem(image:UIImage(named:"link_icon")!,title:"BT")
letSMSItem=FunctionItem(image:UIImage(named:"sms_icon")!,title:"SMS")
letLocationItem=FunctionItem(image:UIImage(named:"geolocation_icon")!,title:"Location")
letDestinationItem=FunctionItem(image:UIImage(named:"navi_icon")!,title:"Destination")
... ... @@ -179,6 +179,6 @@ extension WriteViewController
letWhatsappItem=FunctionItem(image:UIImage(named:"whatsapp2_icon")!,title:"Whatsapp")
return[WifiItem,UriItem,BlueToothItem,SMSItem,LocationItem,DestinationItem,EmailItem,AddressItem,ApplicationItem,TextItem,StreetviewItem,PhoneItem,ContactItem,BitcoinItem,SkypeItem,ViberItem,WhatsappItem]
return[WifiItem,UriItem,BTItem,SMSItem,LocationItem,DestinationItem,EmailItem,AddressItem,ApplicationItem,TextItem,StreetviewItem,PhoneItem,ContactItem,BitcoinItem,SkypeItem,ViberItem,WhatsappItem]
}
}
... ... @@ -6,7 +6,7 @@
//
importUIKit
classBluetoothViewController:UIViewController{
classBTViewController:UIViewController{
@IBOutletweakvarstoreInto:UISegmentedControl!
... ... @@ -25,7 +25,7 @@ class BluetoothViewController: UIViewController {
self.view.backgroundColor=UIColor(patternImage:UIImage(named:"background")!)
}
@IBActionfuncwriteBluetooth(_sender:Any){
@IBActionfuncwriteBT(_sender:Any){
varalert=UIAlertController(title:"Parameter error:",message:"",preferredStyle:.alert)
... ... @@ -44,18 +44,18 @@ class BluetoothViewController: UIViewController {
return
}
status=WriteNdefRecord_Bluetooth(UInt8(ndef_storage),txtMacAddress.text)
status=WriteNdefRecord_BT(UInt8(ndef_storage),txtMacAddress.text)
letstrStatus=字符串(cString:UFR_Status2String(status))
if(status==UFR_OK)
{
alert=UIAlertController(title:"Write BluetoothNDEF was successful",message:"Status:\(strStatus)",preferredStyle:.alert)
alert=UIAlertController(title:"Write BTNDEF was successful",message:"Status:\(strStatus)",preferredStyle:.alert)
DispatchQueue.main.asyncAfter(deadline:.now()+2.5){
alert.dismiss(animated:true,completion:nil)
}
}else
{
alert=UIAlertController(title:"Write BluetoothNDEF failed!",message:"Status:\(strStatus)",preferredStyle:.alert)
alert=UIAlertController(title:"Write BTNDEF failed!",message:"Status:\(strStatus)",preferredStyle:.alert)
DispatchQueue.main.asyncAfter(deadline:.now()+2.5){
alert.dismiss(animated:true,completion:nil)
}
... ... @@ -66,7 +66,7 @@ class BluetoothViewController: UIViewController {
}
}
extensionBluetoothViewController:UITextFieldDelegate
extensionBTViewController:UITextFieldDelegate
{
functextFieldShouldReturn(_textField:UITextField)->Bool{
textField.endEditing(true)
... ...
    Markdownis supported
    0%or
    You are about to add0peopleto the discussion. Proceed with caution.
    Finish editing this message first!
    Pleaseregisterorto comment
    Baidu
    map