Skip to content

Commit

Permalink
增加podspec文件,以及因此修改的工程文件,增加.gitignore文件
Browse files Browse the repository at this point in the history
  • Loading branch information
adonisyuan committed Jan 18, 2018
1 parent d5c877d commit 3c9a195
Show file tree
Hide file tree
Showing 4 changed files with 193 additions and 10 deletions.
30 changes: 30 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# General
.DS_Store

# Xcode
#

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.xcuserdatad
xcuserdata/

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#

Pods/
26 changes: 16 additions & 10 deletions Demo/OOMDetector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
6B8C22ED1F8E494C007DE399 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6B8C22EC1F8E494C007DE399 /* Assets.xcassets */; };
6B8C22F01F8E494C007DE399 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6B8C22EE1F8E494C007DE399 /* LaunchScreen.storyboard */; };
6B8C22F31F8E494C007DE399 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22F21F8E494C007DE399 /* main.m */; };
6B9A04F31FD5816F00414B1F /* libOOMDetector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6B9A04F41FD5816F00414B1F /* libOOMDetector.framework */; settings = {ATTRIBUTES = (Required, ); }; };
6B9A04F51FD5823800414B1F /* BaseDemoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22E71F8E494C007DE399 /* BaseDemoViewController.m */; };
6B9A04F61FD5823800414B1F /* DemoViewController2.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B12C7011F974AB8000B42F0 /* DemoViewController2.m */; };
6B9A04F71FD5823800414B1F /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B8C22E41F8E494C007DE399 /* AppDelegate.m */; };
6BADA10D1FA8AC0F00668479 /* DemoViewController3.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BADA10C1FA8AC0F00668479 /* DemoViewController3.m */; };
6BF6879C1FC3C4D500054160 /* MyOOMDataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BF6879B1FC3C4D500054160 /* MyOOMDataManager.m */; };
7DE3285020107E9B007A188B /* libOOMDetector.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7DE3285120107E9B007A188B /* libOOMDetector.framework */; };
/* End PBXBuildFile section */

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

/* Begin PBXFrameworksBuildPhase section */
6B8C22DD1F8E494C007DE399 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
6B9A04F31FD5816F00414B1F /* libOOMDetector.framework in Frameworks */,
7DE3285020107E9B007A188B /* libOOMDetector.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -113,7 +113,7 @@
6B9A04F21FD5816F00414B1F /* Frameworks */ = {
isa = PBXGroup;
children = (
6B9A04F41FD5816F00414B1F /* libOOMDetector.framework */,
7DE3285120107E9B007A188B /* libOOMDetector.framework */,
);
name = Frameworks;
sourceTree = "<group>";
Expand Down Expand Up @@ -245,7 +245,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
Expand All @@ -262,10 +262,11 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Debug;
};
Expand Down Expand Up @@ -311,10 +312,12 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
MTL_ENABLE_DEBUG_INFO = NO;
ONLY_ACTIVE_ARCH = NO;
SDKROOT = iphoneos;
VALIDATE_PRODUCT = YES;
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Release;
};
Expand All @@ -333,15 +336,17 @@
Build_For_Extern,
);
INFOPLIST_FILE = OOMDetectorDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
NEW_SETTING = "";
ONLY_ACTIVE_ARCH = NO;
OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = com.tencentgsd.OOMDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Debug;
};
Expand All @@ -355,14 +360,15 @@
DEVELOPMENT_TEAM = 8D5EHT9KTL;
GCC_PREPROCESSOR_DEFINITIONS = Build_For_Extern;
INFOPLIST_FILE = OOMDetectorDemo/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 9.0;
IPHONEOS_DEPLOYMENT_TARGET = 7.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
NEW_SETTING = "";
OTHER_LDFLAGS = "-lc++";
PRODUCT_BUNDLE_IDENTIFIER = com.tencentgsd.OOMDemo;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Release;
};
Expand Down
145 changes: 145 additions & 0 deletions OOMDetector.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
#
# Be sure to run `pod spec lint OOMDetector.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

Pod::Spec.new do |s|

# ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# These will help people to find your library, and whilst it
# can feel like a chore to fill in it's definitely to your advantage. The
# summary should be tweet-length, and the description more in depth.
#

s.name = "OOMDetector"
s.version = "1.0"
s.summary = "OOMDetector is an iOS memory detector, which is used to detect OutOfMemory warnings, big memory allocations and memory leaks."

