Skip to content

Add Swift6 support #50

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Nov 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Demo/Demo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -501,7 +501,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -518,7 +518,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 495G5CPHRQ;
INFOPLIST_FILE = Demo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cocomoe.carp;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -538,7 +538,7 @@
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
DEVELOPMENT_TEAM = 495G5CPHRQ;
INFOPLIST_FILE = Demo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.cocomoe.carp;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -555,7 +555,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = XEV6645KTD;
INFOPLIST_FILE = DemoTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand All @@ -572,7 +572,7 @@
BUNDLE_LOADER = "$(TEST_HOST)";
DEVELOPMENT_TEAM = XEV6645KTD;
INFOPLIST_FILE = DemoTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.DemoTests;
PRODUCT_NAME = "$(TARGET_NAME)";
Expand Down
2 changes: 1 addition & 1 deletion Demo/Demo/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class ViewController: UIViewController {
SwiftRater.incrementSignificantUsageCount(point: 1)
SwiftRater.check(host: self)

// If want to navigate app review page, use `rateApp()`.
// If your want to show rating dialog manually, use `rateApp()`.
// SwiftRater.rateApp(host: self)
}

Expand Down
4 changes: 2 additions & 2 deletions Demo/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
platform :ios, '11.0'
platform :ios, '13.0'
use_frameworks!

target 'Demo' do
pod 'SwiftRater', :path => '../'
end
end
15 changes: 7 additions & 8 deletions DemoObjc/DemoObjc.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -186,17 +186,16 @@
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-DemoObjc/Pods-DemoObjc-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/SwiftRater/SwiftRater.framework",
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DemoObjc/Pods-DemoObjc-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SwiftRater.framework",
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-DemoObjc/Pods-DemoObjc-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-DemoObjc/Pods-DemoObjc-frameworks.sh\"\n";
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-DemoObjc/Pods-DemoObjc-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
Expand Down Expand Up @@ -285,7 +284,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -337,7 +336,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
Expand Down
20 changes: 11 additions & 9 deletions DemoObjc/DemoObjc/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ @implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
SwiftRater.daysUntilPrompt = 1;
SwiftRater.usesUntilPrompt = 1;
SwiftRater.daysBeforeReminding = 1;
SwiftRater.showLaterButton = true;
SwiftRater.showLog = true;
// SwiftRater.debugMode = true // need to set false when submitting to AppStore!!
[SwiftRater appLaunched];

return YES;
SwiftRater.daysUntilPrompt = 1;
SwiftRater.usesUntilPrompt = 1;
SwiftRater.daysBeforeReminding = 1;
SwiftRater.showLaterButton = true;
SwiftRater.showLog = true;
// SwiftRater.appID = @"1104775712"; // Optional, if you don't set appId, SwiftRater try to get app id from appstore.
// SwiftRater.countryCode = @"fr"; // if your app is only avaiable for some coutnries, please add country code.
// SwiftRater.debugMode = true; // need to set false when submitting to AppStore!!
[SwiftRater appLaunched];

return YES;
}

@end
2 changes: 1 addition & 1 deletion DemoObjc/Podfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://github.com/CocoaPods/Specs.git'

platform :ios, '11.0'
platform :ios, '13.0'
use_frameworks!

target 'DemoObjc' do
Expand Down
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ let package = Package(
name: "SwiftRater",
defaultLocalization: "en",
platforms: [
.iOS(.v10),
.macOS(.v10_10)
.iOS(.v13),
.macOS(.v10_15)
],
products: [
.library(
Expand Down
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,15 @@ SwiftRater is a class that you can drop into any iPhone app that will help remin

SwiftRater is written in pure Swift.

## iOS 10.3 〜
## iOS
![SwiftRater1](./Resource/later1.gif)

For iOS 10.3 devices, SwiftRater uses SKStoreReviewController.

## 〜 iOS 10.2
![SwiftRater2](./Resource/later2.gif)

## macOS 10.14 〜
## macOS
![SwiftRater1](./Resource/macos-later1.gif)

For macOS 10.14 devices, SwiftRater uses SKStoreReviewController.

## 〜 macOS 10.14
![SwiftRater2](./Resource/macos-later2.gif)

## Requirements

iOS 8.0, macOS 10.10 or later, written in Swift.
Xcode 8.2 or later.
iOS 13.0, macOS 10.15 or later, written in Swift.

## Installation

Expand Down
6 changes: 3 additions & 3 deletions SwiftRater.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

Pod::Spec.new do |s|
s.name = 'SwiftRater'
s.version = '2.1.3'
s.version = '2.2.0'
s.summary = 'A utility that reminds your iPhone app users to review the app written in pure Swift.'
s.platform = :ios, '12.0'
s.platform = :ios, '13.0'

# This description is used to generate tags and improve search results.
# * Think: What does it do? Why did you write it? What is the focus?
Expand All @@ -28,7 +28,7 @@ SwiftRater is a class that you can drop into any iPhone app that will help remin
s.author = { 'takecian' => '[email protected]' }
s.source = { :git => 'https://github.com/takecian/SwiftRater.git', :tag => s.version.to_s }
s.social_media_url = 'https://takecian.github.io'
s.swift_version = '5.1'
s.swift_version = '6.0'

s.source_files = 'SwiftRater/**/*'
s.exclude_files = 'SwiftRater/**/*.{plist}'
Expand Down
24 changes: 14 additions & 10 deletions SwiftRater.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -452,7 +452,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand All @@ -475,13 +475,14 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SwiftRater/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.SwiftRater;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
Expand All @@ -498,12 +499,13 @@
DYLIB_INSTALL_NAME_BASE = "@rpath";
INFOPLIST_FILE = SwiftRater/Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.SwiftRater;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_VERSION = 5.0;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Release;
};
Expand All @@ -513,11 +515,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
DEVELOPMENT_TEAM = XEV6645KTD;
INFOPLIST_FILE = SwiftRaterTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.SwiftRaterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Debug;
};
Expand All @@ -527,11 +530,12 @@
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
DEVELOPMENT_TEAM = XEV6645KTD;
INFOPLIST_FILE = SwiftRaterTests/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 13.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.takecian.SwiftRaterTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
SWIFT_STRICT_CONCURRENCY = complete;
SWIFT_VERSION = 6.0;
};
name = Release;
};
Expand Down
Loading
Loading