JLChen
2021-01-08 20f4a21e2a8e489b5e859a11ad76f77582f6650b
2021-01-08 1.IOS越狱检测库,移植打包成DLL
13个文件已添加
1个文件已修改
770 ■■■■■ 已修改文件
.gitignore 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreak.dll 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a 补丁 | 查看 | 原始文档 | blame | 历史
JailBreak/JailBreak.xcodeproj/project.pbxproj 291 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JailBreak/JailBreak/JLJailBreak.h 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
JailBreak/JailBreak/JLJailBreak.m 116 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
libJailBreak.a 补丁 | 查看 | 原始文档 | blame | 历史
.gitignore
@@ -24,3 +24,199 @@
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Pods/
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
build/
bld/
[Bb]in/
[Oo]bj/
.vs/
.gitignore
packages/
ZigBee.Ios/
ZigBee.Droid/
Shared.IOS/
.DS_Store
.gitignore
# Roslyn cache directories
*.ide/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
#NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
*.cachefile
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding addin-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
## TODO: Comment the next line if you want to checkin your
## web deploy settings but do note that will include unencrypted
## passwords
*.pubxml
# NuGet Packages
packages/*
*.nupkg
## TODO: If the tool you use requires repositories.config
## uncomment the next line
#!packages/repositories.config
# Enable "build/" folder in the NuGet Packages folder since
# NuGet packages use it for MSBuild targets.
# This line needs to be after the ignore of the build folder
# (and the packages folder if the line above has been uncommented)
!packages/build/
# Windows Azure Build Output
csx/
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
sql/
*.Cache
ClientBin/
[Ss]tyle[Cc]op.*
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
JLJailBreak.dll
Binary files differ
JLJailBreakXamarin/JLJailBreak/JLJailBreak.sln
New file
@@ -0,0 +1,17 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JLJailBreak", "JLJailBreak\JLJailBreak.csproj", "{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}"
EndProject
Global
    GlobalSection(SolutionConfigurationPlatforms) = preSolution
        Debug|Any CPU = Debug|Any CPU
        Release|Any CPU = Release|Any CPU
    EndGlobalSection
    GlobalSection(ProjectConfigurationPlatforms) = postSolution
        {1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
        {1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Debug|Any CPU.Build.0 = Debug|Any CPU
        {1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Release|Any CPU.ActiveCfg = Release|Any CPU
        {1711F8FA-D53D-4D11-AC0D-F83FD903AE18}.Release|Any CPU.Build.0 = Release|Any CPU
    EndGlobalSection
EndGlobal
JLJailBreakXamarin/JLJailBreak/JLJailBreak/ApiDefinition.cs
New file
@@ -0,0 +1,21 @@
using System;
using ObjCRuntime;
using Foundation;
using UIKit;
namespace JLJailBreak
{
    // @interface JLJailBreak : NSObject
    [BaseType(typeof(NSObject))]
    interface JLJailBreak
    {
        // +(BOOL)isJailBreak;
        [Static]
        [Export("isJailBreak")]
        //[Verify(MethodToProperty)]
        bool IsJailBreak { get; }
    }
}
JLJailBreakXamarin/JLJailBreak/JLJailBreak/JLJailBreak.csproj
New file
@@ -0,0 +1,56 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
    <ProjectGuid>{1711F8FA-D53D-4D11-AC0D-F83FD903AE18}</ProjectGuid>
    <TemplateGuid>{b6f3ff35-79b2-4f25-a2fc-60a7cf61013b}</TemplateGuid>
    <OutputType>Library</OutputType>
    <RootNamespace>JLJailBreak</RootNamespace>
    <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix>
    <AssemblyName>JLJailBreak</AssemblyName>
    <RestoreProjectStyle>PackageReference</RestoreProjectStyle>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <Optimize>false</Optimize>
    <OutputPath>bin\Debug</OutputPath>
    <DefineConstants>DEBUG;</DefineConstants>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>full</DebugType>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release</OutputPath>
    <ErrorReport>prompt</ErrorReport>
    <WarningLevel>4</WarningLevel>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
  </PropertyGroup>
  <ItemGroup>
    <Reference Include="System" />
    <Reference Include="Xamarin.iOS" />
  </ItemGroup>
  <ItemGroup>
    <Folder Include="Resources\" />
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Properties\AssemblyInfo.cs" />
  </ItemGroup>
  <ItemGroup>
    <ObjcBindingApiDefinition Include="ApiDefinition.cs" />
  </ItemGroup>
  <ItemGroup>
    <ObjcBindingCoreSource Include="Structs.cs" />
  </ItemGroup>
  <ItemGroup>
    <NativeReference Include="lib\libJailBreak.a">
      <Kind>Static</Kind>
      <SmartLink>False</SmartLink>
    </NativeReference>
  </ItemGroup>
  <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" />
</Project>
JLJailBreakXamarin/JLJailBreak/JLJailBreak/Properties/AssemblyInfo.cs
New file
@@ -0,0 +1,34 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Foundation;
// This attribute allows you to mark your assemblies as “safe to link”.
// When the attribute is present, the linker—if enabled—will process the assembly
// even if you’re using the “Link SDK assemblies only” option, which is the default for device builds.
[assembly: LinkerSafe]
// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.
[assembly: AssemblyTitle("JLJailBreak")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("JLJailBreak")]
[assembly: AssemblyCopyright("Copyright ©  2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
[assembly: AssemblyVersion("1.0.2")]
// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.
//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
JLJailBreakXamarin/JLJailBreak/JLJailBreak/Structs.cs
New file
@@ -0,0 +1,6 @@
using System;
namespace JLJailBreak
{
}
JLJailBreakXamarin/JLJailBreak/JLJailBreak/lib/libJailBreak.a
Binary files differ
JailBreak/JailBreak.xcodeproj/project.pbxproj
New file
@@ -0,0 +1,291 @@
// !$*UTF8*$!
{
    archiveVersion = 1;
    classes = {
    };
    objectVersion = 50;
    objects = {
/* Begin PBXBuildFile section */
        B921D98A2546C3FF008F120B /* JLJailBreak.m in Sources */ = {isa = PBXBuildFile; fileRef = B921D9892546C3FF008F120B /* JLJailBreak.m */; };
        B921D98B2546C3FF008F120B /* JLJailBreak.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = B921D9882546C3FF008F120B /* JLJailBreak.h */; };
