edit tiapp.xml and set
<prerendered-icon>true</prerendered-icon>
Icon and splash image dimension and name convention:
1. Icon file:
dimention: 57x57, 72x72, 114x114
file location: /resources/iphone/appicon.png, appicon-72.png (arbitrary), appicon@2x.png
file location: /resources/iphone/appicon.png, appicon-72.png (arbitrary), appicon@2x.png
specify icon image location in info.plist:
<key>CFBundleIconFiles</key>
<array>
<string>appicon.png</string>
<string>appicon-72.png</string>
</array>
2. Splash file:
dimention: 320x480, 640x960
file location: /resources/iphone/Default.png, Default@2x.png
To change display name under icon:
1. copy and paste the info.plist to the project root directory.
2. change the value for CFBundleDisplayName and CFBundleName
3. remove builded files and rebuild, it will copy info.plist from project root directory before compilation.
To invoke another app inside my app:
Titanium.Platform.openURL('nursingvideo://');where nursingvideo is specified in info.plist parameter CFBundleURLSchemes
To check which app invoke my app:
App A invoke App B by "AppB://AppA"
App B add the following checking:
var launchObj = Ti.App.getArgument();
if(launchObj && launchObj.hasOwnProperty('url')){
var launchURL = launchObj.url;
Ti.App.callerApp = launchURL.substring(launchURL.indexOf('//')+2, launchURL.length);
}where Ti.App.callerApp is an arbitrary application-wide global variable used to store the caller app name. In this case, AppA
Troubleshoot
Problem: video file didn't play automatically right after finishing download to device
Solution: save the downloaded file to applicationDataDirectory instead of resourcesDirectory
Problem: can't replace database file in app
Solution: files inside resourcesDirectory are not allowed to be removed. Try place the database file somewhere else.
沒有留言:
張貼留言