I dragged the folder BluetoothManager.framework from finder into the Frameworks group in project navigator. It builds successfully for device, but can't find the framework when I build for simulator. I understand that simulator doesn't support bluetooth, but I need to have it buildable for simulator, so that other people can continue testing their part in simulator. How can I exclude the framework from linking when building for simulator? 开发者_JAVA百科Thank you!
Weaklink the library, add exclude any bluetooth code with compiler directives :
#if !TARGET_IPHONE_SIMULATOR
//Bluetooth code
#endif
精彩评论