Skip to content

Commit 3c9a195

Browse files
committed
增加podspec文件,以及因此修改的工程文件,增加.gitignore文件
1 parent d5c877d commit 3c9a195

File tree

4 files changed

+193
-10
lines changed

4 files changed

+193
-10
lines changed

.gitignore

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# General
2+
.DS_Store
3+
4+
# Xcode
5+
#
6+
7+
## Build generated
8+
build/
9+
DerivedData/
10+
11+
## Various settings
12+
*.pbxuser
13+
!default.pbxuser
14+
*.xcuserdatad
15+
xcuserdata/
16+
17+
## Obj-C/Swift specific
18+
*.hmap
19+
*.ipa
20+
*.dSYM.zip
21+
*.dSYM
22+
23+
# CocoaPods
24+
#
25+
# We recommend against adding the Pods directory to your .gitignore. However
26+
# you should judge for yourself, the pros and cons are mentioned at:
27+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
28+
#
29+
30+
Pods/

Demo/OOMDetector.xcodeproj/project.pbxproj

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
6B8C22ED1F8E494C007DE399 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B8C22EC1F8E494C007DE399 /* Assets.xcassets */; };
1414
6B8C22F01F8E494C007DE399 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6B8C22EE1F8E494C007DE399 /* LaunchScreen.storyboard */; };
1515
6B8C22F31F8E494C007DE399 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22F21F8E494C007DE399 /* main.m */; };
16-
6B9A04F31FD5816F00414B1F /* libOOMDetector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9A04F41FD5816F00414B1F /* libOOMDetector.framework */; settings = {ATTRIBUTES = (Required, ); }; };
1716
6B9A04F51FD5823800414B1F /* BaseDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22E71F8E494C007DE399 /* BaseDemoViewController.m */; };
1817
6B9A04F61FD5823800414B1F /* DemoViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B12C7011F974AB8000B42F0 /* DemoViewController2.m */; };
1918
6B9A04F71FD5823800414B1F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22E41F8E494C007DE399 /* AppDelegate.m */; };
2019
6BADA10D1FA8AC0F00668479 /* DemoViewController3.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BADA10C1FA8AC0F00668479 /* DemoViewController3.m */; };
2120
6BF6879C1FC3C4D500054160 /* MyOOMDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BF6879B1FC3C4D500054160 /* MyOOMDataManager.m */; };
21+
7DE3285020107E9B007A188B /* libOOMDetector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DE3285120107E9B007A188B /* libOOMDetector.framework */; };
2222
/* End PBXBuildFile section */
2323

2424
/* Begin PBXFileReference section */
@@ -39,19 +39,19 @@
3939
6B8C22EF1F8E494C007DE399 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
4040
6B8C22F11F8E494C007DE399 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
4141
6B8C22F21F8E494C007DE399 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
42-
6B9A04F41FD5816F00414B1F /* libOOMDetector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = libOOMDetector.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4342
6BADA10B1FA8AC0F00668479 /* DemoViewController3.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DemoViewController3.h; sourceTree = "<group>"; };
4443
6BADA10C1FA8AC0F00668479 /* DemoViewController3.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DemoViewController3.m; sourceTree = "<group>"; };
4544
6BF6879A1FC3C4D500054160 /* MyOOMDataManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyOOMDataManager.h; sourceTree = "<group>"; };
4645
6BF6879B1FC3C4D500054160 /* MyOOMDataManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MyOOMDataManager.m; sourceTree = "<group>"; };
46+
7DE3285120107E9B007A188B /* libOOMDetector.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = libOOMDetector.framework; sourceTree = BUILT_PRODUCTS_DIR; };
4747
/* End PBXFileReference section */
4848

