Skip to content

Commit

Permalink
Merge pull request #1 from josercc/developer-josercc
Browse files Browse the repository at this point in the history
Developer josercc
  • Loading branch information
josercc authored Aug 25, 2017
2 parents f4eeb95 + 8022379 commit 9e667b5
Show file tree
Hide file tree
Showing 15 changed files with 677 additions and 2 deletions.
114 changes: 112 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,112 @@
# iPATools
用于检索本地的数据来发布Plist到Github本地文件安装 利用Github的HTTPS实现ATO的安装方式 本地地址安装 安装便捷
---
typora-copy-images-to: ./image
---

# 基于Fastlane+Jenkins+Github+MAMP+iPATools搭建本地ATO内网ipa安装环境

## 需要的安装的软件

* MAMP
* Fastlane
* Jenkins
* iPATools

## 第一步 安装MAMP

![DE1E4C0B-345C-474C-90EC-E85608ED0FBE](image/DE1E4C0B-345C-474C-90EC-E85608ED0FBE.png)

前往下载地址->https://www.mamp.info/en/downloads/

下载安装完毕 启动服务 设置端口如下

![46CAF440-CE51-401C-A0EB-CA60FADE9898](image/46CAF440-CE51-401C-A0EB-CA60FADE9898.png)

**需要注意的是端口要设置8888 如果设置其他接口请用iPATools工具设置默认端口是读取8888**

我们拖拽**/Applications/MAMP/htdocs**文件夹快捷菜单上面

![1ECA2141-A7C0-4E44-93A7-1252F94D1EAB](image/1ECA2141-A7C0-4E44-93A7-1252F94D1EAB.png)

**这个主要是方便我们以后操作文件**

## 2 配置htdoc文件夹

下载 配置文件https://github.com/josercc/iPATools/blob/developer-josercc/htdocs.zip?raw=true

复制下载出来htdocs里面的全部文件到/Applications/MAMP/htdocs下

## 3 Git Clone 项目

打开项目https://github.com/iPATools/iPAToolPlist

![31ADE152-E4C9-4EE1-B5EB-C32F8F65BF84](image/31ADE152-E4C9-4EE1-B5EB-C32F8F65BF84.png)

Fork项目之后Clone自己的项目到/Applications/MAMP/htdocs下

**需要注意的是必须使用SSH进行Clone这样是为了让命令行不需要输入账号和密码就可以上传文件了**

## 4.安装Jenkins

下载Jenkins https://jenkins.io/download/thank-you-downloading-osx-installer-stable

之后启动

## 5 安装Fastlane

前往https://github.com/fastlane/fastlane查看安装文档

## 6 下载iPATools

前往https://github.com/josercc/iPATools/releases下载最新的Release

## 7 配置工程Fastlane文件

```ruby

def archiveipa(configuration)
time = Time.new
version = get_version_number(xcodeproj: "xcodepro文件名称")
build_number_int = Time.new.to_i
build_name = version + "." + build_number_int.to_s
set_info_plist_value(key:"CFBundleVersion", value:build_name, path: "Info.plist相对路径")
output_directory = "/Applications/MAMP/htdocs/ipa/"
output_name = "APP名称_" + configuration + "_" + version + "_" + build_number_int.to_s
gym(scheme: 'scheme名称', export_method: 'ad-hoc', configuration: configuration, output_directory: output_directory, output_name:output_name, clean:true)
end

lane :beta do |values|
archiveipa "Debug"
end

lane :applive do |values|
archiveipa "Release"
end
```

## 8 配置jenkins

![5C6583F6-3228-433E-A37F-E614678EA5B9](image/5C6583F6-3228-433E-A37F-E614678EA5B9.png)

新建执行脚本

```ruby
#!/bin/bash
fastlane beta // 执行打包版本
cd /Applications
iPATools public // 执行iPATools进行发布
cd /Applications/MAMP/htdocs/iPAToolPlist /// 上传配置文件到github
git add .
git commit -m "change"
git push
```

这样每次使用Jenkins打包完毕就会自动上传进行在线安装了。

![8AC4676C-9B19-4295-BE61-BD9C99C02BC4](image/8AC4676C-9B19-4295-BE61-BD9C99C02BC4.png)

安装界面有点丑但是实用

这样我们就可以打开0.0.0.0:8888进行安装了

**如果想通过内网让其他同事安装必须设置iPATools server为你本机的ip**

Binary file added htdocs.zip
Binary file not shown.
266 changes: 266 additions & 0 deletions iPATools/iPATools.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,266 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 46;
objects = {

/* Begin PBXBuildFile section */
5DAA3CD51F4E82C500FD61C7 /* main.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DAA3CD41F4E82C500FD61C7 /* main.swift */; };
5DAA3CDC1F4E83E500FD61C7 /* IPATool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DAA3CDB1F4E83E500FD61C7 /* IPATool.swift */; };
/* End PBXBuildFile section */

