上一个练习,做了一个简单但是完整的Web应用,使用HTML5技术实现的。
今天做个更加有趣的小练习,现在我再通过Apache Cordova来将其封装为iOS上的移动应用。
我们可以看到基本上不需要做任何修改就可以迁移到iOS平台上了。
Cordova就是以前的PhoneGap。
主页地址:https://cordova.apache.org/
 
1.安装Cordova
我这里安装的cordova 3.0.6
 
2.创建一个项目Apache Cordova 项目,名称叫employee
cordova -d create ~/Documents/CordovaProjects/employee com.sample employee
 
 
增加对iOS的支持:
cordova -d platform add ios
 
3.下载sapui5的包,解压缩后将resource文件夹拷贝到employee/www下
 
4.修改一下index.html
<!DOCTYPE html>
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements.  See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership.  The ASF licenses this file
    to you under the Apache License, Version 2.0 (the
    "License"); you may n
                
                  
                  
                  
                  
本文介绍了如何通过Apache Cordova将一个基于HTML5的Web应用转化为iOS上的移动应用。详细步骤包括安装Cordova、创建Cordova项目、添加iOS支持、集成SAPUI5资源、修改index.html以及在XCode中运行和测试。利用Cordova,可以轻松将Web应用迁移至不同手机平台。
          
最低0.47元/天 解锁文章
                          
                      
      
          
                
                
                
                
              
                
                
                
                
                
              
                
                
              
            
                  
					302
					
被折叠的  条评论
		 为什么被折叠?
		 
		 
		
    
  
    
  
            


            