DO RUBY
  • Mobile
    • Modularization
      • 再谈移动端跨平台框架 Flutter 与 React Native
      • 打造工业级 App 开发流程 (JIRA+CI/CD)
      • 模块化设计-iOS团队协作开发
      • 剖析几种流行的 iOS 设计模式--MVC;MVVM;VIPER
    • iOS Foundation
      • ARC 与内存管理
      • 从头梳理内存与内存管理
      • 事件交付: 响应链
      • iOS 手势识别
      • iOS 手势操作详解
      • UIKit Class Hierarchy
      • iOS 13 兼容性适配检查
      • iOS 上的蓝牙框架 Bluetooth
    • Performance
      • App 启动优化之一:main.m 方法之前的优化
    • Debug
      • 在Xcode里,为项目定义不同的环境配置
      • 调试我们的 APP (iOS)
      • URLCache 设置不当引起的 App 故障
      • ASDebugger -- 超简单的 App 网络监控调试工具
    • Tips
      • Xcode 自动生成 Objective C SDK 文档
      • 无线分发应用--通过 Safari 安装 App
      • 智能的 App Banner - Smart App Banners
      • 点阴影区关闭 Modal View Controller
    • 3rd Party
      • MKNetworkKit Auto Caching
  • Computer Science
    • 重头梳理网络协议栈
  • Productivity
    • Git
      • Gitflow 在客户端开发中的实践
    • Security
      • 10 分钟将你的网站升级到 HTTPS
    • Others
      • FlexBox 使用向导
  • TECH MANAGER
    • Google VP 聊职场干货
    • 无身份建立影响力 Influence without Authority
Powered by GitBook
On this page
  • 简单几步:
  • plist 文件模板:
  • 网页模板
  • 注意:
  • 参考:
  • 更新 (2014-3)

Was this helpful?

  1. Mobile
  2. Tips

无线分发应用--通过 Safari 安装 App

iOS 支持以无线方式安装企业级应用程序,这可让您在不使用 iTunes 的情况下将内部软件分发给用户。

简单几步:

  1. 用户需要将设备的UDID加到 Apple Developer Center 中心的设备里,并更新 .mobileprovision文件

  2. Scheme 里将 Archive 的 Build Configuration 换成 Debug 模式

  3. Archive 后从 Organizer 找到app文件,生成 ipa 文件

  4. 生成 plist 文件,将它与 ipa 文件放到服务器上,并可通过网址访问并可下载

  5. 做一个网页供大家访问后点键接跳转下载此plist, 如果生成将网址生成一个二维码,就更方便了。

比如:

Install App

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>items</key>
    <array>
        <dict>
            <key>assets</key>
            <array>
                <dict>
                    <key>kind</key>
                    <string>software-package</string>
                    <key>url</key>
                    <string>{你的域名http://doruby.com/xxx.ipa}</string>
                </dict>
            </array>
            <key>metadata</key>
            <dict>
                <key>bundle-identifier</key>
                <string>{你的bundle identifier}</string>
                <key>bundle-version</key>
                <string>1.0</string>
                <key>kind</key>
                <string>software</string>
                <key>title</key>
                <string>{App名称}</string>
            </dict>
        </dict>
    </array>
</dict>
</plist>

网页模板

  • 注: {}里的内容是要替换的

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=320, height=460, user-scalable=no,
initial-scale=1.0" />
<title>Install Dev App</title>
</head>
<br/><br/><br/>
<body>
<div align="center">
<a href="itms-services://?action=download-manifest&url={http://doruby.com/xxx.plist}"  style="color:orange; font-size:24px">Install the App</a>
</div>
</body>
</html>

注意:

可能需要配置你的 Web 服务器以便正确地传输清单文件和应用程序文件。

  • 对于 OS X Server,将以下 MIME 类型添加到 Web 服务的“MIME Types”(MIME 类型)设置中:

application/octet-stream ipa

text/xml plist

  • 对于 IIS,使用 IIS Manager 在服务器的“属性”页面中添加 MIME 类型:

.ipa application/octet-stream

.plist text/xml

参考:

wireless enterprise app distribution

enterprise deployment of ios apps

example:

my app

更新 (2014-3)

iOS 7.1修改了manifest.plist文件的访问协议,之前可以通过http协议访问,在iOS 7.1之后必须使用https协议方式访问。

比如之前的链接代码为:

itms-services://?action=download-manifest&url=http://doruby.com/manifest.plist

需要修改为:

itms-services://?action=download-manifest&url=https://doruby.com/manifest.plist

如果你没有放置或制作 SSL 证书的地方,可以将 plist 文件放到 Dropbox 上,然后得到文件的下载地址: https://www.dropbox.com/s/s3zl5vzxgvjtwfw/app.plist, 替换 www.dropbox.com 为 dl.dropboxusercontent.com 即可。

PreviousXcode 自动生成 Objective C SDK 文档Next智能的 App Banner - Smart App Banners

Last updated 5 years ago

Was this helpful?