Skip to content

Commit 8244c94

Browse files
author
Eric Wu
committed
去除UIWebView 相关api
1 parent b60debf commit 8244c94

File tree

5 files changed

+31
-34
lines changed

5 files changed

+31
-34
lines changed

CRBoostSwift/Classes/CRMath.swift

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -608,8 +608,6 @@ public func CRCallPhoneNumber(phone: String?) {
608608
}
609609
let str = "tel:\(phone!)"
610610
if let url = URL(string: str) {
611-
let callWebview = UIWebView()
612-
callWebview.loadRequest(URLRequest(url: url))
613-
CRRootView().addSubview(callWebview)
611+
Utility.goURL(url)
614612
}
615613
}

CRBoostSwift/Classes/UIKit+CRBoost.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ extension UITableViewCell {
4646
}
4747
}
4848

49-
extension UIWebView {
50-
}
5149

5250
extension UIView {
5351
private struct CRboostKeys {

Example/CRBoostSwift.xcodeproj/project.pbxproj

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@
144144
isa = PBXProject;
145145
attributes = {
146146
LastSwiftUpdateCheck = 0830;
147-
LastUpgradeCheck = 0830;
147+
LastUpgradeCheck = 1130;
148148
ORGANIZATIONNAME = CocoaPods;
149149
TargetAttributes = {
150150
607FACCF1AFB9204008FA782 = {
@@ -273,12 +273,14 @@
273273
CLANG_WARN_BOOL_CONVERSION = YES;
274274
CLANG_WARN_COMMA = YES;
275275
CLANG_WARN_CONSTANT_CONVERSION = YES;
276+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
276277
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
277278
CLANG_WARN_EMPTY_BODY = YES;
278279
CLANG_WARN_ENUM_CONVERSION = YES;
279280
CLANG_WARN_INFINITE_RECURSION = YES;
280281
CLANG_WARN_INT_CONVERSION = YES;
281282
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
283+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
282284
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
283285
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
284286
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -326,12 +328,14 @@
326328
CLANG_WARN_BOOL_CONVERSION = YES;
327329
CLANG_WARN_COMMA = YES;
328330
CLANG_WARN_CONSTANT_CONVERSION = YES;
331+
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
329332
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
330333
CLANG_WARN_EMPTY_BODY = YES;
331334
CLANG_WARN_ENUM_CONVERSION = YES;
332335
CLANG_WARN_INFINITE_RECURSION = YES;
333336
CLANG_WARN_INT_CONVERSION = YES;
334337
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
338+
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
335339
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
336340
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
337341
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
@@ -365,6 +369,7 @@
365369
baseConfigurationReference = 4A26062FAA527DCFA4963110 /* Pods-CRBoostSwift_Example.debug.xcconfig */;
366370
buildSettings = {
367371
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
372+
CODE_SIGN_IDENTITY = "iPhone Developer";
368373
CODE_SIGN_STYLE = Manual;
369374
DEVELOPMENT_TEAM = H843PBVDG6;
370375
INFOPLIST_FILE = CRBoostSwift/Info.plist;
@@ -373,7 +378,7 @@
373378
OTHER_SWIFT_FLAGS = "$(inherited) -D COCOAPODS -D DEBUG";
374379
PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)";
375380
PRODUCT_NAME = "$(TARGET_NAME)";
376-
PROVISIONING_PROFILE_SPECIFIER = "XC Wildcard_Dev(Simai)";
381+
PROVISIONING_PROFILE_SPECIFIER = "* Development";
377382
SWIFT_SWIFT3_OBJC_INFERENCE = Default;
378383
SWIFT_VERSION = 5.0;
379384
};

Example/CRBoostSwift.xcodeproj/xcshareddata/xcschemes/CRBoostSwift-Example.xcscheme

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Scheme
3-
LastUpgradeVersion = "0900"
3+
LastUpgradeVersion = "1130"
44
version = "1.3">
55
<BuildAction
66
parallelizeBuildables = "YES"
@@ -41,6 +41,15 @@
4141
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
4242
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
4343
shouldUseLaunchSchemeArgsEnv = "YES">
44+
<MacroExpansion>
45+
<BuildableReference
46+
BuildableIdentifier = "primary"
47+
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
48+
BuildableName = "CRBoostSwift_Example.app"
49+
BlueprintName = "CRBoostSwift_Example"
50+
ReferencedContainer = "container:CRBoostSwift.xcodeproj">
51+
</BuildableReference>
52+
</MacroExpansion>
4453
<Testables>
4554
<TestableReference
4655
skipped = "NO">
@@ -53,17 +62,6 @@
5362
</BuildableReference>
5463
</TestableReference>
5564
</Testables>
56-
<MacroExpansion>
57-
<BuildableReference
58-
BuildableIdentifier = "primary"
59-
BlueprintIdentifier = "607FACCF1AFB9204008FA782"
60-
BuildableName = "CRBoostSwift_Example.app"
61-
BlueprintName = "CRBoostSwift_Example"
62-
ReferencedContainer = "container:CRBoostSwift.xcodeproj">
63-
</BuildableReference>
64-
</MacroExpansion>
65-
<AdditionalOptions>
66-
</AdditionalOptions>
6765
</TestAction>
6866
<LaunchAction
6967
buildConfiguration = "Debug"
@@ -85,8 +83,6 @@
8583
ReferencedContainer = "container:CRBoostSwift.xcodeproj">
8684
</BuildableReference>
8785
</BuildableProductRunnable>
88-
<AdditionalOptions>
89-
</AdditionalOptions>
9086
</LaunchAction>
9187
<ProfileAction
9288
buildConfiguration = "Release"

Example/CRBoostSwift/ViewController.swift

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,29 @@ class ViewController: UIViewController {
1919
}
2020

2121
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
22+
2223
// print("a".retainDecimal(5))
2324
// print("1".retainDecimal(5))
2425
// print(".11".retainDecimal(5))
2526
// print(".".retainDecimal(5))
2627
print("".retainDecimal(5))
27-
28-
28+
2929
let test = "Hello USA 🇺🇸!!! Hello Brazil 🇧🇷!!!"
30-
print(test[safe: 10] as Any) // "🇺🇸"
31-
print(test[11]) // "!"
32-
print(test[10...]) // "🇺🇸!!! Hello Brazil 🇧🇷!!!"
33-
print(test[10..<12]) // "🇺🇸!"
34-
print(test[10...12]) // "🇺🇸!!"
35-
print(test[...10]) // "Hello USA 🇺🇸"
36-
print(test[..<10]) // "Hello USA "
37-
print(test.first as Any) // "H"
38-
print(test.last as Any) // "!"
30+
print(test[safe: 10] as Any) // "🇺🇸"
31+
print(test[11]) // "!"
32+
print(test[10...]) // "🇺🇸!!! Hello Brazil 🇧🇷!!!"
33+
print(test[10 ..< 12]) // "🇺🇸!"
34+
print(test[10 ... 12]) // "🇺🇸!!"
35+
print(test[...10]) // "Hello USA 🇺🇸"
36+
print(test[..<10]) // "Hello USA "
37+
print(test.first as Any) // "H"
38+
print(test.last as Any) // "!"
3939

4040
// Subscripting the Substring
41-
print(test[...][...3]) // "Hell"
41+
print(test[...][...3]) // "Hell"
4242

4343
// Note that they all return a Substring of the original String.
4444
// To create a new String from a substring
45-
print(test[10...].string) // "🇺🇸!!! Hello Brazil 🇧🇷!!!"
45+
print(test[10...].string) // "🇺🇸!!! Hello Brazil 🇧🇷!!!"
4646
}
4747
}

0 commit comments

Comments
 (0)