     .then (destPath) =>
       @icon.attr('src', destPath[0]) if destPath.length > 0
 
+  serialize: ->
+    _.reduce KEYS, (all, key) =>
+      all[key] = this[key].getText()
+
+    , {icon: @icon[0].src.replace "file://", ""}
+
+    # icon: @icon[0].src.replace "file://", ""
+    # title: @title.getText()
+    # version: @version.getText()
+    # build: @build.getText()
+    # bundleIdentifier: @bundleIdentifier.getText()
+    # mobileprovision: @mobileprovision.getText()
+    # p12: @p12.getText()
+    # p12_password: @p12_password.getText()
+    # scheme: @scheme.getText()
+    # content_src: @content_src.getText()
+    # repository_url: @repository_url.getText()
+
   getResult: ->
-    icon:@icon[0].src.replace "file://", ""
-    title: @title.getText()
-    version: @version.getText()
-    build: @build.getText()
-    BundleIdentifier:@BundleIdentifier.getText()
-    Mobileprovision: @mobileprovision.getText()
-    p12: @p12.getText()
-    p12_password: @password.getText()
-    scheme: @scheme.getText()
-    content_src: @src.getText()
-    repository_url: @url.getText()
+    @serialize()

    @build.setText "1"

    # restore last options

  destroy: ->

    # save last options

    console.log  "ios-build-view destroy."
    @remove()

          else
            each.view.setText destPath[0]

    @repository_url.on 'click', =>
      new AppRepoListView()
      .on 'confirmed', (event, repo) => @repository_url.setText repo.url
      .attach()
      .filterPlatform('ios')

