kevin 3 anni fa
parent
commit
37861150a7

+ 2 - 1
.gitignore

@@ -6,4 +6,5 @@ Pods/
 src/venv/
 .idea/
 .DS_Store
-Podfile.lock
+Podfile.lock
+src/__pycache__/

+ 3 - 3
appbuilder-ios/AppBuilder/AppBuilder/Base.lproj/Main.storyboard

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="nD6-T3-59p">
-    <device id="retina6_7" orientation="portrait" appearance="light"/>
+    <device id="retina6_7" orientation="portrait" appearance="dark"/>
     <dependencies>
         <deployment identifier="iOS"/>
         <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
@@ -35,7 +35,7 @@
                         <subviews>
                             <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zT9-mO-2xu">
                                 <rect key="frame" x="0.0" y="44" width="428" height="882"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <color key="backgroundColor" red="0.36078431372549019" green="0.38823529411764707" blue="0.40392156862745099" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <wkWebViewConfiguration key="configuration">
                                     <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
                                     <wkPreferences key="preferences"/>
@@ -255,7 +255,7 @@
                         <subviews>
                             <wkWebView contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bvD-XN-Tvh">
                                 <rect key="frame" x="0.0" y="44" width="428" height="882"/>
-                                <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <color key="backgroundColor" red="0.36078431372549019" green="0.38823529411764707" blue="0.40392156862745099" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
                                 <wkWebViewConfiguration key="configuration">
                                     <audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
                                     <wkPreferences key="preferences"/>

+ 1 - 1
appbuilder-ios/AppBuilder/AppBuilder/FirstTabViewController.swift

@@ -18,7 +18,7 @@ class FirstTabViewController: UIViewController, WKUIDelegate, UIScrollViewDelega
         super.viewDidLoad()
         let cpaasMode = PrefsUtil.getCpaasMode()
         let isBurger = cpaasMode == PrefsUtil.CPAAS_MODE_BURGER
-        navigationController?.navigationBar.backgroundColor = .white
+//        navigationController?.navigationBar.backgroundColor = .white
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
         let tapGesture = UITapGestureRecognizer(target: self, action: #selector(collapseDocked))
         tapGesture.cancelsTouchesInView = false

+ 0 - 1
appbuilder-ios/AppBuilder/AppBuilder/FourthTabViewController.swift

@@ -29,7 +29,6 @@ public class FourthTabViewController: UIViewController, UITableViewDelegate, UIT
         tableView.dataSource = self
         
         self.navigationController?.navigationBar.topItem?.title = "Settings".localized();
-        view.backgroundColor = .white
         
         makeMenu()
         

+ 3 - 3
appbuilder-ios/AppBuilder/AppBuilder/SecondTabViewController.swift

@@ -195,11 +195,11 @@ class SecondTabViewController: UIViewController, UIScrollViewDelegate {
     @objc func startConversation(){
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
         navigationController.modalPresentationStyle = .fullScreen
-        navigationController.navigationBar.tintColor = .white
+//        navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
-        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-        navigationController.navigationBar.titleTextAttributes = textAttributes
+//        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//        navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
         self.navigationController?.present(navigationController, animated: true, completion: nil)
     }

+ 1 - 1
appbuilder-ios/AppBuilder/AppBuilder/ThirdTabViewController.swift

@@ -64,7 +64,7 @@ class ThirdTabViewController: UIViewController, UIScrollViewDelegate, UIGestureR
         self.navigationController?.navigationBar.topItem?.title = Bundle.main.displayName
         let cpaasMode = PrefsUtil.getCpaasMode()
         let isBurger = cpaasMode == PrefsUtil.CPAAS_MODE_BURGER
-        navigationController?.navigationBar.backgroundColor = .white
+//        navigationController?.navigationBar.backgroundColor = .white
         navigationController?.setNavigationBarHidden(!isBurger, animated: false)
     }
     

+ 23 - 23
appbuilder-ios/AppBuilder/AppBuilder/ViewController.swift

@@ -141,7 +141,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         }
         let numberOfItems = CGFloat(tabBar.items!.count)
         let tabBarItemSize = CGSize(width: tabBar.frame.width / numberOfItems, height: tabBar.frame.height)