# 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?
# * Try to keep it short, snappy and to the point.
# * Write the description between the DESC delimiters below.
# * Finally, don't worry about the indent, CocoaPods strips it!
s.description = <<-DESC
OOMDetector is a memory detector created by programmers from Tencent, which is used as a framework in an iOS app.
By hooking malloc and vm allocation methods, OOMDetector can monitor all allocations of memory by app. Through counting
the summary volume of memory allocated with time, we can get the proximate memory of the app.
DESC

s.homepage = "https://github.com/Tencent/OOMDetector"
# s.screenshots = "www.example.com/screenshots_1.gif", "www.example.com/screenshots_2.gif"


# ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Licensing your code is important. See http://choosealicense.com for more info.
# CocoaPods will detect a license file if there is a named LICENSE*
# Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
#

# s.license = "MIT"
s.license = { :type => "MIT", :file => "LICENSE" }


# ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the authors of the library, with email addresses. Email addresses
# of the authors are extracted from the SCM log. E.g. $ git log. CocoaPods also
# accepts just a name if you'd rather not provide an email address.
#
# Specify a social_media_url where others can refer to, for example a twitter
# profile URL.
#

# s.author = { "" => "" }
s.author = "Tencent"
# s.authors = { "" => "" }
# s.social_media_url = "http://twitter.com/"

# ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If this Pod runs only on iOS or OS X, then specify the platform and
# the deployment target. You can optionally include the target after the platform.
#

# s.platform = :ios
s.platform = :ios, "7.0"

# When using multiple platforms
# s.ios.deployment_target = "5.0"
# s.osx.deployment_target = "10.7"
# s.watchos.deployment_target = "2.0"
# s.tvos.deployment_target = "9.0"


# ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Specify the location from where the source should be retrieved.
# Supports git, hg, bzr, svn and HTTP.
#

s.source = { :git => "https://github.com/Tencent/OOMDetector.git", :tag => "#{s.version}" }

# ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# CocoaPods is smart about how it includes source code. For source files
# giving a folder will include any swift, h, m, mm, c & cpp files.
# For header files it will include any header in the folder.
# Not including the public_header_files will make all headers public.
#

# s.source_files = "libOOMDetector/libOOMDetector", "libOOMDetector/libOOMDetector/**/*.{h,m}", "Demo/**/*.{h,m}"
# s.exclude_files = "libOOMDetector/libOOMDetector/Exclude"

# 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']

s.source_files = "libOOMDetector/libOOMDetector", "libOOMDetector/libOOMDetector/**/*.{h,m,mm,c}"
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']

# ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# A list of resources included with the Pod. These are copied into the
# target bundle with a build phase script. Anything else will be cleaned.
# You can preserve files from being cleaned, please don't preserve
# non-essential files like tests, examples and documentation.
#

# s.resource = "icon.png"
# s.resources = "Resources/*.png"
s.resources = "assets/*.gif"

# s.preserve_paths = "FilesToSave", "MoreFilesToSave"


# ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# Link your library with frameworks, or libraries. Libraries do not include
# the lib prefix of their name.
#

# s.framework = "SomeFramework"
# s.frameworks = "SomeFramework", "AnotherFramework"

# s.library = "iconv"
# s.libraries = "iconv", "xml2"


# ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
#
# If your library depends on compiler flags you can set them in the xcconfig hash
# where they will only apply to your library. If you depend on other Podspecs
# you can include multiple dependencies to ensure it works.

# s.requires_arc = true
s.requires_arc = false
s.requires_arc = ['libOOMDetector/libOOMDetector/OOMDetector/common/upload/QQLeakDataUploadCenter.mm', 'libOOMDetector/libOOMDetector/OOMDetector/OOMDetector/memoryIndicator/MemoryIndicator.m']


# s.xcconfig = { "HEADER_SEARCH_PATHS" => "$(SDKROOT)/usr/include/libxml2" }
# s.dependency "JSONKit", "~> 1.4"

end
2 changes: 2 additions & 0 deletions libOOMDetector/libOOMDetector.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -692,6 +692,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Debug;
};
Expand All @@ -718,6 +719,7 @@
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
SKIP_INSTALL = YES;
TARGETED_DEVICE_FAMILY = "1,2";
VALID_ARCHS = "arm64 armv7 armv7s x86_64 i386";
};
name = Release;
};
Expand Down

0 comments on commit 3c9a195

Please sign in to comment.