/* End PBXBuildFile section */
/* Begin PBXCopyFilesBuildPhase section */
        B921D9832546C3FF008F120B /* CopyFiles */ = {
            isa = PBXCopyFilesBuildPhase;
            buildActionMask = 2147483647;
            dstPath = "include/$(PRODUCT_NAME)";
            dstSubfolderSpec = 16;
            files = (
                B921D98B2546C3FF008F120B /* JLJailBreak.h in CopyFiles */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
        B921D9852546C3FF008F120B /* libJailBreak.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libJailBreak.a; sourceTree = BUILT_PRODUCTS_DIR; };
        B921D9882546C3FF008F120B /* JLJailBreak.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JLJailBreak.h; sourceTree = "<group>"; };
        B921D9892546C3FF008F120B /* JLJailBreak.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = JLJailBreak.m; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
        B921D9822546C3FF008F120B /* Frameworks */ = {
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
        B921D97C2546C3FF008F120B = {
            isa = PBXGroup;
            children = (
                B921D9872546C3FF008F120B /* JailBreak */,
                B921D9862546C3FF008F120B /* Products */,
            );
            sourceTree = "<group>";
        };
        B921D9862546C3FF008F120B /* Products */ = {
            isa = PBXGroup;
            children = (
                B921D9852546C3FF008F120B /* libJailBreak.a */,
            );
            name = Products;
            sourceTree = "<group>";
        };
        B921D9872546C3FF008F120B /* JailBreak */ = {
            isa = PBXGroup;
            children = (
                B921D9882546C3FF008F120B /* JLJailBreak.h */,
                B921D9892546C3FF008F120B /* JLJailBreak.m */,
            );
            path = JailBreak;
            sourceTree = "<group>";
        };
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
        B921D9842546C3FF008F120B /* JailBreak */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = B921D98E2546C3FF008F120B /* Build configuration list for PBXNativeTarget "JailBreak" */;
            buildPhases = (
                B921D9812546C3FF008F120B /* Sources */,
                B921D9822546C3FF008F120B /* Frameworks */,
                B921D9832546C3FF008F120B /* CopyFiles */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = JailBreak;
            productName = JailBreak;
            productReference = B921D9852546C3FF008F120B /* libJailBreak.a */;
            productType = "com.apple.product-type.library.static";
        };
/* End PBXNativeTarget section */
/* Begin PBXProject section */
        B921D97D2546C3FF008F120B /* Project object */ = {
            isa = PBXProject;
            attributes = {
                LastUpgradeCheck = 1120;
                ORGANIZATIONNAME = "陈嘉乐";
                TargetAttributes = {
                    B921D9842546C3FF008F120B = {
                        CreatedOnToolsVersion = 11.2.1;
                    };
                };
            };
            buildConfigurationList = B921D9802546C3FF008F120B /* Build configuration list for PBXProject "JailBreak" */;
            compatibilityVersion = "Xcode 9.3";
            developmentRegion = en;
            hasScannedForEncodings = 0;
            knownRegions = (
                en,
                Base,
            );
            mainGroup = B921D97C2546C3FF008F120B;
            productRefGroup = B921D9862546C3FF008F120B /* Products */;
            projectDirPath = "";
            projectRoot = "";
            targets = (
                B921D9842546C3FF008F120B /* JailBreak */,
            );
        };
/* End PBXProject section */
/* Begin PBXSourcesBuildPhase section */
        B921D9812546C3FF008F120B /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                B921D98A2546C3FF008F120B /* JLJailBreak.m in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
        B921D98C2546C3FF008F120B /* 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++14";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = dwarf;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                ENABLE_TESTABILITY = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                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;
                IPHONEOS_DEPLOYMENT_TARGET = 10.0;
                MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
                MTL_FAST_MATH = YES;
                ONLY_ACTIVE_ARCH = YES;
                SDKROOT = iphoneos;
            };
            name = Debug;
        };
        B921D98D2546C3FF008F120B /* 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++14";
                CLANG_CXX_LIBRARY = "libc++";
                CLANG_ENABLE_MODULES = YES;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_ENABLE_OBJC_WEAK = YES;
                CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
                CLANG_WARN_BOOL_CONVERSION = YES;
                CLANG_WARN_COMMA = YES;
                CLANG_WARN_CONSTANT_CONVERSION = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = 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_NON_LITERAL_NULL_CONVERSION = YES;
                CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
                CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
                CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
                CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
                CLANG_WARN_STRICT_PROTOTYPES = YES;
                CLANG_WARN_SUSPICIOUS_MOVE = YES;
                CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
                CLANG_WARN_UNREACHABLE_CODE = YES;
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                ENABLE_NS_ASSERTIONS = NO;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                GCC_C_LANGUAGE_STANDARD = gnu11;
                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;
                IPHONEOS_DEPLOYMENT_TARGET = 10.0;
                MTL_ENABLE_DEBUG_INFO = NO;
                MTL_FAST_MATH = YES;
                SDKROOT = iphoneos;
                VALIDATE_PRODUCT = YES;
            };
            name = Release;
        };
        B921D98F2546C3FF008F120B /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                CODE_SIGN_STYLE = Automatic;
                DEVELOPMENT_TEAM = 259RU5K4MU;
                OTHER_LDFLAGS = "-ObjC";
                PRODUCT_NAME = "$(TARGET_NAME)";
                SKIP_INSTALL = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Debug;
        };
        B921D9902546C3FF008F120B /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                CODE_SIGN_STYLE = Automatic;
                DEVELOPMENT_TEAM = 259RU5K4MU;
                OTHER_LDFLAGS = "-ObjC";
                PRODUCT_NAME = "$(TARGET_NAME)";
                SKIP_INSTALL = YES;
                TARGETED_DEVICE_FAMILY = "1,2";
            };
            name = Release;
        };
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
        B921D9802546C3FF008F120B /* Build configuration list for PBXProject "JailBreak" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B921D98C2546C3FF008F120B /* Debug */,
                B921D98D2546C3FF008F120B /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        B921D98E2546C3FF008F120B /* Build configuration list for PBXNativeTarget "JailBreak" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                B921D98F2546C3FF008F120B /* Debug */,
                B921D9902546C3FF008F120B /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
/* End XCConfigurationList section */
    };
    rootObject = B921D97D2546C3FF008F120B /* Project object */;
}
JailBreak/JailBreak.xcodeproj/project.xcworkspace/contents.xcworkspacedata
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:JailBreak.xcodeproj">
   </FileRef>
</Workspace>
JailBreak/JailBreak.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
New file
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>IDEDidComputeMac32BitWarning</key>
    <true/>
</dict>
</plist>
JailBreak/JailBreak/JLJailBreak.h
New file
@@ -0,0 +1,18 @@
//
//  JLJailBreak.h
//  JLJailBreak
//
//  Created by 陈嘉乐 on 2020/10/26.
//  Copyright © 2020 陈嘉乐. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface JLJailBreak : NSObject
/**
 * 判断设备是否越狱
 */
+ (BOOL)isJailBreak;
@end
JailBreak/JailBreak/JLJailBreak.m
New file
@@ -0,0 +1,116 @@
//
//  JLJailBreak.m
//  JLJailBreak
//
//  Created by 陈嘉乐 on 2020/10/26.
//  Copyright © 2020 陈嘉乐. All rights reserved.
//
#import "JLJailBreak.h"
#import "stdlib.h"
@implementation JLJailBreak
/**
 * 判断设备是否越狱
 */
+ (BOOL)isJailBreak
{
    return  [JLJailBreak isHasReadAppFileAuthority] || [JLJailBreak isHasJailBreakAppOrFile] || [JLJailBreak isHasDyldInsertLibraries];
}
/**
 * 第一种:判断是否有获取其它App权限
 */
+ (BOOL) isHasReadAppFileAuthority
{
    if ([[NSFileManager defaultManager] fileExistsAtPath:@"User/Applications/"]) {
        return YES;
    }else{
        return NO;
    }
}
/**
 * 第二种:判断是否存在apt和Cydia.app或者越狱文件
 */
+(BOOL) isHasJailBreakAppOrFile{
    BOOL isJailBreak = NO;
    NSString *cydiaPath = @"/Applications/Cydia.app";
    NSString *aptPath = @"/private/var/lib/apt/";
    if ([[NSFileManager defaultManager] fileExistsAtPath:cydiaPath]||[[NSFileManager defaultManager] fileExistsAtPath:aptPath]) {
        isJailBreak = YES;
    }else{
        NSFileManager *fileManager=[NSFileManager defaultManager];
        NSArray *pathArray = @[@"/etc/ssh/sshd_config",
                               @"/usr/libexec/ssh-keysign",
                               @"/usr/sbin/sshd",
                               @"/usr/sbin/sshd",
                               @"/bin/sh",
                               @"/bin/bash",
                               @"/etc/apt",
                               @"/Application/Cydia.app/",
                               @"/Library/MobileSubstrate/MobileSubstrate.dylib"
                               ];
        for (NSString *path in pathArray) {
            isJailBreak = [fileManager fileExistsAtPath:path];
            // 如果存在这些目录,就是已经越狱
            if (isJailBreak) {
                break;
            }
        }
    }
    return isJailBreak;
}
/**
 * 第三种:判断环境变量DYLD_INSERT_LIBRARIES
 */
+ (BOOL) isHasDyldInsertLibraries
{
    char *env = getenv("DYLD_INSERT_LIBRARIES");
    if (env != NULL) {
        return YES;
    }else{
        return NO;
    }
}
//+ (void)exitApplicationWhenJailBreak{
//
//    if ([JLJailBreak isJailBreak]) {
//
//        AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
//
//        UIAlertController *alertVc = [UIAlertController alertControllerWithTitle:@"提示" message:@"本应用暂不支持在越狱设备上运行,请使用未越狱设备进行重新安装" preferredStyle:UIAlertControllerStyleAlert];
//        UIAlertAction *sureAction = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) {
//            [JLJailBreak exitWithAnimation];
//        }];
//        [alertVc addAction:sureAction];
//
//        [app.window.rootViewController presentViewController:alertVc animated:YES completion:nil];
//
//    }
//
//}
//
//
//+ (void)exitWithAnimation{
//
//    AppDelegate *app = (AppDelegate *)[UIApplication sharedApplication].delegate;
//    UIWindow *window = app.window;
//
//    [UIView animateWithDuration:.35 animations:^{
//        window.alpha = 0;
//        window.frame = CGRectMake(window.frame.size.width/2, window.frame.size.height/2, 0, 0);
//    } completion:^(BOOL finished) {
//        exit(0);
//    }];
//}
@end
libJailBreak.a
Binary files differ