-        tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.white, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
+        tabBar.selectionIndicatorImage = UIImage.imageWithColor(color: UIColor.grayColor, size: tabBarItemSize).resizableImage(withCapInsets: .zero)
         UIFont.overrideInitialize()
     }
     
@@ -159,11 +159,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "changeNS") as! ChangeNamePassswordViewController
                 let navigationController = UINavigationController(rootViewController: controller)
                 navigationController.modalPresentationStyle = .fullScreen
-                navigationController.navigationBar.tintColor = .white
+//                navigationController.navigationBar.tintColor = .white
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
-                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-                navigationController.navigationBar.titleTextAttributes = textAttributes
+//                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//                navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
                 ViewController.def?.show(b: false)
                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.dismiss(animated: true, completion: nil)
@@ -277,7 +277,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
         print("buttonCenterX \(buttonCenterX)")
         print("buttonCenterY \(buttonCenterY)")
         ViewController.middleButton = UIButton(frame: CGRect(x: buttonCenterX - 40 , y: buttonCenterY - 40, width: 80, height: 80))
-        ViewController.middleButton.setBackgroundImage(UIImage(named: "pb_icon")!.withRenderingMode(.alwaysOriginal), for: .normal)
+        ViewController.middleButton.setBackgroundImage(UIImage(named: "pb_ball", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
         ViewController.middleButton.layer.shadowColor = UIColor.black.cgColor
         ViewController.middleButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
         ViewController.middleButton.layer.shadowOpacity = 1.0
@@ -359,11 +359,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
     @objc func qmeraLongPress() {
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
         navigationController.modalPresentationStyle = .fullScreen
-        navigationController.navigationBar.tintColor = .white
+//        navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
-        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-        navigationController.navigationBar.titleTextAttributes = textAttributes
+//        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//        navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
         UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
     }
@@ -387,12 +387,12 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
                 let controller = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "myHistoryCC") as! HistoryCCViewController
                 controller.isOfficer = true
                 let navigationController = UINavigationController(rootViewController: controller)
-                navigationController.navigationBar.tintColor = .white
+//                navigationController.navigationBar.tintColor = .white
                 navigationController.modalPresentationStyle = .fullScreen
                 navigationController.navigationBar.barTintColor = .mainColor
                 navigationController.navigationBar.isTranslucent = false
-                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-                navigationController.navigationBar.titleTextAttributes = textAttributes
+//                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//                navigationController.navigationBar.titleTextAttributes = textAttributes
                 navigationController.view.backgroundColor = .mainColor
                 UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
             } else {
@@ -412,11 +412,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             show(b: false)
             let navigationController = UINavigationController(rootViewController: QmeraCreateStreamingViewController())
             navigationController.modalPresentationStyle = .fullScreen
-            navigationController.navigationBar.tintColor = .white
+//            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-            navigationController.navigationBar.titleTextAttributes = textAttributes
+//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
@@ -429,11 +429,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             let callContact = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactSID")
             let navigationController = UINavigationController(rootViewController: callContact)
             navigationController.modalPresentationStyle = .fullScreen
-            navigationController.navigationBar.tintColor = .white
+//            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-            navigationController.navigationBar.titleTextAttributes = textAttributes
+//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
@@ -445,11 +445,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
             show(b: false)
             let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "contactChatNav") as! UINavigationController
             navigationController.modalPresentationStyle = .fullScreen
-            navigationController.navigationBar.tintColor = .white
+//            navigationController.navigationBar.tintColor = .white
             navigationController.navigationBar.barTintColor = .mainColor
             navigationController.navigationBar.isTranslucent = false
-            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-            navigationController.navigationBar.titleTextAttributes = textAttributes
+//            let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//            navigationController.navigationBar.titleTextAttributes = textAttributes
             navigationController.view.backgroundColor = .mainColor
             UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
         }