4949
/* Begin PBXFrameworksBuildPhase section */
5050
6B8C22DD1F8E494C007DE399 /* Frameworks */ = {
5151
isa = PBXFrameworksBuildPhase;
5252
buildActionMask = 2147483647;
5353
files = (
54-
6B9A04F31FD5816F00414B1F /* libOOMDetector.framework in Frameworks */,
54+
7DE3285020107E9B007A188B /* libOOMDetector.framework in Frameworks */,
5555
);
5656
runOnlyForDeploymentPostprocessing = 0;
5757
};
@@ -113,7 +113,7 @@
113113
6B9A04F21FD5816F00414B1F /* Frameworks */ = {
114114
isa = PBXGroup;
115115
children = (
116-
6B9A04F41FD5816F00414B1F /* libOOMDetector.framework */,
116+
7DE3285120107E9B007A188B /* libOOMDetector.framework */,
117117
);
118118
name = Frameworks;
119119
sourceTree = "<group>";
@@ -245,7 +245,7 @@
245245
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
246246
CODE_SIGN_IDENTITY = "iPhone Developer";
247247
COPY_PHASE_STRIP = NO;
248-
DEBUG_INFORMATION_FORMAT = dwarf;
248+
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
249249
ENABLE_STRICT_OBJC_MSGSEND = YES;
250250
ENABLE_TESTABILITY = YES;
251251
GCC_C_LANGUAGE_STANDARD = gnu11;
@@ -262,10 +262,11 @@
262262
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
263263
GCC_WARN_UNUSED_FUNCTION = YES;
264264
GCC_WARN_UNUSED_VARIABLE = YES;
265-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
265+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
266266
MTL_ENABLE_DEBUG_INFO = YES;
267-
ONLY_ACTIVE_ARCH = YES;
267+
ONLY_ACTIVE_ARCH = NO;
268268
SDKROOT = iphoneos;
269+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
269270
};
270271
name = Debug;
271272
};
@@ -311,10 +312,12 @@
311312
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
312313
GCC_WARN_UNUSED_FUNCTION = YES;
313314
GCC_WARN_UNUSED_VARIABLE = YES;
314-
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
315+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
315316
MTL_ENABLE_DEBUG_INFO = NO;
317+
ONLY_ACTIVE_ARCH = NO;
316318
SDKROOT = iphoneos;
317319
VALIDATE_PRODUCT = YES;
320+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
318321
};
319322
name = Release;
320323
};
@@ -333,15 +336,17 @@
333336
Build_For_Extern,
334337
);
335338
INFOPLIST_FILE = OOMDetectorDemo/Info.plist;
336-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
339+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
337340
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
338341
NEW_SETTING = "";
342+
ONLY_ACTIVE_ARCH = NO;
339343
OTHER_LDFLAGS = "-lc++";
340344
PRODUCT_BUNDLE_IDENTIFIER = com.tencentgsd.OOMDemo;
341345
PRODUCT_NAME = "$(TARGET_NAME)";
342346
PROVISIONING_PROFILE = "";
343347
PROVISIONING_PROFILE_SPECIFIER = "";
344348
TARGETED_DEVICE_FAMILY = "1,2";
349+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
345350
};
346351
name = Debug;
347352
};
@@ -355,14 +360,15 @@
355360
DEVELOPMENT_TEAM = 8D5EHT9KTL;
356361
GCC_PREPROCESSOR_DEFINITIONS = Build_For_Extern;
357362
INFOPLIST_FILE = OOMDetectorDemo/Info.plist;
358-
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
363+
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
359364
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
360365
NEW_SETTING = "";
361366
OTHER_LDFLAGS = "-lc++";
362367
PRODUCT_BUNDLE_IDENTIFIER = com.tencentgsd.OOMDemo;
363368
PRODUCT_NAME = "$(TARGET_NAME)";
364369
PROVISIONING_PROFILE_SPECIFIER = "";
365370
TARGETED_DEVICE_FAMILY = "1,2";
371+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
366372
};
367373
name = Release;
368374
};

OOMDetector.podspec

