Skip to content

Commit

Permalink
Bug fixes on app_list an app_new page
Browse files Browse the repository at this point in the history
  • Loading branch information
lludo committed Apr 14, 2011
1 parent 365ba11 commit 4fabc0e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion back/application_list.php
Expand Up @@ -52,7 +52,10 @@

echo '<ul>';
foreach ($applications AS $application) {
echo '<li>Application: <br/>->name: ' . $application->getName() . '<br />->bundle: ' . $application->getBundleId() . '<br />->link: <a href="../app/' . $application->getName() . '.ipa">../app/' . $application->getName() . '.ipa</a></li>' . PHP_EOL;
echo '<li>Application: <br/>->name: ' . $application->getName() . '<br />' .
'->bundle: ' . $application->getBundleId() . '<br />' .
'->app link: <a href="../app/' . $application->getName() . '.ipa">../app/' . $application->getName() . '.ipa</a><br />' .
'->install on device: <a href="itms-services://?action=download-manifest&url=http://www.runthisapp.com/app/' . $application->getName() . '.plist">Install on device</a></li>' . PHP_EOL;
}
echo '</ul>' . PHP_EOL;

Expand Down
21 changes: 16 additions & 5 deletions back/application_new.php
Expand Up @@ -44,7 +44,7 @@ function getInfoPlistPath($appName) {
if ( file_exists($plistPath . '.app/Info.plist') ) {
$plistFilePath = $plistPath . '.app/Info.plist';
} else {
$plistFilePath = $plistPath . '.app/' . appName . '-Info.plist';
$plistFilePath = $plistPath . '.app/' . $appName . '-Info.plist';
}

return $plistFilePath;
Expand Down Expand Up @@ -78,13 +78,24 @@ function fillAppInfoWithPlist($plistfile, $application) {
$plist->parse( $plistValue, CFPropertyList::FORMAT_AUTO);
$plistData = $plist->toArray();

echo 'App display name: ' . $plistData['CFBundleDisplayName'] . '<br />'; //TODO if '${PRODUCT_NAME}' use <app_ame>
echo 'Icon file: ' . $plistData['CFBundleIconFile'] . '<br />'; //TODO if empty use 'Icon.png'
echo 'Bundle identifier: ' . $plistData['CFBundleIdentifier'] . '<br />'; //TODO if contains('${PRODUCT_NAME:rfc1034identifier}') replace by <app_ame>
//TODO if '${PRODUCT_NAME}' use <app_ame>
echo 'App display name: ' . $plistData['CFBundleDisplayName'] . '<br />';

//Get icon, if empty use 'Icon.png'
if ( isset($plistData['CFBundleIconFile']) && $plistData['CFBundleIconFile'] != 0 ) {
$iconFile = $plistData['CFBundleIconFile'];
} else {
$iconFile = 'Icon.png';
}
echo 'Icon file: ' . $iconFile . '<br />';

//TODO if contains('${PRODUCT_NAME:rfc1034identifier}') replace by <app_ame>
echo 'Bundle identifier: ' . $plistData['CFBundleIdentifier'] . '<br />';

echo 'Version: ' . $plistData['CFBundleVersion'] . '<br />';

$application->setName($plistData['CFBundleDisplayName']);
$application->setIconFile($plistData['CFBundleIconFile']);
$application->setIconFile($iconFile);
$application->setBundleId($plistData['CFBundleIdentifier']);

//TODO create a first version of this app
Expand Down

0 comments on commit 4fabc0e

Please sign in to comment.