From 6f27d58355bf9335c72e793158ad060bc7c8488e Mon Sep 17 00:00:00 2001 From: hansemannn Date: Sat, 5 Oct 2019 23:34:19 +0200 Subject: [PATCH 1/4] fix: fix VC crash --- ios/Classes/TiSmsSMSDialogProxy.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ios/Classes/TiSmsSMSDialogProxy.m b/ios/Classes/TiSmsSMSDialogProxy.m index 6f83514..524e62a 100644 --- a/ios/Classes/TiSmsSMSDialogProxy.m +++ b/ios/Classes/TiSmsSMSDialogProxy.m @@ -114,13 +114,14 @@ - (void)open:(id)args - (void)messageComposeViewController:(MFMessageComposeViewController *)composer didFinishWithResult:(MessageComposeResult)result { - [[TiApp app] hideModalController:composer animated:YES]; - RELEASE_TO_NIL(smsDialog); - + TiThreadPerformOnMainThread(^{ + [[TiApp app] hideModalController:composer animated:YES]; + }, NO); + if ([self _hasListeners:@"complete"]) { [self fireEvent:@"complete" withObject:@{ - @"result": NUMINT(result), - @"success": NUMINT(YES) + @"result": @(result), + @"success": @(YES) }]; } } From fe68a3d2d1e99460bedcdeca5e8a2fd84b7ed0e3 Mon Sep 17 00:00:00 2001 From: hansemannn Date: Sun, 6 Oct 2019 09:36:39 +0200 Subject: [PATCH 2/4] refactor: remove unused files, use 7.5.1.GA to build --- .gitignore | 2 + ios/assets/README | 6 - ios/build.py | 198 ------------------ ios/hooks/README | 1 - ios/hooks/add.py | 35 ---- ios/hooks/install.py | 19 -- ios/hooks/remove.py | 34 --- ios/hooks/uninstall.py | 18 -- ios/manifest | 6 +- ios/sms.xcodeproj/project.pbxproj | 51 +++-- .../xcschemes/Build & Test.xcscheme | 80 ------- .../hans.xcuserdatad/xcschemes/sms.xcscheme | 80 ------- ios/titanium.xcconfig | 2 +- 13 files changed, 43 insertions(+), 489 deletions(-) delete mode 100644 ios/assets/README delete mode 100755 ios/build.py delete mode 100644 ios/hooks/README delete mode 100644 ios/hooks/add.py delete mode 100644 ios/hooks/install.py delete mode 100644 ios/hooks/remove.py delete mode 100644 ios/hooks/uninstall.py delete mode 100644 ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/Build & Test.xcscheme delete mode 100644 ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/sms.xcscheme diff --git a/.gitignore b/.gitignore index ee08937..564baed 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ Build & Test.xcscheme sms.xcscheme xcschememanagement.plist +.DS_Store +ios/sms.xcodeproj/xcuserdata/*.xcuserdatad/xcschemes/Build & Test.xcscheme diff --git a/ios/assets/README b/ios/assets/README deleted file mode 100644 index d9d2092..0000000 --- a/ios/assets/README +++ /dev/null @@ -1,6 +0,0 @@ -Place your assets like PNG files in this directory and they will be packaged with your module. - -If you create a file named ti.sms.js in this directory, it will be -compiled and used as your module. This allows you to run pure Javascript -modules that are pre-compiled. - diff --git a/ios/build.py b/ios/build.py deleted file mode 100755 index cf70b02..0000000 --- a/ios/build.py +++ /dev/null @@ -1,198 +0,0 @@ -#!/usr/bin/env python -# -# Appcelerator Titanium Module Packager -# -# -import os, sys, glob, string -import zipfile - -cwd = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename)) -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) 2010 by Your Company', -} -module_license_default = "TODO: place your license here and we'll include it in the module distribution" - -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): - print "Couldn't find documentation file at: %s" % docdir - return None - sdk = config['TITANIUM_SDK'] - support_dir = os.path.join(sdk,'module','support') - sys.path.append(support_dir) - 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','ti.sms.js') - if not os.path.exists(js_file): return - - sdk = config['TITANIUM_SDK'] - iphone_dir = os.path.join(sdk,'iphone') - sys.path.insert(0,iphone_dir) - from compiler import Compiler - - path = os.path.basename(js_file) - metadata = Compiler.make_function_from_file(path,js_file) - method = metadata['method'] - eq = path.replace('.','_') - method = ' return %s;' % method - - f = os.path.join(cwd,'Classes','TiSmsModuleAssets.m') - c = open(f).read() - idx = c.find('return ') - before = c[0:idx] - after = """ -} - -@end - """ - newc = before + method + after - - if newc!=c: - x = open(f,'w') - x.write(newc) - x.close() - -def die(msg): - print msg - sys.exit(1) - -def warn(msg): - print "[WARN] %s" % msg - -def validate_license(): - c = open('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','ti.sms.js'] -ignoreDirs = ['.DS_Store','.svn','.git','CVSROOT'] - -def zip_dir(zf,dir,basepath,ignore=[]): - 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]=='.pyc':continue - from_ = os.path.join(root, file) - to_ = from_.replace(dir, basepath, 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): - 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 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) - for dn in ('assets','example'): - if os.path.exists(dn): - zip_dir(zf,dn,'%s/%s' % (modulepath,dn),['README']) - zf.write('LICENSE','%s/LICENSE' % modulepath) - zf.write('module.xcconfig','%s/module.xcconfig' % modulepath) - zf.close() - - -if __name__ == '__main__': - manifest,mf = validate_manifest() - validate_license() - config = read_ti_xcconfig() - compile_js(manifest,config) - build_module(manifest,config) - package_module(manifest,mf,config) - sys.exit(0) - diff --git a/ios/hooks/README b/ios/hooks/README deleted file mode 100644 index 66b10a8..0000000 --- a/ios/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/ios/hooks/add.py b/ios/hooks/add.py deleted file mode 100644 index 04e1c1d..0000000 --- a/ios/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/ios/hooks/install.py b/ios/hooks/install.py deleted file mode 100644 index b423fe9..0000000 --- a/ios/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/ios/hooks/remove.py b/ios/hooks/remove.py deleted file mode 100644 index f92a234..0000000 --- a/ios/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/ios/hooks/uninstall.py b/ios/hooks/uninstall.py deleted file mode 100644 index a7ffd91..0000000 --- a/ios/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/ios/manifest b/ios/manifest index bddc7ac..ae79ec7 100644 --- a/ios/manifest +++ b/ios/manifest @@ -2,12 +2,12 @@ # this is your module manifest and used by Titanium # during compilation, packaging, distribution, etc. # -version: 2.0.0 +version: 2.0.1 architectures: armv7 i386 x86_64 arm64 description: Native SMS functionality in Titanium author: Jeff Haynie, Hans Knoechel license: Appcelerator Commercial License -copyright: Copyright (c) 2010-2016 by Appcelerator, Inc. +copyright: Copyright (c) 2010-present by Appcelerator, Inc. # these should not be edited @@ -15,4 +15,4 @@ name: sms moduleid: ti.sms guid: 8b8759be-a92a-4c44-a6d2-3e08393bfc36 platform: iphone -minsdk: 3.4.1.GA +minsdk: 7.5.1 diff --git a/ios/sms.xcodeproj/project.pbxproj b/ios/sms.xcodeproj/project.pbxproj index d0ac923..c8cead4 100644 --- a/ios/sms.xcodeproj/project.pbxproj +++ b/ios/sms.xcodeproj/project.pbxproj @@ -160,17 +160,18 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0800; + LastUpgradeCheck = 1100; }; buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "sms" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 1; knownRegions = ( - English, - Japanese, - French, - German, + Base, + de, + fr, + en, + ja, ); mainGroup = 0867D691FE84028FC02AAC07 /* sms */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -225,9 +226,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DSTROOT = /tmp/TiSms.dst; @@ -267,9 +268,9 @@ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + CLANG_ENABLE_OBJC_WEAK = YES; DSTROOT = /tmp/TiSms.dst; GCC_C_LANGUAGE_STANDARD = c99; GCC_MODEL_TUNING = G5; @@ -288,7 +289,7 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 4.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*]" = 5.1.1; OTHER_CFLAGS = "-DTI_POST_1_2"; OTHER_LDFLAGS = "-ObjC"; @@ -305,20 +306,31 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; DSTROOT = /tmp/TiSms.dst; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = c99; GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; @@ -340,7 +352,7 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; ONLY_ACTIVE_ARCH = YES; OTHER_CFLAGS = ( "-DDEBUG", @@ -361,14 +373,24 @@ baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; DSTROOT = /tmp/TiSms.dst; @@ -394,7 +416,7 @@ GCC_WARN_UNUSED_VALUE = NO; GCC_WARN_UNUSED_VARIABLE = NO; INSTALL_PATH = /usr/local/lib; - IPHONEOS_DEPLOYMENT_TARGET = 6.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; OTHER_CFLAGS = "-DTI_POST_1_2"; OTHER_LDFLAGS = "-ObjC"; PRODUCT_NAME = TiSms; @@ -410,6 +432,7 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_OPTIMIZATION_LEVEL = 0; @@ -422,9 +445,9 @@ isa = XCBuildConfiguration; baseConfigurationReference = 24DD6D1B1134B66800162E58 /* titanium.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_THUMB_SUPPORT = NO; PRODUCT_NAME = "Build & test"; ZERO_LINK = NO; diff --git a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/Build & Test.xcscheme b/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/Build & Test.xcscheme deleted file mode 100644 index 70d7dd0..0000000 --- a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/Build & Test.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/sms.xcscheme b/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/sms.xcscheme deleted file mode 100644 index 06ad11e..0000000 --- a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/sms.xcscheme +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/ios/titanium.xcconfig b/ios/titanium.xcconfig index a697b9b..1af2e18 100644 --- a/ios/titanium.xcconfig +++ b/ios/titanium.xcconfig @@ -4,7 +4,7 @@ // OF YOUR TITANIUM SDK YOU'RE BUILDING FOR // // -TITANIUM_SDK_VERSION = 5.5.1.GA +TITANIUM_SDK_VERSION = 7.5.1.GA // From 108dfc3e0c112ad14a0015ec415a187cf1f6943d Mon Sep 17 00:00:00 2001 From: hansemannn Date: Sun, 6 Oct 2019 09:43:15 +0200 Subject: [PATCH 3/4] fix: move to arc --- ios/Classes/TiSmsSMSDialogProxy.m | 13 ++++++++----- ios/sms.xcodeproj/project.pbxproj | 2 ++ .../xcschemes/xcschememanagement.plist | 5 +++++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/ios/Classes/TiSmsSMSDialogProxy.m b/ios/Classes/TiSmsSMSDialogProxy.m index 524e62a..d27289e 100644 --- a/ios/Classes/TiSmsSMSDialogProxy.m +++ b/ios/Classes/TiSmsSMSDialogProxy.m @@ -25,11 +25,10 @@ - (MFMessageComposeViewController*)smsDialog return smsDialog; } -- (void)dealloc +- (void)_destroy { - [smsDialog setDelegate:nil]; - RELEASE_TO_NIL(smsDialog); - [super dealloc]; + [super _destroy]; + smsDialog.delegate = nil; } #pragma mark Public API's @@ -116,7 +115,11 @@ - (void)messageComposeViewController:(MFMessageComposeViewController *)composer { TiThreadPerformOnMainThread(^{ [[TiApp app] hideModalController:composer animated:YES]; - }, NO); + }, YES); + + // Release SMS dialog instance + smsDialog.delegate = nil; + smsDialog = nil; if ([self _hasListeners:@"complete"]) { [self fireEvent:@"complete" withObject:@{ diff --git a/ios/sms.xcodeproj/project.pbxproj b/ios/sms.xcodeproj/project.pbxproj index c8cead4..ef804ee 100644 --- a/ios/sms.xcodeproj/project.pbxproj +++ b/ios/sms.xcodeproj/project.pbxproj @@ -309,6 +309,7 @@ "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -376,6 +377,7 @@ "ARCHS[sdk=iphoneos*]" = "$(ARCHS_STANDARD)"; "ARCHS[sdk=iphonesimulator*]" = "$(ARCHS_STANDARD)"; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; diff --git a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/xcschememanagement.plist b/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/xcschememanagement.plist index 7905825..23030ba 100644 --- a/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/xcschememanagement.plist +++ b/ios/sms.xcodeproj/xcuserdata/hans.xcuserdatad/xcschemes/xcschememanagement.plist @@ -14,6 +14,11 @@ orderHint 0 + sms.xcscheme_^#shared#^_ + + orderHint + 0 + SuppressBuildableAutocreation From 275ccbf228bbdf22da6365bc2fe3d097cf464f26 Mon Sep 17 00:00:00 2001 From: hansemannn Date: Sun, 6 Oct 2019 09:44:16 +0200 Subject: [PATCH 4/4] fix: add back timodule.xml --- .gitignore | 1 + ios/Classes/TiSmsModuleAssets.m | 15 ++++++++++++--- ios/metadata.json | 1 + ios/timodule.xml | 13 +++++++++++++ 4 files changed, 27 insertions(+), 3 deletions(-) create mode 100644 ios/metadata.json create mode 100644 ios/timodule.xml diff --git a/.gitignore b/.gitignore index 564baed..9158b65 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ sms.xcscheme xcschememanagement.plist .DS_Store ios/sms.xcodeproj/xcuserdata/*.xcuserdatad/xcschemes/Build & Test.xcscheme +/ios/dist diff --git a/ios/Classes/TiSmsModuleAssets.m b/ios/Classes/TiSmsModuleAssets.m index 773cbf2..ab89d1a 100644 --- a/ios/Classes/TiSmsModuleAssets.m +++ b/ios/Classes/TiSmsModuleAssets.m @@ -3,13 +3,22 @@ */ #import "TiSmsModuleAssets.h" -extern NSData * dataWithHexString (NSString * hexString); +extern NSData* filterDataInRange(NSData* thedata, NSRange range); @implementation TiSmsModuleAssets -- (NSData*) moduleAsset +- (NSData *)moduleAsset { - return nil; + + + return nil; +} + +- (NSData *)resolveModuleAsset:(NSString *)path +{ + + + return nil; } @end diff --git a/ios/metadata.json b/ios/metadata.json new file mode 100644 index 0000000..43a62e5 --- /dev/null +++ b/ios/metadata.json @@ -0,0 +1 @@ +{"exports":[]} \ No newline at end of file diff --git a/ios/timodule.xml b/ios/timodule.xml new file mode 100644 index 0000000..6affb2f --- /dev/null +++ b/ios/timodule.xml @@ -0,0 +1,13 @@ + + + + + + + + + +