Lines changed: 145 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
1+
#
2+
# Be sure to run `pod spec lint OOMDetector.podspec' to ensure this is a
3+
# valid spec and to remove all comments including this before submitting the spec.
4+
#
5+
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
6+
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
7+
#
8+
9+
Pod::Spec.new do |s|
10+
11+
# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
12+
#
13+
# These will help people to find your library, and whilst it
14+
# can feel like a chore to fill in it's definitely to your advantage. The
15+
# summary should be tweet-length, and the description more in depth.
16+
#
17+
18+
s.name = "OOMDetector"
19+
s.version = "1.0"
20+
s.summary = "OOMDetector is an iOS memory detector, which is used to detect OutOfMemory warnings, big memory allocations and memory leaks."
21+
22+
# This description is used to generate tags and improve search results.
23+
# * Think: What does it do? Why did you write it? What is the focus?
24+
# * Try to keep it short, snappy and to the point.
25+
# * Write the description between the DESC delimiters below.
26+
# * Finally, don't worry about the indent, CocoaPods strips it!
27+
s.description = <<-DESC
28+
OOMDetector is a memory detector created by programmers from Tencent, which is used as a framework in an iOS app.
29+
By hooking malloc and vm allocation methods, OOMDetector can monitor all allocations of memory by app. Through counting
30+
the summary volume of memory allocated with time, we can get the proximate memory of the app.
31+
DESC
32+
33+
s.homepage = "https://github.com/Tencent/OOMDetector"
34+
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"
35+
36+
37+
# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
38+
#
39+
# Licensing your code is important. See http://choosealicense.com for more info.
40+
# CocoaPods will detect a license file if there is a named LICENSE*
41+
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
42+
#
43+
44+
# s.license = "MIT"
45+
s.license = { :type => "MIT", :file => "LICENSE" }
46+
47+
48+
# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
49+
#
50+
# Specify the authors of the library, with email addresses. Email addresses
51+
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
52+
# accepts just a name if you'd rather not provide an email address.
53+
#
54+
# Specify a social_media_url where others can refer to, for example a twitter
55+
# profile URL.
56+
#
57+
58+
# s.author = { "" => "" }
59+
s.author = "Tencent"
60+
# s.authors = { "" => "" }
61+
# s.social_media_url = "http://twitter.com/"
62+
63+
# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
64+
#
65+
# If this Pod runs only on iOS or OS X, then specify the platform and
66+
# the deployment target. You can optionally include the target after the platform.
67+
#
68+
69+
# s.platform = :ios
70+
s.platform = :ios, "7.0"
71+
72+
# When using multiple platforms
73+
# s.ios.deployment_target = "5.0"
74+
# s.osx.deployment_target = "10.7"
75+
# s.watchos.deployment_target = "2.0"
76+
# s.tvos.deployment_target = "9.0"
77+
78+
79+
# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
80+
#
81+
# Specify the location from where the source should be retrieved.
82+
# Supports git, hg, bzr, svn and HTTP.
83+
#
84+
85+
s.source = { :git => "https://github.com/Tencent/OOMDetector.git", :tag => "#{s.version}" }
86+
87+
# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
88+
#
89+
# CocoaPods is smart about how it includes source code. For source files
90+
# giving a folder will include any swift, h, m, mm, c & cpp files.
91+
# For header files it will include any header in the folder.
92+
# Not including the public_header_files will make all headers public.
93+
#
94+
95+
# s.source_files = "libOOMDetector/libOOMDetector", "libOOMDetector/libOOMDetector/**/*.{h,m}", "Demo/**/*.{h,m}"
96+
# s.exclude_files = "libOOMDetector/libOOMDetector/Exclude"
97+
98+
# s.public_header_files = ['libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakDataUploadCenter.h', 'libOOMDetector/libOOMDetector/OOMDetector/Headers/*.h', 'libOOMDetector/libOOMDetector/OOMDetector/OOMDetector/statistic/OOMStatisticsInfoCenter.h', 'libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakFileUploadCenter.h', 'libOOMDetector/libOOMDetector/libOOMDetector.h']
99+
100+
s.source_files = "libOOMDetector/libOOMDetector", "libOOMDetector/libOOMDetector/**/*.{h,m,mm,c}"
101+
s.public_header_files = ['libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakDataUploadCenter.h', 'libOOMDetector/libOOMDetector/OOMDetector/Headers/*.h', 'libOOMDetector/libOOMDetector/OOMDetector/OOMDetector/statistic/OOMStatisticsInfoCenter.h', 'libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakFileUploadCenter.h', 'libOOMDetector/libOOMDetector/libOOMDetector.h']
102+
103+
# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
104+
#
105+
# A list of resources included with the Pod. These are copied into the
106+
# target bundle with a build phase script. Anything else will be cleaned.
107+
# You can preserve files from being cleaned, please don't preserve
108+
# non-essential files like tests, examples and documentation.
109+
#
110+
111+
# s.resource = "icon.png"
112+
# s.resources = "Resources/*.png"
113+
s.resources = "assets/*.gif"
114+
115+
# s.preserve_paths = "FilesToSave", "MoreFilesToSave"
116+
117+
118+
# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
119+
#
120+
# Link your library with frameworks, or libraries. Libraries do not include
121+
# the lib prefix of their name.
122+
#
123+
124+
# s.framework = "SomeFramework"
125+
# s.frameworks = "SomeFramework", "AnotherFramework"
126+
127+
# s.library = "iconv"
128+
# s.libraries = "iconv", "xml2"
129+
130+
131+
# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
132+
#
133+
# If your library depends on compiler flags you can set them in the xcconfig hash
134+
# where they will only apply to your library. If you depend on other Podspecs
135+
# you can include multiple dependencies to ensure it works.
136+
137+
# s.requires_arc = true
138+
s.requires_arc = false
139+
s.requires_arc = ['libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakDataUploadCenter.mm', 'libOOMDetector/libOOMDetector/OOMDetector/OOMDetector/memoryIndicator/MemoryIndicator.m']
140+
141+
142+
# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
143+
# s.dependency "JSONKit", "~> 1.4"
144+
145+
end

libOOMDetector/libOOMDetector.xcodeproj/project.pbxproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@
692692
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
693693
SKIP_INSTALL = YES;
694694
TARGETED_DEVICE_FAMILY = "1,2";
695+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
695696
};
696697
name = Debug;
697698
};
@@ -718,6 +719,7 @@
718719
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
719720
SKIP_INSTALL = YES;
720721
TARGETED_DEVICE_FAMILY = "1,2";
722+
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
721723
};
722724
name = Release;
723725
};

0 commit comments

Comments
 (0)