diff --git a/.project b/.project
deleted file mode 100644
index 43bcb43..0000000
--- a/.project
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
- TiMWKProgressIndicator
-
-
-
-
-
- com.appcelerator.titanium.core.builder
-
-
-
-
- com.aptana.ide.core.unifiedBuilder
-
-
-
-
-
- com.appcelerator.titanium.mobile.module.nature
- com.aptana.projects.webnature
-
-
diff --git a/.settings/com.aptana.editor.common.prefs b/.settings/com.aptana.editor.common.prefs
deleted file mode 100644
index fef713b..0000000
--- a/.settings/com.aptana.editor.common.prefs
+++ /dev/null
@@ -1,2 +0,0 @@
-eclipse.preferences.version=1
-selectUserAgents=com.appcelerator.titanium.mobile.module.nature\:iphone
diff --git a/README b/README
new file mode 100644
index 0000000..cacedf2
--- /dev/null
+++ b/README
@@ -0,0 +1,106 @@
+Appcelerator Titanium Mobile Module Project
+===========================================
+
+This is a skeleton Titanium Mobile Mobile module project.
+
+
+MODULE NAMING
+-------------
+
+Choose a unique module id for your module. This ID usually follows a namespace
+convention using DNS notation. For example, com.appcelerator.module.test. This
+ID can only be used once by all public modules in Titanium.
+
+
+GET STARTED
+------------
+
+1. Edit manifest with the appropriate details about your module.
+2. Edit LICENSE to add your license details.
+3. Place any assets (such as PNG files) that are required anywhere in the module folder.
+4. Edit the timodule.json and configure desired settings.
+5. Code and build.
+
+
+DOCUMENTATION FOR YOUR MODULE
+-----------------------------
+
+You should provide at least minimal documentation for your module in `documentation` folder using the Markdown syntax.
+
+For more information on the Markdown syntax, refer to this documentation at:
+
+
+
+
+TEST HARNESS EXAMPLE FOR YOUR MODULE
+------------------------------------
+
+The `example` directory contains a skeleton application test harness that can be
+used for testing and providing an example of usage to the users of your module.
+
+
+BUILDING YOUR MODULE
+--------------------
+
+Simply run `titanium build --platform --build-type production --dir /path/to/module`.
+You can omit the --dir option if your working directory is in the module's project directory.
+
+
+INSTALL YOUR MODULE
+-------------------
+
+Mac OS X
+--------
+Copy the distribution zip file into the `~/Library/Application Support/Titanium` folder
+
+Linux
+-----
+Copy the distribution zip file into the `~/.titanium` folder
+
+Windows
+-------
+Copy the distribution zip file into the `C:\ProgramData\Titanium` folder
+
+
+REGISTER YOUR MODULE
+--------------------
+
+Register your module with your application by editing `tiapp.xml` and adding your module.
+Example:
+
+
+ com.lightapps.testmodule
+
+
+When you run your project, the compiler will combine your module along with its dependencies
+and assets into the application.
+
+
+USING YOUR MODULE IN CODE
+-------------------------
+
+To use your module in code, you will need to require it.
+
+For example,
+
+ var my_module = require('com.lightapps.testmodule');
+ my_module.foo();
+
+
+TESTING YOUR MODULE
+-------------------
+
+To test with the script, execute:
+
+ titanium run --dir=YOURMODULEDIR
+
+This will execute the app.js in the example folder as a Titanium application.
+
+
+DISTRIBUTING YOUR MODULE
+-------------------------
+
+You can choose to manually distribute your module distribution zip file or through the Titanium Marketplace!
+
+
+Cheers!
diff --git a/build.py b/build.py
deleted file mode 100755
index 690bbad..0000000
--- a/build.py
+++ /dev/null
@@ -1,275 +0,0 @@
-#!/usr/bin/env python
-#
-# Appcelerator Titanium Module Packager
-#
-#
-import os, subprocess, sys, glob, string, optparse, subprocess
-import zipfile
-from datetime import date
-
-cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
-os.chdir(cwd)
-required_module_keys = ['name','version','moduleid','description','copyright','license','copyright','platform','minsdk']
-module_defaults = {
- 'description':'My module',
- 'author': 'Your Name',
- 'license' : 'Specify your license',
- 'copyright' : 'Copyright (c) %s by Your Company' % str(date.today().year),
-}
-module_license_default = "TODO: place your license here and we'll include it in the module distribution"
-
-def find_sdk(config):
- sdk = config['TITANIUM_SDK']
- return os.path.expandvars(os.path.expanduser(sdk))
-
-def replace_vars(config,token):
- idx = token.find('$(')
- while idx != -1:
- idx2 = token.find(')',idx+2)
- if idx2 == -1: break
- key = token[idx+2:idx2]
- if not config.has_key(key): break
- token = token.replace('$(%s)' % key, config[key])
- idx = token.find('$(')
- return token
-
-
-def read_ti_xcconfig():
- contents = open(os.path.join(cwd,'titanium.xcconfig')).read()
- config = {}
- for line in contents.splitlines(False):
- line = line.strip()
- if line[0:2]=='//': continue
- idx = line.find('=')
- if idx > 0:
- key = line[0:idx].strip()
- value = line[idx+1:].strip()
- config[key] = replace_vars(config,value)
- return config
-
-def generate_doc(config):
- docdir = os.path.join(cwd,'documentation')
- if not os.path.exists(docdir):
- warn("Couldn't find documentation file at: %s" % docdir)
- return None
-
- try:
- import markdown2 as markdown
- except ImportError:
- import markdown
- documentation = []
- for file in os.listdir(docdir):
- if file in ignoreFiles or os.path.isdir(os.path.join(docdir, file)):
- continue
- md = open(os.path.join(docdir,file)).read()
- html = markdown.markdown(md)
- documentation.append({file:html});
- return documentation
-
-def compile_js(manifest,config):
- js_file = os.path.join(cwd,'assets','de.marcelpociot.mwkprogress.js')
- if not os.path.exists(js_file): return
-
- from compiler import Compiler
- try:
- import json
- except:
- import simplejson as json
-
- compiler = Compiler(cwd, manifest['moduleid'], manifest['name'], 'commonjs')
- root_asset, module_assets = compiler.compile_module()
-
- root_asset_content = """
-%s
-
- return filterDataInRange([NSData dataWithBytesNoCopy:data length:sizeof(data) freeWhenDone:NO], ranges[0]);
-""" % root_asset
-
- module_asset_content = """
-%s
-
- NSNumber *index = [map objectForKey:path];
- if (index == nil) {
- return nil;
- }
- return filterDataInRange([NSData dataWithBytesNoCopy:data length:sizeof(data) freeWhenDone:NO], ranges[index.integerValue]);
-""" % module_assets
-
- from tools import splice_code
-
- assets_router = os.path.join(cwd,'Classes','DeMarcelpociotMwkprogressModuleAssets.m')
- splice_code(assets_router, 'asset', root_asset_content)
- splice_code(assets_router, 'resolve_asset', module_asset_content)
-
- # Generate the exports after crawling all of the available JS source
- exports = open('metadata.json','w')
- json.dump({'exports':compiler.exports }, exports)
- exports.close()
-
-def die(msg):
- print msg
- sys.exit(1)
-
-def info(msg):
- print "[INFO] %s" % msg
-
-def warn(msg):
- print "[WARN] %s" % msg
-
-def validate_license():
- c = open(os.path.join(cwd,'LICENSE')).read()
- if c.find(module_license_default)!=-1:
- warn('please update the LICENSE file with your license text before distributing')
-
-def validate_manifest():
- path = os.path.join(cwd,'manifest')
- f = open(path)
- if not os.path.exists(path): die("missing %s" % path)
- manifest = {}
- for line in f.readlines():
- line = line.strip()
- if line[0:1]=='#': continue
- if line.find(':') < 0: continue
- key,value = line.split(':')
- manifest[key.strip()]=value.strip()
- for key in required_module_keys:
- if not manifest.has_key(key): die("missing required manifest key '%s'" % key)
- if module_defaults.has_key(key):
- defvalue = module_defaults[key]
- curvalue = manifest[key]
- if curvalue==defvalue: warn("please update the manifest key: '%s' to a non-default value" % key)
- return manifest,path
-
-ignoreFiles = ['.DS_Store','.gitignore','libTitanium.a','titanium.jar','README']
-ignoreDirs = ['.DS_Store','.svn','.git','CVSROOT']
-
-def zip_dir(zf,dir,basepath,ignoreExt=[]):
- if not os.path.exists(dir): return
- for root, dirs, files in os.walk(dir):
- for name in ignoreDirs:
- if name in dirs:
- dirs.remove(name) # don't visit ignored directories
- for file in files:
- if file in ignoreFiles: continue
- e = os.path.splitext(file)
- if len(e) == 2 and e[1] in ignoreExt: continue
- from_ = os.path.join(root, file)
- to_ = from_.replace(dir, '%s/%s'%(basepath,dir), 1)
- zf.write(from_, to_)
-
-def glob_libfiles():
- files = []
- for libfile in glob.glob('build/**/*.a'):
- if libfile.find('Release-')!=-1:
- files.append(libfile)
- return files
-
-def build_module(manifest,config):
- from tools import ensure_dev_path
- ensure_dev_path()
-
- rc = os.system("xcodebuild -sdk iphoneos -configuration Release")
- if rc != 0:
- die("xcodebuild failed")
- rc = os.system("xcodebuild -sdk iphonesimulator -configuration Release")
- if rc != 0:
- die("xcodebuild failed")
- # build the merged library using lipo
- moduleid = manifest['moduleid']
- libpaths = ''
- for libfile in glob_libfiles():
- libpaths+='%s ' % libfile
-
- os.system("lipo %s -create -output build/lib%s.a" %(libpaths,moduleid))
-
-def generate_apidoc(apidoc_build_path):
- global options
-
- if options.skip_docs:
- info("Skipping documentation generation.")
- return False
- else:
- info("Module apidoc generation can be skipped using --skip-docs")
- apidoc_path = os.path.join(cwd, "apidoc")
- if not os.path.exists(apidoc_path):
- warn("Skipping apidoc generation. No apidoc folder found at: %s" % apidoc_path)
- return False
-
- if not os.path.exists(apidoc_build_path):
- os.makedirs(apidoc_build_path)
- ti_root = string.strip(subprocess.check_output(["echo $TI_ROOT"], shell=True))
- if not len(ti_root) > 0:
- warn("Not generating documentation from the apidoc folder. The titanium_mobile repo could not be found.")
- warn("Set the TI_ROOT environment variable to the parent folder where the titanium_mobile repo resides (eg.'export TI_ROOT=/Path').")
- return False
- docgen = os.path.join(ti_root, "titanium_mobile", "apidoc", "docgen.py")
- if not os.path.exists(docgen):
- warn("Not generating documentation from the apidoc folder. Couldn't find docgen.py at: %s" % docgen)
- return False
-
- info("Generating documentation from the apidoc folder.")
- rc = os.system("\"%s\" --format=jsca,modulehtml --css=styles.css -o \"%s\" -e \"%s\"" % (docgen, apidoc_build_path, apidoc_path))
- if rc != 0:
- die("docgen failed")
- return True
-
-def package_module(manifest,mf,config):
- name = manifest['name'].lower()
- moduleid = manifest['moduleid'].lower()
- version = manifest['version']
- modulezip = '%s-iphone-%s.zip' % (moduleid,version)
- if os.path.exists(modulezip): os.remove(modulezip)
- zf = zipfile.ZipFile(modulezip, 'w', zipfile.ZIP_DEFLATED)
- modulepath = 'modules/iphone/%s/%s' % (moduleid,version)
- zf.write(mf,'%s/manifest' % modulepath)
- libname = 'lib%s.a' % moduleid
- zf.write('build/%s' % libname, '%s/%s' % (modulepath,libname))
- docs = generate_doc(config)
- if docs!=None:
- for doc in docs:
- for file, html in doc.iteritems():
- filename = string.replace(file,'.md','.html')
- zf.writestr('%s/documentation/%s'%(modulepath,filename),html)
-
- apidoc_build_path = os.path.join(cwd, "build", "apidoc")
- if generate_apidoc(apidoc_build_path):
- for file in os.listdir(apidoc_build_path):
- if file in ignoreFiles or os.path.isdir(os.path.join(apidoc_build_path, file)):
- continue
- zf.write(os.path.join(apidoc_build_path, file), '%s/documentation/apidoc/%s' % (modulepath, file))
-
- zip_dir(zf,'assets',modulepath,['.pyc','.js'])
- zip_dir(zf,'example',modulepath,['.pyc'])
- zip_dir(zf,'platform',modulepath,['.pyc','.js'])
- zf.write('LICENSE','%s/LICENSE' % modulepath)
- zf.write('module.xcconfig','%s/module.xcconfig' % modulepath)
- exports_file = 'metadata.json'
- if os.path.exists(exports_file):
- zf.write(exports_file, '%s/%s' % (modulepath, exports_file))
- zf.close()
-
-
-if __name__ == '__main__':
- global options
-
- parser = optparse.OptionParser()
- parser.add_option("-s", "--skip-docs",
- dest="skip_docs",
- action="store_true",
- help="Will skip building documentation in apidoc folder",
- default=False)
- (options, args) = parser.parse_args()
-
- manifest,mf = validate_manifest()
- validate_license()
- config = read_ti_xcconfig()
-
- sdk = find_sdk(config)
- sys.path.insert(0,os.path.join(sdk,'iphone'))
- sys.path.append(os.path.join(sdk, "common"))
-
- compile_js(manifest,config)
- build_module(manifest,config)
- package_module(manifest,mf,config)
- sys.exit(0)
-
diff --git a/dist/de.marcelpociot.mwkprogress-iphone-1.5.1.zip b/dist/de.marcelpociot.mwkprogress-iphone-1.5.1.zip
new file mode 100644
index 0000000..321f5b5
Binary files /dev/null and b/dist/de.marcelpociot.mwkprogress-iphone-1.5.1.zip differ
diff --git a/dist/de.marcelpociot.mwkprogress-iphone-1.5.zip b/dist/de.marcelpociot.mwkprogress-iphone-1.5.zip
new file mode 100644
index 0000000..356aba9
Binary files /dev/null and b/dist/de.marcelpociot.mwkprogress-iphone-1.5.zip differ
diff --git a/hooks/README b/hooks/README
deleted file mode 100644
index 66b10a8..0000000
--- a/hooks/README
+++ /dev/null
@@ -1 +0,0 @@
-These files are not yet supported as of 1.4.0 but will be in a near future release.
diff --git a/hooks/add.py b/hooks/add.py
deleted file mode 100644
index 04e1c1d..0000000
--- a/hooks/add.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-#
-# This is the module project add hook that will be
-# called when your module is added to a project
-#
-import os, sys
-
-def dequote(s):
- if s[0:1] == '"':
- return s[1:-1]
- return s
-
-def main(args,argc):
- # You will get the following command line arguments
- # in the following order:
- #
- # project_dir = the full path to the project root directory
- # project_type = the type of project (desktop, mobile, ipad)
- # project_name = the name of the project
- #
- project_dir = dequote(os.path.expanduser(args[1]))
- project_type = dequote(args[2])
- project_name = dequote(args[3])
-
- # TODO: write your add hook here (optional)
-
-
- # exit
- sys.exit(0)
-
-
-
-if __name__ == '__main__':
- main(sys.argv,len(sys.argv))
-
diff --git a/hooks/install.py b/hooks/install.py
deleted file mode 100644
index b423fe9..0000000
--- a/hooks/install.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-#
-# This is the module install hook that will be
-# called when your module is first installed
-#
-import os, sys
-
-def main(args,argc):
-
- # TODO: write your install hook here (optional)
-
- # exit
- sys.exit(0)
-
-
-
-if __name__ == '__main__':
- main(sys.argv,len(sys.argv))
-
diff --git a/hooks/remove.py b/hooks/remove.py
deleted file mode 100644
index f92a234..0000000
--- a/hooks/remove.py
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/usr/bin/env python
-#
-# This is the module project remove hook that will be
-# called when your module is remove from a project
-#
-import os, sys
-
-def dequote(s):
- if s[0:1] == '"':
- return s[1:-1]
- return s
-
-def main(args,argc):
- # You will get the following command line arguments
- # in the following order:
- #
- # project_dir = the full path to the project root directory
- # project_type = the type of project (desktop, mobile, ipad)
- # project_name = the name of the project
- #
- project_dir = dequote(os.path.expanduser(args[1]))
- project_type = dequote(args[2])
- project_name = dequote(args[3])
-
- # TODO: write your remove hook here (optional)
-
- # exit
- sys.exit(0)
-
-
-
-if __name__ == '__main__':
- main(sys.argv,len(sys.argv))
-
diff --git a/hooks/uninstall.py b/hooks/uninstall.py
deleted file mode 100644
index a7ffd91..0000000
--- a/hooks/uninstall.py
+++ /dev/null
@@ -1,18 +0,0 @@
-#!/usr/bin/env python
-#
-# This is the module uninstall hook that will be
-# called when your module is uninstalled
-#
-import os, sys
-
-def main(args,argc):
-
- # TODO: write your uninstall hook here (optional)
-
- # exit
- sys.exit(0)
-
-
-if __name__ == '__main__':
- main(sys.argv,len(sys.argv))
-
diff --git a/Classes/.gitignore b/ios/Classes/.gitignore
similarity index 100%
rename from Classes/.gitignore
rename to ios/Classes/.gitignore
diff --git a/Classes/DeMarcelpociotMwkprogressModule.h b/ios/Classes/DeMarcelpociotMwkprogressModule.h
similarity index 100%
rename from Classes/DeMarcelpociotMwkprogressModule.h
rename to ios/Classes/DeMarcelpociotMwkprogressModule.h
diff --git a/Classes/DeMarcelpociotMwkprogressModule.m b/ios/Classes/DeMarcelpociotMwkprogressModule.m
similarity index 100%
rename from Classes/DeMarcelpociotMwkprogressModule.m
rename to ios/Classes/DeMarcelpociotMwkprogressModule.m
diff --git a/Classes/DeMarcelpociotMwkprogressModuleAssets.h b/ios/Classes/DeMarcelpociotMwkprogressModuleAssets.h
similarity index 100%
rename from Classes/DeMarcelpociotMwkprogressModuleAssets.h
rename to ios/Classes/DeMarcelpociotMwkprogressModuleAssets.h
diff --git a/Classes/DeMarcelpociotMwkprogressModuleAssets.m b/ios/Classes/DeMarcelpociotMwkprogressModuleAssets.m
similarity index 100%
rename from Classes/DeMarcelpociotMwkprogressModuleAssets.m
rename to ios/Classes/DeMarcelpociotMwkprogressModuleAssets.m
diff --git a/Classes/MWKProgressIndicator.h b/ios/Classes/MWKProgressIndicator.h
similarity index 100%
rename from Classes/MWKProgressIndicator.h
rename to ios/Classes/MWKProgressIndicator.h
diff --git a/Classes/MWKProgressIndicator.m b/ios/Classes/MWKProgressIndicator.m
similarity index 86%
rename from Classes/MWKProgressIndicator.m
rename to ios/Classes/MWKProgressIndicator.m
index 75fc5c0..bffc7a3 100755
--- a/Classes/MWKProgressIndicator.m
+++ b/ios/Classes/MWKProgressIndicator.m
@@ -10,7 +10,6 @@
#import
-#define MWKProgressIndicatorHeight 64.0f
#define statusBarHeight 14.0f
@implementation MWKProgressIndicator
{
@@ -39,8 +38,10 @@ - (id)init
if (!self) return nil;
self.backgroundColor = [UIColor whiteColor];
+ CGFloat progressIndicatorHeight = [MWKProgressIndicator getProgressIndicatorHeight];
CGFloat screenWidth=[MWKProgressIndicator getScreenWidth];
- self.frame = CGRectMake(0, -MWKProgressIndicatorHeight, screenWidth, MWKProgressIndicatorHeight);
+
+ self.frame = CGRectMake(0, -progressIndicatorHeight, screenWidth, progressIndicatorHeight);
[[[[[UIApplication sharedApplication] keyWindow] subviews] firstObject] addSubview:self];
_progress = 0.0;
@@ -48,7 +49,7 @@ - (id)init
[_progressTrack setBackgroundColor:[UIColor colorWithRed:0.53 green:0.82 blue:1 alpha:1]];
[self addSubview:_progressTrack];
- _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, statusBarHeight, screenWidth, MWKProgressIndicatorHeight - statusBarHeight)];
+ _titleLabel = [[UILabel alloc] initWithFrame:CGRectMake(0, statusBarHeight, screenWidth, progressIndicatorHeight - statusBarHeight)];
[_titleLabel setBackgroundColor:[UIColor clearColor]];
[_titleLabel setTextColor:[UIColor blackColor]];
[_titleLabel setTextAlignment:NSTextAlignmentCenter];
@@ -84,17 +85,19 @@ + (void)dismissWithoutAnimation
- (void)dismissAnimated:(BOOL)animated
{
- if (CGRectGetMinY(self.frame) == -MWKProgressIndicatorHeight) return;
+ CGFloat progressIndicatorHeight = [MWKProgressIndicator getProgressIndicatorHeight];
+
+ if (CGRectGetMinY(self.frame) == -progressIndicatorHeight) return;
if (animated)
{
[self updateProgress:0.0];
- [self setTopLocationValue:-MWKProgressIndicatorHeight];
+ [self setTopLocationValue:-progressIndicatorHeight];
}
else
{
_progressTrack.frame = CGRectMake(0, 0, 0, self.frame.size.height);
- [self setTopLocationValue:-MWKProgressIndicatorHeight withDuration:0.0];
+ [self setTopLocationValue:-progressIndicatorHeight withDuration:0.0];
}
}
@@ -205,10 +208,12 @@ - (void)showWithColor:(UIColor *)color duration:(float)duration message:(NSStrin
_lock = YES;
+ CGFloat progressIndicatorHeight = [MWKProgressIndicator getProgressIndicatorHeight];
+
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
float hideDuration = 0.5;
- [self setTopLocationValue:-MWKProgressIndicatorHeight withDuration:hideDuration];
+ [self setTopLocationValue:-progressIndicatorHeight withDuration:hideDuration];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(hideDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^
@@ -224,7 +229,7 @@ - (void)showWithColor:(UIColor *)color duration:(float)duration message:(NSStrin
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)((duration+hideDuration) * NSEC_PER_SEC)), dispatch_get_main_queue(),^
{
- [self setTopLocationValue:-MWKProgressIndicatorHeight withDuration:hideDuration];
+ [self setTopLocationValue:-progressIndicatorHeight withDuration:hideDuration];
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(hideDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^
{
@@ -276,10 +281,11 @@ + (void)speakMessage:(NSString *)message
- (void)orientationChanged:(NSNotification *)notification
{
CGFloat screenWidth=[MWKProgressIndicator getScreenWidth];
+ CGFloat progressIndicatorHeight = [MWKProgressIndicator getProgressIndicatorHeight];
- self.frame = CGRectMake(0, -MWKProgressIndicatorHeight, screenWidth,
- + MWKProgressIndicatorHeight);
- _titleLabel.frame=CGRectMake(0, statusBarHeight, screenWidth, MWKProgressIndicatorHeight - statusBarHeight);
+ self.frame = CGRectMake(0, -progressIndicatorHeight, screenWidth,
+ + progressIndicatorHeight);
+ _titleLabel.frame=CGRectMake(0, statusBarHeight, screenWidth, progressIndicatorHeight - statusBarHeight);
}
+(CGFloat)getScreenWidth
@@ -288,4 +294,16 @@ +(CGFloat)getScreenWidth
return [UIScreen mainScreen].bounds.size.width;
}
++(CGFloat)getProgressIndicatorHeight
+{
+ if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
+ CGSize screenSize = [[UIScreen mainScreen] bounds].size;
+ // Is this an iPhone X?
+ if (screenSize.height >= 812.0f){
+ return 88.0f;
+ }
+ }
+ return 64.0f;
+}
+
@end
diff --git a/DeMarcelpociotMwkprogress_Prefix.pch b/ios/DeMarcelpociotMwkprogress_Prefix.pch
similarity index 100%
rename from DeMarcelpociotMwkprogress_Prefix.pch
rename to ios/DeMarcelpociotMwkprogress_Prefix.pch
diff --git a/ios/LICENSE b/ios/LICENSE
new file mode 100644
index 0000000..f991950
--- /dev/null
+++ b/ios/LICENSE
@@ -0,0 +1 @@
+My personal license
\ No newline at end of file
diff --git a/README.md b/ios/README.md
similarity index 100%
rename from README.md
rename to ios/README.md
diff --git a/ios/Resources/README.md b/ios/Resources/README.md
new file mode 100644
index 0000000..bb6c641
--- /dev/null
+++ b/ios/Resources/README.md
@@ -0,0 +1,10 @@
+Files in this folder are copied directory into the compiled product directory
+when the iOS app is compiled:
+
+ /build/iphone/build/Products//.app/
+
+Place your module's iOS bundles and localization files in this folder.
+
+Files in this directory are copied directly on top of whatever files are already
+in the build directory, so please be careful that your files don't clobber
+essential project files or files from other modules.
diff --git a/TiMWKProgressIndicator.xcodeproj/project.pbxproj b/ios/TiMWKProgressIndicator.xcodeproj/project.pbxproj
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/project.pbxproj
rename to ios/TiMWKProgressIndicator.xcodeproj/project.pbxproj
diff --git a/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
rename to ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/contents.xcworkspacedata
diff --git a/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/TiMWKProgressIndicator.xccheckout b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/TiMWKProgressIndicator.xccheckout
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/TiMWKProgressIndicator.xccheckout
rename to ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcshareddata/TiMWKProgressIndicator.xccheckout
diff --git a/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/marcelpociot.xcuserdatad/UserInterfaceState.xcuserstate b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/marcelpociot.xcuserdatad/UserInterfaceState.xcuserstate
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/marcelpociot.xcuserdatad/UserInterfaceState.xcuserstate
rename to ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/marcelpociot.xcuserdatad/UserInterfaceState.xcuserstate
diff --git a/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/sebastianklaus.xcuserdatad/UserInterfaceState.xcuserstate b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/sebastianklaus.xcuserdatad/UserInterfaceState.xcuserstate
new file mode 100644
index 0000000..827b937
Binary files /dev/null and b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/sebastianklaus.xcuserdatad/UserInterfaceState.xcuserstate differ
diff --git a/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/steven.xcuserdatad/WorkspaceSettings.xcsettings b/ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/steven.xcuserdatad/WorkspaceSettings.xcsettings
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/steven.xcuserdatad/WorkspaceSettings.xcsettings
rename to ios/TiMWKProgressIndicator.xcodeproj/project.xcworkspace/xcuserdata/steven.xcuserdatad/WorkspaceSettings.xcsettings
diff --git a/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/Build & Test.xcscheme b/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/Build & Test.xcscheme
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/Build & Test.xcscheme
rename to ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/Build & Test.xcscheme
diff --git a/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/TiMWKProgressIndicator.xcscheme b/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/TiMWKProgressIndicator.xcscheme
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/TiMWKProgressIndicator.xcscheme
rename to ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/TiMWKProgressIndicator.xcscheme
diff --git a/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/xcschememanagement.plist
similarity index 100%
rename from TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/xcschememanagement.plist
rename to ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/marcelpociot.xcuserdatad/xcschemes/xcschememanagement.plist
diff --git a/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/sebastianklaus.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/sebastianklaus.xcuserdatad/xcschemes/xcschememanagement.plist
new file mode 100644
index 0000000..55f21a5
--- /dev/null
+++ b/ios/TiMWKProgressIndicator.xcodeproj/xcuserdata/sebastianklaus.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,19 @@
+
+
+
+
+ SchemeUserState
+
+ Build & Test.xcscheme
+
+ orderHint
+ 1
+
+ TiMWKProgressIndicator.xcscheme
+
+ orderHint
+ 0
+
+
+
+
diff --git a/manifest b/ios/manifest
similarity index 94%
rename from manifest
rename to ios/manifest
index b3e149d..d679a79 100644
--- a/manifest
+++ b/ios/manifest
@@ -2,7 +2,7 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
-version: 1.4
+version: 1.5.1
apiversion: 2
architectures: armv7 arm64 i386 x86_64
description: A minimal progress indicator for iOS with status update support. Displays above UINavigationBar and below the Status Bar
@@ -16,4 +16,4 @@ name: TiMWKProgressIndicator
moduleid: de.marcelpociot.mwkprogress
guid: c169d45b-52bd-4f40-a274-54e19d7a5215
platform: iphone
-minsdk: 3.4.0.GA
+minsdk: 7.0.0.GA
diff --git a/ios/module.xcconfig b/ios/module.xcconfig
new file mode 100644
index 0000000..3423d99
--- /dev/null
+++ b/ios/module.xcconfig
@@ -0,0 +1,28 @@
+//
+// PLACE ANY BUILD DEFINITIONS IN THIS FILE AND THEY WILL BE
+// PICKED UP DURING THE APP BUILD FOR YOUR MODULE
+//
+// see the following webpage for instructions on the settings
+// for this file:
+// https://developer.apple.com/library/content/featuredarticles/XcodeConcepts/Concept-Build_Settings.html
+//
+
+//
+// How to manually add a Framework (example)
+// Note: Titanium SDK 6.2.2+ detects and links frameworks automatically
+//
+// OTHER_LDFLAGS=$(inherited) -framework Foo
+//
+// Adding a framework for a specific version(s) of iOS, e.g iOS 11:
+//
+// OTHER_LDFLAGS[sdk=iphoneos11*]=$(inherited) -framework Foo
+// OTHER_LDFLAGS[sdk=iphonesimulator11*]=$(inherited) -framework Foo
+//
+//
+// How to add a compiler define:
+//
+// OTHER_CFLAGS=$(inherited) -DFOO=1
+//
+//
+// IMPORTANT NOTE: always use $(inherited) in your overrides
+//
diff --git a/platform/README b/ios/platform/README
similarity index 100%
rename from platform/README
rename to ios/platform/README
diff --git a/timodule.xml b/ios/timodule.xml
similarity index 100%
rename from timodule.xml
rename to ios/timodule.xml
diff --git a/titanium.xcconfig b/ios/titanium.xcconfig
similarity index 94%
rename from titanium.xcconfig
rename to ios/titanium.xcconfig
index cf65d19..b68e1ec 100644
--- a/titanium.xcconfig
+++ b/ios/titanium.xcconfig
@@ -4,7 +4,7 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
-TITANIUM_SDK_VERSION = 3.4.1.GA
+TITANIUM_SDK_VERSION = 7.2.0.GA
//
diff --git a/module.xcconfig b/module.xcconfig
deleted file mode 100644
index 80ca884..0000000
--- a/module.xcconfig
+++ /dev/null
@@ -1,27 +0,0 @@
-//
-// PLACE ANY BUILD DEFINITIONS IN THIS FILE AND THEY WILL BE
-// PICKED UP DURING THE APP BUILD FOR YOUR MODULE
-//
-// see the following webpage for instructions on the settings
-// for this file:
-// http://developer.apple.com/mac/library/documentation/DeveloperTools/Conceptual/XcodeBuildSystem/400-Build_Configurations/build_configs.html
-//
-
-//
-// How to add a Framework (example)
-//
-// OTHER_LDFLAGS=$(inherited) -framework Foo
-//
-// Adding a framework for a specific version(s) of iPhone:
-//
-// OTHER_LDFLAGS[sdk=iphoneos4*]=$(inherited) -framework Foo
-// OTHER_LDFLAGS[sdk=iphonesimulator4*]=$(inherited) -framework Foo
-//
-//
-// How to add a compiler define:
-//
-// OTHER_CFLAGS=$(inherited) -DFOO=1
-//
-//
-// IMPORTANT NOTE: always use $(inherited) in your overrides
-//