/* Begin PBXCopyFilesBuildPhase section */
5DAA3CCF1F4E82C500FD61C7 /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = /usr/share/man/man1/;
dstSubfolderSpec = 0;
files = (
);
runOnlyForDeploymentPostprocessing = 1;
};
/* End PBXCopyFilesBuildPhase section */

/* Begin PBXFileReference section */
5DAA3CD11F4E82C500FD61C7 /* iPATools */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = iPATools; sourceTree = BUILT_PRODUCTS_DIR; };
5DAA3CD41F4E82C500FD61C7 /* main.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = main.swift; sourceTree = "<group>"; };
5DAA3CDB1F4E83E500FD61C7 /* IPATool.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IPATool.swift; sourceTree = "<group>"; };
/* End PBXFileReference section */

/* Begin PBXFrameworksBuildPhase section */
5DAA3CCE1F4E82C500FD61C7 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
5DAA3CC81F4E82C500FD61C7 = {
isa = PBXGroup;
children = (
5DAA3CD31F4E82C500FD61C7 /* iPATools */,
5DAA3CD21F4E82C500FD61C7 /* Products */,
);
sourceTree = "<group>";
};
5DAA3CD21F4E82C500FD61C7 /* Products */ = {
isa = PBXGroup;
children = (
5DAA3CD11F4E82C500FD61C7 /* iPATools */,
);
name = Products;
sourceTree = "<group>";
};
5DAA3CD31F4E82C500FD61C7 /* iPATools */ = {
isa = PBXGroup;
children = (
5DAA3CD41F4E82C500FD61C7 /* main.swift */,
5DAA3CDB1F4E83E500FD61C7 /* IPATool.swift */,
);
path = iPATools;
sourceTree = "<group>";
};
/* End PBXGroup section */

/* Begin PBXNativeTarget section */
5DAA3CD01F4E82C500FD61C7 /* iPATools */ = {
isa = PBXNativeTarget;
buildConfigurationList = 5DAA3CD81F4E82C500FD61C7 /* Build configuration list for PBXNativeTarget "iPATools" */;
buildPhases = (
5DAA3CCD1F4E82C500FD61C7 /* Sources */,
5DAA3CCE1F4E82C500FD61C7 /* Frameworks */,
5DAA3CCF1F4E82C500FD61C7 /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
name = iPATools;
productName = iPATools;
productReference = 5DAA3CD11F4E82C500FD61C7 /* iPATools */;
productType = "com.apple.product-type.tool";
};
/* End PBXNativeTarget section */

/* Begin PBXProject section */
5DAA3CC91F4E82C500FD61C7 /* Project object */ = {
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0830;
LastUpgradeCheck = 0830;
ORGANIZATIONNAME = "张行";
TargetAttributes = {
5DAA3CD01F4E82C500FD61C7 = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = UL78A6B4GH;
ProvisioningStyle = Automatic;
};
};
};
buildConfigurationList = 5DAA3CCC1F4E82C500FD61C7 /* Build configuration list for PBXProject "iPATools" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 0;
knownRegions = (
en,
);
mainGroup = 5DAA3CC81F4E82C500FD61C7;
productRefGroup = 5DAA3CD21F4E82C500FD61C7 /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
5DAA3CD01F4E82C500FD61C7 /* iPATools */,
);
};
/* End PBXProject section */

/* Begin PBXSourcesBuildPhase section */
5DAA3CCD1F4E82C500FD61C7 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
5DAA3CDC1F4E83E500FD61C7 /* IPATool.swift in Sources */,
5DAA3CD51F4E82C500FD61C7 /* main.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */

/* Begin XCBuildConfiguration section */
5DAA3CD61F4E82C500FD61C7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = macosx;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
};
name = Debug;
};
5DAA3CD71F4E82C500FD61C7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.12;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = macosx;
};
name = Release;
};
5DAA3CD91F4E82C500FD61C7 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = UL78A6B4GH;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Debug;
};
5DAA3CDA1F4E82C500FD61C7 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = UL78A6B4GH;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 3.0;
};
name = Release;
};
/* End XCBuildConfiguration section */

/* Begin XCConfigurationList section */
5DAA3CCC1F4E82C500FD61C7 /* Build configuration list for PBXProject "iPATools" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5DAA3CD61F4E82C500FD61C7 /* Debug */,
5DAA3CD71F4E82C500FD61C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
5DAA3CD81F4E82C500FD61C7 /* Build configuration list for PBXNativeTarget "iPATools" */ = {
isa = XCConfigurationList;
buildConfigurations = (
5DAA3CD91F4E82C500FD61C7 /* Debug */,
5DAA3CDA1F4E82C500FD61C7 /* Release */,
);
defaultConfigurationIsVisible = 0;
};
/* End XCConfigurationList section */
};
rootObject = 5DAA3CC91F4E82C500FD61C7 /* Project object */;
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9e667b5

Please sign in to comment.