@@ -458,11 +458,11 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
     @objc func settingTap() {
         let navigationController = AppStoryBoard.Palio.instance.instantiateViewController(withIdentifier: "settingNav") as! UINavigationController
         navigationController.modalPresentationStyle = .fullScreen
-        navigationController.navigationBar.tintColor = .white
+//        navigationController.navigationBar.tintColor = .white
         navigationController.navigationBar.barTintColor = .mainColor
         navigationController.navigationBar.isTranslucent = false
-        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
-        navigationController.navigationBar.titleTextAttributes = textAttributes
+//        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+//        navigationController.navigationBar.titleTextAttributes = textAttributes
         navigationController.view.backgroundColor = .mainColor
         UIApplication.shared.windows.filter {$0.isKeyWindow}.first?.rootViewController?.present(navigationController, animated: true, completion: nil)
     }

+ 117 - 53
src/mainIOS.py

@@ -15,12 +15,17 @@ app.base_project = "/Users/maronakins/Documents/AppBuilder/appbuilder-ios/AppBui
 app.nexilis_lite = "/Users/maronakins/Documents/AppBuilder/appbuilder-ios/NexilisLite"
 app.temp_folder = "/Users/maronakins/BuildIos"
 app.app_folder = "/Users/maronakins/"
+app.asset_folder = "/Users/maronakins/BuildIosAssets"
 app.verbose = True
 app.ssl = None
 app.keytool = '/usr/bin/keytool'
 app.username = "maronakins"
 # app.ios_platform_ids = ["bb8f256703e8fbe84da414cee20cb4d0eca3388d"]
 app.ios_platform_ids = []
+app.app_name = "AppBuilder"
+app.package_id = "io.newuniverse.AppBuilder420"
+app.version_code = "1"
+app.version_name = "1.0.0"
 
 app.base_project_name = os.path.basename(app.base_project)
 
@@ -154,29 +159,54 @@ def change_font(c_code_path, font):
     pass
 
 
-def change_logo(c_code_path, logo, logo_float=None):
+def change_logo(c_code_path, lib_dest, logo, logo_float=None):
     app_icon_set = [29,40,57,58,60,80,87,114,120,180,1024]
     app_icon_dir = os.path.join(c_code_path, 'Assets.xcassets/AppIcon.appiconset')
-    app_float_dir = os.path.join(c_code_path, 'Assets.xcassets/pb_icon.imageset')
+    app_float_dir = os.path.join(lib_dest, 'NexilisLite/Resource/Assets.xcassets/pb_ball.imageset')
     if isinstance(logo, str):
-        logo = requests.get('https://id.palio.io/dashboardv2/uploads/logo/{}'.format(logo))
-        for size in app_icon_set:
-            img_path = os.path.join(app_icon_dir, "{}.png".format(size))
-            with open(img_path, "wb") as f:
-                f.write(logo.content)
-            with open(img_path, "rb") as f:
-                l = Image.open(f)
-                l = l.resize((size, size))
-            l.save(img_path, "PNG")
+        # try:
+        #     logo_url = requests.get('https://newuniverse.io/dashboardv2/uploads/logo/{}'.format(logo))
+        #     for size in app_icon_set:
+        #         img_path = os.path.join(app_icon_dir, "{}.png".format(size))
+        #         with open(img_path, "wb") as f:
+        #             f.write(logo_url.content)
+        #         with open(img_path, "rb") as f:
+        #             l = Image.open(f)
+        #             l = l.resize((size, size))
+        #         l.save(img_path, "PNG")
+        # except:
+        try:
+            logo_path = os.path.join(app.asset_folder, "logo", "{}".format(logo))
+            for size in app_icon_set:
+                img_path = os.path.join(app_icon_dir, "{}.png".format(size))
+                with open(logo_path, "rb") as f:
+                    l = Image.open(f)
+                    l = l.resize((size, size))
+                l.save(img_path, "PNG")
+        except:
+            print("error logo: {}".format(logo))
+            return
         if logo_float:
-            logo_float = requests.get('https://id.palio.io/dashboardv2/uploads/logofloat/{}'.format(logo_float))
-            img_path = os.path.join(app_float_dir, "nexilis_icon.png")
-            with open(img_path, "wb") as f:
-                f.write(logo_float.content)
-            with open(img_path, "rb") as f:
-                l = Image.open(f)
-                l = l.resize((512, 512))
-            l.save(img_path, "PNG")
+            # try:
+            #     logo_float_url = requests.get('https://newuniverse.io/dashboardv2/uploads/logofloat/{}'.format(logo_float))
+            #     img_path = os.path.join(app_float_dir, "pb_ball.png")
+            #     with open(img_path, "wb") as f:
+            #         f.write(logo_float_url.content)
+            #     with open(img_path, "rb") as f:
+            #         l = Image.open(f)
+            #         l = l.resize((512, 512))
+            #     l.save(img_path, "PNG")
+            # except:
+            try:
+                logo_float_path = os.path.join(app.asset_folder, "logofloat", "{}".format(logo))
+                img_path = os.path.join(app_float_dir, "pb_ball.png".format(size))
+                with open(logo_float_path, "rb") as f:
+                    l = Image.open(f)
+                    l = l.resize((size, size))
+                l.save(img_path, "PNG")
+            except:
+                print("error logofloat: {}".format(logo))
+                return
     else:
         logo = Image.open(logo)
         for size in app_icon_set:
@@ -194,27 +224,40 @@ def change_background(c_code_path, background):
     assets_dir = os.path.join(c_code_path, "Assets.xcassets")
     img_src_path_1 = os.path.join(assets_dir, "pb_lbackground_1.imageset")
     if isinstance(background, str):
-        background = []
         background = background.split(",")
         for i, b in enumerate(background):
             n = i + 1
+            print(b)
             img_src_path = os.path.join(assets_dir, "pb_lbackground_{}.imageset".format(n))
+            print(img_src_path)
             if n != 1:
-                shutil.copy(img_src_path_1,img_src_path)
-                contents_json = os.path.join(img_src_path, "Contents.json")
-                with open(contents_json, "r") as f:
-                    file_source = f.read()
-                replaced = file_source.replace("lbackground_1", "= lbackground_{}".format(n))
-                with open(contents_json, "w") as f:
-                    f.write(replaced)
+                shutil.copytree(img_src_path_1,img_src_path)
+            os.remove(os.path.join(img_src_path,"pb_lbackground_1.png"))
+            contents_json = os.path.join(img_src_path, "Contents.json")
+            with open(contents_json, "r") as f:
+                file_source = f.read()
+            replaced = file_source.replace("lbackground_1", "lbackground_{}".format(n))
+            with open(contents_json, "w") as f:
+                f.write(replaced)
             img_path = os.path.join(img_src_path, "pb_lbackground_{}.png".format(n))
-            logo = requests.get('https://id.palio.io/dashboardv2/uploads/background/{}'.format(b))
-            with open(img_path, "wb") as f:
-                f.write(logo.content)
-            with open(img_path, "rb") as f:
-                logo = Image.open(f)
-                logo = logo.resize((600, 1250))
-            logo.save(img_path, "PNG")
+            # try:
+            #     background_url = requests.get('https://newuniverse.io/dashboardv2/uploads/background/{}'.format(b))
+            #     with open(img_path, "wb") as f:
+            #         f.write(background_url.content)
+            #     with open(img_path, "rb") as f:
+            #         l = Image.open(f)
+            #         l = l.resize((600, 1250))
+            #     l.save(img_path, "PNG")
+            # except:
+            try:
+                background_path = os.path.join(app.asset_folder, "background", "{}".format(b))
+                with open(background_path, "rb") as f:
+                    l = Image.open(f)
+                    l = l.resize((600, 1250))
+                l.save(img_path, "PNG")
+            except:
+                print("error background: {}".format(b))
+                return
         second_tab = os.path.join(c_code_path, "SecondTabViewController.swift")
         fourth_tab = os.path.join(c_code_path, "FourthTabViewController.swift")
         with open(second_tab, "r") as f:
@@ -242,13 +285,23 @@ def change_fb(lib_dest, fb_icon):
         img_path = "NexilisLite/Resource/Assets.xcassets"
         img_path = os.path.join(lib_dest, img_path, "{}.imageset".format(default_fb_icon[i]), "{}.png".format(default_fb_icon[i]))
         if isinstance(fb_icon[i], str):
