您的位置:首页 > 移动开发 > IOS开发

【ISO】【2011-3-20】【IOS 应用中弹出WiFi 提示框的方法】【转】

2012-03-20 13:21 309 查看




如果 iOS 程序中用到了 WiFi,想有 WiFi 提示,只需要在 .plist 文件中加入如下 Key/Value 即可:

键名:Application uses Wi-Fi 值:YES

键名:SBUsesNetwork 值:3






示例代码:(在项目 .plist 做如下类似更改)

<?xml version=”1.0″ encoding=”UTF-8″?>

<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN” “http://www.apple.com/DTDs/PropertyList-1.0.dtd”>

<plist version=”1.0″>

<dict>

<key>CFBundleDevelopmentRegion</key>

<string>English</string>

<key>CFBundleDisplayName</key>

<string>${PRODUCT_NAME}</string>

<key>CFBundleExecutable</key>

<string>${EXECUTABLE_NAME}</string>

<key>CFBundleIconFile</key>

<string></string>

<key>CFBundleIdentifier</key>

<string>com.yourcompany.${PRODUCT_NAME:rfc1034identifier}</string>

<key>CFBundleInfoDictionaryVersion</key>

<string>6.0</string>

<key>CFBundleName</key>

<string>${PRODUCT_NAME}</string>

<key>CFBundlePackageType</key>

<string>APPL</string>

<key>CFBundleSignature</key>

<string>????</string>

<key>CFBundleVersion</key>

<string>1.0</string>

<key>LSRequiresIPhoneOS</key>

<true/>

<key>NSMainNibFile</key>

<string>MainWindow</string>

<key>UIRequiresPersistentWiFi</key>

<true/>

<key>SBUsesNetwork</key>

<string>3</string>

</dict>

</plist>

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: