Skip to content

Commit

Permalink
feat: support Apple Silicon
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Knöchel authored and Hans Knöchel committed Aug 12, 2021
1 parent 5fe038c commit 4f18d06
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 17 deletions.
10 changes: 2 additions & 8 deletions ios/Classes/TiReviewdialogModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,12 @@ -(NSString*)moduleId

- (id)isSupported:(id)unused
{
return @([TiUtils isIOSVersionOrGreater:@"10.3"]);
return @(YES); // The module's minimum target is iOS 11 now
}

- (void)requestReview:(id)unused
{
ENSURE_UI_THREAD(requestReview, unused);

if (![TiUtils isIOSVersionOrGreater:@"10.3"]) {
NSLog(@"[ERROR] Ti.ReviewDialog: This feature is only available on iOS 10.3 and later.");
return;
}

ENSURE_UI_THREAD(requestReview, unused);
[SKStoreReviewController requestReview];
}

Expand Down
7 changes: 4 additions & 3 deletions ios/manifest
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
# this is your module manifest and used by Titanium
# during compilation, packaging, distribution, etc.
#
version: 2.0.1
version: 3.0.0
apiversion: 2
architectures: armv7 arm64 i386 x86_64
architectures: arm64 x86_64
description: ti.reviewdialog
author: Hans Knoechel
license: Apache 2
mac: true
copyright: Copyright (c) 2017-Present by Hans Knoechel

# these should not be edited
name: ti.reviewdialog
moduleid: ti.reviewdialog
guid: 6f1b3b5d-db05-47da-9e7d-ebb4124cdd8d
platform: iphone
minsdk: 8.0.0
minsdk: 9.2.0
11 changes: 7 additions & 4 deletions ios/ti.reviewdialog.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 1140;
LastUpgradeCheck = 1250;
};
buildConfigurationList = 1DEB922208733DC00010E9CD /* Build configuration list for PBXProject "ti.reviewdialog" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -236,7 +236,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = (
"-DDEBUG",
Expand Down Expand Up @@ -276,7 +276,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LIBRARY_SEARCH_PATHS = "";
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
Expand Down Expand Up @@ -305,6 +305,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -335,6 +336,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
ONLY_ACTIVE_ARCH = YES;
OTHER_CFLAGS = (
"-DDEBUG",
Expand Down Expand Up @@ -369,6 +371,7 @@
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
Expand Down Expand Up @@ -396,7 +399,7 @@
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = NO;
INSTALL_PATH = /usr/local/lib;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
OTHER_CFLAGS = "-DTI_POST_1_2";
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = ti.reviewdialog;
Expand Down
4 changes: 2 additions & 2 deletions ios/titanium.xcconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
// OF YOUR TITANIUM SDK YOU'RE BUILDING FOR
//
//
TITANIUM_SDK_VERSION = 9.0.1.GA
TITANIUM_SDK_VERSION = 10.0.2.GA

//
// THESE SHOULD BE OK GENERALLY AS-IS
//
TITANIUM_SDK = /Users/$(USER)/Library/Application Support/Titanium/mobilesdk/osx/${TITANIUM_SDK_VERSION}
HEADER_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/include"
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks"
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(TITANIUM_SDK)/iphone/Frameworks/**"

0 comments on commit 4f18d06

Please sign in to comment.