-            logo = requests.get('https://id.palio.io/dashboardv2/uploads/fb_icon/{}'.format(fb_icon[i]))
-            with open(img_path, "wb") as f:
-                f.write(logo.content)
-            with open(img_path, "rb") as f:
-                logo = Image.open(f)
-                logo = logo.resize((150, 150))
-                logo.save(img_path, "PNG")
+            try:
+                fb_icon_url = requests.get('https://newuniverse.io/dashboardv2/uploads/fb_icon/{}'.format(fb_icon[i]))
+                with open(img_path, "wb") as f:
+                    f.write(fb_icon_url.content)
+                with open(img_path, "rb") as f:
+                    l = Image.open(f)
+                    l = l.resize((150, 150))
+                l.save(img_path, "PNG")
+            except:
+                try:
+                    fb_icon_path = os.path.join(app.asset_folder, "fb_icon", "{}".format(fb_icon[i]))
+                    with open(fb_icon_path, "rb") as f:
+                        l = Image.open(f)
+                        l = l.resize((150, 150))
+                    l.save(img_path, "PNG")
+                except:
+                    print("error tab icon {}: {}".format(i,fb_icon[i]))
         else:
             logo = Image.open(fb_icon[i])
             logo = logo.resize((150, 150))
@@ -277,13 +330,24 @@ def change_tab(c_code_path, tabs, tab_icon, tab3_mode):
                                 "{}_icon.imageset".format(default_tab_icon[i]),
                                 "{}_nexilis.png".format(default_tab_icon[i]))
         if isinstance(tab_icon[i], str):
-            logo = requests.get('https://id.palio.io/dashboardv2/uploads/tab_icon/{}'.format(tab_icon[i]))
-            with open(img_path, "wb") as f:
-                f.write(logo.content)
-            with open(img_path, "rb") as f:
-                logo = Image.open(f)
-                logo = logo.resize((150, 150))
-                logo.save(img_path, "PNG")
+            # try:
+            #     tab_icon_url = requests.get('https://newuniverse.io/dashboardv2/uploads/tab_icon/{}'.format(tab_icon[i]))
+            #     with open(img_path, "wb") as f:
+            #         f.write(tab_icon_url.content)
+            #     with open(img_path, "rb") as f:
+            #         l = Image.open(f)
+            #         l = l.resize((150, 150))
+            #     l.save(img_path, "PNG")
+            # except:
+            try:
+                tab_icon_path = os.path.join(app.asset_folder, "tab_icon", "{}".format(tab_icon[i]))
+                with open(tab_icon_path, "rb") as f:
+                    l = Image.open(f)
+                    l = l.resize((150, 150))
+                l.save(img_path, "PNG")
+            except:
+                print("error tab_icon {}: {}".format(i,tab_icon[i]))
+                return
         else:
             logo = Image.open(tab_icon[i])
             logo = logo.resize((150, 150))
@@ -353,8 +417,8 @@ def build_apk():
     if request.method == 'POST':
         logo = None
         logo_float = None
-        app_name = "AppBuilder"
-        package_id = "io.newuniverse.AppBuilder420"
+        app_name = app.app_name
+        package_id = app.package_id
         acc = None
         url = None
         keystore = None
@@ -365,8 +429,8 @@ def build_apk():
         tab_icon = [None, None, None, None]
         fb_icon = [None, None, None, None, None]
         background = None
-        version_code = "1"
-        version_name = "1.0.0"
+        version_code = app.version_code
+        version_name = app.version_name
         font = 0
         key = {"alias": "nexilislite", "store_password": "allyourbase", "key_password": "arebelongto", "common_name": "all", "organization_unit": "your",
                "organization_name": "base", "locality_name": "are", "state_name": "belong", "country": "to"}
@@ -524,7 +588,7 @@ def build_apk():
         change_version(path_dest, app_name, version_code, version_name)
         change_font(c_code_path, font)
         if logo:
-            change_logo(c_code_path, logo, logo_float)
+            change_logo(c_code_path, lib_dest, logo, logo_float)
         if background:
             change_background(c_code_path, background)
         change_fb(lib_dest, fb_icon)