├── .gitignore ├── .travis.yml ├── LICENSE ├── Podfile ├── Podfile.lock ├── README.md ├── WordPressCom-Analytics-iOS.podspec ├── WordPressCom-Analytics-iOS.xcodeproj ├── .gitignore ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── sendhil.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcshareddata │ └── xcschemes │ └── WordPressCom-Analytics-iOS.xcscheme ├── WordPressCom-Analytics-iOS.xcworkspace └── contents.xcworkspacedata ├── WordPressCom-Analytics-iOS ├── WPAnalytics.h ├── WPAnalytics.m └── WordPressCom-Analytics-iOS-Prefix.pch └── WordPressCom-Analytics-iOSTests ├── TestAnalyticsTracker.h ├── TestAnalyticsTracker.m ├── WPAnalyticsTests.m ├── WordPressCom-Analytics-iOSTests-Info.plist └── en.lproj └── InfoPlist.strings /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # OSX 21 | .DS_Store 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 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control? 28 | # 29 | Pods/ 30 | 31 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: objective-c 2 | osx_image: xcode7.1 3 | xcode_workspace: WordPressCom-Analytics-iOS.xcworkspace 4 | xcode_scheme: WordPressCom-Analytics-iOS 5 | xcode_sdk: iphonesimulator 6 | sudo: false 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 2, June 1991 3 | 4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc., 5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The licenses for most software are designed to take away your 12 | freedom to share and change it. By contrast, the GNU General Public 13 | License is intended to guarantee your freedom to share and change free 14 | software--to make sure the software is free for all its users. This 15 | General Public License applies to most of the Free Software 16 | Foundation's software and to any other program whose authors commit to 17 | using it. (Some other Free Software Foundation software is covered by 18 | the GNU Lesser General Public License instead.) You can apply it to 19 | your programs, too. 20 | 21 | When we speak of free software, we are referring to freedom, not 22 | price. Our General Public Licenses are designed to make sure that you 23 | have the freedom to distribute copies of free software (and charge for 24 | this service if you wish), that you receive source code or can get it 25 | if you want it, that you can change the software or use pieces of it 26 | in new free programs; and that you know you can do these things. 27 | 28 | To protect your rights, we need to make restrictions that forbid 29 | anyone to deny you these rights or to ask you to surrender the rights. 30 | These restrictions translate to certain responsibilities for you if you 31 | distribute copies of the software, or if you modify it. 32 | 33 | For example, if you distribute copies of such a program, whether 34 | gratis or for a fee, you must give the recipients all the rights that 35 | you have. You must make sure that they, too, receive or can get the 36 | source code. And you must show them these terms so they know their 37 | rights. 38 | 39 | We protect your rights with two steps: (1) copyright the software, and 40 | (2) offer you this license which gives you legal permission to copy, 41 | distribute and/or modify the software. 42 | 43 | Also, for each author's protection and ours, we want to make certain 44 | that everyone understands that there is no warranty for this free 45 | software. If the software is modified by someone else and passed on, we 46 | want its recipients to know that what they have is not the original, so 47 | that any problems introduced by others will not reflect on the original 48 | authors' reputations. 49 | 50 | Finally, any free program is threatened constantly by software 51 | patents. We wish to avoid the danger that redistributors of a free 52 | program will individually obtain patent licenses, in effect making the 53 | program proprietary. To prevent this, we have made it clear that any 54 | patent must be licensed for everyone's free use or not licensed at all. 55 | 56 | The precise terms and conditions for copying, distribution and 57 | modification follow. 58 | 59 | GNU GENERAL PUBLIC LICENSE 60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 61 | 62 | 0. This License applies to any program or other work which contains 63 | a notice placed by the copyright holder saying it may be distributed 64 | under the terms of this General Public License. The "Program", below, 65 | refers to any such program or work, and a "work based on the Program" 66 | means either the Program or any derivative work under copyright law: 67 | that is to say, a work containing the Program or a portion of it, 68 | either verbatim or with modifications and/or translated into another 69 | language. (Hereinafter, translation is included without limitation in 70 | the term "modification".) Each licensee is addressed as "you". 71 | 72 | Activities other than copying, distribution and modification are not 73 | covered by this License; they are outside its scope. The act of 74 | running the Program is not restricted, and the output from the Program 75 | is covered only if its contents constitute a work based on the 76 | Program (independent of having been made by running the Program). 77 | Whether that is true depends on what the Program does. 78 | 79 | 1. You may copy and distribute verbatim copies of the Program's 80 | source code as you receive it, in any medium, provided that you 81 | conspicuously and appropriately publish on each copy an appropriate 82 | copyright notice and disclaimer of warranty; keep intact all the 83 | notices that refer to this License and to the absence of any warranty; 84 | and give any other recipients of the Program a copy of this License 85 | along with the Program. 86 | 87 | You may charge a fee for the physical act of transferring a copy, and 88 | you may at your option offer warranty protection in exchange for a fee. 89 | 90 | 2. You may modify your copy or copies of the Program or any portion 91 | of it, thus forming a work based on the Program, and copy and 92 | distribute such modifications or work under the terms of Section 1 93 | above, provided that you also meet all of these conditions: 94 | 95 | a) You must cause the modified files to carry prominent notices 96 | stating that you changed the files and the date of any change. 97 | 98 | b) You must cause any work that you distribute or publish, that in 99 | whole or in part contains or is derived from the Program or any 100 | part thereof, to be licensed as a whole at no charge to all third 101 | parties under the terms of this License. 102 | 103 | c) If the modified program normally reads commands interactively 104 | when run, you must cause it, when started running for such 105 | interactive use in the most ordinary way, to print or display an 106 | announcement including an appropriate copyright notice and a 107 | notice that there is no warranty (or else, saying that you provide 108 | a warranty) and that users may redistribute the program under 109 | these conditions, and telling the user how to view a copy of this 110 | License. (Exception: if the Program itself is interactive but 111 | does not normally print such an announcement, your work based on 112 | the Program is not required to print an announcement.) 113 | 114 | These requirements apply to the modified work as a whole. If 115 | identifiable sections of that work are not derived from the Program, 116 | and can be reasonably considered independent and separate works in 117 | themselves, then this License, and its terms, do not apply to those 118 | sections when you distribute them as separate works. But when you 119 | distribute the same sections as part of a whole which is a work based 120 | on the Program, the distribution of the whole must be on the terms of 121 | this License, whose permissions for other licensees extend to the 122 | entire whole, and thus to each and every part regardless of who wrote it. 123 | 124 | Thus, it is not the intent of this section to claim rights or contest 125 | your rights to work written entirely by you; rather, the intent is to 126 | exercise the right to control the distribution of derivative or 127 | collective works based on the Program. 128 | 129 | In addition, mere aggregation of another work not based on the Program 130 | with the Program (or with a work based on the Program) on a volume of 131 | a storage or distribution medium does not bring the other work under 132 | the scope of this License. 133 | 134 | 3. You may copy and distribute the Program (or a work based on it, 135 | under Section 2) in object code or executable form under the terms of 136 | Sections 1 and 2 above provided that you also do one of the following: 137 | 138 | a) Accompany it with the complete corresponding machine-readable 139 | source code, which must be distributed under the terms of Sections 140 | 1 and 2 above on a medium customarily used for software interchange; or, 141 | 142 | b) Accompany it with a written offer, valid for at least three 143 | years, to give any third party, for a charge no more than your 144 | cost of physically performing source distribution, a complete 145 | machine-readable copy of the corresponding source code, to be 146 | distributed under the terms of Sections 1 and 2 above on a medium 147 | customarily used for software interchange; or, 148 | 149 | c) Accompany it with the information you received as to the offer 150 | to distribute corresponding source code. (This alternative is 151 | allowed only for noncommercial distribution and only if you 152 | received the program in object code or executable form with such 153 | an offer, in accord with Subsection b above.) 154 | 155 | The source code for a work means the preferred form of the work for 156 | making modifications to it. For an executable work, complete source 157 | code means all the source code for all modules it contains, plus any 158 | associated interface definition files, plus the scripts used to 159 | control compilation and installation of the executable. However, as a 160 | special exception, the source code distributed need not include 161 | anything that is normally distributed (in either source or binary 162 | form) with the major components (compiler, kernel, and so on) of the 163 | operating system on which the executable runs, unless that component 164 | itself accompanies the executable. 165 | 166 | If distribution of executable or object code is made by offering 167 | access to copy from a designated place, then offering equivalent 168 | access to copy the source code from the same place counts as 169 | distribution of the source code, even though third parties are not 170 | compelled to copy the source along with the object code. 171 | 172 | 4. You may not copy, modify, sublicense, or distribute the Program 173 | except as expressly provided under this License. Any attempt 174 | otherwise to copy, modify, sublicense or distribute the Program is 175 | void, and will automatically terminate your rights under this License. 176 | However, parties who have received copies, or rights, from you under 177 | this License will not have their licenses terminated so long as such 178 | parties remain in full compliance. 179 | 180 | 5. You are not required to accept this License, since you have not 181 | signed it. However, nothing else grants you permission to modify or 182 | distribute the Program or its derivative works. These actions are 183 | prohibited by law if you do not accept this License. Therefore, by 184 | modifying or distributing the Program (or any work based on the 185 | Program), you indicate your acceptance of this License to do so, and 186 | all its terms and conditions for copying, distributing or modifying 187 | the Program or works based on it. 188 | 189 | 6. Each time you redistribute the Program (or any work based on the 190 | Program), the recipient automatically receives a license from the 191 | original licensor to copy, distribute or modify the Program subject to 192 | these terms and conditions. You may not impose any further 193 | restrictions on the recipients' exercise of the rights granted herein. 194 | You are not responsible for enforcing compliance by third parties to 195 | this License. 196 | 197 | 7. If, as a consequence of a court judgment or allegation of patent 198 | infringement or for any other reason (not limited to patent issues), 199 | conditions are imposed on you (whether by court order, agreement or 200 | otherwise) that contradict the conditions of this License, they do not 201 | excuse you from the conditions of this License. If you cannot 202 | distribute so as to satisfy simultaneously your obligations under this 203 | License and any other pertinent obligations, then as a consequence you 204 | may not distribute the Program at all. For example, if a patent 205 | license would not permit royalty-free redistribution of the Program by 206 | all those who receive copies directly or indirectly through you, then 207 | the only way you could satisfy both it and this License would be to 208 | refrain entirely from distribution of the Program. 209 | 210 | If any portion of this section is held invalid or unenforceable under 211 | any particular circumstance, the balance of the section is intended to 212 | apply and the section as a whole is intended to apply in other 213 | circumstances. 214 | 215 | It is not the purpose of this section to induce you to infringe any 216 | patents or other property right claims or to contest validity of any 217 | such claims; this section has the sole purpose of protecting the 218 | integrity of the free software distribution system, which is 219 | implemented by public license practices. Many people have made 220 | generous contributions to the wide range of software distributed 221 | through that system in reliance on consistent application of that 222 | system; it is up to the author/donor to decide if he or she is willing 223 | to distribute software through any other system and a licensee cannot 224 | impose that choice. 225 | 226 | This section is intended to make thoroughly clear what is believed to 227 | be a consequence of the rest of this License. 228 | 229 | 8. If the distribution and/or use of the Program is restricted in 230 | certain countries either by patents or by copyrighted interfaces, the 231 | original copyright holder who places the Program under this License 232 | may add an explicit geographical distribution limitation excluding 233 | those countries, so that distribution is permitted only in or among 234 | countries not thus excluded. In such case, this License incorporates 235 | the limitation as if written in the body of this License. 236 | 237 | 9. The Free Software Foundation may publish revised and/or new versions 238 | of the General Public License from time to time. Such new versions will 239 | be similar in spirit to the present version, but may differ in detail to 240 | address new problems or concerns. 241 | 242 | Each version is given a distinguishing version number. If the Program 243 | specifies a version number of this License which applies to it and "any 244 | later version", you have the option of following the terms and conditions 245 | either of that version or of any later version published by the Free 246 | Software Foundation. If the Program does not specify a version number of 247 | this License, you may choose any version ever published by the Free Software 248 | Foundation. 249 | 250 | 10. If you wish to incorporate parts of the Program into other free 251 | programs whose distribution conditions are different, write to the author 252 | to ask for permission. For software which is copyrighted by the Free 253 | Software Foundation, write to the Free Software Foundation; we sometimes 254 | make exceptions for this. Our decision will be guided by the two goals 255 | of preserving the free status of all derivatives of our free software and 256 | of promoting the sharing and reuse of software generally. 257 | 258 | NO WARRANTY 259 | 260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY 261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN 262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES 263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED 264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS 266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE 267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 268 | REPAIR OR CORRECTION. 269 | 270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR 272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, 273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING 274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED 275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY 276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER 277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE 278 | POSSIBILITY OF SUCH DAMAGES. 279 | 280 | END OF TERMS AND CONDITIONS 281 | 282 | How to Apply These Terms to Your New Programs 283 | 284 | If you develop a new program, and you want it to be of the greatest 285 | possible use to the public, the best way to achieve this is to make it 286 | free software which everyone can redistribute and change under these terms. 287 | 288 | To do so, attach the following notices to the program. It is safest 289 | to attach them to the start of each source file to most effectively 290 | convey the exclusion of warranty; and each file should have at least 291 | the "copyright" line and a pointer to where the full notice is found. 292 | 293 | {description} 294 | Copyright (C) {year} {fullname} 295 | 296 | This program is free software; you can redistribute it and/or modify 297 | it under the terms of the GNU General Public License as published by 298 | the Free Software Foundation; either version 2 of the License, or 299 | (at your option) any later version. 300 | 301 | This program is distributed in the hope that it will be useful, 302 | but WITHOUT ANY WARRANTY; without even the implied warranty of 303 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 304 | GNU General Public License for more details. 305 | 306 | You should have received a copy of the GNU General Public License along 307 | with this program; if not, write to the Free Software Foundation, Inc., 308 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 309 | 310 | Also add information on how to contact you by electronic and paper mail. 311 | 312 | If the program is interactive, make it output a short notice like this 313 | when it starts in an interactive mode: 314 | 315 | Gnomovision version 69, Copyright (C) year name of author 316 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 317 | This is free software, and you are welcome to redistribute it 318 | under certain conditions; type `show c' for details. 319 | 320 | The hypothetical commands `show w' and `show c' should show the appropriate 321 | parts of the General Public License. Of course, the commands you use may 322 | be called something other than `show w' and `show c'; they could even be 323 | mouse-clicks or menu items--whatever suits your program. 324 | 325 | You should also get your employer (if you work as a programmer) or your 326 | school, if any, to sign a "copyright disclaimer" for the program, if 327 | necessary. Here is a sample; alter the names: 328 | 329 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program 330 | `Gnomovision' (which makes passes at compilers) written by James Hacker. 331 | 332 | {signature of Ty Coon}, 1 April 1989 333 | Ty Coon, President of Vice 334 | 335 | This General Public License does not permit incorporating your program into 336 | proprietary programs. If your program is a subroutine library, you may 337 | consider it more useful to permit linking proprietary applications with the 338 | library. If this is what you want to do, use the GNU Lesser General 339 | Public License instead of this License. -------------------------------------------------------------------------------- /Podfile: -------------------------------------------------------------------------------- 1 | inhibit_all_warnings! 2 | 3 | platform :ios, '7.0' 4 | 5 | target 'WordPressCom-Analytics-iOSTests' do 6 | pod 'Specta', '~> 0.2.1' 7 | pod 'Expecta' 8 | pod 'OCMock' 9 | end 10 | 11 | -------------------------------------------------------------------------------- /Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Expecta (1.0.0) 3 | - OCMock (3.1.2) 4 | - Specta (0.2.1) 5 | 6 | DEPENDENCIES: 7 | - Expecta 8 | - OCMock 9 | - Specta (~> 0.2.1) 10 | 11 | SPEC CHECKSUMS: 12 | Expecta: 32604574add2c46a36f8d2f716b6c5736eb75024 13 | OCMock: a10ea9f0a6e921651f96f78b6faee95ebc813b92 14 | Specta: 15a276a6343867b426d5ed135d5aa4d04123a573 15 | 16 | PODFILE CHECKSUM: a4c7de5e7134c73b42ab23f160a2764806537fab 17 | 18 | COCOAPODS: 1.2.1 19 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🚨 Deprecation Notice: 🚨 As of 13-Jul-2017 this project has been deprecated and will no longer be updated. The code is here for historical purposes only. The WordPressCom-Analytics-iOS project was merged into the main WordPress-iOS project as a dynamic framework. 2 | 3 | [![Build Status](https://travis-ci.org/wordpress-mobile/WordPressCom-Analytics-iOS.svg?branch=develop)](https://travis-ci.org/wordpress-mobile/WordPressCom-Analytics-iOS) 4 | WordPressCom-Analytics-iOS 5 | ========================== 6 | 7 | Library for handling Analytics tracking in WPiOS 8 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "WordPressCom-Analytics-iOS" 3 | s.version = "0.1.31" 4 | s.summary = "Library for handling Analytics tracking in WPiOS" 5 | s.homepage = "http://apps.wordpress.org" 6 | s.license = { :type => "Sendhil PanchadsaramGPLv2" } 7 | s.author = { "WordPress" => "mobile@automattic.com" } 8 | s.social_media_url = "http://twitter.com/WordPressiOS" 9 | s.platform = :ios, "10.0" 10 | s.source = { :git => "https://github.com/wordpress-mobile/WordPressCom-Analytics-iOS.git", :tag => s.version.to_s } 11 | s.source_files = "WordPressCom-Analytics-iOS", "WordPressCom-Analytics-iOS/**/*.{h,m}" 12 | s.prefix_header_file = "WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch" 13 | s.requires_arc = true 14 | s.header_dir = 'WordPressComAnalytics' 15 | end 16 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcodeproj/.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | build/ 4 | *.pbxuser 5 | !default.pbxuser 6 | *.mode1v3 7 | !default.mode1v3 8 | *.mode2v3 9 | !default.mode2v3 10 | *.perspectivev3 11 | !default.perspectivev3 12 | xcuserdata 13 | *.xccheckout 14 | *.moved-aside 15 | DerivedData 16 | *.hmap 17 | *.ipa 18 | *.xcuserstate 19 | 20 | # CocoaPods 21 | # 22 | # We recommend against adding the Pods directory to your .gitignore. However 23 | # you should judge for yourself, the pros and cons are mentioned at: 24 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control? 25 | # 26 | Pods/ 27 | 28 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 232DF3CABE8D90483E8CF38B /* libPods-WordPressCom-Analytics-iOSTests.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 5C6C8E87B0B8E081E9913D0C /* libPods-WordPressCom-Analytics-iOSTests.a */; }; 11 | 85902C6E19833055004A95F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85902C6D19833055004A95F2 /* Foundation.framework */; }; 12 | 85902C7C19833055004A95F2 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85902C7B19833055004A95F2 /* XCTest.framework */; }; 13 | 85902C7D19833055004A95F2 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85902C6D19833055004A95F2 /* Foundation.framework */; }; 14 | 85902C7F19833055004A95F2 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 85902C7E19833055004A95F2 /* UIKit.framework */; }; 15 | 85902C8219833055004A95F2 /* libWordPressCom-Analytics-iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 85902C6A19833055004A95F2 /* libWordPressCom-Analytics-iOS.a */; }; 16 | 85902C8819833055004A95F2 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 85902C8619833055004A95F2 /* InfoPlist.strings */; }; 17 | 85902C9519833080004A95F2 /* WPAnalytics.m in Sources */ = {isa = PBXBuildFile; fileRef = 85902C9419833080004A95F2 /* WPAnalytics.m */; }; 18 | 85902C9819833107004A95F2 /* WPAnalyticsTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 85902C9719833107004A95F2 /* WPAnalyticsTests.m */; }; 19 | 85902C9B198334F7004A95F2 /* TestAnalyticsTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = 85902C9A198334F7004A95F2 /* TestAnalyticsTracker.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 85902C8019833055004A95F2 /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 85902C6219833055004A95F2 /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 85902C6919833055004A95F2; 28 | remoteInfo = "WordPressCom-Analytics-iOS"; 29 | }; 30 | /* End PBXContainerItemProxy section */ 31 | 32 | /* Begin PBXCopyFilesBuildPhase section */ 33 | 85902C6819833055004A95F2 /* CopyFiles */ = { 34 | isa = PBXCopyFilesBuildPhase; 35 | buildActionMask = 2147483647; 36 | dstPath = "include/$(PRODUCT_NAME)"; 37 | dstSubfolderSpec = 16; 38 | files = ( 39 | ); 40 | runOnlyForDeploymentPostprocessing = 0; 41 | }; 42 | /* End PBXCopyFilesBuildPhase section */ 43 | 44 | /* Begin PBXFileReference section */ 45 | 524FB2245716594AC918ACB3 /* Pods-WordPressCom-Analytics-iOSTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressCom-Analytics-iOSTests.release.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressCom-Analytics-iOSTests/Pods-WordPressCom-Analytics-iOSTests.release.xcconfig"; sourceTree = ""; }; 46 | 5C6C8E87B0B8E081E9913D0C /* libPods-WordPressCom-Analytics-iOSTests.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-WordPressCom-Analytics-iOSTests.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 47 | 85902C6A19833055004A95F2 /* libWordPressCom-Analytics-iOS.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libWordPressCom-Analytics-iOS.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 85902C6D19833055004A95F2 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 49 | 85902C7119833055004A95F2 /* WordPressCom-Analytics-iOS-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WordPressCom-Analytics-iOS-Prefix.pch"; sourceTree = ""; }; 50 | 85902C7A19833055004A95F2 /* WordPressCom-Analytics-iOSTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "WordPressCom-Analytics-iOSTests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 85902C7B19833055004A95F2 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; 52 | 85902C7E19833055004A95F2 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 53 | 85902C8519833055004A95F2 /* WordPressCom-Analytics-iOSTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WordPressCom-Analytics-iOSTests-Info.plist"; sourceTree = ""; }; 54 | 85902C8719833055004A95F2 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 55 | 85902C9319833080004A95F2 /* WPAnalytics.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WPAnalytics.h; sourceTree = ""; }; 56 | 85902C9419833080004A95F2 /* WPAnalytics.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPAnalytics.m; sourceTree = ""; }; 57 | 85902C9719833107004A95F2 /* WPAnalyticsTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WPAnalyticsTests.m; sourceTree = ""; }; 58 | 85902C99198334F7004A95F2 /* TestAnalyticsTracker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TestAnalyticsTracker.h; sourceTree = ""; }; 59 | 85902C9A198334F7004A95F2 /* TestAnalyticsTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TestAnalyticsTracker.m; sourceTree = ""; }; 60 | C372E5EB6B5A1C5052433BA7 /* Pods-WordPressCom-Analytics-iOSTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-WordPressCom-Analytics-iOSTests.debug.xcconfig"; path = "Pods/Target Support Files/Pods-WordPressCom-Analytics-iOSTests/Pods-WordPressCom-Analytics-iOSTests.debug.xcconfig"; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 85902C6719833055004A95F2 /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | 85902C6E19833055004A95F2 /* Foundation.framework in Frameworks */, 69 | ); 70 | runOnlyForDeploymentPostprocessing = 0; 71 | }; 72 | 85902C7719833055004A95F2 /* Frameworks */ = { 73 | isa = PBXFrameworksBuildPhase; 74 | buildActionMask = 2147483647; 75 | files = ( 76 | 85902C7C19833055004A95F2 /* XCTest.framework in Frameworks */, 77 | 85902C7F19833055004A95F2 /* UIKit.framework in Frameworks */, 78 | 85902C8219833055004A95F2 /* libWordPressCom-Analytics-iOS.a in Frameworks */, 79 | 85902C7D19833055004A95F2 /* Foundation.framework in Frameworks */, 80 | 232DF3CABE8D90483E8CF38B /* libPods-WordPressCom-Analytics-iOSTests.a in Frameworks */, 81 | ); 82 | runOnlyForDeploymentPostprocessing = 0; 83 | }; 84 | /* End PBXFrameworksBuildPhase section */ 85 | 86 | /* Begin PBXGroup section */ 87 | 85902C6119833055004A95F2 = { 88 | isa = PBXGroup; 89 | children = ( 90 | 85902C6F19833055004A95F2 /* WordPressCom-Analytics-iOS */, 91 | 85902C8319833055004A95F2 /* WordPressCom-Analytics-iOSTests */, 92 | 85902C6C19833055004A95F2 /* Frameworks */, 93 | 85902C6B19833055004A95F2 /* Products */, 94 | D9CDC37D1EE53390D966EA0C /* Pods */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 85902C6B19833055004A95F2 /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 85902C6A19833055004A95F2 /* libWordPressCom-Analytics-iOS.a */, 102 | 85902C7A19833055004A95F2 /* WordPressCom-Analytics-iOSTests.xctest */, 103 | ); 104 | name = Products; 105 | sourceTree = ""; 106 | }; 107 | 85902C6C19833055004A95F2 /* Frameworks */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 85902C6D19833055004A95F2 /* Foundation.framework */, 111 | 85902C7B19833055004A95F2 /* XCTest.framework */, 112 | 85902C7E19833055004A95F2 /* UIKit.framework */, 113 | 5C6C8E87B0B8E081E9913D0C /* libPods-WordPressCom-Analytics-iOSTests.a */, 114 | ); 115 | name = Frameworks; 116 | sourceTree = ""; 117 | }; 118 | 85902C6F19833055004A95F2 /* WordPressCom-Analytics-iOS */ = { 119 | isa = PBXGroup; 120 | children = ( 121 | 85902C7019833055004A95F2 /* Supporting Files */, 122 | 85902C9319833080004A95F2 /* WPAnalytics.h */, 123 | 85902C9419833080004A95F2 /* WPAnalytics.m */, 124 | ); 125 | path = "WordPressCom-Analytics-iOS"; 126 | sourceTree = ""; 127 | }; 128 | 85902C7019833055004A95F2 /* Supporting Files */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 85902C7119833055004A95F2 /* WordPressCom-Analytics-iOS-Prefix.pch */, 132 | ); 133 | name = "Supporting Files"; 134 | sourceTree = ""; 135 | }; 136 | 85902C8319833055004A95F2 /* WordPressCom-Analytics-iOSTests */ = { 137 | isa = PBXGroup; 138 | children = ( 139 | 85902C8419833055004A95F2 /* Supporting Files */, 140 | 85902C9719833107004A95F2 /* WPAnalyticsTests.m */, 141 | ); 142 | path = "WordPressCom-Analytics-iOSTests"; 143 | sourceTree = ""; 144 | }; 145 | 85902C8419833055004A95F2 /* Supporting Files */ = { 146 | isa = PBXGroup; 147 | children = ( 148 | 85902C8519833055004A95F2 /* WordPressCom-Analytics-iOSTests-Info.plist */, 149 | 85902C8619833055004A95F2 /* InfoPlist.strings */, 150 | 85902C99198334F7004A95F2 /* TestAnalyticsTracker.h */, 151 | 85902C9A198334F7004A95F2 /* TestAnalyticsTracker.m */, 152 | ); 153 | name = "Supporting Files"; 154 | sourceTree = ""; 155 | }; 156 | D9CDC37D1EE53390D966EA0C /* Pods */ = { 157 | isa = PBXGroup; 158 | children = ( 159 | C372E5EB6B5A1C5052433BA7 /* Pods-WordPressCom-Analytics-iOSTests.debug.xcconfig */, 160 | 524FB2245716594AC918ACB3 /* Pods-WordPressCom-Analytics-iOSTests.release.xcconfig */, 161 | ); 162 | name = Pods; 163 | sourceTree = ""; 164 | }; 165 | /* End PBXGroup section */ 166 | 167 | /* Begin PBXNativeTarget section */ 168 | 85902C6919833055004A95F2 /* WordPressCom-Analytics-iOS */ = { 169 | isa = PBXNativeTarget; 170 | buildConfigurationList = 85902C8D19833055004A95F2 /* Build configuration list for PBXNativeTarget "WordPressCom-Analytics-iOS" */; 171 | buildPhases = ( 172 | 85902C6619833055004A95F2 /* Sources */, 173 | 85902C6719833055004A95F2 /* Frameworks */, 174 | 85902C6819833055004A95F2 /* CopyFiles */, 175 | ); 176 | buildRules = ( 177 | ); 178 | dependencies = ( 179 | ); 180 | name = "WordPressCom-Analytics-iOS"; 181 | productName = "WordPressCom-Analytics-iOS"; 182 | productReference = 85902C6A19833055004A95F2 /* libWordPressCom-Analytics-iOS.a */; 183 | productType = "com.apple.product-type.library.static"; 184 | }; 185 | 85902C7919833055004A95F2 /* WordPressCom-Analytics-iOSTests */ = { 186 | isa = PBXNativeTarget; 187 | buildConfigurationList = 85902C9019833055004A95F2 /* Build configuration list for PBXNativeTarget "WordPressCom-Analytics-iOSTests" */; 188 | buildPhases = ( 189 | 177C355384E735A6CB952482 /* [CP] Check Pods Manifest.lock */, 190 | 85902C7619833055004A95F2 /* Sources */, 191 | 85902C7719833055004A95F2 /* Frameworks */, 192 | 85902C7819833055004A95F2 /* Resources */, 193 | BF29EF8372C4431498B3B29D /* [CP] Embed Pods Frameworks */, 194 | FB85E379D9F865ED59C85B11 /* [CP] Copy Pods Resources */, 195 | ); 196 | buildRules = ( 197 | ); 198 | dependencies = ( 199 | 85902C8119833055004A95F2 /* PBXTargetDependency */, 200 | ); 201 | name = "WordPressCom-Analytics-iOSTests"; 202 | productName = "WordPressCom-Analytics-iOSTests"; 203 | productReference = 85902C7A19833055004A95F2 /* WordPressCom-Analytics-iOSTests.xctest */; 204 | productType = "com.apple.product-type.bundle.unit-test"; 205 | }; 206 | /* End PBXNativeTarget section */ 207 | 208 | /* Begin PBXProject section */ 209 | 85902C6219833055004A95F2 /* Project object */ = { 210 | isa = PBXProject; 211 | attributes = { 212 | LastUpgradeCheck = 0510; 213 | ORGANIZATIONNAME = WordPress; 214 | }; 215 | buildConfigurationList = 85902C6519833055004A95F2 /* Build configuration list for PBXProject "WordPressCom-Analytics-iOS" */; 216 | compatibilityVersion = "Xcode 3.2"; 217 | developmentRegion = English; 218 | hasScannedForEncodings = 0; 219 | knownRegions = ( 220 | en, 221 | ); 222 | mainGroup = 85902C6119833055004A95F2; 223 | productRefGroup = 85902C6B19833055004A95F2 /* Products */; 224 | projectDirPath = ""; 225 | projectRoot = ""; 226 | targets = ( 227 | 85902C6919833055004A95F2 /* WordPressCom-Analytics-iOS */, 228 | 85902C7919833055004A95F2 /* WordPressCom-Analytics-iOSTests */, 229 | ); 230 | }; 231 | /* End PBXProject section */ 232 | 233 | /* Begin PBXResourcesBuildPhase section */ 234 | 85902C7819833055004A95F2 /* Resources */ = { 235 | isa = PBXResourcesBuildPhase; 236 | buildActionMask = 2147483647; 237 | files = ( 238 | 85902C8819833055004A95F2 /* InfoPlist.strings in Resources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXResourcesBuildPhase section */ 243 | 244 | /* Begin PBXShellScriptBuildPhase section */ 245 | 177C355384E735A6CB952482 /* [CP] Check Pods Manifest.lock */ = { 246 | isa = PBXShellScriptBuildPhase; 247 | buildActionMask = 2147483647; 248 | files = ( 249 | ); 250 | inputPaths = ( 251 | ); 252 | name = "[CP] Check Pods Manifest.lock"; 253 | outputPaths = ( 254 | ); 255 | runOnlyForDeploymentPostprocessing = 0; 256 | shellPath = /bin/sh; 257 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; 258 | showEnvVarsInLog = 0; 259 | }; 260 | BF29EF8372C4431498B3B29D /* [CP] Embed Pods Frameworks */ = { 261 | isa = PBXShellScriptBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | ); 265 | inputPaths = ( 266 | ); 267 | name = "[CP] Embed Pods Frameworks"; 268 | outputPaths = ( 269 | ); 270 | runOnlyForDeploymentPostprocessing = 0; 271 | shellPath = /bin/sh; 272 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressCom-Analytics-iOSTests/Pods-WordPressCom-Analytics-iOSTests-frameworks.sh\"\n"; 273 | showEnvVarsInLog = 0; 274 | }; 275 | FB85E379D9F865ED59C85B11 /* [CP] Copy Pods Resources */ = { 276 | isa = PBXShellScriptBuildPhase; 277 | buildActionMask = 2147483647; 278 | files = ( 279 | ); 280 | inputPaths = ( 281 | ); 282 | name = "[CP] Copy Pods Resources"; 283 | outputPaths = ( 284 | ); 285 | runOnlyForDeploymentPostprocessing = 0; 286 | shellPath = /bin/sh; 287 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WordPressCom-Analytics-iOSTests/Pods-WordPressCom-Analytics-iOSTests-resources.sh\"\n"; 288 | showEnvVarsInLog = 0; 289 | }; 290 | /* End PBXShellScriptBuildPhase section */ 291 | 292 | /* Begin PBXSourcesBuildPhase section */ 293 | 85902C6619833055004A95F2 /* Sources */ = { 294 | isa = PBXSourcesBuildPhase; 295 | buildActionMask = 2147483647; 296 | files = ( 297 | 85902C9519833080004A95F2 /* WPAnalytics.m in Sources */, 298 | ); 299 | runOnlyForDeploymentPostprocessing = 0; 300 | }; 301 | 85902C7619833055004A95F2 /* Sources */ = { 302 | isa = PBXSourcesBuildPhase; 303 | buildActionMask = 2147483647; 304 | files = ( 305 | 85902C9819833107004A95F2 /* WPAnalyticsTests.m in Sources */, 306 | 85902C9B198334F7004A95F2 /* TestAnalyticsTracker.m in Sources */, 307 | ); 308 | runOnlyForDeploymentPostprocessing = 0; 309 | }; 310 | /* End PBXSourcesBuildPhase section */ 311 | 312 | /* Begin PBXTargetDependency section */ 313 | 85902C8119833055004A95F2 /* PBXTargetDependency */ = { 314 | isa = PBXTargetDependency; 315 | target = 85902C6919833055004A95F2 /* WordPressCom-Analytics-iOS */; 316 | targetProxy = 85902C8019833055004A95F2 /* PBXContainerItemProxy */; 317 | }; 318 | /* End PBXTargetDependency section */ 319 | 320 | /* Begin PBXVariantGroup section */ 321 | 85902C8619833055004A95F2 /* InfoPlist.strings */ = { 322 | isa = PBXVariantGroup; 323 | children = ( 324 | 85902C8719833055004A95F2 /* en */, 325 | ); 326 | name = InfoPlist.strings; 327 | sourceTree = ""; 328 | }; 329 | /* End PBXVariantGroup section */ 330 | 331 | /* Begin XCBuildConfiguration section */ 332 | 85902C8B19833055004A95F2 /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | buildSettings = { 335 | ALWAYS_SEARCH_USER_PATHS = NO; 336 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 337 | CLANG_CXX_LIBRARY = "libc++"; 338 | CLANG_ENABLE_MODULES = YES; 339 | CLANG_ENABLE_OBJC_ARC = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_CONSTANT_CONVERSION = YES; 342 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 343 | CLANG_WARN_EMPTY_BODY = YES; 344 | CLANG_WARN_ENUM_CONVERSION = YES; 345 | CLANG_WARN_INT_CONVERSION = YES; 346 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | COPY_PHASE_STRIP = NO; 349 | GCC_C_LANGUAGE_STANDARD = gnu99; 350 | GCC_DYNAMIC_NO_PIC = NO; 351 | GCC_OPTIMIZATION_LEVEL = 0; 352 | GCC_PREPROCESSOR_DEFINITIONS = ( 353 | "DEBUG=1", 354 | "$(inherited)", 355 | ); 356 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 357 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 358 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 359 | GCC_WARN_UNDECLARED_SELECTOR = YES; 360 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 361 | GCC_WARN_UNUSED_FUNCTION = YES; 362 | GCC_WARN_UNUSED_VARIABLE = YES; 363 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 364 | ONLY_ACTIVE_ARCH = YES; 365 | SDKROOT = iphoneos; 366 | }; 367 | name = Debug; 368 | }; 369 | 85902C8C19833055004A95F2 /* Release */ = { 370 | isa = XCBuildConfiguration; 371 | buildSettings = { 372 | ALWAYS_SEARCH_USER_PATHS = NO; 373 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 374 | CLANG_CXX_LIBRARY = "libc++"; 375 | CLANG_ENABLE_MODULES = YES; 376 | CLANG_ENABLE_OBJC_ARC = YES; 377 | CLANG_WARN_BOOL_CONVERSION = YES; 378 | CLANG_WARN_CONSTANT_CONVERSION = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INT_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | COPY_PHASE_STRIP = YES; 386 | ENABLE_NS_ASSERTIONS = NO; 387 | GCC_C_LANGUAGE_STANDARD = gnu99; 388 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 389 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 390 | GCC_WARN_UNDECLARED_SELECTOR = YES; 391 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 392 | GCC_WARN_UNUSED_FUNCTION = YES; 393 | GCC_WARN_UNUSED_VARIABLE = YES; 394 | IPHONEOS_DEPLOYMENT_TARGET = 10.0; 395 | SDKROOT = iphoneos; 396 | VALIDATE_PRODUCT = YES; 397 | }; 398 | name = Release; 399 | }; 400 | 85902C8E19833055004A95F2 /* Debug */ = { 401 | isa = XCBuildConfiguration; 402 | buildSettings = { 403 | DSTROOT = /tmp/WordPressCom_Analytics_iOS.dst; 404 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 405 | GCC_PREFIX_HEADER = "WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch"; 406 | OTHER_LDFLAGS = "-ObjC"; 407 | PRODUCT_NAME = "$(TARGET_NAME)"; 408 | SKIP_INSTALL = YES; 409 | }; 410 | name = Debug; 411 | }; 412 | 85902C8F19833055004A95F2 /* Release */ = { 413 | isa = XCBuildConfiguration; 414 | buildSettings = { 415 | DSTROOT = /tmp/WordPressCom_Analytics_iOS.dst; 416 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 417 | GCC_PREFIX_HEADER = "WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch"; 418 | OTHER_LDFLAGS = "-ObjC"; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SKIP_INSTALL = YES; 421 | }; 422 | name = Release; 423 | }; 424 | 85902C9119833055004A95F2 /* Debug */ = { 425 | isa = XCBuildConfiguration; 426 | baseConfigurationReference = C372E5EB6B5A1C5052433BA7 /* Pods-WordPressCom-Analytics-iOSTests.debug.xcconfig */; 427 | buildSettings = { 428 | FRAMEWORK_SEARCH_PATHS = ( 429 | "$(SDKROOT)/Developer/Library/Frameworks", 430 | "$(inherited)", 431 | "$(DEVELOPER_FRAMEWORKS_DIR)", 432 | ); 433 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 434 | GCC_PREFIX_HEADER = "WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch"; 435 | GCC_PREPROCESSOR_DEFINITIONS = ( 436 | "DEBUG=1", 437 | "$(inherited)", 438 | ); 439 | INFOPLIST_FILE = "WordPressCom-Analytics-iOSTests/WordPressCom-Analytics-iOSTests-Info.plist"; 440 | PRODUCT_NAME = "$(TARGET_NAME)"; 441 | WRAPPER_EXTENSION = xctest; 442 | }; 443 | name = Debug; 444 | }; 445 | 85902C9219833055004A95F2 /* Release */ = { 446 | isa = XCBuildConfiguration; 447 | baseConfigurationReference = 524FB2245716594AC918ACB3 /* Pods-WordPressCom-Analytics-iOSTests.release.xcconfig */; 448 | buildSettings = { 449 | FRAMEWORK_SEARCH_PATHS = ( 450 | "$(SDKROOT)/Developer/Library/Frameworks", 451 | "$(inherited)", 452 | "$(DEVELOPER_FRAMEWORKS_DIR)", 453 | ); 454 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 455 | GCC_PREFIX_HEADER = "WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch"; 456 | INFOPLIST_FILE = "WordPressCom-Analytics-iOSTests/WordPressCom-Analytics-iOSTests-Info.plist"; 457 | PRODUCT_NAME = "$(TARGET_NAME)"; 458 | WRAPPER_EXTENSION = xctest; 459 | }; 460 | name = Release; 461 | }; 462 | /* End XCBuildConfiguration section */ 463 | 464 | /* Begin XCConfigurationList section */ 465 | 85902C6519833055004A95F2 /* Build configuration list for PBXProject "WordPressCom-Analytics-iOS" */ = { 466 | isa = XCConfigurationList; 467 | buildConfigurations = ( 468 | 85902C8B19833055004A95F2 /* Debug */, 469 | 85902C8C19833055004A95F2 /* Release */, 470 | ); 471 | defaultConfigurationIsVisible = 0; 472 | defaultConfigurationName = Release; 473 | }; 474 | 85902C8D19833055004A95F2 /* Build configuration list for PBXNativeTarget "WordPressCom-Analytics-iOS" */ = { 475 | isa = XCConfigurationList; 476 | buildConfigurations = ( 477 | 85902C8E19833055004A95F2 /* Debug */, 478 | 85902C8F19833055004A95F2 /* Release */, 479 | ); 480 | defaultConfigurationIsVisible = 0; 481 | defaultConfigurationName = Release; 482 | }; 483 | 85902C9019833055004A95F2 /* Build configuration list for PBXNativeTarget "WordPressCom-Analytics-iOSTests" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 85902C9119833055004A95F2 /* Debug */, 487 | 85902C9219833055004A95F2 /* Release */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | /* End XCConfigurationList section */ 493 | }; 494 | rootObject = 85902C6219833055004A95F2 /* Project object */; 495 | } 496 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcodeproj/project.xcworkspace/xcuserdata/sendhil.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wordpress-mobile/WordPressCom-Analytics-iOS/1658cbc985cd0393d7b4141c921a7f7bcb87a4da/WordPressCom-Analytics-iOS.xcodeproj/project.xcworkspace/xcuserdata/sendhil.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcodeproj/xcshareddata/xcschemes/WordPressCom-Analytics-iOS.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 42 | 43 | 52 | 53 | 54 | 55 | 61 | 62 | 64 | 65 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS/WPAnalytics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef NS_ENUM(NSUInteger, WPAnalyticsStat) { 4 | WPAnalyticsStatNoStat, // Since we can't have a nil enum we'll use this to act as the nil 5 | WPAnalyticsStatABTestStart, 6 | WPAnalyticsStatAddedSelfHostedSite, 7 | WPAnalyticsStatAddedSelfHostedSiteButJetpackNotConnectedToWPCom, 8 | WPAnalyticsStatAppInstalled, 9 | WPAnalyticsStatAppReviewsCanceledFeedbackScreen, 10 | WPAnalyticsStatAppReviewsDeclinedToRateApp, 11 | WPAnalyticsStatAppReviewsDidntLikeApp, 12 | WPAnalyticsStatAppReviewsLikedApp, 13 | WPAnalyticsStatAppReviewsOpenedFeedbackScreen, 14 | WPAnalyticsStatAppReviewsRatedApp, 15 | WPAnalyticsStatAppReviewsSawPrompt, 16 | WPAnalyticsStatAppReviewsSentFeedback, 17 | WPAnalyticsStatAppUpgraded, 18 | WPAnalyticsStatApplicationClosed, 19 | WPAnalyticsStatApplicationOpened, 20 | WPAnalyticsStatCreatedAccount, 21 | WPAnalyticsStatCreatedSite, 22 | WPAnalyticsStatCreateAccountInitiated, 23 | WPAnalyticsStatCreateAccountEmailExists, 24 | WPAnalyticsStatCreateAccountUsernameExists, 25 | WPAnalyticsStatCreateAccountFailed, 26 | WPAnalyticsStatDefaultAccountChanged, 27 | WPAnalyticsStatEditorAddedPhotoViaLocalLibrary, 28 | WPAnalyticsStatEditorAddedVideoViaLocalLibrary, 29 | WPAnalyticsStatEditorAddedPhotoViaWPMediaLibrary, 30 | WPAnalyticsStatEditorAddedVideoViaWPMediaLibrary, 31 | WPAnalyticsStatEditorAztecBetaLink, 32 | WPAnalyticsStatEditorAztecPromoLink, 33 | WPAnalyticsStatEditorAztecPromoPositive, 34 | WPAnalyticsStatEditorAztecPromoNegative, 35 | WPAnalyticsStatEditorClosed, 36 | WPAnalyticsStatEditorCreatedPost, 37 | WPAnalyticsStatEditorDiscardedChanges, 38 | WPAnalyticsStatEditorEditedImage, 39 | WPAnalyticsStatEditorEnabledNewVersion, 40 | WPAnalyticsStatEditorPublishedPost, 41 | WPAnalyticsStatEditorQuickPublishedPost, 42 | WPAnalyticsStatEditorQuickSavedDraft, 43 | WPAnalyticsStatEditorResizedPhoto, 44 | WPAnalyticsStatEditorResizedPhotoError, 45 | WPAnalyticsStatEditorSavedDraft, 46 | WPAnalyticsStatEditorScheduledPost, 47 | WPAnalyticsStatEditorTappedBlockquote, 48 | WPAnalyticsStatEditorTappedBold, 49 | WPAnalyticsStatEditorTappedHeader, 50 | WPAnalyticsStatEditorTappedHeaderSelection, 51 | WPAnalyticsStatEditorTappedHorizontalRule, 52 | WPAnalyticsStatEditorTappedHTML, 53 | WPAnalyticsStatEditorTappedImage, 54 | WPAnalyticsStatEditorTappedItalic, 55 | WPAnalyticsStatEditorTappedLink, 56 | WPAnalyticsStatEditorTappedMore, 57 | WPAnalyticsStatEditorTappedMoreItems, 58 | WPAnalyticsStatEditorTappedOrderedList, 59 | WPAnalyticsStatEditorTappedStrikethrough, 60 | WPAnalyticsStatEditorTappedUnderline, 61 | WPAnalyticsStatEditorTappedUnlink, 62 | WPAnalyticsStatEditorTappedUnorderedList, 63 | WPAnalyticsStatEditorToggledOff, 64 | WPAnalyticsStatEditorToggledOn, 65 | WPAnalyticsStatEditorUpdatedPost, 66 | WPAnalyticsStatEditorUploadMediaFailed, 67 | WPAnalyticsStatEditorUploadMediaRetried, 68 | WPAnalyticsStatGravatarCropped, 69 | WPAnalyticsStatGravatarTapped, 70 | WPAnalyticsStatGravatarUploaded, 71 | WPAnalyticsStatLogSpecialCondition, 72 | WPAnalyticsStatLoginFailed, 73 | WPAnalyticsStatLoginFailedToGuessXMLRPC, 74 | WPAnalyticsStatLoginAutoFillCredentialsFilled, 75 | WPAnalyticsStatLoginAutoFillCredentialsUpdated, 76 | WPAnalyticsStatLoginEmailFormViewed, 77 | WPAnalyticsStatLoginEmailRetryViewed, 78 | WPAnalyticsStatLoginEpilogueViewed, 79 | WPAnalyticsStatLoginForgotPasswordClicked, 80 | WPAnalyticsStatLoginMagicLinkOpenEmailClientViewed, 81 | WPAnalyticsStatLoginMagicLinkRequestFormViewed, 82 | WPAnalyticsStatLoginMagicLinkExited, 83 | WPAnalyticsStatLoginMagicLinkFailed, 84 | WPAnalyticsStatLoginMagicLinkOpened, 85 | WPAnalyticsStatLoginMagicLinkRequested, 86 | WPAnalyticsStatLoginMagicLinkSucceeded, 87 | WPAnalyticsStatLoginPasswordFormViewed, 88 | WPAnalyticsStatLoginPrologueViewed, 89 | WPAnalyticsStatLoginTwoFactorFormViewed, 90 | WPAnalyticsStatLoginURLFormViewed, 91 | WPAnalyticsStatLoginURLHelpScreenViewed, 92 | WPAnalyticsStatLoginUsernamePasswordFormViewed, 93 | WPAnalyticsStatLogout, 94 | WPAnalyticsStatLowMemoryWarning, 95 | WPAnalyticsStatMediaLibraryDeletedItems, 96 | WPAnalyticsStatMediaLibraryEditedItemMetadata, 97 | WPAnalyticsStatMediaLibraryPreviewedItem, 98 | WPAnalyticsStatMediaLibrarySharedItemLink, 99 | WPAnalyticsStatMediaLibraryAddedPhoto, 100 | WPAnalyticsStatMediaLibraryAddedVideo, 101 | WPAnalyticsStatMediaServiceUploadStarted, 102 | WPAnalyticsStatMediaServiceUploadFailed, 103 | WPAnalyticsStatMediaServiceUploadSuccessful, 104 | WPAnalyticsStatMediaServiceUploadCanceled, 105 | WPAnalyticsStatMenusAccessed, 106 | WPAnalyticsStatMenusCreatedItem, 107 | WPAnalyticsStatMenusCreatedMenu, 108 | WPAnalyticsStatMenusDeletedMenu, 109 | WPAnalyticsStatMenusDeletedItem, 110 | WPAnalyticsStatMenusDiscardedChanges, 111 | WPAnalyticsStatMenusEditedItem, 112 | WPAnalyticsStatMenusOpenedItemEditor, 113 | WPAnalyticsStatMenusOrderedItems, 114 | WPAnalyticsStatMenusSavedMenu, 115 | WPAnalyticsStatMeTabAccessed, 116 | WPAnalyticsStatMySitesTabAccessed, 117 | WPAnalyticsStatNotificationsCommentApproved, 118 | WPAnalyticsStatNotificationsCommentFlaggedAsSpam, 119 | WPAnalyticsStatNotificationsCommentLiked, 120 | WPAnalyticsStatNotificationsCommentRepliedTo, 121 | WPAnalyticsStatNotificationsCommentTrashed, 122 | WPAnalyticsStatNotificationsCommentUnapproved, 123 | WPAnalyticsStatNotificationsCommentUnliked, 124 | WPAnalyticsStatNotificationsMissingSyncWarning, 125 | WPAnalyticsStatNotificationsTappedNewPost, 126 | WPAnalyticsStatNotificationsTappedViewReader, 127 | WPAnalyticsStatNotificationsSettingsUpdated, 128 | WPAnalyticsStatNotificationsSiteFollowAction, 129 | WPAnalyticsStatNotificationsSiteUnfollowAction, 130 | WPAnalyticsStatOnePasswordFailed, 131 | WPAnalyticsStatOnePasswordLogin, 132 | WPAnalyticsStatOnePasswordSignup, 133 | WPAnalyticsStatOpenedAccountSettings, 134 | WPAnalyticsStatOpenedAppSettings, 135 | WPAnalyticsStatOpenedComments, 136 | WPAnalyticsStatOpenedLogin, 137 | WPAnalyticsStatOpenedMediaLibrary, 138 | WPAnalyticsStatOpenedMyProfile, 139 | WPAnalyticsStatOpenedNotificationsList, 140 | WPAnalyticsStatOpenedNotificationDetails, 141 | WPAnalyticsStatOpenedNotificationSettingsList, 142 | WPAnalyticsStatOpenedNotificationSettingStreams, 143 | WPAnalyticsStatOpenedNotificationSettingDetails, 144 | WPAnalyticsStatOpenedPages, 145 | WPAnalyticsStatOpenedPlans, 146 | WPAnalyticsStatOpenedPlansComparison, 147 | WPAnalyticsStatOpenedPeople, 148 | WPAnalyticsStatOpenedPerson, 149 | WPAnalyticsStatOpenedPosts, 150 | WPAnalyticsStatOpenedSharingManagement, 151 | WPAnalyticsStatOpenedSiteSettings, 152 | WPAnalyticsStatOpenedSupport, 153 | WPAnalyticsStatOpenedViewAdmin, 154 | WPAnalyticsStatOpenedViewSite, 155 | WPAnalyticsStatPerformedCoreDataMigrationFixFor45, 156 | WPAnalyticsStatPerformedJetpackSignInFromStatsScreen, 157 | WPAnalyticsStatPersonUpdated, 158 | WPAnalyticsStatPersonRemoved, 159 | WPAnalyticsStatPostListAuthorFilterChanged, 160 | WPAnalyticsStatPostListDraftAction, 161 | WPAnalyticsStatPostListEditAction, 162 | WPAnalyticsStatPostListLoadedMore, 163 | WPAnalyticsStatPostListNoResultsButtonPressed, 164 | WPAnalyticsStatPostListOpenedCellMenu, 165 | WPAnalyticsStatPostListPublishAction, 166 | WPAnalyticsStatPostListScheduleAction, 167 | WPAnalyticsStatPostListPullToRefresh, 168 | WPAnalyticsStatPostListRestoreAction, 169 | WPAnalyticsStatPostListSearchOpened, 170 | WPAnalyticsStatPostListStatsAction, 171 | WPAnalyticsStatPostListStatusFilterChanged, 172 | WPAnalyticsStatPostListTrashAction, 173 | WPAnalyticsStatPostListViewAction, 174 | WPAnalyticsStatPushAuthenticationApproved, 175 | WPAnalyticsStatPushAuthenticationExpired, 176 | WPAnalyticsStatPushAuthenticationFailed, 177 | WPAnalyticsStatPushAuthenticationIgnored, 178 | WPAnalyticsStatPushNotificationAlertPressed, 179 | WPAnalyticsStatPushNotificationReceived, 180 | WPAnalyticsStatReaderAccessed, 181 | WPAnalyticsStatReaderArticleCommentedOn, 182 | WPAnalyticsStatReaderArticleLiked, 183 | WPAnalyticsStatReaderArticleOpened, 184 | WPAnalyticsStatReaderArticleReblogged, 185 | WPAnalyticsStatReaderArticleUnliked, 186 | WPAnalyticsStatReaderDiscoverViewed, 187 | WPAnalyticsStatReaderFreshlyPressedLoaded, 188 | WPAnalyticsStatReaderInfiniteScroll, 189 | WPAnalyticsStatReaderListFollowed, 190 | WPAnalyticsStatReaderListLoaded, 191 | WPAnalyticsStatReaderListPreviewed, 192 | WPAnalyticsStatReaderListUnfollowed, 193 | WPAnalyticsStatReaderSearchLoaded, 194 | WPAnalyticsStatReaderSearchPerformed, 195 | WPAnalyticsStatReaderSearchResultTapped, 196 | WPAnalyticsStatReaderSiteBlocked, 197 | WPAnalyticsStatReaderSiteFollowed, 198 | WPAnalyticsStatReaderSitePreviewed, 199 | WPAnalyticsStatReaderSiteUnfollowed, 200 | WPAnalyticsStatReaderTagFollowed, 201 | WPAnalyticsStatReaderTagLoaded, 202 | WPAnalyticsStatReaderTagPreviewed, 203 | WPAnalyticsStatReaderTagUnfollowed, 204 | WPAnalyticsStatSelectedInstallJetpack, 205 | WPAnalyticsStatSelectedLearnMoreInConnectToJetpackScreen, 206 | WPAnalyticsStatSentItemToGooglePlus, 207 | WPAnalyticsStatSentItemToInstapaper, 208 | WPAnalyticsStatSentItemToPocket, 209 | WPAnalyticsStatSentItemToWordPress, 210 | WPAnalyticsStatSharedItem, 211 | WPAnalyticsStatSharedItemViaEmail, 212 | WPAnalyticsStatSharedItemViaFacebook, 213 | WPAnalyticsStatSharedItemViaSMS, 214 | WPAnalyticsStatSharedItemViaTwitter, 215 | WPAnalyticsStatSharedItemViaWeibo, 216 | WPAnalyticsStatSharingButtonSettingsChanged, 217 | WPAnalyticsStatSharingButtonOrderChanged, 218 | WPAnalyticsStatSharingButtonShowReblogChanged, 219 | WPAnalyticsStatSharingOpenedPublicize, 220 | WPAnalyticsStatSharingOpenedSharingButtonSettings, 221 | WPAnalyticsStatSharingPublicizeConnected, 222 | WPAnalyticsStatSharingPublicizeDisconnected, 223 | WPAnalyticsStatSharingPublicizeConnectionAvailableToAllChanged, 224 | WPAnalyticsStatShortcutLogIn, 225 | WPAnalyticsStatShortcutNewPost, 226 | WPAnalyticsStatShortcutNewPhotoPost, 227 | WPAnalyticsStatShortcutStats, 228 | WPAnalyticsStatShortcutNotifications, 229 | WPAnalyticsStatSignedIn, 230 | WPAnalyticsStatSignedInToJetpack, 231 | WPAnalyticsStatSiteSettingsDeleteSiteAccessed, 232 | WPAnalyticsStatSiteSettingsDeleteSitePurchasesRequested, 233 | WPAnalyticsStatSiteSettingsDeleteSitePurchasesShowClicked, 234 | WPAnalyticsStatSiteSettingsDeleteSitePurchasesShown, 235 | WPAnalyticsStatSiteSettingsDeleteSiteRequested, 236 | WPAnalyticsStatSiteSettingsDeleteSiteResponseError, 237 | WPAnalyticsStatSiteSettingsDeleteSiteResponseOK, 238 | WPAnalyticsStatSiteSettingsExportSiteAccessed, 239 | WPAnalyticsStatSiteSettingsExportSiteRequested, 240 | WPAnalyticsStatSiteSettingsExportSiteResponseError, 241 | WPAnalyticsStatSiteSettingsExportSiteResponseOK, 242 | WPAnalyticsStatSiteSettingsStartOverAccessed, 243 | WPAnalyticsStatSiteSettingsStartOverContactSupportClicked, 244 | WPAnalyticsStatSkippedConnectingToJetpack, 245 | WPAnalyticsStatStatsAccessed, 246 | WPAnalyticsStatStatsInsightsAccessed, 247 | WPAnalyticsStatStatsPeriodDaysAccessed, 248 | WPAnalyticsStatStatsPeriodWeeksAccessed, 249 | WPAnalyticsStatStatsPeriodMonthsAccessed, 250 | WPAnalyticsStatStatsPeriodYearsAccessed, 251 | WPAnalyticsStatStatsScrolledToBottom, 252 | WPAnalyticsStatStatsSinglePostAccessed, 253 | WPAnalyticsStatStatsTappedBarChart, 254 | WPAnalyticsStatStatsViewAllAccessed, 255 | WPAnalyticsStatSupportOpenedHelpshiftScreen, 256 | WPAnalyticsStatSupportReceivedResponseFromSupport, 257 | WPAnalyticsStatSupportUserAcceptedTheSolution, 258 | WPAnalyticsStatSupportUserRejectedTheSolution, 259 | WPAnalyticsStatSupportUserSentScreenshot, 260 | WPAnalyticsStatSupportUserReviewedTheApp, 261 | WPAnalyticsStatSupportUserRepliedToHelpshift, 262 | WPAnalyticsStatThemesAccessedThemeBrowser, 263 | WPAnalyticsStatThemesAccessedSearch, 264 | WPAnalyticsStatThemesChangedTheme, 265 | WPAnalyticsStatThemesCustomizeAccessed, 266 | WPAnalyticsStatThemesDemoAccessed, 267 | WPAnalyticsStatThemesDetailsAccessed, 268 | WPAnalyticsStatThemesPreviewedSite, 269 | WPAnalyticsStatThemesSupportAccessed, 270 | WPAnalyticsStatTrainTracksRender, 271 | WPAnalyticsStatTrainTracksInteract, 272 | WPAnalyticsStatTwoFactorCodeRequested, 273 | WPAnalyticsStatTwoFactorSentSMS, 274 | WPAnalyticsStatMaxValue 275 | }; 276 | 277 | extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyCategory; 278 | extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyPhoto; 279 | extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyTag; 280 | extern NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo; 281 | 282 | @protocol WPAnalyticsTracker; 283 | @interface WPAnalytics : NSObject 284 | 285 | + (void)registerTracker:(id)tracker; 286 | + (void)clearTrackers; 287 | + (void)beginSession; 288 | + (void)refreshMetadata; 289 | + (void)beginTimerForStat:(WPAnalyticsStat)stat; 290 | + (void)endTimerForStat:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; 291 | + (void)track:(WPAnalyticsStat)stat; 292 | + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; 293 | + (void)endSession; 294 | 295 | @end 296 | 297 | @protocol WPAnalyticsTracker 298 | 299 | - (void)track:(WPAnalyticsStat)stat; 300 | - (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; 301 | 302 | @optional 303 | - (void)beginSession; 304 | - (void)endSession; 305 | - (void)refreshMetadata; 306 | - (void)beginTimerForStat:(WPAnalyticsStat)stat; 307 | - (void)endTimerForStat:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; 308 | 309 | @end 310 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS/WPAnalytics.m: -------------------------------------------------------------------------------- 1 | #import "WPAnalytics.h" 2 | 3 | NSString *const WPAnalyticsStatEditorPublishedPostPropertyCategory = @"with_categories"; 4 | NSString *const WPAnalyticsStatEditorPublishedPostPropertyPhoto = @"with_photos"; 5 | NSString *const WPAnalyticsStatEditorPublishedPostPropertyTag = @"with_tags"; 6 | NSString *const WPAnalyticsStatEditorPublishedPostPropertyVideo = @"with_videos"; 7 | 8 | @implementation WPAnalytics 9 | 10 | + (NSMutableArray *)trackers 11 | { 12 | static NSMutableArray *trackers = nil; 13 | 14 | static dispatch_once_t predicate; 15 | dispatch_once(&predicate, ^{ 16 | trackers = [[NSMutableArray alloc] init]; 17 | }); 18 | 19 | return trackers; 20 | } 21 | 22 | + (void)registerTracker:(id)tracker 23 | { 24 | NSParameterAssert(tracker != nil); 25 | [[self trackers] addObject:tracker]; 26 | } 27 | 28 | + (void)clearTrackers 29 | { 30 | [[self trackers] removeAllObjects]; 31 | } 32 | 33 | + (void)beginTimerForStat:(WPAnalyticsStat)stat 34 | { 35 | for (id tracker in [self trackers]) { 36 | if ([tracker respondsToSelector:@selector(beginTimerForStat:)]) { 37 | [tracker beginTimerForStat:stat]; 38 | } 39 | } 40 | } 41 | 42 | + (void)endTimerForStat:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties 43 | { 44 | for (id tracker in [self trackers]) { 45 | if ([tracker respondsToSelector:@selector(endTimerForStat:withProperties:)]) { 46 | [tracker endTimerForStat:stat withProperties:properties]; 47 | } 48 | } 49 | } 50 | 51 | + (void)track:(WPAnalyticsStat)stat 52 | { 53 | for (id tracker in [self trackers]) { 54 | [tracker track:stat]; 55 | } 56 | } 57 | 58 | + (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties 59 | { 60 | NSParameterAssert(properties != nil); 61 | for (id tracker in [self trackers]) { 62 | [tracker track:stat withProperties:properties]; 63 | } 64 | } 65 | 66 | + (void)beginSession 67 | { 68 | for (id tracker in [self trackers]) { 69 | if ([tracker respondsToSelector:@selector(beginSession)]) { 70 | [tracker beginSession]; 71 | } 72 | } 73 | } 74 | 75 | + (void)endSession 76 | { 77 | for (id tracker in [self trackers]) { 78 | if ([tracker respondsToSelector:@selector(endSession)]) { 79 | [tracker endSession]; 80 | } 81 | } 82 | } 83 | 84 | + (void)refreshMetadata 85 | { 86 | for (id tracker in [self trackers]) { 87 | if ([tracker respondsToSelector:@selector(refreshMetadata)]) { 88 | [tracker refreshMetadata]; 89 | } 90 | } 91 | } 92 | 93 | @end 94 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOS/WordPressCom-Analytics-iOS-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header 3 | // 4 | // The contents of this file are implicitly included at the beginning of every source file. 5 | // 6 | 7 | #ifdef __OBJC__ 8 | #import 9 | #endif 10 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOSTests/TestAnalyticsTracker.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "WPAnalytics.h" 3 | 4 | @interface TestAnalyticsTracker : NSObject 5 | 6 | - (void)track:(WPAnalyticsStat)stat; 7 | - (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties; 8 | 9 | - (void)beginSession; 10 | - (void)endSession; 11 | - (void)refreshMetadata; 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOSTests/TestAnalyticsTracker.m: -------------------------------------------------------------------------------- 1 | #import "TestAnalyticsTracker.h" 2 | 3 | @implementation TestAnalyticsTracker 4 | 5 | - (void)track:(WPAnalyticsStat)stat 6 | { 7 | // No-op 8 | } 9 | 10 | - (void)track:(WPAnalyticsStat)stat withProperties:(NSDictionary *)properties 11 | { 12 | // No-op 13 | } 14 | 15 | - (void)beginSession 16 | { 17 | // No-op 18 | } 19 | 20 | - (void)endSession 21 | { 22 | // No-op 23 | } 24 | 25 | - (void)refreshMetadata 26 | { 27 | // No-op 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOSTests/WPAnalyticsTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #define EXP_SHORTHAND 3 | #import 4 | #import 5 | #import "TestAnalyticsTracker.h" 6 | 7 | // Rather than duplicate these tests for each method, we abstracted them into a set of 8 | // shared examples and use an NSInvocation object to tell us what to call. 9 | SharedExampleGroupsBegin(WPAnalyticsMethodBehavior) 10 | 11 | sharedExamplesFor(@"a WPAnalyticsTracker method", ^(NSDictionary *data) { 12 | NSInvocation *invocation = data[@"invocation"]; 13 | it(@"should not be called if tracker isn't registered", ^{ 14 | id trackerMock = OCMStrictClassMock([TestAnalyticsTracker class]); 15 | id expectation = [trackerMock reject]; 16 | [invocation invokeWithTarget:expectation]; 17 | [trackerMock verify]; 18 | }); 19 | 20 | it(@"should be called if tracker is registered", ^{ 21 | id trackerMock = OCMStrictClassMock([TestAnalyticsTracker class]); 22 | id expectation = [trackerMock expect]; 23 | [invocation invokeWithTarget:expectation]; 24 | [invocation invokeWithTarget:trackerMock]; 25 | [trackerMock verify]; 26 | }); 27 | 28 | it(@"should be called on multiple trackers if registered", ^{ 29 | id trackerMock = OCMStrictClassMock([TestAnalyticsTracker class]); 30 | id trackerMock2 = OCMStrictClassMock([TestAnalyticsTracker class]); 31 | id expectation = [trackerMock expect]; 32 | id expectation2 = [trackerMock2 expect]; 33 | [invocation invokeWithTarget:expectation]; 34 | [invocation invokeWithTarget:expectation2]; 35 | [invocation invokeWithTarget:trackerMock]; 36 | [invocation invokeWithTarget:trackerMock2]; 37 | [trackerMock verify]; 38 | [trackerMock2 verify]; 39 | }); 40 | }); 41 | 42 | SharedExampleGroupsEnd 43 | 44 | SpecBegin(WPAnalyticsSpecs) 45 | 46 | beforeEach(^{ 47 | [WPAnalytics clearTrackers]; 48 | }); 49 | 50 | describe(@"beginSession", ^{ 51 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(beginSession)]; 52 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 53 | [invocation setSelector:@selector(beginSession)]; 54 | 55 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 56 | }); 57 | 58 | describe(@"endSession", ^{ 59 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(endSession)]; 60 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 61 | [invocation setSelector:@selector(endSession)]; 62 | 63 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 64 | }); 65 | 66 | describe(@"refreshMetadata", ^{ 67 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(refreshMetadata)]; 68 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 69 | [invocation setSelector:@selector(refreshMetadata)]; 70 | 71 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 72 | }); 73 | 74 | describe(@"beginTimerForStat:", ^{ 75 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(beginTimerForStat:)]; 76 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 77 | [invocation setSelector:@selector(beginTimerForStat:)]; 78 | WPAnalyticsStat stat = WPAnalyticsStatApplicationOpened; 79 | [invocation setArgument:&stat atIndex:2]; 80 | 81 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 82 | }); 83 | 84 | describe(@"endTimerForStat:withProperties", ^{ 85 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(endTimerForStat:withProperties:)]; 86 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 87 | [invocation setSelector:@selector(endTimerForStat:withProperties:)]; 88 | 89 | WPAnalyticsStat stat = WPAnalyticsStatApplicationOpened; 90 | NSDictionary *dict = @{}; 91 | [invocation setArgument:&stat atIndex:2]; 92 | [invocation setArgument:&dict atIndex:3]; 93 | 94 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 95 | }); 96 | 97 | describe(@"track:", ^{ 98 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(track:)]; 99 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 100 | [invocation setSelector:@selector(track:)]; 101 | WPAnalyticsStat stat = WPAnalyticsStatApplicationOpened; 102 | [invocation setArgument:&stat atIndex:2]; 103 | 104 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 105 | }); 106 | 107 | describe(@"track:withProperties:", ^{ 108 | NSMethodSignature *signature = [TestAnalyticsTracker instanceMethodSignatureForSelector:@selector(track:withProperties:)]; 109 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; 110 | [invocation setSelector:@selector(track:withProperties:)]; 111 | 112 | WPAnalyticsStat stat = WPAnalyticsStatApplicationOpened; 113 | NSDictionary *dict = @{}; 114 | [invocation setArgument:&stat atIndex:2]; 115 | [invocation setArgument:&dict atIndex:3]; 116 | 117 | itShouldBehaveLike(@"a WPAnalyticsTracker method", @{@"invocation": invocation}); 118 | }); 119 | 120 | SpecEnd -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOSTests/WordPressCom-Analytics-iOSTests-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | org.wordpress.${PRODUCT_NAME:rfc1034identifier} 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /WordPressCom-Analytics-iOSTests/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | --------------------------------------------------------------------------------